Credit Usage

The Portfolio API operates on a credit-based system, where each request consumes credits based on the modules included in the response. This ensures efficient usage and cost control for developers.

How Credits Are Consumed

  • Credits are only charged when all returned data is fresh (i.e., no stale data in the response).

  • Each module has an associated credit cost, which is deducted when queried.

  • If a request includes multiple modules, the total credit cost is the sum of all queried modules.

Usage monitoring

Credit usage and remaining subscription time can be tracked using the endpoint below.

get
Authorizations
Query parameters
apiKeystringRequired

API key for the request

Responses
200

Successful usage response

application/json
get
GET /retail-api/usage?apiKey=text HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

Successful usage response

{
  "periodCreditsUsed": 1,
  "totalPeriodCredits": 1,
  "currentPeriodExpiry": 1,
  "finalPeriodExpiry": 1
}

Coverage

User portfolio data is grouped into one of several modules. some of which have subgroups. A single module or subgroup will contain positions fetched from a number DeFi providers.

A complete list of providers can be found here

Module Credit Costs

Below are the current credit costs per module:

Module Key
Desciption
Credit Cost

"dex"

Decentralized exchanges. e.g. Openbook

1

"domain"

Solana domain name services

1

"farm"

Yield farms

1

"lending"

Lending platforms

1

'liquidity"

Liquidity pools

1

"margin"

Margin platforms, e.g. Drift

2

"nft"

Metaplex NFTs and cNFTs

1

"nftmarket"

NFT DeFi platforms, e.g. Tensor

1

"staking"

Single-sided staking protocols

1

"token"

Spot and Yield Bearing fungible tokens

2

"validator"

Staked solana validator positions

1

"vault"

Automated strategies, e.g. Hawksight

1

Last updated