Kehittäjäportaali

Get TSV Daily Trading Statistics#

Query daily share volume aggregated by stock and snapshot time, with EOD TVL for each AMM pool. begin / end filter by snapshotTime, and begin must not be later than end. EOD is fixed EST (UTC−5) 00:00, equivalent to UTC 05:00, without daylight-saving changes.

This endpoint is free and requires no login, API key, signature, or payment. The service implements a 2 RPS limit per IP for each endpoint, effective when the corresponding version is deployed. The aggregate 200 RPS limit per endpoint requires an external platform rule and applies when that rule is configured and active. Changing query parameters, cursors, or client keys does not reset the quota. Clients sharing an outbound IP share its quota. Reduce the request rate after a rate-limit failure and retry when quota recovers.

Request URL#

GET
https://web3.okx.com/api/v6/explorer/tsv/daily-statistics

Request Parameters#

ParameterTypeRequiredDescription
stockCodeStringNoStock token code; exact match against stockSymbol
stockTokenAddressStringNoStock token contract address: 0x followed by 40 hexadecimal characters; combined with stockCode when both are supplied
beginStringNoInclusive start of snapshot time, as a 13-digit UTC Unix timestamp in milliseconds
endStringNoInclusive end of snapshot time, as a 13-digit UTC Unix timestamp in milliseconds
limitIntegerNoPage size; default 100, range 1–1000
cursorStringNoNon-negative integer offset represented as a numeric string. Omit it or send "0" on the first request; use the returned non-empty value unchanged for the next page

cursor is a numeric-string offset and does not retain query conditions. Repeat the same filters, time parameters, and limit on subsequent requests, passing the returned non-empty cursor unchanged. An empty response cursor indicates no more records. To keep the time range consistent, explicitly set time bounds on the first request and preserve them on subsequent requests.

If end is omitted, it defaults to the current UTC time in milliseconds. If begin is omitted, it defaults to 29 days before the effective end; both bounds are inclusive. Explicit bounds filter snapshotTime directly, without shifting statistics days or aligning to midnight, and explicit ranges are not restricted to 30 days. limit and cursor count aggregates by stock and snapshot time; LiquidityInfo retains individual pool entries.

Response Parameters#

Successful responses use a code, msg, and data envelope. data is an array containing a paginated result object. All numeric response fields are represented as strings. Missing volumes return an empty string "", distinct from the string "0" for a true zero; missing values are not filled with zero.

ParameterTypeDescription
limitStringPage size
cursorStringNumeric-string offset for the next page; an empty string indicates no more records
dailyStatisticsListArrayRecords on the current page
> dateStringStart of the statistics day, as a UTC Unix timestamp in milliseconds; 24 hours before the corresponding snapshotTime
> totalDailyShareVolumeStringTotal executed shares across pools for the same stock and snapshot time, in shares; an empty string "" if any pool volume is missing, "0" for a true zero total
> snapshotTimeStringActual EOD snapshot business time, as a UTC Unix timestamp in milliseconds
> LiquidityInfoArrayEOD liquidity information per pool; the initial letter is uppercase
> > eodPoolSizeStringPool EOD TVL, in USD
> > paymentSymbolStringPayment asset symbol
> > paymentTokenAddressStringPayment asset contract address
> > stockSymbolStringStock token symbol
> > stockTokenAddressStringStock token contract address
> > dailyShareVolumeStringDaily executed shares for this pool, in shares; "0" for a true zero, an empty string "" when missing
> > poolIdStringbytes32 PoolId
> > poolManagerStringPoolManager contract address

No matching records produces an empty list and an empty cursor. Upstream failures or unavailable data must be treated as errors, not as empty results or zero trading activity.

Error Handling#

ScenarioHTTP statusBusiness codeAction
Rate limit exceeded42950011Requests too frequent; reduce the request rate and retry when quota recovers
Invalid parameter40050036Correct the parameters and retry
Rate-limit service unavailable50350001Retry later

Each IP is counted independently for each endpoint in a fixed 1000 ms window starting with the first request.

Upstream query failures return errors, not successful empty lists.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/tsv/daily-statistics?stockCode=AAPLx&limit=100'

Response Example#

This is a structural example. Addresses, trades, and values are illustrative and do not represent actual asset configurations or query results.

json
{
  "code": "0",
  "msg": "",
  "data": [
    {
      "limit": "100",
      "cursor": "",
      "dailyStatisticsList": [
        {
          "date": "1793509200000",
          "totalDailyShareVolume": "15230.75",
          "snapshotTime": "1793595600000",
          "LiquidityInfo": [
            {
              "eodPoolSize": "2500000.50",
              "paymentSymbol": "USDG",
              "paymentTokenAddress": "0x0000000000000000000000000000000000000003",
              "stockSymbol": "AAPLx",
              "stockTokenAddress": "0x9d275685dc284c8eb1c79f6aba7a63dc75ec890a",
              "dailyShareVolume": "15230.75",
              "poolId": "0x0000000000000000000000000000000000000000000000000000000000000001",
              "poolManager": "0x360e68faccca8ca495c1b759fd9eee466db9fb32"
            }
          ]
        }
      ]
    }
  ]
}