Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 1.94 KB

OrderBookApi.md

File metadata and controls

57 lines (39 loc) · 1.94 KB

swagger_client.OrderBookApi

All URIs are relative to https://localhost/api/v1

Method HTTP request Description
order_book_get_l2 GET /orderBook/L2 Get current orderbook in vertical format.

order_book_get_l2

list[OrderBookL2] order_book_get_l2(symbol, depth=depth)

Get current orderbook in vertical format.

Example

from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrderBookApi()
symbol = 'symbol_example' # str | Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
depth = 25 # float | Orderbook depth per side. Send 0 for full depth. (optional) (default to 25)

try:
    # Get current orderbook in vertical format.
    api_response = api_instance.order_book_get_l2(symbol, depth=depth)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderBookApi->order_book_get_l2: %s\n" % e)

Parameters

Name Type Description Notes
symbol str Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
depth float Orderbook depth per side. Send 0 for full depth. [optional] [default to 25]

Return type

list[OrderBookL2]

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, application/xml, text/xml, application/javascript, text/javascript

[Back to top] [Back to API list] [Back to Model list] [Back to README]