Skip to content

Latest commit

 

History

History
106 lines (71 loc) · 2.72 KB

TickersApi.md

File metadata and controls

106 lines (71 loc) · 2.72 KB

PeatioSdk.TickersApi

All URIs are relative to http://localhost:8000/api/v2

Method HTTP request Description
getV2Tickers GET /tickers Get ticker of all markets.
getV2TickersMarket GET /tickers/{market} Get ticker of specific market.

getV2Tickers

{'String': TickerInfo} getV2Tickers()

Get ticker of all markets.

Get ticker of all markets.

Example

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.TickersApi();

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getV2Tickers(callback);

Parameters

This endpoint does not need any parameter.

Return type

{'String': TickerInfo}

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getV2TickersMarket

TickerInfo getV2TickersMarket(market)

Get ticker of specific market.

Get ticker of specific market.

Example

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.TickersApi();

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 callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getV2TickersMarket(market, callback);

Parameters

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.

Return type

TickerInfo

Authorization

jwt

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json