Thanks to visit codestin.com
Credit goes to github.com

Skip to content

the rock order book imcomplete #1053

@marcobazzani

Description

@marcobazzani

The rock trading order book is incomplete:

  • OS:
  • Programming Language:
  • CCXT version:
  • Exchange:
  • Method:

In [1]: import ccxt

In [2]: a =ccxt.therock()

In [3]: a.load_markets()
Out[3]:
{'BCH/BTC': {'base': 'BCH',
  'id': 'BCHBTC',
  'info': {'ask': 0.17282,
   'bid': 0.17067,
   'close': 0.1731,
   'date': '2018-01-03T18:46:10.153+01:00',
   'fund_id': 'BCHBTC',
   'high': 0.19587,
   'last': 0.16652,
   'low': 0.171,
   'open': 0.17773822,
   'volume': 6.31333198,
   'volume_traded': 35.582},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'BTC',
  'symbol': 'BCH/BTC',
  'taker': 0.002},
 'BTC/EUR': {'base': 'BTC',
  'id': 'BTCEURN',
  'info': {'ask': 12451.442,
   'bid': 12327.547,
   'close': 0.0,
   'date': '2018-01-03T18:46:08.072+01:00',
   'fund_id': 'BTCEURN',
   'high': 0.0,
   'last': 12241.012,
   'low': 0.0,
   'open': 0.0,
   'volume': 15.991618,
   'volume_traded': 0.0013},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'BTC/EUR',
  'taker': 0.002},
 'BTC/XRP': {'base': 'BTC',
  'id': 'BTCXRP',
  'info': {'ask': 5664.72,
   'bid': 5500.01,
   'close': 7000.0,
   'date': '2018-01-03T18:46:05.952+01:00',
   'fund_id': 'BTCXRP',
   'high': 7603.79,
   'last': 5500.01,
   'low': 6050.01,
   'open': 6650.0,
   'volume': 73875.46471,
   'volume_traded': 11.5682},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'XRP',
  'symbol': 'BTC/XRP',
  'taker': 0.002},
 'ETH/BTC': {'base': 'ETH',
  'id': 'ETHBTC',
  'info': {'ask': 0.05836,
   'bid': 0.05805,
   'close': 0.0579,
   'date': '2018-01-03T18:46:10.129+01:00',
   'fund_id': 'ETHBTC',
   'high': 0.06519436,
   'last': 0.05823,
   'low': 0.05373076,
   'open': 0.05616,
   'volume': 16.38481073,
   'volume_traded': 290.043},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'BTC',
  'symbol': 'ETH/BTC',
  'taker': 0.002},
 'ETH/EUR': {'base': 'ETH',
  'id': 'ETHEURN',
  'info': {'ask': 720.0,
   'bid': 713.272,
   'close': 0.0,
   'date': '2018-01-03T18:46:03.604+01:00',
   'fund_id': 'ETHEURN',
   'high': 0.0,
   'last': 720.0,
   'low': 0.0,
   'open': 0.0,
   'volume': 746.145,
   'volume_traded': 1.047},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'ETH/EUR',
  'taker': 0.002},
 'EUR/EUR': {'base': 'EUR',
  'id': 'EUREURN',
  'info': {'ask': 0.999,
   'bid': 0.988,
   'close': 0.0,
   'date': '2018-01-03T17:52:31.867+01:00',
   'fund_id': 'EUREURN',
   'high': 0.0,
   'last': 0.987,
   'low': 0.0,
   'open': 0.0,
   'volume': 2531.46033,
   'volume_traded': 3352.59},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'EUR/EUR',
  'taker': 0.002},
 'EUR/XRP': {'base': 'EUR',
  'id': 'EURXRP',
  'info': {'ask': 0.45,
   'bid': 0.44,
   'close': 0.58,
   'date': '2018-01-03T18:46:05.945+01:00',
   'fund_id': 'EURXRP',
   'high': 0.7,
   'last': 0.44,
   'low': 0.57,
   'open': 0.63,
   'volume': 301779.723,
   'volume_traded': 576102.43},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'XRP',
  'symbol': 'EUR/XRP',
  'taker': 0.002},
 'LTC/BTC': {'base': 'LTC',
  'id': 'LTCBTC',
  'info': {'ask': 0.0164,
   'bid': 0.01626,
   'close': 0.01711,
   'date': '2018-01-03T18:45:58.515+01:00',
   'fund_id': 'LTCBTC',
   'high': 0.01864,
   'last': 0.0163,
   'low': 0.01653673,
   'open': 0.01674,
   'volume': 8.39422247,
   'volume_traded': 496.96},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'BTC',
  'symbol': 'LTC/BTC',
  'taker': 0.002},
 'LTC/EUR': {'base': 'LTC',
  'id': 'LTCEUR',
  'info': {'ask': 203.75,
   'bid': 203.0,
   'close': 203.0,
   'date': '2018-01-03T18:42:32.062+01:00',
   'fund_id': 'LTCEUR',
   'high': 217.34,
   'last': 203.0,
   'low': 185.49,
   'open': 185.5,
   'volume': 112365.06,
   'volume_traded': 550.22},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'LTC/EUR',
  'taker': 0.002},
 'PPC/BTC': {'base': 'PPC',
  'id': 'PPCBTC',
  'info': {'ask': 0.00043544,
   'bid': 0.00033065,
   'close': 0.00043999,
   'date': '2018-01-03T17:08:48.655+00:00',
   'fund_id': 'PPCBTC',
   'high': 0.0005,
   'last': 0.00043,
   'low': 0.00031501,
   'open': 0.00034645,
   'volume': 0.01489295,
   'volume_traded': 44.99},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'BTC',
  'symbol': 'PPC/BTC',
  'taker': 0.002},
 'PPC/EUR': {'base': 'PPC',
  'id': 'PPCEUR',
  'info': {'ask': 4.61,
   'bid': 4.59,
   'close': 4.29,
   'date': '2018-01-03T18:37:28.745+01:00',
   'fund_id': 'PPCEUR',
   'high': 4.3,
   'last': 4.62,
   'low': 3.5,
   'open': 3.84,
   'volume': 17081.49,
   'volume_traded': 3937.08},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'PPC/EUR',
  'taker': 0.002},
 'ZEC/BTC': {'base': 'ZEC',
  'id': 'ZECBTC',
  'info': {'ask': 0.03847,
   'bid': 0.03678,
   'close': 0.03359,
   'date': '2018-01-03T18:45:58.032+01:00',
   'fund_id': 'ZECBTC',
   'high': 0.04121008,
   'last': 0.03668,
   'low': 0.03358,
   'open': 0.039996,
   'volume': 0.77411614,
   'volume_traded': 20.699},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'BTC',
  'symbol': 'ZEC/BTC',
  'taker': 0.002},
 'ZEC/EUR': {'base': 'ZEC',
  'id': 'ZECEUR',
  'info': {'ask': 465.0,
   'bid': 451.33,
   'close': 441.37,
   'date': '2018-01-03T18:45:10.938+01:00',
   'fund_id': 'ZECEUR',
   'high': 450.0,
   'last': 459.08,
   'low': 420.0,
   'open': 448.39,
   'volume': 16892.43,
   'volume_traded': 37.891},
  'limits': {},
  'maker': 0.0002,
  'precision': {},
  'quote': 'EUR',
  'symbol': 'ZEC/EUR',
  'taker': 0.002}}

In [4]: a.fetch_l2_order_book('BTC/EUR')
Out[4]:
{'asks': [[12451.442, 0.1392],
  [12635.698, 0.1123],
  [12674.792, 0.1072],
  [12820.022, 0.1304],
  [12834.614, 0.078],
  [12935.636, 0.055],
  [13046.85, 0.048],
  [13357.023, 0.042],
  [13407.355, 0.078],
  [13602.608, 0.066],
  [13683.312, 0.048],
  [13848.44, 0.072],
  [13877.573, 0.036],
  [14304.898, 0.06],
  [14310.352, 0.018]],
 'bids': [[12327.547, 0.114],
  [12242.301, 0.05],
  [12125.981, 0.1112],
  [11983.13, 0.0964],
  [11824.29, 0.1446],
  [1215.874, 0.005],
  [22.113, 0.05],
  [22.111, 1.0],
  [0.99, 1.0]],
 'datetime': '2018-01-03T19:46:08.231Z',
 'timestamp': 1515008768231}


Versus:

curl -s "https://api.therocktrading.com/v1/funds/BTCEUR/orderbook"  | jq .bids[].price | sort -n -u  |wc -l
     471



Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions