Tickers
Get tickers for all traded markets
Summary
Marketdata request
Request |
Description |
GET /tickers |
Get an unlimited list of tickers with 24h stats of all traded markets |
Data-service alternative
# |
Request |
Description |
1 |
GET /assets?ticker=* |
Get a list of all assets having a non-empty ticker |
2 |
GET /pairs?pairs={AMOUNT_ASSET_ID}/{PRICE_ASSET_ID}&pairs=... |
Get a list of pairs info with 24h stats by serialized pairs list |
3 |
GET {NODES_URL}/assets/balance/${ISSUER_ADDRESS}/${ASSET_ID} |
Get the asset issuer balance (need for circulating supply value) |
4 |
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sort=asc&limit=1 |
Get the first trade day |
5 |
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sort=desc&limit=1 |
Get the last trade day |
Schemas and examples
Marketdata
Request
GET /tickers
Response schema
[
{
"symbol" : string,
"amountAssetID" : string,
"amountAssetName" : string,
"amountAssetDecimals" : number,
"amountAssetTotalSupply" : string,
"amountAssetMaxSupply" : string,
"amountAssetCirculatingSupply" : string,
"priceAssetID" : string,
"priceAssetName" : string,
"priceAssetDecimals" : number,
"priceAssetTotalSupply" : string,
"priceAssetMaxSupply" : string,
"priceAssetCirculatingSupply" : string,
"24h_open" : string,
"24h_high" : string,
"24h_low" : string,
"24h_close" : string,
"24h_vwap" : string,
"24h_volume" : string,
"24h_priceVolume" : string,
"timestamp" : number
},
...
]
Example
GET /tickers
[
{
"symbol" : "B@/BTC",
"amountAssetID" : "APz41KyoKuBBh8t3oZjqvhbbsg6f63tpZM5Ck5LYx6h",
"amountAssetName" : "B@nkcoin",
"amountAssetDecimals" : 8,
"amountAssetTotalSupply" : "25000000.00000000",
"amountAssetMaxSupply" : "infinite",
"amountAssetCirculatingSupply" : "11411669.00000000",
"priceAssetID" : "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS",
"priceAssetName" : "WBTC",
"priceAssetDecimals" : 8,
"priceAssetTotalSupply" : "21000000.00000000",
"priceAssetMaxSupply" : "21000000.00000000",
"priceAssetCirculatingSupply" : "1769.00000000",
"24h_open" : "0.00040000",
"24h_high" : "0.00040000",
"24h_low" : "0.00040000",
"24h_close" : "0.00040000",
"24h_vwap" : "0.00040000",
"24h_volume" : "40.00000000",
"24h_priceVolume" : "0.01600000",
"timestamp" : 1498798060195
},
...
]
Data-service alternative
Request #1
Data-service Docs for the request
GET /assets?ticker=*
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #2
GET /pairs?pairs={AMOUNT_ASSET_ID}/{PRICE_ASSET_ID}&pairs=...
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
Response schema
{
"__type": "list",
"data": [
{
"__type": "pair",
"data": {
"firstPrice": number,
"lastPrice": number,
"low": number,
"high": number,
"weightedAveragePrice": number,
"volume": number,
"quoteVolume": number,
"volumeWaves": number,
"txsCount": number
}
}
]
}
Request #3
GET {NODES_URL}/assets/balance/{ISSUER_ADDRESS}/{ASSET_ID}
Param |
Type |
Description |
NODES_URL |
string |
Nodes API url (e.g. http://nodes.wavesnodes.com/) |
ISSUER_ADDRES |
string |
Address of an {ASSET_ID} issuer |
ASSET_ID |
string |
Asset ID |
Response schema
{
"address": string,
"assetId": string,
"balance": number
}
Request #4
Data-service Docs for Request
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sort=asc&limit=1
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
Response Schema
{
"__type": "list",
"lastCursor": string,
"data": [
{
"__type": "transaction",
"data": {
"id": string,
"timestamp": Date,
"height": number,
"type": number,
"version": number | null,
"proofs": string[],
"fee": number,
"sender": string,
"senderPublicKey": string,
"buyMatcherFee": number,
"sellMatcherFee": number,
"price": number,
"amount": number,
"order1": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
},
"order2": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
}
}
},
...
]
}
Request #5
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sort=desc&limit=1
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
Response Schema
{
"__type": "list",
"lastCursor": string,
"data": [
{
"__type": "transaction",
"data": {
"id": string,
"timestamp": Date,
"height": number,
"type": number,
"version": number | null,
"proofs": string[],
"fee": number,
"sender": string,
"senderPublicKey": string,
"buyMatcherFee": number,
"sellMatcherFee": number,
"price": number,
"amount": number,
"order1": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
},
"order2": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
}
}
},
...
]
}
Response mapping
Marketdata returns data including information about each of the assets and 24h stats for assets pair, but Data-service can return this data on different requests.
Table legend:
- Request #1 - #1
- Request #2 - #2
- amount asset - (1)
- price asset - (2)
Marketdata |
Data-service |
Description |
symbol |
#1.ticker(1)/#1.ticker(2) |
Take the field ticker from the Request #1; (1) - amount asset, (2) - price asset |
amountAssetID |
#1.id(1) |
id from the Request #1; (1) - amount asset |
amountAssetName |
#1.name(1) |
name from the Request #1; (1) - amount asset |
amountAssetDecimals |
#1.precision(1) |
precision from the Request #1
|
amountAssetTotalSupply |
#1.quantity(1)/10^#1.precision(1) |
Take fields quantity and precision from the Request #1 and calculate amountAssetTotalSupply; (1) - amount asset |
amountAssetMaxSupply |
‘infinity’ or #1.quantity(1)/10^#1.precision(1) |
If the field reissuble (from the Request #1) of an amount asset is equal to true , then amountAssetMaxSupply='infinity' , else take fields quantity and precision from the Request #1 and calculate amountAssetMaxSupply; (1) - amount asset |
amountAssetCirculatingSupply |
#1.quantity(1) - #3.balance(1) |
Take the field quantity from the Request #1 and balance from Request #3, calculate amountAssetCirculatingSupply; (1) - amount asset |
priceAssetID |
#1.id(2) |
id from the Request #1; (2) - price asset |
priceAssetName |
#1.name(2) |
name from the Request #1; (2) - price asset |
priceAssetDecimals |
#1.precision(2) |
precision from the Request #1; (2) - price asset |
priceAssetTotalSupply |
#1.quantity(2)/10^#1.precision(2) |
Take fields quantity and precision from the Request #1 and calculate priceAssetTotalSupply; (2) - price asset |
priceAssetMaxSupply |
‘infinity’ or #1.quantity(2)/10^#1.precision(2) |
If the field reissuble (from the Request #1) of a price asset is equal to true , then priceAssetMaxSupply='infinity' , else take fields quantity and precision from the Request #1 and calculate priceAssetMaxSupply; (2) - price asset |
priceAssetCirculatingSupply |
#1.quantity(2) - #3.balance(2) |
Take the field quantity from the Request #1 and and balance from the Request #3, calculate amountAssetCirculatingSupply |
24h_open |
#2.firstPrice |
firstPrice from the Request #2
|
24h_high |
#2.high |
high from the Request #2
|
24h_low |
#2.low |
low from the Request #2
|
24h_close |
#2.lastPrice |
lastPrice from the Request #2
|
24h_vwap |
#2.weightedAveragePrice |
weightedAveragePrice from the Request #2
|
24h_volume |
#2.volume |
volume from the Request #2
|
24h_priceVolume |
#2.quoteVolume |
quoteVolume from the Request #2
|
timestamp |
Not available |
Just now |
Ticker
Get a ticker for the specified asset pair
Summary
Marketdata request
Request |
Description |
GET /ticker/{AMOUNT_ASSET}/{PRICE_ASSET} |
Get the last {LIMIT} trades |
Data-service alternative
# |
Request |
Description |
1 |
GET /assets?ticker={AMOUNT_ASSET} |
(Optional) Get amount asset info by the ticker |
2 |
GET /assets?ticker={PRICE_ASSET} |
(Optional) Get price asset info by the ticker |
3 |
GET /pairs/{AMOUNT_ASSET_ID}/{PRICE_ASSET_ID} |
Get pair info with 24h stats |
4 |
GET {NODES_URL}/assets/balance/${ISSUER_ADDRESS}/${ASSET_ID} |
Get the asset issuer balance (need for circulating supply value |
Schemas and examples
Marketdata
Request
GET /ticker/{AMOUNT_ASSET}/{PRICE_ASSET}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker or ID |
PRICE_ASSET |
string |
Price asset ticker or ID |
Response schema
{
"symbol" : string,
"amountAssetID" : string,
"amountAssetName" : string,
"amountAssetDecimals" : number,
"amountAssetTotalSupply" : string,
"amountAssetMaxSupply" : string,
"amountAssetCirculatingSupply" : string,
"priceAssetID" : string,
"priceAssetName" : string,
"priceAssetDecimals" : number,
"priceAssetTotalSupply" : string,
"priceAssetMaxSupply" : string,
"priceAssetCirculatingSupply" : string,
"24h_open" : string,
"24h_high" : string,
"24h_low" : string,
"24h_close" : string,
"24h_vwap" : string,
"24h_volume" : string,
"24h_priceVolume" : string,
"timestamp" : number (js timestamp)
}
Example
GET /ticker/WAVES/BTC
{
"symbol" : "WAVES/BTC",
"amountAssetID" : "WAVES",
"amountAssetName" : "WAVES",
"amountAssetDecimals" : 8,
"amountAssetTotalSupply" : "100000000.00000000",
"amountAssetMaxSupply" : "100000000.00000000",
"amountAssetCirculatingSupply" : "100000000.00000000",
"priceAssetID" : "8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS",
"priceAssetName" : "WBTC",
"priceAssetDecimals" : 8,
"priceAssetTotalSupply" : "21000000.00000000",
"priceAssetMaxSupply" : "21000000.00000000",
"priceAssetCirculatingSupply" : "1769.00000000",
"24h_open" : "0.00167870",
"24h_high" : "0.00177000",
"24h_low" : "0.00150001",
"24h_close" : "0.00154037",
"24h_vwap" : "0.00159388",
"24h_volume" : "38772.93226749",
"24h_priceVolume" : "61.79940128",
"timestamp" : 1498798083804
}
Data-service alternative
Request #1
Data-service Docs for Request
GET /assets?ticker={AMOUNT_ASSET}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Example
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": "WAVES",
"id": "WAVES",
"name": "Waves",
"precision": 8,
"description": "",
"height": 0,
"timestamp": "2016-04-11T21:00:00.000Z",
"sender": "",
"quantity": 10000000000000000,
"reissuable": false
}
}
]
}
Request #2
Data-service Docs for Request
GET /assets?ticker={PRICE_ASSET}
Param |
Type |
Description |
PRICE_ASSET |
string |
Price asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #3
Data-service Docs for Request
GET /pairs/{AMOUNT_ASSET_ID}/PRICE_ASSET_ID}
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
Response schema
{
"__type": "pair",
"data": {
"firstPrice": number,
"lastPrice": number,
"low": number,
"high": number,
"weightedAveragePrice": number,
"volume": number,
"quoteVolume": number,
"volumeWaves": number,
"txsCount": number
}
}
Example
GET /pairs/WAVES/8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS
{
"__type": "pair",
"data": {
"firstPrice": 0.0007149,
"lastPrice": 0.00071694,
"low": 0.00070315,
"high": 0.00074959,
"weightedAveragePrice": 0.000720884786947976,
"volume": 73589.23928945,
"quoteVolume": 53.0493630868388,
"volumeWaves": 73589.23928945,
"txsCount": 4629
}
}
Request #4
GET {NODES_URL}/assets/balance/{AMOUNT_ASSET_ISSUER_ADDRESS}/{AMOUNT_ASSET_ID}
Param |
Type |
Description |
NODES_URL |
string |
Nodes url |
AMOUNT_ASSET_ISSUER_ADDRESS |
string |
Address of {AMOUNT_ASSET_ID} issuer |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
Response schema
{
"address": string,
"assetId": string,
"balance": number
}
Request #5
GET {NODES_URL}/assets/balance/{PRICE_ASSET_ISSUER_ADDRESS}/{PRICE_ASSET_ID}
Param |
Type |
Description |
NODES_URL |
string |
Nodes url |
PRICE_ASSET_ISSUER_ADDRESS |
string |
Address of {PRICE_ASSET_ID} issuer |
PRICE_ASSET_ID |
string |
Price asset ID |
Response schema
{
"address": string,
"assetId": string,
"balance": number
}
Response mapping
Table legend:
- Request #1 - #1
- Request #2 - #2
- amount asset - (1)
- price asset - (2)
Marketdata |
Data-service |
Description |
symbol |
#1.ticker/#2.ticker |
Take the field ticker from Request #1 and #2
|
amountAssetID |
#1.id |
id from the Request #1
|
amountAssetName |
#1.name |
name from the Request #1
|
amountAssetDecimals |
#1.precision |
precision from the Request #1
|
amountAssetTotalSupply |
#1.quantity/10^#1.precision |
Take fields quantity and precision from the Request #1 and calculate amountAssetTotalSupply |
amountAssetMaxSupply |
‘infinity’ or #1.quantity/10^#1.precision |
If the field reissuble (from the Request #1) of an amount asset is equal to true , then amountAssetMaxSupply='infinity' , else take fields quantity and precision from the Request #1 and calculate amountAssetMaxSupply |
amountAssetCirculatingSupply |
#1.quantity - #4.balance |
Take the field quantity from the Request #1 and balance from Request #3, calculate amountAssetCirculatingSupply |
priceAssetID |
#2.id |
id from the Request #2
|
priceAssetName |
#2.name |
name from the Request #2
|
priceAssetDecimals |
#2.precision |
precision from the Request #2
|
priceAssetTotalSupply |
#2.quantity/10^#2.precision |
Take fields quantity and precision from the Request #2 and calculate priceAssetTotalSupply |
priceAssetMaxSupply |
‘infinity’ or #2.quantity/10^#2.precision |
If the field reissuble (from the Request #2) of a price asset is equal to true , then priceAssetMaxSupply='infinity' , else take fields quantity and precision from the Request #2 and calculate priceAssetMaxSupply |
priceAssetCirculatingSupply |
#2.quantity - #5.balance |
Take the field quantity from the Request #2 and and balance from the Request #5, calculate amountAssetCirculatingSupply |
24h_open |
#3.firstPrice |
firstPrice from the Request #3
|
24h_high |
#3.high |
high from the Request #3
|
24h_low |
#3.low |
low from the Request #3
|
24h_close |
#3.lastPrice |
lastPrice from the Request #3
|
24h_vwap |
#3.weightedAveragePrice |
weightedAveragePrice from the Request #3
|
24h_volume |
#3.volume |
volume from the Request #3
|
24h_priceVolume |
#3.quoteVolume |
quoteVolume from the Request #3
|
timestamp |
Not available |
Just now |
Trades
Get unconfirmed and confirmed trades for the specified asset pair
Summary
Marketdata request
Request |
Description |
GET /ticker/{AMOUNT_ASSET}/{PRICE_ASSET}/{LIMIT} |
Get the last {LIMIT} trades |
GET /ticker/{AMOUNT_ASSET}/{PRICE_ASSET}/{FROM}/{TO} |
Get trades within the {FROM} / {TO} time range |
Data-service alternative
# |
Request |
Description |
1 |
GET /assets?ticker={AMOUNT_ASSET} |
(Optional) Get amount asset info by the ticker |
2 |
GET /assets?ticker={PRICE_ASSET} |
(Optional) Get price asset info by the ticker |
3 |
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sender={SENDER}&timeStart={TIME_START}&timeEnd={TIME_END}&after={AFTER}&sort={SORT}&limit={LIMIT} |
Get exchange transactions for specified parameters |
Schemas and examples
Marketdata
Request #1
GET /trades/{AMOUNT_ASSET}/{PRICE_ASSET}/{LIMIT}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker or ID |
PRICE_ASSET |
string |
Price asset ticker or ID |
LIMIT |
number |
Requested amount of trades |
Request #2
GET /trades/{AMOUNT_ASSET}/{PRICE_ASSET}/{FROM}/{TO}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker or ID |
PRICE_ASSET |
string |
Price asset ticker or ID |
FROM |
number |
Start Unix epoch timestamp in milliseconds |
TO |
number |
End Unix epoch timestamp in milliseconds |
Response schema
[
{
"timestamp" : number,
"id": string,
"confirmed" : boolean,
"type": string,
"price": string,
"amount": string,
"buyer": string,
"seller": string,
"matcher": string
},
...
]
Example #1
GET /trades/WAVES/BTC/5
[
{
"timestamp": 1547029062854,
"id": "ARx5iPkY3EjwKnqdEZ4WYa9tTqJj2qoYr3dYg33Wz6kg",
"confirmed": true,
"type": "buy",
"price": "0.00071920",
"amount": "3.05702170",
"buyer": "3PRAYvxeEJB45uChi2shUZixc4keR3eH2Cq",
"seller": "3PPHnqzZU1aHdju1oUFoh8ws9x4S8Mqv2Zj",
"matcher": "7kPFrHDiGw1rCm7LPszuECwWYL3dMf6iMifLRDJQZMzy"
},
...
]
Example #2
GET /trades/WAVES/BTC/1546290000000/1546462799999
[
{
"timestamp": 1546302909071,
"id": "89kzVA7wHbF8mGxLgX3PXSYDzkPiudgX7AiyraC5FKw7",
"confirmed": true,
"type": "sell",
"price": "0.00085351",
"amount": "4.00000000",
"buyer": "3PRAYvxeEJB45uChi2shUZixc4keR3eH2Cq",
"seller": "3PPHnqzZU1aHdju1oUFoh8ws9x4S8Mqv2Zj",
"matcher": "7kPFrHDiGw1rCm7LPszuECwWYL3dMf6iMifLRDJQZMzy"
},
...
]
Data-service alternative
Request #1
Data-service Docs for Request
GET /assets?ticker={AMOUNT_ASSET}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #2
Data-service Docs for Request
GET /assets?ticker={PRICE_ASSET}
Param |
Type |
Description |
PRICE_ASSET |
string |
Price asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #3
Data-service Docs for Request
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sender={SENDER}&timeStart={TIME_START}&timeEnd={TIME_END}&after={AFTER}&sort={SORT}&limit={LIMIT}
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
SENDER |
string |
Transaction orders buyer or seller |
TIME_START |
string or number |
Start time in Unix epoch timestamp in milliseconds or in Date ISO format |
TIME_END |
string or number |
(Optional) End time in Unix epoch timestamp in milliseconds or in Date ISO format. Default: now |
AFTER |
string |
The cursor |
SORT |
string |
Sorting direction. One of: asc, desc |
LIMIT |
number |
Requested amount of trades |
Response Schema
{
"__type": "list",
"lastCursor": string,
"data": [
{
"__type": "transaction",
"data": {
"id": string,
"timestamp": Date,
"height": number,
"type": number,
"version": number | null,
"proofs": string[],
"fee": number,
"sender": string,
"senderPublicKey": string,
"buyMatcherFee": number,
"sellMatcherFee": number,
"price": number,
"amount": number,
"order1": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
},
"order2": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
}
}
},
...
]
}
Response mapping
Marketdata preprocess exchange transactions, but Data-service has exchange transactions as is. So set up fields type
, buyer
and seller
manually.
Note: Marketdata’s response can have wrong value for type
field - it’s bug!
The transaction type is determined by the orderType
of second transaction order, buyer
and seller
is determined by its order (e.g. a sender of the order with buy
type is the buyer).
All of Data-service transactions are confirmed (confirmed
is equal to true).
Marketdata |
Data-service |
timestamp |
timestamp |
id |
id |
confirmed |
Not available |
type |
Not available |
price |
price |
amount |
amount |
buyer |
Not available |
seller |
Not available |
matcher |
sender |
Trades (by address)
Get trades for the specified asset pair and the address
Summary
Marketdata request
Request |
Description |
GET /trades/{AMOUNT_ASSET}/{PRICE_ASSET}/{ADDRESS}/{LIMIT} |
Get the limited amount of trades for the specified asset pair filtered by the address (buyer or seller) |
Data-service alternative
# |
Request |
Description |
1 |
GET /assets?ticker={AMOUNT_ASSET} |
(Optional) Get amount asset info by the ticker |
2 |
GET /assets?ticker={PRICE_ASSET} |
(Optional) Get price asset info by the ticker |
3 |
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sender={SENDER}&timeStart={TIME_START}&timeEnd={TIME_END}&after={AFTER}&sort={SORT}&limit={LIMIT} |
Get exchange transactions for specified parameters |
Schemas and examples
Marketdata
Request
GET /trades/{AMOUNT_ASSET}/{PRICE_ASSET}/{ADDRESS}/{LIMIT}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker or ID |
PRICE_ASSET |
string |
Price asset ticker or ID |
ADDRESS |
string |
Trades buyer or seller |
LIMIT |
number |
Requested amount of trades |
Response schema
[
{
"timestamp" : number,
"id": string,
"confirmed" : boolean,
"type": string,
"price": string,
"amount": string,
"buyer": string,
"seller": string,
"matcher": string
},
...
]
Example
GET /trades/WAVES/BTC/3PCfUovRHpCoGL54UakGBTSDEXTbmYMU3ib/10
[
{
"timestamp": 1499025225254,
"id": "9p2PEao1ZZFkDoxqotaewKKNHfzYMypQ67vnZTANQtVy",
"confirmed": true,
"type": "sell",
"price": "0.00145919",
"amount": "64.19860931",
"buyer": "3PCfUovRHpCoGL54UakGBTSDEXTbmYMU3ib",
"seller": "3PEDkinFRUmGuBQdtAu88FUb5irLcppcxvR",
"matcher": "7kPFrHDiGw1rCm7LPszuECwWYL3dMf6iMifLRDJQZMzy"
},
...
]
Data-service alternative
Request #1
Data-service Docs for Request
GET /assets?ticker={AMOUNT_ASSET}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #2
Data-service Docs for Request
GET /assets?ticker={PRICE_ASSET}
Param |
Type |
Description |
PRICE_ASSET |
string |
Price asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #3
Data-service Docs for Request
GET /transactions/exchange?amountAsset={AMOUNT_ASSET_ID}&priceAsset={PRICE_ASSET_ID}&sender={SENDER}&timeStart={TIME_START}&timeEnd={TIME_END}&after={AFTER}&sort={SORT}&limit={LIMIT}
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
SENDER |
string |
Transaction orders buyer or seller |
TIME_START |
string or number |
Start time in Unix epoch timestamp in milliseconds or in Date ISO format |
TIME_END |
string or number |
(Optional) End time in Unix epoch timestamp in milliseconds or in Date ISO format. Default: now |
AFTER |
string |
The cursor |
SORT |
string |
Sorting direction. One of: asc, desc |
LIMIT |
number |
Requested amount of trades |
Response Schema
{
"__type": "list",
"lastCursor": string,
"data": [
{
"__type": "transaction",
"data": {
"id": string,
"timestamp": Date,
"height": number,
"type": number,
"version": number | null,
"proofs": string[],
"fee": number,
"sender": string,
"senderPublicKey": string,
"buyMatcherFee": number,
"sellMatcherFee": number,
"price": number,
"amount": number,
"order1": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
},
"order2": {
"id": string,
"senderPublicKey": string,
"matcherPublicKey": string,
"assetPair": {
"amountAsset": string,
"priceAsset": string
},
"orderType": string,
"price": number,
"sender": string,
"amount": number,
"timestamp": string (Date in ISO format),
"expiration": string (Date in ISO format),
"matcherFee": number,
"signature"?: string,
"proofs"?: string[]
}
}
},
...
]
}
Response mapping
Marketdata preprocess exchange transactions, but Data-service has exchange transactions as is. So set up fields type
, buyer
and seller
manually.
Note: Marketdata’s response can have wrong value for type
field - it’s bug!
The transaction type is determined by the orderType
of second transaction order, buyer
and seller
is determined by its order (e.g. a sender of the order with buy
type is the buyer).
All of Data-service transactions are confirmed (confirmed
is equal to true).
Marketdata |
Data-service |
timestamp |
timestamp |
id |
id |
confirmed |
Not available |
type |
Not available |
price |
price |
amount |
amount |
buyer |
Not available |
seller |
Not available |
matcher |
sender |
Candles
Get the OHLCV candlestick data for the specified asset pair
Summary
Marketdata request
Request |
Description |
GET /candles/{AMOUNT_ASSET}/{PRICE_ASSET}/{TIMEFRAME}/{LIMIT} |
Get the limited amount of timeframed OHLCV candlestick data for the specified asset pair |
GET /candles/{AMOUNT_ASSET}/{PRICE_ASSET}/{TIMEFRAME}/{FROM}/{TO} |
Get the timeframed OHLCV candlestick data for the specified asset pair between from and to timestamps |
Data-service alternative
# |
Request |
Description |
1 |
GET /assets?ticker={AMOUNT_ASSET} |
(Optional) Get the amount asset info by the ticker |
2 |
GET /assets?ticker={PRICE_ASSET} |
(Optional) Get the price asset info by the ticker |
3 |
GET /candles/{AMOUNT_ASSET_ID}/{PRICE_ASSET_ID}?timeStart={TIME_START}&timeEnd={TIME_END}&interval={INTERVAL} |
Get candles from previously got asset IDs |
How to get candles from Data-service:
- If asset IDs are known, go to step 3, else go to step 2.
- Using requests #1 and #2 and known asset tickers get asset IDs.
- Using request #3 and asset IDs get candles. Attention:
{TIMEFRAME}
and {INTERVAL}
parameters have different format.
Note: Maximum amount of candles in response – 1440.
Schemas and examples
Marketdata
Request
GET /candles/{AMOUNT_ASSET}/{PRICE_ASSET}/{TIMEFRAME}/{LIMIT}
GET /candles/{AMOUNT_ASSET}/{PRICE_ASSET}/{TIMEFRAME}/{FROM}/{TO}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker or ID |
PRICE_ASSET |
string |
Price asset ticker or ID |
TIMEFRAME |
number |
Candle timeframe in minutes. Valid timeframes are valid timeframes are 5, 15, 30, 60, 240, 1440 minutes |
LIMIT |
number |
Requested amount of candles |
FROM |
number |
Start Unix epoch timestamp in milliseconds |
TO |
number |
End Unix epoch timestamp in milliseconds |
Response schema
[
{
"timestamp" : number,
"open" : string,
"high" : string,
"low" : string,
"close" : string,
"vwap" : string,
"volume" : string,
"priceVolume" : string,
"confirmed" : boolean
},
...
]
Example
GET /candles/WAVES/BTC/30/5
[
{
"timestamp" : 1498536000000,
"open" : "0.00170430",
"high" : "0.00170430",
"low" : "0.00165618",
"close" : "0.00165618",
"vwap" : "0.00168210",
"volume" : "264.43216559",
"priceVolume" : "0.44480134",
"confirmed" : true
},
...
]
Data-service alternative
Request #1
Data-service Docs for Request
GET /assets?ticker={AMOUNT_ASSET}
Param |
Type |
Description |
AMOUNT_ASSET |
string |
Amount asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Example
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": "WAVES",
"id": "WAVES",
"name": "Waves",
"precision": 8,
"description": "",
"height": 0,
"timestamp": "2016-04-11T21:00:00.000Z",
"sender": "",
"quantity": 10000000000000000,
"reissuable": false
}
}
]
}
Request #2
Data-service Docs for Request
GET /assets?ticker={PRICE_ASSET}
Param |
Type |
Description |
PRICE_ASSET |
string |
Price asset ticker |
Response schema
{
"__type": "list",
"data": [
{
"__type": "asset",
"data": {
"ticker": string,
"id": string,
"name": string,
"precision": number,
"description": string,
"height": number,
"timestamp": string (Date in ISO format),
"sender": string,
"quantity": number,
"reissuable": boolean
}
}
]
}
Request #3
Data-service Docs for Request
GET /candles/{AMOUNT_ASSET_ID}/{PRICE_ASSET_ID}?timeStart={TIME_START}&timeEnd={TIME_END}&interval={INTERVAL}
Param |
Type |
Description |
AMOUNT_ASSET_ID |
string |
Amount asset ID |
PRICE_ASSET_ID |
string |
Price asset ID |
TIME_START |
string or number |
Start time in Unix epoch timestamp in milliseconds or in Date ISO format |
TIME_END |
string or number |
(Optional) End time in Unix epoch timestamp in milliseconds or in Date ISO format. Default: now |
INTERVAL |
number |
Candles interval. Valid intervals are 1m, 5m, 15m, 30m, 1h, 3h, 6h, 12h, 1d |
Response schema
{
"__type": "list",
"data": [
{
"__type": "candle",
"data": {
"time": string (Date in ISO format),
"open": number,
"close": number,
"high": number,
"low": number,
"volume": number,
"quoteVolume": number,
"weightedAveragePrice": number,
"maxHeight": number,
"txsCount": number
}
},
]
Example
{
"__type": "list",
"data": [
{
"__type": "candle",
"data": {
"time": "2018-12-25T21:50:00.000Z",
"open": 0.00087545,
"close": 0.00087542,
"high": 0.00087545,
"low": 0.00087542,
"volume": 52,
"quoteVolume": 0.0455224,
"weightedAveragePrice": 0.00087543,
"maxHeight": 1322206,
"txsCount": 3
}
},
...
]
}
Response mapping
Marketdata |
Data-service |
timestamp |
time |
open |
open |
high |
high |
low |
low |
close |
close |
vwap |
weightedAveragePrice |
volume |
volume |
priceVolume |
quoteVolume |
confirmed |
Not available |
Contacts
For all feature-requests and questions contact us at: