Introduction
API endpoint
https://ticker.saturn.network
Examples in this documentation are written using httpie for clarity.
To install
httpie
on macOS runbrew install httpie
To install
httpie
on Ubuntu runsudo apt-get install httpie
The Saturn API is designed to be a predictable and intuitive interface for interacting with Saturn Network DEX and other decentralized tools.
For historical reasons most of the API endpoints are namespaced as https://ticker.saturn.network/api/v2/
.
v1
was the original API that powered the launch of Saturn Network exchange.v2
is a faster and more scalable rewrite of thev1
API. According to our benchmarksv2
is 100 times faster.- All further API work will be co-developed by the Saturn community and will be namespaced as
v3
.
Return Ticker
$ http https://ticker.saturn.network/returnTicker.json
{
"ETC_0xac55641cbb734bdf6510d1bbd62e240c2409040f": {
"baseVolume": "0.01167075",
"highestBid": "0.000065",
"last": "0.000065",
"lowestAsk": "0.000088",
"name": "Saturn Classic DAO Token",
"percentChange": "-0.061570303862448314",
"quoteVolume": "180",
"symbol": "SATURN"
},
"ETH_0xdac17f958d2ee523a2206206994597c13d831ec7": {
"baseVolume": "0",
"highestBid": "",
"last": "",
"lowestAsk": "",
"name": "Tether USD",
"percentChange": "",
"quoteVolume": "0",
"symbol": "USDT"
}
}
Return Ticker is the de-facto standard API for cryptocurrency exchanges. Most exchange aggregators, such as CoinMarketCap, require this API endpoint for integration. This endpoint will return a record for every token ever traded on the exchange, even if there hasn’t been any trading activity.
Properties
Property | Description |
---|---|
token_contract |
token contract, starting with ETH_ or ETC_ to indicate which blockchain the token is on. |
name |
token’s name, i.e. Saturn Classic DAO Token. |
symbol |
token’s symbol, i.e. SATURN. |
quoteVolume |
the token’s past 24h trading volume in tokens, in this case SATURN, i.e. 180. |
baseVolume |
indicates the token’s past 24h trading volume in blockchain’s native ether, in this case ETC, i.e. 0.01167075. |
highestBid |
best current sell price, i.e. 0.000065. |
lowestAsk |
best current buy price, i.e. 0.000088. |
last |
indicates the token price for the last executed trade, i.e. 0.000065. |
percentChange |
the token’s price change over the last 24h, i.e. -0.061570303862448314. Note that this API returns a fraction, not a percentage, so you need to multiply by 100 yourself. In this case, the token is down 6.16%. |
Tokens
In addition to Return Ticker API, Saturn Network implements a number of custom endpoints that developers are encouraged to use when building applications utilizing Saturn Protocol.
All Tokens
$ http https://ticker.saturn.network/api/v2/tokens/all.json
[
{
"address": "0x0000000000000000000000000000000000000000",
"blockchain": "ETC",
"decimals": 18,
"id": 1,
"name": "Classic Ether",
"symbol": "ETC"
},
{
"address": "0x0000000000000000000000000000000000000000",
"blockchain": "ETH",
"decimals": 18,
"id": 2,
"name": "Ether",
"symbol": "ETH"
},
{
"address": "0x0000000000b3f879cb30fe243b4dfee438691c04",
"blockchain": "ETC",
"decimals": 2,
"id": 13,
"name": "Gastoken.io",
"symbol": "GST2",
"total_supply": "6104877"
}
]
Returns details of all tokens known to the API. Whenever a token is traded on the exchange, or is airdropped through the airdrop-tool, a record about this token gets inserted in the database.
Properties
Property | Description |
---|---|
blockchain |
which blockchain this token belongs to. |
address |
address of the token’s smart contract on the blockchain. Native ether always has address of 0x0 . |
decimals |
token’s decimals. |
name |
token’s name. |
symbol |
token’s symbol. |
total_supply |
last known token’s total supply. This value is not available for native ether (i.e. ETH on Ethereum blockchain and ETC on Ethereum Classic blockchain). For tokens with fluctuating total supply, such as GasToken, this value gets updated on every trade. For those tokens this value can be an effective approximation of token’s circulating supply. |
id |
id of this record in the API’s database. |
Search Token by Symbol
tokens/by_symbol/:symbol, where :symbol can be any string
$ http https://ticker.saturn.network/api/v2/tokens/by_symbol/sat.json
[
{
"address": "0xac55641cbb734bdf6510d1bbd62e240c2409040f",
"blockchain": "ETC",
"decimals": 4,
"id": 12,
"name": "Saturn Classic DAO Token",
"symbol": "SATURN",
"total_supply": "10000000000000"
},
{
"address": "0xb9440022a095343b440d590fcd2d7a3794bd76c8",
"blockchain": "ETH",
"decimals": 4,
"id": 3,
"name": "Saturn ETH DAO Token",
"symbol": "SATURN",
"total_supply": "10000000000000"
}
]
This endpoint allows you to get token details for tokens whose symbol
begins
with the specified query string. In this case the query string is sat
, and
the API will return all tokens whose symbol begins with sat
.
This endpoint can be useful for applications where you want to provide autocomplete for user input, such as for search or telegram bots.
The format of the returned payload is the same as tokens/all.json`.
Short Token Summary
tokens/show/:blockchain/:address.json
$ http https://ticker.saturn.network/api/v2/tokens/show/eth/0xb9440022a095343b440d590fcd2d7a3794bd76c8.json
# or
$ http https://ticker.saturn.network/api/v2/tokens/show/eth/saturn.json
{
"address": "0xb9440022a095343b440d590fcd2d7a3794bd76c8",
"blockchain": "ETH",
"name": "Saturn ETH DAO Token",
"symbol": "SATURN",
"decimals": 4,
"best_buy_order": "2701",
"best_buy_price": "0.00000101",
"best_buy_order_tx": "0x5dded820a0d8ff53e01b75fc41c201b045fee77ad6723e1bfc5810f3e6cf2aa9",
"best_sell_order": "2723",
"best_sell_price": "0.000006",
"best_sell_order_tx": "0x675ab84e2af549fa50f9fe216da9c8680c6b204debb25b06e71c6d7776451122",
"total_supply": "1000000000",
"volume24hr": "5.948037614013625",
"price24hr": "0.00000634725382301998",
"dashboard_price": "0.00000631597077131445",
"change_pct": "-0.301263",
"liquidity_depth": {
"ether": "0.721771",
"tokens": "15160181.8898"
}
}
This endpoint returns a brief summary of token’s details and its trading activity, given that you know the token’s blockchain and the token’s address on said blockchain.
Properties
Property | Description |
---|---|
address |
token’s address. |
best_buy_order |
the id of the best buy order (buy order with the highest price). This is the id that is returned by the exchange smart contract when the order is created, and is the id that you should use when you want to create a transaction to trade against said order. |
best_buy_order_tx |
the transaction that created the best buy order. |
best_buy_price |
the price of the best buy order. |
best_sell_order |
the id of the best sell order (buy order with the lowest price). This is the id that is returned by the exchange smart contract when the order is created, and is the id that you should use when you want to create a transaction to trade against said order. |
best_sell_order_tx |
the transaction that created the best sell order. |
best_sell_price |
the price of the best sell order. |
blockchain |
token’s blockchain. |
change_pct |
shows how much the token’s price changed over last 24 hours. Note that this API returns a fraction, not a percentage, so you need to multiply by 100 yourself. In this case, the token is up 35.38%. |
dashboard_price |
weighted average price over last 10 buys and last 10 sells, an approximation of token’s fair market price. |
decimals |
token’s decimals. |
liquidity_depth |
shows how much liquidity is available for this token, locked into buy and sell orders. In this case, there is 38.20525 ETC and 2536870.0702 SATURN available. |
name |
token’s full name. |
price24hr |
weighted average price, selected by looking at the trades that happened within last 24 hours. |
symbol |
token’s symbol. |
total_supply |
last known token’s total supply. This value is not available for native ether (i.e. ETH on Ethereum blockchain and ETC on Ethereum Classic blockchain). For tokens with fluctuating total supply, such as GasToken, this value gets updated on every trade. For those tokens this value can be an effective approximation of token’s circulating supply. |
volume24hr |
token’s trade volume over last 24 hours, measure in blockchain’s native ether. In this case 1.32 ETC. |
Detailed Token Summary
tokens/summary/:blockchain/:address.json
$ http https://ticker.saturn.network/api/v2/tokens/summary/eth/0xb9440022a095343b440d590fcd2d7a3794bd76c8.json
# or
$ http https://ticker.saturn.network/api/v2/tokens/summary/eth/saturn.json
{
"token": {
"address": "0xb9440022a095343b440d590fcd2d7a3794bd76c8",
"blockchain": "ETH",
"name": "Saturn ETH DAO Token",
"symbol": "SATURN",
"decimals": 4,
"best_buy_order": "2701",
"best_buy_price": "0.00000101",
"best_buy_order_tx": "0x5dded820a0d8ff53e01b75fc41c201b045fee77ad6723e1bfc5810f3e6cf2aa9",
"best_sell_order": "2723",
"best_sell_price": "0.000006",
"best_sell_order_tx": "0x675ab84e2af549fa50f9fe216da9c8680c6b204debb25b06e71c6d7776451122",
"total_supply": "1000000000",
"volume24hr": "5.948037614013625",
"price24hr": "0.00000634725382301998",
"dashboard_price": "0.00000631597077131445",
"change_pct": "-0.301263",
"liquidity_depth": {
"ether": "0.721771",
"tokens": "15160181.8898"
}
},
"sparkline": [
{"day": "2019-08-30","price": "0.00000631597077131445","volume": "5.648037613713625","quoteVolume": "5.648037613713625"},
{"day": "2019-08-29","price": "0.00000867825912182362","volume": "7.97999950353","quoteVolume": "7.97999950353"},
{"day": "2019-08-28","price": "0.00000754068112432968","volume": "6.27337890626","quoteVolume": "6.27337890626"},
{"day": "2019-08-27","price": "0.00000613340702029351","volume": "6.235423059460725","quoteVolume": "6.235423059460725"},
{"day": "2019-08-26","price": "0.00000944758889578385","volume": "5.34731479415875","quoteVolume": "5.34731479415875"},
{"day": "2019-08-25","price": "0.00000800327219584074","volume": "5.181832910835","quoteVolume": "5.181832910835"},
{"day": "2019-08-24","price": "0.00000776183925548577","volume": "6.277114510735","quoteVolume": "6.277114510735"},
{"day": "2019-08-23","price": "0.00000998825175088032","volume": "0.18079999982","quoteVolume": "0.18079999982"}
]
}
In addition to token’s short summary, this endpoint also returns token’s trading statistics over last 7 days.
Properties
Property | Description |
---|---|
token |
token’s short summary. |
sparkline |
token trading statistics over last 7 days, including weighted average price, volume measured in native ether, in this case ETC, and quoteVolume measured in tokens. |
OHLCV
tokens/ohlcv/:blockchain/:address/:candle.json, where candle is one of 24h, 1h, 5m
$ http https://ticker.saturn.network/api/v2/tokens/ohlcv/etc/0x876a68d9efbc3cadaa886e9868d93737035f717c/24h.json
# or
$ http https://ticker.saturn.network/api/v2/tokens/ohlcv/etc/onex/24h.json
[
{
"close": "0.0001",
"high": "0.0001",
"low": "0.0001",
"open": "0.0001",
"time": 1547848441,
"volume": "1"
},
{
"close": "0.00224719",
"high": "0.00224719",
"low": "0.00224719",
"open": "0.00224719",
"time": 1547243641,
"volume": "0.00449438"
}
]
Returns OHLCV summary for a given token.
Dashboard
These API endpoints return detailed token summaries for all known tokens and are useful for generating comprehensive dashboards.
dashboard/:blockchain.json
$ http https://ticker.saturn.network/api/v2/dashboard/all.json
This endpoint returns token summaries for all available blockchains.
$ http https://ticker.saturn.network/api/v2/dashboard/etc.json
This endpoint returns token summaries for one given blockchain.
Transactions
Transactions API lets you query for a given transaction to make sure it was processed by the system.
transactions/:blockchain/:tx.json
$ http https://ticker.saturn.network/api/v2/transactions/etc/0xf62d7f51818ddfa8edc62590a548460dfd49e1abd6817ff833a310a6a50b36d8.json
{
"blockchain": "ETC",
"blocknumber": 6937076,
"created_at": 1542315557,
"from": "0xbb1c3f13da3abbd2813d77eb739d54143eeef0c8",
"gasprice": 1000000000,
"gasused": 69106,
"to": "0xca08daec07f11d9375ca64478e83a12fc35b09d2",
"tx": "0xf62d7f51818ddfa8edc62590a548460dfd49e1abd6817ff833a310a6a50b36d8",
"txprice": "0.000069106",
"value": "0"
}
Properties
Property | Description |
---|---|
blockchain |
What blockchain does the transaction belong to. |
blocknumber |
Block height at which the transaction was included in the blockchain. |
created_at |
A UNIX timestamp of the transaction. |
from |
The address that initiated the transaction. |
gasprice |
Gas price that was used to broadcast this transaction. |
gasused |
Total amount of gas used by the transaction. |
to |
The to field of the transaction. Typically would be the exchange address or the address of an ERC223 token. |
tx |
Transaction hash. |
txprice |
Total fees paid by this transaction, calculated as gasprice * gasused |
value |
Amount of native ether (i.e. ETH, ETC) sent by the sender in this transaction. |
Orders
Exchange contracts
$ http https://ticker.saturn.network/api/v2/orders/contracts.json
{
"etc": "0x3EC00Ee8a4fbE81e7eeA328029ce490654e8e11a",
"eth": "0x13f64609Bf1EF46F6515f8CD3115433a93a00DC6"
}
Addresses of the most recently deployed exchange contracts.
Order by Tx
orders/by_tx/:blockchain/:tx.json
$ http https://ticker.saturn.network/api/v2/orders/by_tx/eth/0x377af8d56ba09b3e025d9e3fd114762891ef725c45217e6cdf989663f0c57171.json
{
"active": true,
"balance": "122106.902",
"blockchain": "ETH",
"blocknumber": 7038124,
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"name": "Ether",
"symbol": "ETH"
},
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"created_at": 1547056831,
"order_id": 425,
"owner": "0xa116a924f864b9cb3a6871502c6dec09a6cb5592",
"price": "0.00001349",
"selltoken": {
"address": "0xb9440022a095343b440d590fcd2d7a3794bd76c8",
"decimals": 4,
"name": "Saturn ETH DAO Token",
"symbol": "SATURN"
},
"transaction": "0x377af8d56ba09b3e025d9e3fd114762891ef725c45217e6cdf989663f0c57171",
"type": "SELL"
}
Returns a summary of a given order.
Properties
Property | Description |
---|---|
active |
Is the order active (available for trading) or not (cancelled or filled). Either true or false. |
balance |
Available order balance, denominated in tokens. |
blockchain |
What blockchain does the order belong to. |
blocknumber |
Describes at what block number was the order created. |
buytoken |
Short summary of order’s buy token. |
selltoken |
Short summary of order’s sell token. |
contract |
Saturn Network DEX is a dApp that runs across multiple smart contracts and multiple blockchains. This field indicates the address of the exchange smart contract. |
created_at |
A UNIX timestamp of the transaction that created the order. |
order_id |
The id of the order, as issued by the exchange smart contract. |
owner |
The address that created this order. |
price |
Order price. |
transaction |
Transaction hash of the transaction that created the order. |
type |
Must be either BUY or SELL. |
Orders by Trader
orders/trader/:address.json
$ http https://ticker.saturn.network/api/v2/orders/trader/0x4803c26955625d21d7157851a823fba6a3622315.json
{
"sell_orders": [
{
"transaction": "0x4e48ec0967ce029a8f494018604dc95b06e4696656dfcac350be985c6c7ee0c9",
"blockchain": "ETH",
"order_id": 406,
"blocknumber": 7020540,
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"owner": "0x4803c26955625d21d7157851a823fba6a3622315",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"selltoken": {
"address": "0xb472c71365ef9ed14226bb0aa4c9a3fa45ece510",
"name": "Stish",
"symbol": "stish",
"decimals": 4
},
"type": "SELL",
"price": "0.002",
"active": true,
"balance": "5000",
"created_at": 1546785125
}
],
"buy_orders": [
{
"transaction": "0x5586af6f980ad67abd13fb83a86e7bd1a342aaa2309444d864fe1ee5a1f51f38",
"blockchain": "ETH",
"order_id": 404,
"blocknumber": 7019931,
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"owner": "0x4803c26955625d21d7157851a823fba6a3622315",
"buytoken": {
"address": "0xb472c71365ef9ed14226bb0aa4c9a3fa45ece510",
"name": "Stish",
"symbol": "stish",
"decimals": 4
},
"selltoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"type": "BUY",
"price": "0.000001",
"active": true,
"balance": "10000",
"created_at": 1546775396
}
]
}
Returns all active orders for a given trader address.
Properties
Property | Description |
---|---|
buy_orders |
An array of buy orders, each record of which is an order summary. |
sell_orders |
An array of sell orders, each record of which is an order summary. |
Orders by Token Pair
orders/:blockchain/:selltoken/:buytoken/:limit.json. In this case limit may be a number, i.e.
10
if you want to get 10 orders, or a stringall
to get all active orders.
$ http https://ticker.saturn.network/api/v2/orders/ETC/0x085b0fdf115aa9e16ae1bddd396ce1f993c52220/0x0000000000000000000000000000000000000000/all.json
# or
$ http https://ticker.saturn.network/api/v2/orders/ETC/onex/0x0000000000000000000000000000000000000000/all.json
{
"buys": [
{
"transaction": "0x6958316570de4a7d8e4dea0678fe090d4fb6fdfceec47718b38b00d13d8b42bd",
"blockchain": "ETC",
"order_id": 1173,
"blocknumber": 7246637,
"contract": "0x3ec00ee8a4fbe81e7eea328029ce490654e8e11a",
"owner": "0xc09e95c13fd6f037ec408e1372ce539712e13b62",
"buytoken": {
"address": "0x085b0fdf115aa9e16ae1bddd396ce1f993c52220",
"name": "ONEX Network",
"symbol": "ONEX",
"decimals": 18
},
"selltoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Classic Ether",
"symbol": "ETC",
"decimals": 18
},
"type": "BUY",
"price": "0.000001",
"active": true,
"balance": "100000",
"created_at": 1546708817
}
],
"sells": [
{
"transaction": "0x53342403ab2ed0c04c6974cdc3250adb7d0c3df7753295d48625639a68ca1530",
"blockchain": "ETC",
"order_id": 1217,
"blocknumber": 7253696,
"contract": "0x3ec00ee8a4fbe81e7eea328029ce490654e8e11a",
"owner": "0x0d1591af9dd4c8e907fa94f1b02181ec7de5dd04",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Classic Ether",
"symbol": "ETC",
"decimals": 18
},
"selltoken": {
"address": "0x085b0fdf115aa9e16ae1bddd396ce1f993c52220",
"name": "ONEX Network",
"symbol": "ONEX",
"decimals": 18
},
"type": "SELL",
"price": "0.015",
"active": true,
"balance": "300",
"created_at": 1546808177
}
]
}
Returns all active orders for a given token pair.
Properties
Property | Description |
---|---|
buys |
An array of buy orders, each record of which is an order summary. |
sells |
An array of sell orders, each record of which is an order summary. |
Most Recent Orders
orders/last/:limit.json
$ http https://ticker.saturn.network/api/v2/orders/last/1.json
[
{
"transaction": "0xf51e7e637bf53167d0969814434fda5410fa69b31af01710d03f8566fbad36bf",
"blockchain": "ETH",
"order_id": 457,
"blocknumber": 7049709,
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"owner": "0x1886cd5ce2ed455668d0b505759026d0fd173103",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Ether",
"symbol": "ETH",
"decimals": 18
},
"selltoken": {
"address": "0xb0cc5610e590eb7215bf4d69eca2ca26b6a9bc87",
"name": "ScudoCash",
"symbol": "SCUDO",
"decimals": 18
},
"type": "SELL",
"price": "0.000006",
"active": true,
"balance": "18000",
"created_at": 1547236338
}
]
Returns most recently created orders. Useful for developing a live feed of all new orders entering the system.
Every record in this array is an order summary.
Trades
Trade by Tx
trades/by_tx/:blockchain/:tx.json
$ http https://ticker.saturn.network/api/v2/trades/by_tx/ETC/0xf62d7f51818ddfa8edc62590a548460dfd49e1abd6817ff833a310a6a50b36d8.json
{
"blockchain": "ETC",
"blocknumber": 7282005,
"buyer": "0xd0a978f2c07ea03425a9ee49e6ec49a355907fee",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"name": "Classic Ether",
"symbol": "ETC"
},
"buytokenamount": "1.3825",
"contract": "0x3ec00ee8a4fbe81e7eea328029ce490654e8e11a",
"created_at": 1547207809,
"order_id": 1314,
"order_owner": "0xca3fbfc0d1cf4a3ecc6310e95388b9a0a68500b5",
"order_tx": "0xfd2123d29fe30cd5990d6ea81a0e2b18eb1786695d40dd9b6c5e286571a651e9",
"order_type": "SELL",
"price": "0.00079",
"seller": "0xca3fbfc0d1cf4a3ecc6310e95388b9a0a68500b5",
"selltoken": {
"address": "0x1be6d61b1103d91f7f86d47e6ca0429259a15ff0",
"decimals": 8,
"name": "Bitcoin Classic Token",
"symbol": "BCT"
},
"selltokenamount": "1750",
"trade_miner_address": "0xd0a978f2c07ea03425a9ee49e6ec49a355907fee",
"trademiningamount": "34.6491",
"transaction": "0x67a9a0de4e2ccd839dee5f96da08eb6a334d8e68e99d5ac9c11b7cd4d4fa301c"
}
Returns a summary of a given trade.
Properties
Property | Description |
---|---|
blockchain |
What blockchain does the trade belong to. |
blocknumber |
Describes at what block number was the trade created. |
buytoken |
Short summary of order’s buy token. |
selltoken |
Short summary of order’s sell token. |
buytokenamount |
How many tokens were bought. |
selltokenamount |
How many tokens were sold. |
trademiningamount |
How many SATURN tokens were mined via this trade. |
contract |
Saturn Network DEX is a dApp that runs across multiple smart contracts and multiple blockchains. This field indicates the address of the exchange smart contract. |
buyer |
The address of the buyer. |
seller |
The address of the seller (order owner). |
trade_miner_address |
Address of the entity that received trade mining rewards. Currently same as buyer. |
order_owner |
Address that created the order. |
order_tx |
Transaction that created the order. |
created_at |
A UNIX timestamp of the transaction that created the trade. |
order_id |
The id of the order, as issued by the exchange smart contract. |
price |
Order price. |
transaction |
Transaction hash of the transaction that created the trade. |
order_type |
Must be either BUY or SELL. |
Trades by Trader
trades/trader/:address.json
$ http https://ticker.saturn.network/api/v2/trades/trader/0x4803c26955625d21d7157851a823fba6a3622315.json
{
"buys": [
{
"blockchain": "ETH",
"blocknumber": 7030829,
"buyer": "0x4803c26955625d21d7157851a823fba6a3622315",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"name": "Ether",
"symbol": "ETH"
},
"buytokenamount": "0.06",
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"created_at": 1546944269,
"order_id": 416,
"order_owner": "0x6ba272b9946419c107dd7163c7e5895b70196209",
"order_tx": "0xf7cb04a00aaa2290cf3407563649ca0e93d4dd2077c5cd9cdfcbb1ffe907d61f",
"order_type": "SELL",
"price": "0.0006",
"seller": "0x6ba272b9946419c107dd7163c7e5895b70196209",
"selltoken": {
"address": "0xb472c71365ef9ed14226bb0aa4c9a3fa45ece510",
"decimals": 4,
"name": "Stish",
"symbol": "stish"
},
"selltokenamount": "100",
"trade_miner_address": "0x4803c26955625d21d7157851a823fba6a3622315",
"trademiningamount": "1.5037",
"transaction": "0x39a48226db3efd858e8372a5b928d434a68468c7c1b21595d27c7bcd5d520796"
}
],
"sells": [
{
"blockchain": "ETH",
"blocknumber": 7039846,
"buyer": "0x6008ef900eb6e6f52e07981859ee40f57c648260",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"name": "Ether",
"symbol": "ETH"
},
"buytokenamount": "0.1375",
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"created_at": 1547083564,
"order_id": 422,
"order_owner": "0x4803c26955625d21d7157851a823fba6a3622315",
"order_tx": "0xf2f047b286659dc187993c1fbc5b5051292600ec9586cba0c6612f5b584ea8fd",
"order_type": "SELL",
"price": "0.00055",
"seller": "0x4803c26955625d21d7157851a823fba6a3622315",
"selltoken": {
"address": "0xb472c71365ef9ed14226bb0aa4c9a3fa45ece510",
"decimals": 4,
"name": "Stish",
"symbol": "stish"
},
"selltokenamount": "250",
"trade_miner_address": "0x6008ef900eb6e6f52e07981859ee40f57c648260",
"trademiningamount": "3.4461",
"transaction": "0xc56f5d763e84d204cfdf5da4a1790773da53c60a6f6fa64a3a7888eee8919904"
}
]
}
Returns all trades for a given trader address.
Properties
Property | Description |
---|---|
buys |
An array of trades, each record of which is a trade summary. |
sells |
An array of trades, each record of which is a trade summary. |
Trades by Token Pair
trades/:blockchain/:selltoken/:buytoken/:limit.json. In this case limit may be a number, i.e.
10
if you want to get 10 trades, or a stringall
to get all active trades.
$ http https://ticker.saturn.network/api/v2/trades/ETC/0x0000000000000000000000000000000000000000/0xac55641cbb734bdf6510d1bbd62e240c2409040f/all.json
# or
$ http https://ticker.saturn.network/api/v2/trades/ETH/0x0000000000000000000000000000000000000000/saturn/all.json
{
"buys": [
{
"transaction": "0x35cfe6822a7aba491e8e2b1a2fcba309152b6666f38443e2b288c876b472186b",
"blockchain": "ETC",
"order_id": 1337,
"order_tx": "0x805c4c141408ff4cb107b05346e03c3074761ec87ea3b9b86722da7fc52e06d8",
"order_owner": "0x692306857d17a8f31bb5feb17cfe765773487e66",
"blocknumber": 7283078,
"contract": "0x3ec00ee8a4fbe81e7eea328029ce490654e8e11a",
"buyer": "0x23cc32a2f2cf1477e7aa43774663f7f96e3b8f99",
"seller": "0x692306857d17a8f31bb5feb17cfe765773487e66",
"trade_miner_address": "0x23cc32a2f2cf1477e7aa43774663f7f96e3b8f99",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Classic Ether",
"symbol": "ETC",
"decimals": 18
},
"selltoken": {
"address": "0xac55641cbb734bdf6510d1bbd62e240c2409040f",
"name": "Saturn Classic DAO Token",
"symbol": "SATURN",
"decimals": 4
},
"order_type": "SELL",
"price": "0.000088",
"trademiningamount": "33.0827",
"selltokenamount": "15000",
"buytokenamount": "1.32",
"created_at": 1547223101
}
],
"sells": [
{
"transaction": "0xf95b394f2040a226a66cc5bf820c5f4a35eb2b8a5be6692f389639d406b7db1e",
"blockchain": "ETC",
"order_id": 1280,
"order_tx": "0x231ea9c02e61ed5d335616e3ea854bff0a4c732e087443b467a8e29a0f36e6c9",
"order_owner": "0x1ca5ba0e97daa11989b9db57ef2a161b250a6617",
"blocknumber": 7276710,
"contract": "0x3ec00ee8a4fbe81e7eea328029ce490654e8e11a",
"buyer": "0xd808aa10bbb2b6f105812017416fa39771c831dc",
"seller": "0x1ca5ba0e97daa11989b9db57ef2a161b250a6617",
"trade_miner_address": "0xd808aa10bbb2b6f105812017416fa39771c831dc",
"buytoken": {
"address": "0xac55641cbb734bdf6510d1bbd62e240c2409040f",
"name": "Saturn Classic DAO Token",
"symbol": "SATURN",
"decimals": 4
},
"selltoken": {
"address": "0x0000000000000000000000000000000000000000",
"name": "Classic Ether",
"symbol": "ETC",
"decimals": 18
},
"order_type": "BUY",
"price": "0.000065",
"trademiningamount": "0.2925",
"selltokenamount": "0.01167075",
"buytokenamount": "180",
"created_at": 1547133732
}
]
}
Returns trades for a given token pair.
Properties
Property | Description |
---|---|
buys |
An array of trades, each record of which is a trade summary. |
sells |
An array of trades, each record of which is a trade summary. |
Most Recent Trades
trades/last/:limit.json
$ http https://ticker.saturn.network/api/v2/trades/last/1.json
[
{
"blockchain": "ETH",
"blocknumber": 7049954,
"buyer": "0x736ed51d11e8ced9ccfa229ab5b2cbc5dfd40d4e",
"buytoken": {
"address": "0x0000000000000000000000000000000000000000",
"decimals": 18,
"name": "Ether",
"symbol": "ETH"
},
"buytokenamount": "0.0538",
"contract": "0x13f64609bf1ef46f6515f8cd3115433a93a00dc6",
"created_at": 1547240167,
"order_id": 455,
"order_owner": "0x01037c7324dc25a169c32f243716cc0e6911f5b0",
"order_tx": "0x7f6b75ec21274e9497c30a10dee3b913bbd6ddbf4170495e9b42e9ea9890bdb3",
"order_type": "SELL",
"price": "0.00001345",
"seller": "0x01037c7324dc25a169c32f243716cc0e6911f5b0",
"selltoken": {
"address": "0xb9440022a095343b440d590fcd2d7a3794bd76c8",
"decimals": 4,
"name": "Saturn ETH DAO Token",
"symbol": "SATURN"
},
"selltokenamount": "4000",
"trade_miner_address": "0x736ed51d11e8ced9ccfa229ab5b2cbc5dfd40d4e",
"trademiningamount": "1.3483",
"transaction": "0xc434ea6c4f78e4360c139a4d3cd6d79f3c109571bedc65d895405dafa0e11dd0"
}
]
Returns most recent trades.
Every record in this array is a trade summary.
Airdrops
There are three concepts that one needs to grasp in order to work with airdrops API.
- Airdrop is an act of gifting a number of tokens to one given address. The airdrop tool thus generates one airdrop for every address in the json file.
- Airdrop Balance is what is displayed on Saturn Network airdrop dashboard. Multiple airdrops of the same token to the same address are combined within the smart contract, allowing people to treat the airdrop smart contract as their external wallet. The beneficiaries of airdrops can be rest assured that their funds are safe and are waiting to be claimed in one transaction.
- Airdrop Claim is an act of claiming tokens from the airdrop smart contract into the user’s wallet.
Airdrop by Tx
airdrops/by_tx/:blockchain/:tx.json
$ http https://ticker.saturn.network/api/v2/airdrops/by_tx/etc/0xaa68cface001caf187f7973513747b8791b7815be20838a511f3f09ea2c2991d.json
{
"amount": "1000",
"blockchain": "ETC",
"blocknumber": 6938055,
"created_at": 1542328923,
"receiver": "0x82cfc5443a9b9808e23d1e1fa05f858644ad1bb0",
"sender": "0xede92d9d913b5479fd8d1f65979cd7b008024316",
"token": {
"address": "0x8900f34372f27ebb5881d4ec6b35844a3655ccfc",
"decimals": 0,
"name": "Phoenix",
"symbol": "PHX"
},
"tx": "0xaa68cface001caf187f7973513747b8791b7815be20838a511f3f09ea2c2991d"
}
Returns the summary of a given airdrop.
Properties
Property | Description |
---|---|
blockchain |
What blockchain does the airdrop belong to. |
blocknumber |
Describes at what block number was the airdrop created. |
created_at |
A UNIX timestamp of the transaction that created the airdrop. |
sender |
The address that initiated the airdrop. |
receiver |
The address that received the airdrop. |
token |
A short summary of the token that was sent. |
amount |
Amount of tokens that were sent in this airdrop. |
transaction |
Transaction hash of the transaction that created the airdrop. |
Airdrops by Address
airdrops/by_address/:address.json
$ http https://ticker.saturn.network/api/v2/airdrops/by_address/0x82cfc5443a9b9808e23d1e1fa05f858644ad1bb0.json
[
{
"amount": "500",
"blockchain": "ETC",
"blocknumber": 7269173,
"created_at": 1547027574,
"receiver": "0x82cfc5443a9b9808e23d1e1fa05f858644ad1bb0",
"sender": "0x589c5fbfcf268c37fd424bfd9809f64d6881fe3d",
"token": {
"address": "0xd4729a47ffdbdd190a015bb0c29fc613c5ad3cfe",
"decimals": 8,
"name": "BCash Classic",
"symbol": "BCHC"
},
"tx": "0x7a4944c02f187cfffc39cfe01f45b9611868552533485c637750661fe9e3180c"
},
{
"amount": "10",
"blockchain": "ETC",
"blocknumber": 7021639,
"created_at": 1543520740,
"receiver": "0x82cfc5443a9b9808e23d1e1fa05f858644ad1bb0",
"sender": "0x47133156a40ce927d32e516de39b8b5949db7438",
"token": {
"address": "0xc5001cf14630a792045ff51c83a4d2b455bb5b0f",
"decimals": 8,
"name": "Raise on Market",
"symbol": "XAVE"
},
"tx": "0x7014bf58a3cba99179b944208ef73ace5b5453c98532bef56a57633254bcbdaa"
}
]
Displays all airdrops every received by an address. Returns an array of objects, each of which is an airdrop summary.
Most Recent Airdrops
airdrops/last/:limit.json, where limit is an integer
$ http https://ticker.saturn.network/api/v2/airdrops/last/2.json
[
{
"amount": "1000",
"blockchain": "ETC",
"blocknumber": 7282469,
"created_at": 1547214779,
"receiver": "0x13b7ea97e949d818f01755909a3cd95fae8d64aa",
"sender": "0x589c5fbfcf268c37fd424bfd9809f64d6881fe3d",
"token": {
"address": "0xd4729a47ffdbdd190a015bb0c29fc613c5ad3cfe",
"decimals": 8,
"name": "BCash Classic",
"symbol": "BCHC"
},
"tx": "0x2a6a15e1a1eedc181e54b6a58bed914422a2dee276030162435f7ac2e1b6a7fe"
},
{
"amount": "1000",
"blockchain": "ETC",
"blocknumber": 7282469,
"created_at": 1547214779,
"receiver": "0x2d32e965094bd0e786bbaef27099309da83fe25d",
"sender": "0x589c5fbfcf268c37fd424bfd9809f64d6881fe3d",
"token": {
"address": "0xd4729a47ffdbdd190a015bb0c29fc613c5ad3cfe",
"decimals": 8,
"name": "BCash Classic",
"symbol": "BCHC"
},
"tx": "0x9cb744509215bddbf8eb67f0f867c14c6e11955b3790108b3e92f9b20167da55"
}
]
Displays :limit
most recent airdrops. Returns an array of objects, each of which is an airdrop summary.
Airdrop Balances by Address
airdrops/balances/:address.json
$ http https://ticker.saturn.network/api/v2/airdrops/balances/0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c.json
[
{
"address": "0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c",
"balance": "2000",
"blockchain": "ETC",
"token": "0xd4729a47ffdbdd190a015bb0c29fc613c5ad3cfe"
}
]
Returns a list of unclaimed airdrop balances. Returns an empty list if all airdrops have been claimed.
Properties
Property | Description |
---|---|
address |
The address that was queried. |
blockchain |
What blockchain does the airdrop belong to. |
token |
Address of the airdropped token. |
balance |
How many tokens are waiting to be claimed by this address. |
Airdrop Claims by Address
airdrops/claims/:address.json
$ http https://ticker.saturn.network/api/v2/airdrops/claims/0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c.json
[
{
"address": "0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c",
"amount": "3000",
"blockchain": "ETC",
"blocknumber": 6942013,
"claimed_at": 1542385767,
"token": "0x8900f34372f27ebb5881d4ec6b35844a3655ccfc",
"tx": "0x2baf5cafd4d32c578c186208fb309cf104d8c08ff0e9ea16e38dbe174836264c"
},
{
"address": "0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c",
"amount": "0.1",
"blockchain": "ETC",
"blocknumber": 6942448,
"claimed_at": 1542391719,
"token": "0x1178d40896cf784db203eb40f159d78ab6e99a29",
"tx": "0xa5304a7f7ea23be4609bb8a29f5301ee9dfebddbe3c5fe425c02b8f940a12b40"
},
{
"address": "0x3c56d5d078b3a9696bc74163c8b392f5b69b9e4c",
"amount": "488",
"blockchain": "ETC",
"blocknumber": 7004980,
"claimed_at": 1543283026,
"token": "0x1178d40896cf784db203eb40f159d78ab6e99a29",
"tx": "0xf6ef64b5507cf46afe3f2c1c51c404267c39e5d8c93aa74ac1af2754694eae03"
}
]
Returns a list of all airdrop claims for a given address. Returns an empty list if no airdrops have been claimed.
Properties
Property | Description |
---|---|
address |
The address that was queried. |
blockchain |
What blockchain does the airdrop belong to. |
blocknumber |
Describes at what block number was the airdrop claimed. |
token |
Address of the airdropped token. |
amount |
Amount of tokens that were claimed. |
tx |
Transaction that claimed the airdrop. |
claimed_at |
A UNIX timestamp of the transaction that claimed the airdrop. |
Coinmarketcap Integration
This API is namespaced under
https://ticker.saturn.network/api/coinmarketcap/v1/
Saturn API implements CoinMarketCap Ideal API spec.
The goal of CoinMarketCap API spec is to set an industry standard of data reporting that will help aggregators make better sense of the markets and filter outliers.
Listed Assets
$ http https://ticker.saturn.network/api/coinmarketcap/v1/assets
{
"ETC|0xfc07d3e0e36330a151c09384c3ad45e745227688": {
"canDeposit": true,
"canWithdraw": true,
"lastUpdateTimestamp": "2019-08-24T17:39:28.326Z",
"makerFee": 0,
"name": "Highlander",
"symbol": "ONE",
"takerFee": 0.0025
},
"ETH|0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c": {
"canDeposit": true,
"canWithdraw": true,
"lastUpdateTimestamp": "2019-08-24T17:39:28.326Z",
"makerFee": 0,
"name": "Enjin Coin",
"symbol": "ENJ",
"takerFee": 0.0025
},
"ETH|0xf6dbe88ba55f1793ff0773c9b1275300f830914f": {
"canDeposit": true,
"canWithdraw": true,
"lastUpdateTimestamp": "2019-08-24T17:39:28.326Z",
"makerFee": 0,
"name": "Asian Dragon",
"symbol": "AD",
"takerFee": 0.0025
}
}
Every key in the returned JSON Dictionary is a unique identifier of a cryptocurrency listed on Saturn Network. The value corresponding to each key describes this asset’s status.
Properties
Property | Description |
---|---|
name |
Token’s name as reported by the smart contract. |
symbol |
Token’s symbol as reported by the smart contract. |
canDeposit |
Always set to true , as Saturn is a decentralized exchange. |
canWithdraw |
Always set to true , as Saturn is a decentralized exchange. |
lastUpdateTimestamp |
Data returned by the API is cached. This field describes when the last cache was made. |
makerFee |
Describes market maker fee. Currently set to 0% for all assets. |
takerFee |
Describes taker fee. Currently set to 0.25% for all assets. |
Ticker Summary
$ http https://ticker.saturn.network/api/coinmarketcap/v1/ticker
{
"lastUpdateTimestamp": "2019-08-24T17:39:28.326Z",
"tradingPairs": {
"ETH_ETH|0xbc90c835f2bc5255078cefc2a9c37cde0db2cae5": {
"LastPrice": "0.0000025",
"baseVolume24h": "0",
"highestBid": null,
"lowestAsk": "0.00000239",
"quoteVolume24h": "0",
"tradesEnabled": true
},
"ETH_ETH|0xbdc5bac39dbe132b1e030e898ae3830017d7d969": {
"LastPrice": null,
"baseVolume24h": "0",
"highestBid": null,
"lowestAsk": null,
"quoteVolume24h": "0",
"tradesEnabled": true
},
"ETH_ETH|0xbffdd152a9da1eda4afcc550fb1c789019e75334": {
"LastPrice": "0.000019",
"baseVolume24h": "3.696601349999997",
"highestBid": null,
"lowestAsk": "0.000045",
"quoteVolume24h": "154673.9999999999",
"tradesEnabled": true
}
}
}
Every key in the tradingPairs
JSON Dictionary is a unique identifier of a cryptocurrency trading pair listed in base_quote format. All the prices follow the base_quote format as well. The value corresponding to each key describes this asset’s trading performance KPIs.
This API is mostly a duplicate of returnTicker API, but reformatted according to CoinMarketCap spec.
Properties
Property | Description |
---|---|
LastPrice |
Last price at which this asset has traded. Returns null if the asset was listed but was never traded. |
baseVolume24h |
Trading volume of this trading pair denominated in base currency. |
quoteVolume24h |
Trading volume of this trading pair denominated in quote currency. |
tradesEnabled |
Always set to true , as Saturn is a decentralized exchange. |
highestBid |
Highest bid price. Returns null if there are no active bids. |
lowestAsk |
Lowest ask price. Returns null if there are no active asks. |
Recent Trades
$ http https://ticker.saturn.network/api/coinmarketcap/v1/trades/ETC|0x7b355c571fede83f152e9585143306c0d2b53193_ETC
[{"tradeID":"1661","price":"0.001","baseVolume":"0.001","quoteVolume":"1","time":"2018-11-02T16:34:39.000Z","isBuyerMaker":false},{"tradeID":"1694","price":"0.0005","baseVolume":"1","quoteVolume":"2000","time":"2018-11-03T05:39:46.000Z","isBuyerMaker":false},{"tradeID":"1865","price":"0.0005","baseVolume":"0.5","quoteVolume":"1000","time":"2018-11-04T13:05:11.000Z","isBuyerMaker":false},{"tradeID":"1933","price":"0.0005","baseVolume":"0.0005","quoteVolume":"1","time":"2018-11-05T00:14:24.000Z","isBuyerMaker":false},{"tradeID":"1974","price":"0.00002","baseVolume":"0.1","quoteVolume":"5000","time":"2018-11-05T20:03:20.000Z","isBuyerMaker":false},{"tradeID":"1982","price":"0.00002","baseVolume":"0.02","quoteVolume":"1000","time":"2018-11-05T22:34:00.000Z","isBuyerMaker":false}]
Returns full trade history of a token pair as an array of JSON objects.
Properties
Property | Description |
---|---|
TradeID |
Unique identifier of a trade. |
price |
Trade price. |
baseVolume |
Trade size denominated in base currency. |
quoteVolume |
Trade size denominated in quote currency. |
time |
Timestamp of when the trade happened. |
isBuyerMaker |
true if token buyer was a maker. false otherwise. |
Orderbook
$ http https://ticker.saturn.network/api/coinmarketcap/v1/depth/ETC|0x7b355c571fede83f152e9585143306c0d2b53193_ETC
{
"LastUpdateTimestamp": "2019-08-24T18:16:51.680Z",
"asks": [
[
"0.0075",
"563.3334"
],
[
"0.008",
"2437.5"
],
[
"0.0085",
"943.9"
],
[
"0.01",
"8650"
],
[
"0.019",
"2000"
],
[
"0.02",
"2000"
],
[
"0.025",
"500"
],
[
"0.027",
"1515"
],
[
"0.03",
"500"
],
[
"0.035",
"500"
],
[
"0.04",
"500"
],
[
"0.045",
"500"
],
[
"0.05",
"500"
],
[
"0.055",
"500"
],
[
"0.06",
"500"
],
[
"0.065",
"500"
],
[
"0.07",
"500"
],
[
"0.075",
"500"
],
[
"0.08",
"500"
],
[
"0.085",
"500"
],
[
"0.09",
"500"
],
[
"0.095",
"500"
],
[
"0.29",
"1403"
],
[
"0.5",
"6616.3"
],
[
"1",
"500"
]
],
"bids": [
[
"0.004",
"250"
],
[
"0.0025",
"80000"
],
[
"0.0015",
"10000"
],
[
"0.001001",
"100"
],
[
"0.000101",
"100"
],
[
"0.0001",
"1337"
],
[
"0.00000101",
"10000"
]
]
}
Returns full order book of a trading pair.
Properties
Property | Description |
---|---|
LastUpdateTimestamp |
Timestamp of when the snapshot of the order book was taken. |
bids |
Array of bids [price, quoteAmount] sorted by price descending. |
asks |
Array of asks [price, quoteAmount] sorted by price ascending. |