Price
Prices
Minutely spot asset and instrument price data.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Minutely spot asset and instrument price data.
wss://analytics-ws.amberdata.com/prices
{"jsonrpc":"2.0","id":1,"method":"subscribe","params":["prices:spot:asset",{"asset":"all"}]}
{"jsonrpc":"2.0","id":1,"method":"subscribe","params":["prices:spot:asset",{"asset":"btc"}]}
| Param | Type | Description |
|---|---|---|
| asset | string | The asset by which to filter. Use all for all assets. |
{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "a3fd4e8d-b344-480f-b1c4-2726c014ae85",
"result": {
"asset": "btc",
"assetArcId": "AMB:BTC000000000",
"priceUSD": 81650.48236869258,
"timestamp": 1777995360000,
"type": "asset",
"volumeAsset": 74.17509235915826
}
}
}
| Field | Type | Description |
|---|---|---|
| asset | string | The asset symbol. |
| assetArcId | string | The Amberdata ARC ID for the asset. |
| priceUSD | number | The USD price of the asset. |
| timestamp | number | The time at which the price update occurred. |
| type | string | The price update type. |
| volumeAsset | number | The asset volume. |
const WebSocket = require('ws');
const ws = new WebSocket('wss://analytics-ws.amberdata.com/prices', {
headers: { 'x-api-key': '<api_key>' }
});
ws.on('open', () => {
ws.send(JSON.stringify({
jsonrpc: '2.0',
method: 'subscribe',
params: ['prices:spot:asset', { asset: 'all' }],
id: 1
}));
});
ws.on('message', data => {
console.log(JSON.stringify(JSON.parse(data), null, 2));
});
{"jsonrpc":"2.0","id":1,"method":"subscribe","params":["prices:spot:instrument",{"instrument":"all"}]}
{"jsonrpc":"2.0","id":1,"method":"subscribe","params":["prices:spot:instrument",{"instrument":"btc_usdt"}]}
| Param | Type | Description |
|---|---|---|
| instrument | string | The instrument by which to filter. Use all for all instruments. |
{
"jsonrpc": "2.0",
"method": "subscription",
"params": {
"subscription": "3276cfc7-0d2d-43bb-8b5a-0ff4f94af296",
"result": {
"arcInstrumentId": "AMB:BTC000000000_AMB:USD000000335",
"instrument": "btc_usdt",
"priceUSD": 81640.61888782766,
"timestamp": 1777995360000,
"type": "instrument",
"volumeAsset": 28.394765248158286
}
}
}
| Field | Type | Description |
|---|---|---|
| arcInstrumentId | string | The Amberdata ARC ID for the instrument. |
| instrument | string | The instrument symbol. |
| priceUSD | number | The USD price of the instrument. |
| timestamp | number | The time at which the price update occurred. |
| type | string | The price update type. |
| volumeAsset | number | The asset volume. |
const WebSocket = require('ws');
const ws = new WebSocket('wss://analytics-ws.amberdata.com/prices', {
headers: { 'x-api-key': '<api_key>' }
});
ws.on('open', () => {
ws.send(JSON.stringify({
jsonrpc: '2.0',
method: 'subscribe',
params: ['prices:spot:instrument', { instrument: 'all' }],
id: 1
}));
});
ws.on('message', data => {
console.log(JSON.stringify(JSON.parse(data), null, 2));
});
Was this page helpful?