Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 3.21 KB

OrderBookApi.md

File metadata and controls

100 lines (70 loc) · 3.21 KB

OrderBookApi

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

Method HTTP request Description
orderBookGet GET /orderBook Get current orderbook [deprecated, use /orderBook/L2].
orderBookGetL2 GET /orderBook/L2 Get current orderbook in vertical format.

orderBookGet

List<OrderBook> orderBookGet(symbol, depth)

Get current orderbook [deprecated, use /orderBook/L2].

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.OrderBookApi;


OrderBookApi apiInstance = new OrderBookApi();
String symbol = "symbol_example"; // String | Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
BigDecimal depth = new BigDecimal(); // BigDecimal | Orderbook depth.
try {
    List<OrderBook> result = apiInstance.orderBookGet(symbol, depth);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling OrderBookApi#orderBookGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
depth BigDecimal Orderbook depth. [optional] [default to 25]

Return type

List<OrderBook>

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

orderBookGetL2

List<OrderBookL2> orderBookGetL2(symbol, depth)

Get current orderbook in vertical format.

Example

// Import classes:
//import io.swagger.client.ApiException;
//import io.swagger.client.api.OrderBookApi;


OrderBookApi apiInstance = new OrderBookApi();
String symbol = "symbol_example"; // String | Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
BigDecimal depth = new BigDecimal(); // BigDecimal | Orderbook depth per side. Send 0 for full depth.
try {
    List<OrderBookL2> result = apiInstance.orderBookGetL2(symbol, depth);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling OrderBookApi#orderBookGetL2");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
symbol String Instrument symbol. Send a series (e.g. XBT) to get data for the nearest contract in that series.
depth BigDecimal 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