Get Volume Analytics

GET https://api.sfox.com/v1/analytics/volume

Retrieve historical exchange volume analytics by currency.

Data is not forward-filled and, therefore, may be incomplete. e.g. no data will be returned for an interval during which 0 trades were recorded.

Responses are limited to 500 results. If the requested start_time , end_time , and interval will result in more than 500 results, your request will be rejected. To retrieve data over a larger time range, you will need to make multiple requests with new start_time / end_time ranges. Results may precede your specified start_time value.

Query Parameters

NameTypeDescription

start_time required

timestamp

Unix timestamp (ms) of the first datapoint to return

end_time

timestamp

Unix timestamp (ms) of the last datapoint to return

interval required

int

Duration of each datapoint in seconds (i.e. interval = 86400 = daily volume data)

(60 | 3600 | 86400)

currency required

string

The currency to retrieve data for (i.e. eth)

net

boolean

Retrieve "net volume" (net buy/sell volume) or "gross volume" (total traded volume)

(true | false)

default = false

by_exchange

boolean

Retrieve total market volume or volume by exchange

(true | false) default = false

Response Body

KeyDescription

timstamp

The Unix timestamp (ms) of the beginning of the interval

exchange

The exchange associated with the volume data (only returned if by_exchange = true in the request)

volume

The quantity of the specified currency traded during this interval

usd_notional

The USD value of the quantity of the specified currency traded during this interval

Responses

200: Gross Volume
//interval=86400&net=false&by_exchange=false
{
    "data": [
        {
            "timestamp": 1689206400000,
            "volume": 324557.08579094,
            "usd_notional": 633266040.1379151
        },
        {
            "timestamp": 1689292800000,
            "volume": 244525.03601467,
            "usd_notional": 482590637.1359154
        },
        {
            "timestamp": 1689379200000,
            "volume": 54552.86708131,
            "usd_notional": 105565737.85291174
        },
        {
            "timestamp": 1689465600000,
            "volume": 59350.88216805,
            "usd_notional": 114595675.74899396
        },
        {
            "timestamp": 1689552000000,
            "volume": 174930.26792864,
            "usd_notional": 333229267.7529286
        }
    ]
}
200: Net Volume
//interval=86400&net=true&by_exchange=false
{
    "data": [
        {
            "timestamp": 1689206400000,
            "volume": 23385.45910848,
            "usd_notional": 45629005.60418967
        },
        {
            "timestamp": 1689292800000,
            "volume": 487.77127065,
            "usd_notional": 962657.4526522362
        },
        {
            "timestamp": 1689379200000,
            "volume": 541.72807017,
            "usd_notional": 1048302.8024520231
        }
    ]
}
200: Gross Volume by Exchange
//interval=86400&net=false&by_exchange=true
{
    "data": [
        {
            "timestamp": 1689206400000,
            "volumes": [
                {
                    "exchange": "bitfinex",
                    "volume": 22064.11327313,
                    "usd_notional": 43050835.2870461
                },
                {
                    "exchange": "bitflyer",
                    "volume": 675.3754941,
                    "usd_notional": 1317772.3842097484
                },
                {
                    "exchange": "bitstamp",
                    "volume": 20403.74974212,
                    "usd_notional": 39811183.82200494
                },
                {
                    "exchange": "coinbase",
                    "volume": 256084.73824809,
                    "usd_notional": 499664851.6698304
                },
                {
                    "exchange": "gemini",
                    "volume": 2893.597955,
                    "usd_notional": 5645901.442109791
                },
                {
                    "exchange": "kraken",
                    "volume": 22435.5110785,
                    "usd_notional": 43775495.53271416
                }
            ]
        },
        {
            "timestamp": 1689292800000,
            "volumes": [
                {
                    "exchange": "bitfinex",
                    "volume": 16438.39032122,
                    "usd_notional": 32442539.986500576
                },
                {
                    "exchange": "bitflyer",
                    "volume": 282.4740891,
                    "usd_notional": 557486.2715692556
                },
                {
                    "exchange": "bitstamp",
                    "volume": 11499.07793533,
                    "usd_notional": 22694393.333832387
                },
                {
                    "exchange": "coinbase",
                    "volume": 194042.96600292,
                    "usd_notional": 382960044.1791732
                },
                {
                    "exchange": "gemini",
                    "volume": 1941.224533,
                    "usd_notional": 3831169.1901688813
                },
                {
                    "exchange": "kraken",
                    "volume": 20320.9031331,
                    "usd_notional": 40105004.17467113
                }
            ]
        }
    ]
}
200: Net Volume by Exchange
//interval=86400&net=true&by_exchange=true
{
    "data": [
        {
            "timestamp": 1689206400000,
            "volumes": [
                {
                    "exchange": "bitfinex",
                    "volume": -6825.69751025,
                    "usd_notional": -13318096.02295827
                },
                {
                    "exchange": "bitflyer",
                    "volume": 405.5878231,
                    "usd_notional": 791370.7816200266
                },
                {
                    "exchange": "bitstamp",
                    "volume": 2621.19358698,
                    "usd_notional": 5114394.218867672
                },
                {
                    "exchange": "coinbase",
                    "volume": 25602.95423207,
                    "usd_notional": 49955715.503370605
                },
                {
                    "exchange": "gemini",
                    "volume": 278.054287,
                    "usd_notional": 542531.1755026139
                },
                {
                    "exchange": "kraken",
                    "volume": 1303.36668958,
                    "usd_notional": 2543089.9477870227
                }
            ]
        },
        {
            "timestamp": 1689292800000,
            "volumes": [
                {
                    "exchange": "bitfinex",
                    "volume": -3128.46017994,
                    "usd_notional": -6174278.168395847
                },
                {
                    "exchange": "bitflyer",
                    "volume": 81.1377265,
                    "usd_notional": 160132.098396033
                },
                {
                    "exchange": "bitstamp",
                    "volume": 211.54172883,
                    "usd_notional": 417495.3181104044
                },
                {
                    "exchange": "coinbase",
                    "volume": 4753.17507186,
                    "usd_notional": 9380789.074742645
                },
                {
                    "exchange": "gemini",
                    "volume": -341.430339,
                    "usd_notional": -673841.3682337883
                },
                {
                    "exchange": "kraken",
                    "volume": -1088.1927376,
                    "usd_notional": -2147639.5019672103
                }
            ]
        }
    ]
}
401: Unauthorized
{
    "error": "invalid token. check authorization header."
}
422: Unprocessable Entity
{
    "error": "currency must be a non-blank string"
}

Example Request

curl -H 'Authorization: Bearer <API_TOKEN>'
'https://api.sfox.com/v1/analytics/volume?currency=btc&interval=86400&start_time=1689279127000&end_time=1689624727000&net=true'

Last updated