Skip to main content
POST
/
account
/
positions
/
{token_address}
cURL
curl --request POST \
  --url https://core-api-dev.vanish.trade/account/positions/{token_address} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "timestamp": "<string>",
  "user_address": "<string>",
  "signature": "<string>"
}'
{
  "token_address": "<string>",
  "sol_bought": "<string>",
  "usd_bought": 123,
  "tokens_bought": "<string>",
  "sol_sold": "<string>",
  "usd_sold": 123,
  "tokens_sold": "<string>",
  "tokens_remaining": "<string>",
  "token_decimals": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "last_updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

x-api-key
string
header
required

Path Parameters

token_address
string
required

The token mint address for which to retrieve the user's position.

Body

application/json

Request payload for querying a specific token's position.

timestamp
required

The current timestamp in milliseconds used for signature verification. Can be provided as a string or a number.

user_address
string
required

The Solana wallet address of the user.

signature
string
required

Signature of the 'read:{timestamp}' string signed using the user's wallet.

Response

A successful response containing the user's position for the specified token.

token_address
string
required

The token mint address associated with this position.

sol_bought
string<int64>
required

Total amount of SOL spent buying this token (in lamports).

usd_bought
number
required

Total USD value spent buying this token, based on SOL price at the time of transactions.

tokens_bought
string<int64>
required

Total number of tokens purchased (in smallest units).

sol_sold
string<int64>
required

Total amount of SOL received from selling this token (in lamports).

usd_sold
number
required

Total USD value received from selling this token, based on SOL price at the time of transactions.

tokens_sold
string<int64>
required

Total number of tokens sold (in smallest units).

tokens_remaining
string<uint64>
required

Current remaining token balance for this token (in smallest units).

token_decimals
integer
required

Number of decimal places used by the token (e.g., 9 for SOL).

created_at
string<date-time> | null

Timestamp of the first trade related to this token position (ISO 8601 format).

last_updated_at
string<date-time> | null

Timestamp of the latest trade related to this token position (ISO 8601 format).

I