Step API
  • Overview
    • Introduction
    • Getting Started
    • JavaScript SDK
    • Purchasing
    • Credit Usage
    • Rate Limiting
    • Authentication
  • API Reference
    • Portfolio
    • TX History
Powered by GitBook
On this page
  1. API Reference

Portfolio

These endpoints are related to the current contents of a wallet.

PreviousAuthenticationNextTX History

Last updated 3 months ago

Purchasing

Access can be purchased through our API Dashboard website. See the page for more info.

Authentication

Access to the API requires a valid API key which can be generated after purchasing a plan on our

General Information

The information provided is as of last confirmed slot when not stale.

website
Purchasing

Gets portfolio positions for a specified wallet

get

Gets portfolio positions for a specified wallet, including summary with total values and staleness statuses

Authorizations
Path parameters
addressstringRequired

Wallet address to fetch data for

Query parameters
maxWaitTimenumberOptional

Max wait time in seconds. The response will wait for all fetchers to complete, or till the max wait time is reached before returning data. Default is 0.

staleTimenumberOptional

Stale time in seconds. Amount of time data is considered fresh after being fetched. Once time has elapsed, data will be marked as stale. Default is 60 seconds. Minimum allowed value is 15 seconds.

showSmallBalancesbooleanOptional

Show balances worth less than $0.99 USD equivalent in the response. Default is true.

showcNFTsbooleanOptional

Show compressed NFTs in the response. Doesn't affect nft module credit cost. Option is provided for spam reduction. Default is true.

modulesstringOptional

All modules included by default. If specified, only the provided modules will be returned and charged credits for. Full list with credit costs here.

excludeModulesstringOptional

All modules included by default. If specified, provided modules will be excluded and only included modules will be charged credits for. Full list with credit costs here

apiKeystringOptional

API key for the request

Responses
200
Successful portfolio response with positions
application/json
get
GET /v1/portfolio/all/{address} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

Successful portfolio response with positions

{
  "wallet": "text",
  "positions": {
    "token": {
      "spot": [
        {
          "asset": [
            {
              "title": "Bitcoin",
              "symbol": "BTC",
              "mint": "text",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
              "underlyings": [
                "text"
              ]
            }
          ],
          "balance": 100,
          "decimals": 6,
          "programId": 1,
          "priceInUSD": 2,
          "priceChange24hPct": -0.1,
          "valueInUSD": 100
        }
      ],
      "yield": [
        {
          "asset": [
            {
              "title": "Bitcoin",
              "symbol": "BTC",
              "mint": "text",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
              "underlyings": [
                "text"
              ]
            }
          ],
          "balance": 100,
          "decimals": 6,
          "programId": 1,
          "priceInUSD": 2,
          "priceChange24hPct": -0.1,
          "valueInUSD": 100,
          "apr": 0.1
        }
      ]
    },
    "domain": [
      {
        "title": "example.sol",
        "accountAddress": "BuwhgpzWdzMjhpFsNB1JgGUEj9gfKhfyRbwoBnAkUGpQ"
      }
    ],
    "dex": {
      "order": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "assets": [
            {
              "symbol": "BTC",
              "name": "Bitcoin",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png"
            },
            {
              "symbol": "USDT",
              "name": "Tether",
              "logoURI": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png"
            }
          ],
          "isBid": true,
          "size": 100,
          "offerPriceInUSD": 1.2,
          "marketAddress": "text"
        }
      ],
      "unsettledBalance": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "assets": [
            {
              "symbol": "BTC",
              "name": "Bitcoin",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
              "balance": 0.1
            },
            {
              "symbol": "USDT",
              "name": "Tether",
              "logoURI": "https://assets.coingecko.com/coins/images/325/large/Tether-logo.png",
              "balance": 100
            }
          ],
          "marketAddress": "text"
        }
      ]
    },
    "liquidity": {
      "amm": [
        {
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 100,
          "curveType": 0,
          "apr": 0.1,
          "balance": 100,
          "asset": {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ]
          }
        }
      ],
      "clmm": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "poolInfoPda": "text",
          "positionMintAddress": "text",
          "underlyings": [
            {
              "title": "Bitcoin",
              "symbol": "BTC",
              "mint": "text",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
              "underlyings": [
                "text"
              ],
              "balance": 1
            }
          ],
          "curveType": 1,
          "apr": 1,
          "isInRange": true,
          "upperLimit": 1,
          "lowerLimit": 1,
          "currentPrice": 1,
          "rewardAssets": [
            {
              "title": "Bitcoin",
              "symbol": "BTC",
              "mint": "text",
              "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
              "underlyings": [
                "text"
              ],
              "balance": 1
            }
          ],
          "pendingRewardInUSD": {}
        }
      ]
    },
    "staking": [
      {
        "platform": {
          "title": "Raydium",
          "url": "https://raydium.io"
        },
        "valueInUSD": 100,
        "asset": {
          "title": "Bitcoin",
          "symbol": "BTC",
          "mint": "text",
          "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
          "underlyings": [
            "text"
          ]
        },
        "apr": 0.1,
        "balance": 100,
        "rewardAssets": [
          {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ],
            "balance": 1
          }
        ],
        "pendingRewardInUSD": 1.2
      }
    ],
    "farm": [
      {
        "title": "Raydium LP",
        "platform": {
          "title": "Raydium",
          "url": "https://raydium.io"
        },
        "valueInUSD": 1000,
        "farmAddress": "text",
        "asset": [
          {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ]
          }
        ],
        "apr": 0.1,
        "balance": 100,
        "rewardAssets": [
          {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ],
            "balance": 1
          }
        ],
        "pendingRewardInUSD": 1.2
      }
    ],
    "vault": [
      {
        "title": "Raydium LP",
        "platform": {
          "title": "Raydium",
          "url": "https://raydium.io"
        },
        "valueInUSD": 1000,
        "vaultAddress": "text",
        "underlyings": [
          {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ],
            "balance": 1
          }
        ],
        "apr": 0.1,
        "pendingRewardInUSD": 1.2
      }
    ],
    "margin": [
      {
        "title": "Raydium LP",
        "platform": {
          "title": "Raydium",
          "url": "https://raydium.io"
        },
        "valueInUSD": 1000,
        "perpetuals": [
          {
            "title": "SOL-PERP",
            "valueInUSD": 100,
            "logoURI": "https://coin-images.coingecko.com/coins/images/4128/large/solana.png?1718769756",
            "isLong": true,
            "size": 100,
            "notionalValue": 100,
            "avgEntryPrice": 10.5
          }
        ],
        "orders": [
          {
            "title": "SOL-PERP",
            "isBid": true,
            "size": 100,
            "offerPrice": 10.5,
            "logoURI": "https://coin-images.coingecko.com/coins/images/4128/large/solana.png?1718769756"
          }
        ],
        "balances": [
          {
            "asset": [
              {
                "title": "Bitcoin",
                "symbol": "BTC",
                "mint": "text",
                "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
                "underlyings": [
                  "text"
                ]
              }
            ],
            "balance": 100,
            "apr": 0.1,
            "valueInUSD": 100
          }
        ]
      }
    ],
    "lending": {
      "tokenPosition": [
        {
          "asset": {
            "symbol": "USDC",
            "name": "USD Coin",
            "logoURI": "https://assets.coingecko.com/coins/images/6319/large/USD_Coin_icon.png"
          },
          "balance": 100,
          "apr": 0.1,
          "valueInUSD": 1.2,
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          }
        }
      ],
      "leverageFarmPosition": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "asset": {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ]
          },
          "debtInUSD": 100,
          "equityInUSD": 100
        }
      ],
      "nftPosition": [
        {
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 100,
          "mint": {},
          "nftName": "NFT Name",
          "collectionName": "Collection Name",
          "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
          "loanAmount": 100,
          "loanEndTs": {},
          "interestAmountInSol": 100,
          "status": "borrowed"
        }
      ]
    },
    "validator": [
      {
        "title": "Solana",
        "valueInUSD": 100,
        "validatorAddress": "StepeLdhJ2znRjHcZdjwMWsC4nTRURNKQY8Nca82LJp",
        "stakeAccountAddress": "3kwR413BhEsTE6vMkze22qKT4txnFZPcsh7RBooFcfTE",
        "authorizedStakerAddress": "stWirqFCf2Uts1JBL1Jsd3r6VBWhgnpdPxCTe1MFjrq",
        "avg24hRewardInUSD": 0.02,
        "balance": 100.123456789,
        "activeStakeBalance": 100.123456789,
        "inactiveBalance": 0.0228228,
        "status": "inactive",
        "logoURI": "https://s3.amazonaws.com/keybase_processed_uploads/91868aefb0dbe77847d806a85d7b8305_360_360.jpg"
      }
    ],
    "nftmarket": {
      "singleOrder": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "logoURI": "https://arweave.net/123.jpg",
          "isBid": true,
          "floorPriceInSOL": 10,
          "offerPriceInSOL": 10
        }
      ],
      "poolOrder": [
        {
          "title": "Raydium LP",
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 1000,
          "logoURI": "https://arweave.net/123.jpg",
          "nftsHeld": 0,
          "mmProfitInSOL": 0,
          "balance": 100,
          "isSharedEscrow": false,
          "floorPriceInSOL": 10,
          "mmProfitInUSD": 100,
          "apy": 10
        }
      ],
      "escrowAccount": [
        {
          "platform": {
            "title": "Raydium",
            "url": "https://raydium.io"
          },
          "valueInUSD": 100,
          "asset": {
            "title": "Bitcoin",
            "symbol": "BTC",
            "mint": "text",
            "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
            "underlyings": [
              "text"
            ]
          },
          "balance": 100
        }
      ]
    },
    "nft": [
      {
        "collectionName": "Collection Name",
        "isCompressed": false,
        "asset": {
          "title": "Bitcoin",
          "symbol": "BTC",
          "mint": "text",
          "logoURI": "https://assets.coingecko.com/coins/images/1/large/bitcoin.png",
          "underlyings": [
            "text"
          ]
        },
        "metadataUrl": "https://arweave.net/123",
        "balance": 1,
        "floorPriceInSOL": 10,
        "valueInUSD": 100
      }
    ]
  },
  "summary": {
    "positions": {
      "token": {
        "spot": {
          "totalValue": 1
        },
        "yield": {
          "totalValue": 1,
          "estimated24hReward": 1
        }
      },
      "domain": {
        "totalValue": 1
      },
      "dex": {
        "order": {
          "totalValue": 1
        },
        "unsettledBalance": {
          "totalValue": 1
        }
      },
      "liquidity": {
        "amm": {
          "totalValue": 1,
          "estimated24hReward": 1
        },
        "clmm": {
          "totalValue": 1,
          "estimated24hReward": 1,
          "totalPendingReward": 1
        }
      },
      "staking": {
        "totalValue": 1,
        "estimated24hReward": 1,
        "totalPendingReward": 1
      },
      "farm": {
        "totalValue": 1,
        "estimated24hReward": 1,
        "totalPendingReward": 1
      },
      "vault": {
        "totalValue": 1,
        "estimated24hReward": 1
      },
      "margin": {
        "totalValue": 1,
        "estimated24hReward": 1
      },
      "lending": {
        "tokenPosition": {
          "totalValue": 1,
          "estimated24hReward": 1
        },
        "leverageFarmPosition": {
          "totalValue": 1
        },
        "nftPosition": {
          "totalValue": 1
        }
      },
      "validator": {
        "totalValue": 1,
        "estimated24hReward": 1
      },
      "nftmarket": {
        "singleOrder": {
          "totalValue": 1
        },
        "poolOrder": {
          "totalValue": 1,
          "estimated24hReward": 1,
          "totalPendingReward": 1
        },
        "escrowAccount": {
          "totalValue": 1
        }
      },
      "nft": {
        "totalValue": 1
      }
    },
    "aggregated": {
      "netWorth": 1,
      "tokenValue": 1,
      "defiValue": 1,
      "nftDefiValue": 1,
      "nftValue": 1,
      "totalPendingReward": 1,
      "estimated24hReward": 1
    },
    "statuses": {
      "farm": {
        "raydium": {
          "error": null,
          "asOf": 0,
          "duration": 0
        }
      },
      "amm": {
        "solana": {
          "error": null,
          "asOf": 0,
          "duration": 0
        }
      },
      "clmm": {
        "raydium": {
          "error": null,
          "asOf": 0,
          "duration": 0
        }
      },
      "staking": {
        "raydium": {
          "error": null,
          "asOf": 0,
          "duration": 0
        }
      }
    },
    "staleJobs": [
      "text"
    ]
  },
  "status": "text"
}

Invalidates the cache for a specified wallet

delete

Invalidates the cache for a specified wallet. Next GET call will still return cached data if available, but everything will be marked as stale regardless of the data age.

Authorizations
Path parameters
addressstringRequired

Wallet address to invalidate cache for

Responses
200Success
delete
DELETE /v1/portfolio/all/{address} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200Success

No content

  • Purchasing
  • Authentication
  • General Information
  • GETGets portfolio positions for a specified wallet
  • DELETEInvalidates the cache for a specified wallet