Market Data REST API

Savitar offers a general use public REST API to provide basic information about all pairs on our platform.

API is hosted at https://api.savitar.io

Currencies

A currency is a crypto or fiat currency.

Currency Index

Returns all currencies.

Endpoint: https://api.savitar.io/api/v2/currencies

Sample response:

[
   {
      "id":"eur",
     "symbol":"€",
     "fullname":"Euro",
     "type":"fiat",
     "min_deposit_amount":"0.0",
     "deposit_fee":"0.0",
     "withdraw_fee":"0.99",
     "quick_withdraw_limit":"1000.0",
     "deposit_status":true,
     "withdraw_status":true,
     "base_factor":1,
     "precision":2
   },
   {
     "id":"btc",
     "symbol":"฿",
     "fullname":"Bitcoin",
     "type":"coin",
     "min_deposit_amount":"0.0",
     "deposit_fee":"0.0",
     "withdraw_fee":"0.0005",
     "quick_withdraw_limit":"1.0",
     "deposit_status":true,
     "withdraw_status":true,
     "base_factor":100000000,
     "precision":8
  },
]

Markets

A market allow to exchange a pair of currencies. Each market has a base and a quote currency. For example, btceur has base btc and quote eur.

Market Index

Returns all markets.

Endpoint: https://api.savitar.io/api/v2/markets

Sample response:

[
  {
    "id":"btceur",
    "name":"BTC/EUR",
    "ask_unit":"btc",
    "bid_unit":"eur",
    "ask_fee":"0.001",
    "bid_fee":"0.001",
    "trading_enabled":true
  }
]

Market Ticker

Returns the current ticker of a market.

Parameters

Parameter

Description

Format

Example

market

Only return ticker for this market

string

btceur

Example Endpoint: https://api.savitar.io/api/v2/tickers/btceur

Sample response:

{
  "at":1560937470,
  "ticker":{
    "buy":"8133.6564",
    "sell":"8145.5101",
    "low":"8002.9691",
    "high":"8267.7961",
    "last":"8134.3456",
    "last24h":"8248.6781",
    "variation24h":"-1.39",
    "vol":"5.7432"
  }
}

Market OHLC

Returns the OHLC candlestick data of a market.

Parameters

Parameter

Description

Format

Example

market

Only return OHLC for this market

string

btceur

to

Return OHLC up to to

Unix Timestamp

1559404800

from

Return OHLC from from

Unix Timestamp

1559376000

resolution

OHLC granularity

string

60

Supported resolutions are:

resolution

description

60

1 hour

120

2 hours

720

12 hours

1D

1 day

Example Endpoint: https://api.savitar.io/api/v2/ohlc?market=btceur&to=1559404800&from=1559376000

Sample response:

{
  "s":"ok",
  "t":[
    1559376000,
    1559379600,
    1559383200,
    1559386800,
    1559390400,
    1559394000,
    1559397600,
    1559401200
  ],
  "o":[
    "7639.1472000000000000",
    "7694.6263000000000000",
    "7663.9815000000000000",
    "7673.7134000000000000",
    "7661.7665000000000000",
    "7650.1766000000000000",
    "7603.1232000000000000",
    "7642.4403000000000000"
  ],
  "h":[
    "7680.4928",
    "7716.343",
    "7713.2547",
    "7693.091",
    "7685.5593",
    "7670.204",
    "7657.2903",
    "7660.3477"
  ],
  "c":[
    "7620.2531000000000000",
    "7684.4232000000000000",
    "7678.9546000000000000",
    "7648.2364000000000000",
    "7665.4967000000000000",
    "7643.3491000000000000",
    "7618.2906000000000000",
    "7660.3477000000000000"
  ],
  "l":[
    "7620.2531",
    "7672.365",
    "7663.9815",
    "7648.2364",
    "7655.3117",
    "7630.7265",
    "7587.8634",
    "7607.6202"
  ],
  "v":[
    "0.3947",
    "0.3056",
    "0.2343",
    "0.1996",
    "0.2608",
    "0.2368",
    "0.4419",
    "0.257"
  ]
}

Market Trades

Returns a markets’s most recent trades.

Parameters

Parameter

Description

Format

Example

market

Only return ticker for this market

string

btceur

limit

Limit amount of trades returned

integer

50

Example Endpoint: https://api.savitar.io/api/v2/trades?market=btceur&limit=1

Sample response:

[
 {
    "id":55107,
   "price":"8180.9451",
   "volume":"0.0332",
   "funds":"272.42",
   "trend":"buy",
   "market":"btceur",
   "created_at":"2019-06-19T14:03:32+02:00"
 }
]