> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Solana Token Trades API V2

> Get a Solana token's trades with signatures, exact amounts, fees, prices and market cap.

A token's trades across every pool, newest first. Each trade has its signature, its exact position on chain (`slot`, `txIndex`, `swapIndex`), USD and SOL prices, market cap and the trader (`wallet`, with `owner` and `feePayer`). Full pages add both legs with exact raw amounts and the owner's balance change, fees and tips, compute and route. Each mint on the page is listed once in `tokens`, each pool once in `pools` and each known wallet once in `wallets`.

A trade against SOL or a stablecoin is listed under the other token. A trade between two tokens is listed under both, as a buy of one and a sell of the other. For every leg of a stablecoin in one pool, use [pool trades](https://docs.solanatracker.io/data-api/trades-v2/token/get-pool-trades.md).

## SDK Example

```typescript
import { Client } from '@solana-tracker/data-api';

const client = new Client({ apiKey: 'YOUR_API_KEY' });

const data = await client.getTokenTradesV2('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN', {
  limit: 100,
  arbitrage: true, // Adds arbitrage through the token in the page's slots.
});

// Pages can be empty while more remain: client.iterateTokenTradesV2() follows nextCursor for you.
```


## OpenAPI

````yaml /data-api/trades-v2/openapi.json get /v2/trades/{token}
openapi: 3.1.0
info:
  title: Solana Tracker Trades API v2
  version: 2.0.0
  description: >-
    Solana trades with signature, exact on-chain order, prices, market cap,
    exact raw amounts, the owner's balance change, fees and tips, compute and
    route. Token, pool and wallet details are listed once per page. Live trades
    in the same format are on the Datastream `v2:` rooms.
  contact:
    email: contact@solanatracker.io
servers:
  - url: https://data.solanatracker.io
    description: Production server
security:
  - apiKey: []
tags:
  - name: Token
    description: Trades of a token, optionally in one pool or by one wallet.
  - name: Wallet
    description: A wallet's trades across every token.
paths:
  /v2/trades/{token}:
    get:
      tags:
        - Token
      summary: Get Token Trades
      description: A token's trades across every pool, newest first, in the v2 format.
      operationId: getTokenTradesV2
      parameters:
        - $ref: '#/components/parameters/Token'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Cursor'
        - $ref: '#/components/parameters/SortDirection'
        - $ref: '#/components/parameters/TimeFrom'
        - $ref: '#/components/parameters/TimeTo'
        - $ref: '#/components/parameters/Fields'
        - $ref: '#/components/parameters/Enrich'
        - $ref: '#/components/parameters/Arbitrage'
      responses:
        '200':
          $ref: '#/components/responses/TradesPage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
      x-codeSamples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getTokenTradesV2('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN',
            {
              limit: 100,
              arbitrage: true, // Adds arbitrage through the token in the page's slots.
            });


            // Pages can be empty while more remain:
            client.iterateTokenTradesV2() follows nextCursor for you.
      x-code-samples:
        - lang: typescript
          label: SDK
          source: >
            import { Client } from '@solana-tracker/data-api';


            const client = new Client({ apiKey: 'YOUR_API_KEY' });


            const data = await
            client.getTokenTradesV2('6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN',
            {
              limit: 100,
              arbitrage: true, // Adds arbitrage through the token in the page's slots.
            });


            // Pages can be empty while more remain:
            client.iterateTokenTradesV2() follows nextCursor for you.
components:
  parameters:
    Token:
      name: token
      in: path
      required: true
      schema:
        type: string
        default: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
      description: Token mint address.
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 500
        default: 100
      description: Trades per page, up to 500. Default 100.
    Cursor:
      name: cursor
      in: query
      schema:
        type: string
      description: >-
        `nextCursor` of the previous page, unchanged. Keep the other parameters
        the same between pages. Cursors from the `/trades` routes do not work
        here.
    SortDirection:
      name: sortDirection
      in: query
      schema:
        type: string
        enum:
          - DESC
          - ASC
        default: DESC
      description: '`DESC` for newest first (default) or `ASC` for oldest first.'
    TimeFrom:
      name: time_from
      in: query
      schema:
        type: integer
      description: Only trades at or after this time, in Unix seconds.
    TimeTo:
      name: time_to
      in: query
      schema:
        type: integer
      description: >-
        Only trades at or before this time, in Unix seconds. A `time_to` before
        `time_from` returns 400.
    Fields:
      name: fields
      in: query
      schema:
        type: string
        enum:
          - full
          - basic
        default: full
      description: >-
        `basic` returns lighter pages: trades without `from`, `to`, `fees`,
        `compute` and `route`, no `pools` or `wallets` map, and only name,
        symbol, decimals, image and supply in `tokens`.
    Enrich:
      name: enrich
      in: query
      schema:
        type: string
        enum:
          - identity
      description: >-
        With `fields=basic`, `identity` adds the `wallets` map. Full pages
        always include it.
    Arbitrage:
      name: arbitrage
      in: query
      schema:
        type: boolean
        default: false
      description: >-
        Adds an `arbitrage` array next to `trades`: arbitrage transactions
        through this token (and the pool or wallet of the route) in the slots
        the page's trades span. Consecutive pages cover those slots with no gap
        or overlap unless `arbitrageComplete` is false. Arbitrage is never in
        `trades` or in volume.
  responses:
    TradesPage:
      description: A page of trades.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/TradesV2Response'
          examples:
            full:
              summary: Full page (default)
              value:
                trades:
                  - tx: >-
                      5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW
                    slot: 470027315
                    txIndex: 312
                    swapIndex: 0
                    time: 1794733462000
                    type: sell
                    wallet: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    owner: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    feePayer: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    token: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                    amount: 90
                    priceUsd: 6.002467911111111
                    priceSol: 0.03285243233052986
                    marketCapUsd: 6002464620.378128
                    quoteToken: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    quoteAmount: 540.222112
                    quotePriceUsd: 1
                    volumeUsd: 540.222112
                    volumeSol: 2.956718909747688
                    solPriceUsd: 182.71
                    program: meteora-dlmm
                    platform: axiom
                    pools:
                      - 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2
                    roundTrip: false
                    relayed: false
                    priceEstimated: false
                    noPool: false
                    transferFee: false
                    from:
                      mint: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                      decimals: 6
                      amount: 90
                      amountRaw: '90000000'
                      priceUsd: 6.002467911111111
                      residualRaw: '0'
                      walletChangeRaw: '-90000000'
                    to:
                      mint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      decimals: 6
                      amount: 540.222112
                      amountRaw: '540222112'
                      priceUsd: 1
                      residualRaw: '0'
                      walletChangeRaw: '540222112'
                    fees:
                      txLamports: 105000
                      priorityLamports: 100000
                      signatures: 1
                      tipLamports: 1000000
                      tipService: jito
                      platformFeeRaw: '2956624'
                      platformFeeMint: So11111111111111111111111111111111111111112
                      platformFeeApp: axiom
                      totalUsd: 0.742099
                    compute:
                      unitsConsumed: 148213
                      unitLimit: 200000
                      unitPriceMicroLamports: 500000
                    route:
                      programId: LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo
                      router: null
                      priceMint: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                      instructionIndex: 3
                      txPrograms:
                        - ComputeBudget111111111111111111111111111111
                        - LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo
                        - TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                        - '11111111111111111111111111111111'
                  - tx: >-
                      3wpLJJVCb7Z5ANgtqqkJxkmhEh1y5yvE4GkPESuAtjQWbqFFd2PAzhouVh3Yu4EwTWYXtytptjFy8DHU3L8s6fMg
                    slot: 470027315
                    txIndex: 187
                    swapIndex: 0
                    time: 1794733462000
                    type: buy
                    wallet: FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF
                    owner: FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF
                    feePayer: HjMhpGkbtBfrbmSSmjN3dGdXrdXAvwPgt2YqUP2GjZpF
                    token: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                    amount: 30.481902
                    priceUsd: 5.994048534110503
                    priceSol: 0.03280635178211648
                    marketCapUsd: 5994045247.993275
                    quoteToken: So11111111111111111111111111111111111111112
                    quoteAmount: 1
                    quotePriceUsd: 182.71
                    volumeUsd: 182.71
                    volumeSol: 1
                    solPriceUsd: 182.71
                    program: jupiter
                    platform: null
                    pools:
                      - 8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj
                      - 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2
                    roundTrip: false
                    relayed: true
                    priceEstimated: false
                    noPool: false
                    transferFee: false
                    from:
                      mint: So11111111111111111111111111111111111111112
                      decimals: 9
                      amount: 1
                      amountRaw: '1000000000'
                      priceUsd: 182.71
                      residualRaw: '2039280'
                      walletChangeRaw: '-1002039280'
                    to:
                      mint: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                      decimals: 6
                      amount: 30.481902
                      amountRaw: '30481902'
                      priceUsd: 5.994048534110503
                      residualRaw: '0'
                      walletChangeRaw: '30481902'
                    fees:
                      txLamports: 10000
                      priorityLamports: 0
                      signatures: 2
                      tipLamports: 0
                      tipService: null
                      platformFeeRaw: '0'
                      platformFeeMint: null
                      platformFeeApp: null
                      totalUsd: 0.001827
                    compute:
                      unitsConsumed: 211873
                      unitLimit: 400000
                      unitPriceMicroLamports: 0
                    route:
                      programId: JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4
                      router: jupiter
                      priceMint: So11111111111111111111111111111111111111112
                      instructionIndex: 2
                      txPrograms:
                        - ComputeBudget111111111111111111111111111111
                        - JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4
                        - CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK
                        - LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo
                        - TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
                tokens:
                  6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN:
                    name: OFFICIAL TRUMP
                    symbol: TRUMP
                    decimals: 6
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Farweave.net%2FVQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw
                    supply: 999999451.77
                    uri: >-
                      https://arweave.net/cSCP0h2n1crjeSWE9KF-XtLciJalDNFs7Vf-Sm0NNY0
                    description: null
                    creator: null
                    createdOn: null
                    twitter: null
                    telegram: null
                    website: https://gettrumpmemes.com
                  EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:
                    name: USD Coin
                    symbol: USDC
                    decimals: 6
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v%2Flogo.png
                    supply: 8873651024.53
                    uri: null
                    description: null
                    creator: null
                    createdOn: null
                    twitter: null
                    telegram: null
                    website: null
                  So11111111111111111111111111111111111111112:
                    name: Wrapped SOL
                    symbol: SOL
                    decimals: 9
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FSo11111111111111111111111111111111111111112%2Flogo.png
                    supply: 551203887.41
                    uri: null
                    description: null
                    creator: null
                    createdOn: null
                    twitter: null
                    telegram: null
                    website: null
                pools:
                  9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2:
                    market: meteora-dlmm
                    tokenAddress: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                    quoteToken: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    liquidityUsd: 41872931.44
                    lpBurn: 0
                    createdAt: 1737165082000
                wallets:
                  F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi:
                    type: axiom
                    tags:
                      - axiom
                    platforms:
                      - axiom
                nextCursor: >-
                  eyJzbG90Ijo0NzAwMjczMTUsInR4SW5kZXgiOjE4Nywic3dhcEluZGV4IjowLCJzaWRlIjoiYnV5In0
                hasNextPage: true
                sortDirection: DESC
            basic:
              summary: fields=basic
              value:
                trades:
                  - tx: >-
                      5V4apVkgHf49J5acYPiuh5rB89EGsF8ocSysgnD9vFfZsTtDamhN3MFDKJSq7Dn7Z6Y5XhjghuVYuvvYWnSFpnvW
                    slot: 470027315
                    txIndex: 312
                    swapIndex: 0
                    time: 1794733462000
                    type: sell
                    wallet: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    owner: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    feePayer: F7R61te4Ac8xZ4pfkJUdF6iaaHy9tnM8nVRUPv8H8EMi
                    token: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                    amount: 90
                    priceUsd: 6.002467911111111
                    priceSol: 0.03285243233052986
                    marketCapUsd: 6002464620.378128
                    quoteToken: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
                    quoteAmount: 540.222112
                    quotePriceUsd: 1
                    volumeUsd: 540.222112
                    volumeSol: 2.956718909747688
                    solPriceUsd: 182.71
                    program: meteora-dlmm
                    platform: axiom
                    pools:
                      - 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2
                    roundTrip: false
                    relayed: false
                    priceEstimated: false
                    noPool: false
                    transferFee: false
                  - tx: >-
                      3wpLJJVCb7Z5ANgtqqkJxkmhEh1y5yvE4GkPESuAtjQWbqFFd2PAzhouVh3Yu4EwTWYXtytptjFy8DHU3L8s6fMg
                    slot: 470027315
                    txIndex: 187
                    swapIndex: 0
                    time: 1794733462000
                    type: buy
                    wallet: FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF
                    owner: FbMxP3GVq8TQ36nbYgx4NP9iygMpwAwFWJwW81ioCiSF
                    feePayer: HjMhpGkbtBfrbmSSmjN3dGdXrdXAvwPgt2YqUP2GjZpF
                    token: 6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN
                    amount: 30.481902
                    priceUsd: 5.994048534110503
                    priceSol: 0.03280635178211648
                    marketCapUsd: 5994045247.993275
                    quoteToken: So11111111111111111111111111111111111111112
                    quoteAmount: 1
                    quotePriceUsd: 182.71
                    volumeUsd: 182.71
                    volumeSol: 1
                    solPriceUsd: 182.71
                    program: jupiter
                    platform: null
                    pools:
                      - 8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj
                      - 9d9mb8kooFfaD3SctgZtkxQypkshx6ezhbKio89ixyy2
                    roundTrip: false
                    relayed: true
                    priceEstimated: false
                    noPool: false
                    transferFee: false
                tokens:
                  6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN:
                    name: OFFICIAL TRUMP
                    symbol: TRUMP
                    decimals: 6
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Farweave.net%2FVQrPjACwnQRmxdKBTqNwPiyo65x7LAT773t8Kd7YBzw
                    supply: 999999451.77
                  EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:
                    name: USD Coin
                    symbol: USDC
                    decimals: 6
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v%2Flogo.png
                    supply: 8873651024.53
                  So11111111111111111111111111111111111111112:
                    name: Wrapped SOL
                    symbol: SOL
                    decimals: 9
                    image: >-
                      https://image.solanatracker.io/proxy?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolana-labs%2Ftoken-list%2Fmain%2Fassets%2Fmainnet%2FSo11111111111111111111111111111111111111112%2Flogo.png
                    supply: 551203887.41
                nextCursor: >-
                  eyJzbG90Ijo0NzAwMjczMTUsInR4SW5kZXgiOjE4Nywic3dhcEluZGV4IjowLCJzaWRlIjoiYnV5In0
                hasNextPage: true
                sortDirection: DESC
    BadRequest:
      description: >-
        Invalid address, limit, cursor, sort direction, fields value or time
        range.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Invalid time range. time_from is after time_to
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: Trades are briefly unavailable. Retry after `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: integer
            example: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Trades are temporarily unavailable, please retry
  schemas:
    TradesV2Response:
      type: object
      required:
        - trades
        - tokens
        - nextCursor
        - hasNextPage
        - sortDirection
      properties:
        trades:
          type: array
          items:
            $ref: '#/components/schemas/TradeV2'
        tokens:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TradeTokenV2'
          description: >-
            Each mint on the page, once, by mint address: the traded tokens and
            their quote tokens.
        pools:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/TradePoolV2'
          description: The page's pools, by pool address. Left out with `fields=basic`.
        wallets:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/WalletIdentityV2'
          description: >-
            Known wallets on the page, by the `wallet` field of each trade. With
            `fields=basic`, only with `enrich=identity`.
        nextCursor:
          type:
            - string
            - 'null'
          description: Pass as `cursor` for the next page. Null when there is none.
        hasNextPage:
          type: boolean
          description: A page can be short or empty and still have a next page.
        sortDirection:
          type: string
          enum:
            - DESC
            - ASC
        arbitrage:
          type: array
          items:
            $ref: '#/components/schemas/ArbitrageV2'
          description: >-
            Only with `arbitrage=true`: arbitrage through the token in the slots
            the page's trades span, in the page's order, at most 500. Each leg
            carries its own decimals.
        arbitrageComplete:
          type: boolean
          description: >-
            Only with `arbitrage=true`. False when the search stopped early or
            failed.
        arbitrageFromSlot:
          type:
            - integer
            - 'null'
          description: Only with `arbitrage=true`. Lowest slot searched.
        arbitrageToSlot:
          type:
            - integer
            - 'null'
          description: >-
            Only with `arbitrage=true`. Highest slot searched. Null on the first
            page of a `DESC` request.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
    TradeV2:
      type: object
      description: >-
        One swap. A trade between two tokens is two trades: a buy of one and a
        sell of the other.
      required:
        - tx
        - slot
        - txIndex
        - swapIndex
        - time
        - type
        - wallet
        - owner
        - feePayer
        - token
        - amount
        - priceUsd
        - priceSol
        - marketCapUsd
        - quoteToken
        - quoteAmount
        - quotePriceUsd
        - volumeUsd
        - volumeSol
        - solPriceUsd
        - program
        - platform
        - pools
        - roundTrip
        - relayed
        - priceEstimated
        - noPool
        - transferFee
      properties:
        tx:
          type:
            - string
            - 'null'
          description: Transaction signature. Null when it is not known.
        slot:
          type: integer
          description: Slot of the block.
        txIndex:
          type: integer
          description: Position of the transaction in its block.
        swapIndex:
          type: integer
          description: Position of the swap in its transaction.
        time:
          type: integer
          description: >-
            Block time in Unix milliseconds. Many trades share a time: order by
            `slot`, `txIndex` and `swapIndex`.
        type:
          type: string
          description: Buy or sell of `token`.
          enum:
            - buy
            - sell
        wallet:
          type: string
          description: >-
            The trader: `owner`, or `feePayer` when the owner is a program
            vault.
        owner:
          type: string
          description: The account whose token balances changed.
        feePayer:
          type: string
          description: >-
            The account that signed and paid the transaction fee. Differs from
            `owner` on relayed and routed trades.
        token:
          type: string
          description: Mint of the traded token. Its metadata is in `tokens`.
        amount:
          type: number
          description: Amount of `token`, in whole tokens.
        priceUsd:
          type:
            - number
            - 'null'
          description: >-
            USD price of `token` at the trade. Null when the trade could not be
            priced.
        priceSol:
          type:
            - number
            - 'null'
          description: Price of `token` in SOL at the trade.
        marketCapUsd:
          type:
            - number
            - 'null'
          description: >-
            `priceUsd` times the token's current supply. Null when either is
            unknown.
        quoteToken:
          type: string
          description: Mint of the other side of the swap. Its metadata is in `tokens`.
        quoteAmount:
          type: number
          description: Amount of `quoteToken`, in whole tokens.
        quotePriceUsd:
          type:
            - number
            - 'null'
          description: USD price of `quoteToken` at the trade.
        volumeUsd:
          type: number
          description: USD value of the trade. 0 when it could not be priced.
        volumeSol:
          type:
            - number
            - 'null'
          description: Value of the trade in SOL.
        solPriceUsd:
          type:
            - number
            - 'null'
          description: SOL price in USD at the trade.
        program:
          type: string
          description: >-
            The program that made the swap, such as `pumpfun-amm`,
            `meteora-dlmm` or `jupiter`.
        platform:
          type:
            - string
            - 'null'
          description: >-
            The trading app the trade went through, such as `axiom`, `photon` or
            `gmgn`, when it is known.
        pools:
          type: array
          items:
            type: string
          description: Pools the swap went through, in order.
        roundTrip:
          type: boolean
          description: >-
            The same transaction also traded this token the other way in the
            same pool.
        relayed:
          type: boolean
          description: Someone other than `owner` paid the transaction fee.
        priceEstimated:
          type: boolean
          description: >-
            Priced through another token's USD price instead of a SOL or
            stablecoin leg, so less exact.
        noPool:
          type: boolean
          description: The pool could not be identified. `pools` may be empty.
        transferFee:
          type: boolean
          description: A Token-2022 transfer fee was withheld on this swap.
        from:
          oneOf:
            - $ref: '#/components/schemas/TradeLegV2'
            - type: 'null'
          description: >-
            What went into the swap. Left out with `fields=basic`. Null when the
            details of this trade are not available.
        to:
          oneOf:
            - $ref: '#/components/schemas/TradeLegV2'
            - type: 'null'
          description: >-
            What came out of the swap. Left out with `fields=basic`. Null when
            the details of this trade are not available.
        fees:
          oneOf:
            - $ref: '#/components/schemas/TradeFeesV2'
            - type: 'null'
          description: >-
            Fees of the whole transaction, repeated on each of its swaps. Left
            out with `fields=basic`. Null when the details of this trade are not
            available.
        compute:
          oneOf:
            - $ref: '#/components/schemas/TradeComputeV2'
            - type: 'null'
          description: >-
            Left out with `fields=basic`. Null when the details of this trade
            are not available.
        route:
          oneOf:
            - $ref: '#/components/schemas/TradeRouteV2'
            - type: 'null'
          description: >-
            Left out with `fields=basic`. Null when the details of this trade
            are not available.
    TradeTokenV2:
      type: object
      description: Token metadata, current at the time of the request.
      required:
        - name
        - symbol
        - decimals
        - image
        - supply
      properties:
        name:
          type:
            - string
            - 'null'
        symbol:
          type:
            - string
            - 'null'
        decimals:
          type:
            - integer
            - 'null'
        image:
          type:
            - string
            - 'null'
        supply:
          type:
            - number
            - 'null'
          description: Current supply, in whole tokens.
        uri:
          type:
            - string
            - 'null'
          description: >-
            Metadata URI. This and the fields below are left out with
            `fields=basic`.
        description:
          type:
            - string
            - 'null'
          description: At most 2,000 characters.
        creator:
          type:
            - string
            - 'null'
        createdOn:
          type:
            - string
            - 'null'
        twitter:
          type:
            - string
            - 'null'
        telegram:
          type:
            - string
            - 'null'
        website:
          type:
            - string
            - 'null'
    TradePoolV2:
      type: object
      description: The pool as it is now, not at the time of the trade.
      required:
        - market
        - tokenAddress
        - quoteToken
        - liquidityUsd
        - lpBurn
        - createdAt
      properties:
        market:
          type:
            - string
            - 'null'
          description: DEX of the pool.
        tokenAddress:
          type:
            - string
            - 'null'
        quoteToken:
          type:
            - string
            - 'null'
        liquidityUsd:
          type:
            - number
            - 'null'
        lpBurn:
          type:
            - number
            - 'null'
          description: Percentage of LP tokens burned.
        createdAt:
          type:
            - integer
            - 'null'
          description: Unix milliseconds.
    WalletIdentityV2:
      type: object
      description: >-
        What is known about a wallet: KOL profile, trading platforms, developer
        or pool labels, bots and SNS name. Only known fields are returned.
        Current labels, not a snapshot at the time of the trade.
      properties:
        type:
          type: string
          description: >-
            Primary label for single-badge UIs, such as `kol`, `bot`, `pool`,
            `developer` or a platform tag.
        tags:
          type: array
          items:
            type: string
          examples:
            - - kol
              - axiom
              - sns
        name:
          type: string
        twitter:
          type: string
        avatar:
          type: string
        platforms:
          type: array
          items:
            type: string
        platformProfiles:
          type: object
          additionalProperties:
            type: object
            additionalProperties: true
        sns:
          type: object
          properties:
            domain:
              type: string
              examples:
                - trader.sol
        developer:
          type: object
          properties:
            token:
              type:
                - string
                - 'null'
            via:
              type: array
              items:
                type: string
            pools:
              type: array
              items:
                type: string
            creationTx:
              type:
                - string
                - 'null'
            createdAt:
              type:
                - integer
                - 'null'
              description: Unix timestamp in seconds.
        pool:
          type: object
          properties:
            program:
              type:
                - string
                - 'null'
            poolAddress:
              type:
                - string
                - 'null'
        exchange:
          type: object
          description: Known centralized exchange hot wallet label, when known.
          properties:
            name:
              type:
                - string
                - 'null'
        bot:
          type: object
          properties:
            name:
              type:
                - string
                - 'null'
            avatar:
              type:
                - string
                - 'null'
              format: uri
        hacker:
          type: object
          description: Curated exploit/scam wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
        spamDusting:
          type: object
          description: Curated spam-dusting wallet label, when known.
          properties:
            label:
              type:
                - string
                - 'null'
    ArbitrageV2:
      type: object
      description: >-
        One arbitrage transaction: its swaps end in the mint they started with.
        Never counted in trades or volume.
      required:
        - tx
        - slot
        - txIndex
        - time
        - type
        - wallet
        - traders
        - feePayer
        - token
        - decimals
        - amountIn
        - amountInRaw
        - amountOut
        - amountOutRaw
        - profit
        - profitRaw
        - netProfit
        - netProfitRaw
        - profitUsd
        - netProfitUsd
        - solPriceUsd
        - flashLoan
        - loss
        - legs
        - loans
        - fees
        - compute
        - txPrograms
      properties:
        tx:
          type: string
          description: Transaction signature.
        slot:
          type: integer
        txIndex:
          type: integer
        time:
          type: integer
          description: Block time in Unix milliseconds.
        type:
          type: string
          enum:
            - arbitrage
        wallet:
          type: string
        traders:
          type: array
          items:
            type: string
        feePayer:
          type: string
        token:
          type: string
          description: The mint the profit is in.
        decimals:
          type: integer
        amountIn:
          type: number
        amountInRaw:
          type: string
          description: In base units, as a string.
        amountOut:
          type: number
        amountOutRaw:
          type: string
          description: In base units, as a string.
        profit:
          type: number
        profitRaw:
          type: string
          description: In base units, as a string.
        netProfit:
          type: number
          description: >-
            What the traders kept: profit less the tips, fees and sweeps they
            paid, network fee not counted. Can be negative.
        netProfitRaw:
          type: string
          description: In base units, as a string.
        profitUsd:
          type:
            - number
            - 'null'
        netProfitUsd:
          type:
            - number
            - 'null'
          description: >-
            `netProfit` in USD at the same price as `profitUsd`. Null when
            `profitUsd` is.
        solPriceUsd:
          type:
            - number
            - 'null'
        flashLoan:
          type: boolean
        loss:
          type: boolean
        legs:
          type: array
          items:
            type: object
            required:
              - program
              - programId
              - pool
              - from
              - to
            properties:
              program:
                type:
                  - string
                  - 'null'
              programId:
                type: string
              pool:
                type:
                  - string
                  - 'null'
              from:
                type: object
                required:
                  - mint
                  - decimals
                  - amount
                  - amountRaw
                properties:
                  mint:
                    type: string
                  decimals:
                    type: integer
                  amount:
                    type: number
                  amountRaw:
                    type: string
                    description: In base units, as a string.
              to:
                type: object
                required:
                  - mint
                  - decimals
                  - amount
                  - amountRaw
                properties:
                  mint:
                    type: string
                  decimals:
                    type: integer
                  amount:
                    type: number
                  amountRaw:
                    type: string
                    description: In base units, as a string.
        loans:
          type: array
          items:
            type: object
            required:
              - programId
              - mint
              - borrowedRaw
              - repaidRaw
            properties:
              programId:
                type: string
              mint:
                type: string
              borrowedRaw:
                type: string
                description: In base units, as a string.
              repaidRaw:
                type: string
                description: In base units, as a string.
        fees:
          type: object
          required:
            - txLamports
            - tipLamports
            - tipService
            - sideSolOutLamports
            - sideSolInLamports
            - sweptRaw
          properties:
            txLamports:
              type: integer
            tipLamports:
              type: integer
            tipService:
              type:
                - string
                - 'null'
            sideSolOutLamports:
              type: integer
              description: SOL sent out beside the swaps.
            sideSolInLamports:
              type: integer
              description: SOL received beside the swaps.
            sweptRaw:
              type: string
              description: Profit swept to another wallet, in base units, as a string.
        compute:
          $ref: '#/components/schemas/TradeComputeV2'
        txPrograms:
          type: array
          items:
            type: string
    TradeLegV2:
      type: object
      description: One side of a swap, with exact amounts.
      required:
        - mint
        - decimals
        - amount
        - amountRaw
        - priceUsd
        - residualRaw
        - walletChangeRaw
      properties:
        mint:
          type: string
        decimals:
          type: integer
        amount:
          type: number
          description: In whole tokens.
        amountRaw:
          type: string
          description: In base units, as a string.
        priceUsd:
          type:
            - number
            - 'null'
          description: USD price of this mint at the trade. Null when it has none.
        residualRaw:
          type: string
          description: >-
            Other movement of this mint in the same transaction, beside the
            swap, such as rent, tips or a platform fee. In base units, as a
            string.
        walletChangeRaw:
          type: string
          description: >-
            The owner's balance change in this mint over the whole transaction,
            negative on `from`. Includes rent and tips, not the network fee. For
            SOL, lamports and wrapped SOL count together. In base units, as a
            string.
    TradeFeesV2:
      type: object
      description: Fees of the transaction.
      required:
        - txLamports
        - priorityLamports
        - signatures
        - tipLamports
        - tipService
        - platformFeeRaw
        - platformFeeMint
        - platformFeeApp
        - totalUsd
      properties:
        txLamports:
          type: integer
          description: Network fee in lamports, priority fee included.
        priorityLamports:
          type: integer
          description: Priority fee in lamports.
        signatures:
          type: integer
          description: Number of signatures on the transaction.
        tipLamports:
          type: integer
          description: Tip paid to a landing service, in lamports.
        tipService:
          type:
            - string
            - 'null'
          description: >-
            The landing service that was tipped, such as `jito` or
            `helius-sender`.
        platformFeeRaw:
          type: string
          description: >-
            Fee paid to the trading app, in `platformFeeMint` base units, as a
            string. `0` when none was found.
        platformFeeMint:
          type:
            - string
            - 'null'
          description: Mint the platform fee was paid in.
        platformFeeApp:
          type:
            - string
            - 'null'
          description: >-
            The app that received the platform fee, such as `axiom` or `fomo`.
            Null when none was found.
        totalUsd:
          type:
            - number
            - 'null'
          description: >-
            Network fee, tip and platform fee in USD. A platform fee in a mint
            with no price on this trade is left out.
    TradeComputeV2:
      type: object
      required:
        - unitsConsumed
        - unitLimit
        - unitPriceMicroLamports
      properties:
        unitsConsumed:
          type: integer
          description: Compute units the transaction used.
        unitLimit:
          type:
            - integer
            - 'null'
          description: Compute unit limit the transaction set. Null when it set none.
        unitPriceMicroLamports:
          type:
            - integer
            - 'null'
          description: >-
            Compute unit price in micro-lamports. Null when a priority fee was
            paid but the price is not known.
    TradeRouteV2:
      type: object
      required:
        - programId
        - router
        - priceMint
        - instructionIndex
        - txPrograms
      properties:
        programId:
          type:
            - string
            - 'null'
          description: Address of the program in `program`.
        router:
          type:
            - string
            - 'null'
          description: The router the swap went through, when there is one.
        priceMint:
          type:
            - string
            - 'null'
          description: The mint the trade's price was derived from.
        instructionIndex:
          type: integer
          description: Index of the top-level instruction that holds the swap.
        txPrograms:
          type: array
          items:
            type: string
          description: Every program the transaction called.
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.