All URIs are relative to http://localhost:8000/api/v2
Method | HTTP request | Description |
---|---|---|
getV2OrderBook | GET /order_book | Get the order book of specified market. |
getV2OrderBook(market, opts)
Get the order book of specified market.
Get the order book of specified market.
var PeatioSdk = require('peatio-sdk');
var defaultClient = PeatioSdk.ApiClient.instance;
// Configure OAuth2 access token for authorization: jwt
var jwt = defaultClient.authentications['jwt'];
jwt.accessToken = 'YOUR ACCESS TOKEN';
var apiInstance = new PeatioSdk.OrderBookApi();
var market = "market_example"; // String | Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btcusd'. All available markets can be found at /api/markets.
var opts = {
'asksLimit': 20, // Number | Limit the number of returned sell orders. Default to 20.
'bidsLimit': 20 // Number | Limit the number of returned buy orders. Default to 20.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.getV2OrderBook(market, opts, callback);
Name | Type | Description | Notes |
---|---|---|---|
market | String | Unique market id. It's always in the form of xxxyyy, where xxx is the base currency code, yyy is the quote currency code, e.g. 'btcusd'. All available markets can be found at /api/markets. | |
asksLimit | Number | Limit the number of returned sell orders. Default to 20. | [optional] [default to 20] |
bidsLimit | Number | Limit the number of returned buy orders. Default to 20. | [optional] [default to 20] |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json