Figment Solana API

The Solana API from Figment — 12 operation(s) for solana.

OpenAPI Specification

figment-solana-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Figment Solana API
  version: 2.0.0+1190.1
  termsOfService: https://figment.io/staking-terms-of-use
servers:
- url: https://api.figment.io
tags:
- name: Solana
paths:
  /solana/stake:
    post:
      summary: Stake
      tags:
      - Solana
      operationId: solana-stake
      parameters: []
      responses:
        '201':
          description: Staking transaction created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/solana_transaction'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                funding_account:
                  type: string
                  example: your-funding-account-pubkey
                vote_account:
                  type: string
                  example: your-vote-account-pubkey
                amount_sol:
                  type: number
                  example: 10.5
                network:
                  type: string
                  example: mainnet
                  enum:
                  - mainnet
                  - testnet
                  - devnet
                nonce_account:
                  type: string
                  example: your-nonce-account-pubkey
                  nullable: true
                  description: Pubkey of the on-chain nonce account. Enables offline signing without the 60–90s blockhash expiry.
                nonce_authority:
                  type: string
                  example: your-nonce-authority-pubkey
                  nullable: true
                  description: Pubkey of the account authorized to advance the nonce. Defaults to the fee payer if omitted.
              required:
              - funding_account
              - vote_account
              - amount_sol
              - network
  /solana/broadcast:
    post:
      summary: Broadcast
      tags:
      - Solana
      operationId: solana-broadcast
      parameters: []
      responses:
        '201':
          description: Transaction broadcasted
          content:
            application/json:
              schema:
                type: object
                properties:
                  transaction_hash:
                    type: string
                    example: CvjSFceVoRm8QJUtp1tVTZc1EABSL3HPyrZ9PXckLrJHU5hV3akB5StKJeeSsoUpPVvpzPjZwMi5YYt3e3oq7wE
                    description: The hash of the transaction
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                transaction_payload:
                  type: string
                  example: your-signed-transaction-payload
                network:
                  type: string
                  example: mainnet
                  enum:
                  - mainnet
                  - testnet
                  - devnet
              required:
              - transaction_payload
              - network
  /solana/undelegate:
    post:
      summary: Undelegate
      tags:
      - Solana
      operationId: solana-undelegate
      parameters: []
      responses:
        '201':
          description: undelegate transaction created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/solana_transaction'
        '422':
          description: Stake account is not active
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stake_account:
                  type: string
                  example: your-stake-account-pubkey
                network:
                  type: string
                  example: mainnet
                  enum:
                  - mainnet
                  - testnet
                  - devnet
                nonce_account:
                  type: string
                  example: your-nonce-account-pubkey
                  nullable: true
                  description: Pubkey of the on-chain nonce account. Enables offline signing without the 60–90s blockhash expiry.
                nonce_authority:
                  type: string
                  example: your-nonce-authority-pubkey
                  nullable: true
                  description: Pubkey of the account authorized to advance the nonce. Defaults to the fee payer if omitted.
              required:
              - stake_account
              - network
  /solana/withdraw:
    post:
      summary: Withdraw
      tags:
      - Solana
      operationId: solana-withdraw
      parameters: []
      responses:
        '201':
          description: withdraw transaction created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/solana_transaction'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                stake_account:
                  type: string
                  example: your-stake-account-pubkey
                recipient_account:
                  type: string
                  example: your-recipient-account-pubkey
                amount_sol:
                  type: number
                  example: 10.5
                network:
                  type: string
                  example: mainnet
                  enum:
                  - mainnet
                  - testnet
                  - devnet
                nonce_account:
                  type: string
                  example: your-nonce-account-pubkey
                  nullable: true
                  description: Pubkey of the on-chain nonce account. Enables offline signing without the 60–90s blockhash expiry.
                nonce_authority:
                  type: string
                  example: your-nonce-authority-pubkey
                  nullable: true
                  description: Pubkey of the account authorized to advance the nonce. Defaults to the fee payer if omitted.
              required:
              - stake_account
              - recipient_account
              - amount_sol
              - network
  /solana/stakes:
    get:
      summary: Stakes
      tags:
      - Solana
      operationId: solana-stakes
      parameters:
      - name: network
        in: query
        required: true
        schema:
          type: string
          enum:
          - mainnet
          - testnet
          - devnet
      - name: groups
        in: query
        required: false
        schema:
          type: string
        description: Filter using comma-separated group uuids.
        example: be982d21-ff93-4092-b56a-f40bac865400,a0ba2333-c541-41f0-ad89-e29a268a3ee5
      - name: stake_authority
        in: query
        required: false
        schema:
          type: string
        description: Filter by stake authority public key.
        example: 4qjmvyPVkJG5Jc9g8fY3QHxYm4rKz2JtEpVc7WxD5nE3
      - name: withdraw_authority
        in: query
        required: false
        schema:
          type: string
        description: Filter by withdraw authority public key.
        example: 7sJmFvyPVkJG5Jc9g8fY3QHxYm4rKz2JtEpVc7WxD5nE3
      responses:
        '200':
          description: List Stakes
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/tracked_solana_stake_account'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
  /solana/rewards:
    post:
      summary: Rewards
      operationId: sol-rewards
      tags:
      - Solana
      parameters: []
      responses:
        '200':
          description: A rewards result set with metadata.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        stake_account:
                          type: string
                          description: Returns the stake account that received the rewards.
                        validator:
                          type: string
                          description: Returns the validator that distributed the rewards.
                        stake_authority:
                          type: string
                          description: Returns the stake authority of the stake account.
                        withdraw_authority:
                          type: string
                          description: Returns the withdraw authority of the stake account.
                        epoch:
                          type: string
                          description: The epoch number. Only available on epoch time_rollup
                        timestamp:
                          type: string
                          description: The timestamp at the end of the epoch.
                        rewards:
                          type: array
                          items:
                            type: object
                            description: The formula to compute the final rewards in the currency unit is numeric x 10^(-exp).
                            properties:
                              text:
                                type: string
                                description: The textual version of the other fields in the rewards object.
                              currency:
                                type: string
                              numeric:
                                type: integer
                              exp:
                                type: integer
                              type:
                                type: string
                                description: The type of reward. Either "mev" or "protocol"
                        balances:
                          type: array
                          items:
                            type: object
                            description: The account's current balance.
                            properties:
                              text:
                                type: string
                                description: The textual version of the other fields in the rewards object.
                              currency:
                                type: string
                              numeric:
                                type: integer
                              exp:
                                type: integer
                  meta:
                    type: object
                    properties:
                      protocol:
                        type: string
                        description: The name of the protocol queried.
                      network:
                        type: string
                        description: The name of the network queried.
                      time_rollup:
                        type: string
                        description: The unit of the rollup.
              example:
                data:
                - stake_account: 2yoofMr4N78WPxVK8MU8Yy26dfRZbPw5WDzTRCA9uv95
                  rewards:
                  - text: '0.001390828'
                    currency: SOL
                    numeric: 1390828
                    exp: 9
                    type: protocol
                  - text: '0.000220507'
                    currency: SOL
                    numeric: 220507
                    exp: 9
                    type: mev
                  balances:
                  - text: '3.340325069'
                    currency: SOL
                    numeric: 3340325069
                    exp: 9
                  epoch: 584
                  timestamp: '2024-03-07T18:42:36Z'
                  validator: CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1
                  stake_authority: EToJFrGakntRnwL8LLikLgXoAfBjgwYhwwYvfVRcrgLL
                  withdraw_authority: EToJFrGakntRnwL8LLikLgXoAfBjgwYhwwYvfVRcrgLL
                meta:
                  protocol: solana
                  network: mainnet
                  time_rollup: epoch
        '400':
          description: Parameter error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
        '500':
          description: System error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
              - $ref: '#/components/schemas/sol_rewards_req_by_stake_account'
              - $ref: '#/components/schemas/sol_rewards_req_by_stake_authority'
              - $ref: '#/components/schemas/sol_rewards_req_by_withdraw_authority'
              - $ref: '#/components/schemas/sol_rewards_req_by_groups'
  /solana/rewards_rates:
    get:
      tags:
      - Solana
      summary: Reward Rates
      operationId: sol-rewards-rates
      parameters:
      - in: query
        name: figment
        schema:
          type: boolean
          default: false
        required: false
        description: If `true`, for [our main public validator](https://www.validators.app/validators/Fd7btgySsrjuo25CJCj7oE7VPMyezDhnx7pZkj2v69Nk) only. Otherwise, for the whole network.
      - in: query
        name: avg
        schema:
          type: string
          enum:
          - 7d
          default: 7d
        required: false
        description: If `7d`, returns the 7 days moving average. If not, returns the daily spot rates.
      - in: query
        name: decimal
        schema:
          type: integer
          default: 2
        required: false
        description: Specifies the number of desired decimal to be returned. Accepts values between 2 (default) and 5.
      responses:
        '200':
          description: List of rewards rates
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          example: '2023-07-05'
                          description: Specific date associated with value (staking reward rates).
                        value:
                          type: string
                          example: '10.37'
                          description: Staking reward rates, in %.
                        protocol:
                          type: string
                          example: '6.81'
                          description: Protocol (inflationary) portion of the staking reward rates, in %.
                        mev:
                          type: string
                          example: '2.91'
                          description: Mev portion of the staking reward rates, in %.
              example:
                data:
                - date: '2024-11-26'
                  value: '10.37'
                  protocol: '6.81'
                  mev: '2.91'
                - date: '2024-11-25'
                  value: '10.37'
                  protocol: '6.81'
                  mev: '2.91'
                - date: '2024-11-24'
                  value: '10.60'
                  protocol: '6.82'
                  mev: '3.78'
                - date: '2024-11-23'
                  value: '11.71'
                  protocol: '6.87'
                  mev: '4.84'
                - date: '2024-11-21'
                  value: '11.93'
                  protocol: '6.78'
                  mev: '4.65'
        '400':
          description: Parameter error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
        '500':
          description: System error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rewards_error'
  /solana/allocated_rewards:
    post:
      summary: Allocated Rewards
      tags:
      - Solana
      operationId: solana-allocated-rewards
      parameters: []
      responses:
        '200':
          description: Success
          content:
            application/x-ndjson:
              schema:
                type: object
                properties:
                  stake_account:
                    type: string
                    example: HsHmF24mA182PgXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                  stake_authority:
                    type: string
                    example: AQbak1dRySjKfSXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                  withdraw_authority:
                    type: string
                    nullable: true
                    example: AQbak1dRySjKfSXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                  validator:
                    type: string
                    example: GvZEwtCHZ7YtXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                  epoch:
                    type: integer
                    example: 581
                  timestamp:
                    type: string
                    format: date-time
                    example: '2024-03-01T14:58:33Z'
                  rewards:
                    type: array
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          enum:
                          - protocol
                          - mev
                          - priority_fees
                          example: protocol
                        numeric:
                          type: string
                          nullable: true
                          example: '1234567890'
                        exp:
                          type: integer
                          example: 9
                        currency:
                          type: string
                          example: SOL
                      required:
                      - type
                      - exp
                      - currency
                required:
                - stake_account
                - stake_authority
                - epoch
                - timestamp
                - rewards
        '401':
          description: Invalid API key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                network:
                  type: string
                  enum:
                  - mainnet
                  example: mainnet
                  description: Network to query. Only mainnet is supported.
                start:
                  type:
                  - string
                  - integer
                  example: 581
                  description: 'Start of the range. Either an epoch (integer) or a date (YYYY-MM-DD). Maximum range: 90 days or 45 epochs.'
                end:
                  type:
                  - string
                  - integer
                  example: 590
                  description: 'End of the range. Must be the same type as start. Maximum range: 90 days or 45 epochs.'
                stake_accounts:
                  type: array
                  items:
                    type: string
                  example:
                  - HsHmF24mA182Pg...
                  description: Filter results to specific stake account addresses.
                stake_authorities:
                  type: array
                  items:
                    type: string
                  example:
                  - AQbak1dRySjKfS...
                  description: Filter results to specific stake authority addresses.
                withdraw_authorities:
                  type: array
                  items:
                    type: string
                  example:
                  - AQbak1dRySjKfS...
                  description: Filter results to specific withdraw authority addresses.
              required:
              - network
              - start
              - end
  /solana/activities:
    get:
      summary: Activities
      tags:
      - Solana
      operationId: solana-activities
      description: 'Returns Solana staking activities for the authenticated organization.


        ## Activity types


        | `type`         | Description |

        |----------------|-------------|

        | `delegation`   | Stake account delegated to a validator |

        | `undelegation` | Stake account deactivated and removed from validator |

        | `withdrawal`   | SOL withdrawn back to wallet after cooldown |


        All Solana activities are on-chain. `tx.status` reflects the transaction status

        (`in_progress`, `confirmed`, `failed`, `expired`).

        '
      parameters:
      - name: network
        in: query
        schema:
          type: string
          enum:
          - mainnet
          - testnet
          - devnet
        example: mainnet
        required: true
      - name: type
        in: query
        required: false
        schema:
          type: string
          enum:
          - delegation
          - undelegation
          - withdrawal
        description: Filter by activity type.
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - pending
          - complete
          - failed
        description: Filter by activity-life status.
      - name: page
        in: query
        required: false
        style: deepObject
        schema:
          type: object
          properties:
            number:
              type: integer
              example: 2
              minimum: 1
              description: The page number.
            size:
              type: integer
              example: 10
              minimum: 1
              maximum: 100
              description: Number of items to include in the response.
      responses:
        '200':
          description: List of activities, newest first.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      oneOf:
                      - type: object
                        title: Delegation
                        description: Stake account delegated to a validator.
                        properties:
                          id:
                            type: string
                            format: uuid
                            example: 3f1c9b2a-8e4d-4a6b-9c1e-2d5f7a8b0c3d
                            description: Activity UUID.
                          status:
                            type: string
                            enum:
                            - pending
                            - complete
                            - failed
                            example: pending
                            description: Activity-life status (warmup/cooldown), not the on-chain status.
                          network:
                            type: string
                            enum:
                            - mainnet
                            - testnet
                            - devnet
                            example: mainnet
                          protocol:
                            type: string
                            example: solana
                          amount:
                            type: number
                            example: 1.0
                            description: Amount in the asset major unit.
                          currency:
                            type: string
                            example: SOL
                          timestamp:
                            type: string
                            example: '2024-03-12T00:00:00.000Z'
                          estimated_completed_at:
                            type:
                            - string
                            - 'null'
                            description: Estimated activity completion time, when known.
                          delegation_address:
                            type:
                            - string
                            - 'null'
                            description: The wallet that originated the activity — for Solana, the stake authority (not the stake account).
                          tx:
                            type: object
                            description: On-chain transaction axis. Distinct from the activity-life `status`.
                            properties:
                              hash:
                                type:
                                - string
                                - 'null'
                                example: solTxAbc…
                                description: Transaction hash, when one exists.
                              status:
                                type:
                                - string
                                - 'null'
                                enum:
                                - in_progress
                                - confirmed
                                - failed
                                - expired
                                - null
                                example: confirmed
                                description: On-chain/transaction status, resolved via tx-tracking for SOL.
                          details:
                            type:
                            - object
                            - 'null'
                            description: Type-specific details. Null for activity types that have none.
                          type:
                            type: string
                            enum:
                            - delegation
                            example: delegation
                      - type: object
                        title: Undelegation
                        description: Stake account deactivated and removed from validator.
                        properties:
                          id:
                            type: string
                            format: uuid
                            example: 3f1c9b2a-8e4d-4a6b-9c1e-2d5f7a8b0c3d
                            description: Activity UUID.
                          status:
                            type: string
                            enum:
                            - pending
                            - complete
                            - failed
                            example: pending
                            description: Activity-life status (warmup/cooldown), not the on-chain status.
                          network:
                            type: string
                            enum:
                            - mainnet
                            - testnet
                            - devnet
                            example: mainnet
                          protocol:
                            type: string
                            example: solana
                          amount:
                            type: number
                            example: 1.0
                            description: Amount in the asset major unit.
                          currency:
                            type: string
                            example: SOL
                          timestamp:
                            type: string
                            example: '2024-03-12T00:00:00.000Z'
                          estimated_completed_at:
                            type:
                            - string
                            - 'null'
                            description: Estimated activity completion time, when known.
                          delegation_address:
                            type:
                            - string
                            - 'null'
                            description: The wallet that originated the activity — for Solana, the stake authority (not the stake account).
                          tx:
                            type: object
                            description: On-chain transaction axis. Distinct from the activity-life `status`.
                            properties:
                              hash:
                                type:
                                - string
                                - 'null'
                                example: solTxAbc…
                                description: Transaction hash, when one exists.
                              status:
                                type:
                                - string
                                - 'null'
                                enum:
                                - in_progress
                                - confirmed
                                - failed
                                - expired
                                - null
                                example: confirmed
                                description: On-chain/transaction status, resolved via tx-tracking for SOL.
                          details:
                            type:
                            - object
                            - 'null'
                            description: Type-specific details. Null for activity types that have none.
                          type:
                            type: string
                            enum:
                            - undelegation
                            example: undelegation
                      - type: object
                        title: Withdrawal
                        description: SOL withdrawn back to wallet after cooldown.
                        properties:
                          id:
                            type: string
                            format: uuid
                            example: 3f1c9b2a-8e4d-4a6b-9c1e-2d5f7a8b0c3d
                            description: Activity UUID.
                        

# --- truncated at 32 KB (69 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/figment/refs/heads/main/openapi/figment-solana-api-openapi.yml