Skip to content

Latest commit

 

History

History
118 lines (82 loc) · 3.33 KB

MarketApi.md

File metadata and controls

118 lines (82 loc) · 3.33 KB

GeinsSdkApiMgmtJavascript.MarketApi

All URIs are relative to https://mgmtapi.geins.io

Method HTTP request Description
getMarket GET /API/Market/{marketId} Get market
listMarkets GET /API/Market/List List markets

getMarket

EnvelopeMarketModelsMarket getMarket(marketId, opts)

Get market

Example

import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

let apiInstance = new GeinsSdkApiMgmtJavascript.MarketApi();
let marketId = "marketId_example"; // String | The id of the market to get.
let opts = {
  'marketIdType': 56 // Number | The type of market id supplied.    0 = Internal. Internal market id set by Geins.    1 = Name. The name of the market.
};
apiInstance.getMarket(marketId, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
marketId String The id of the market to get.
marketIdType Number The type of market id supplied. 0 = Internal. Internal market id set by Geins. 1 = Name. The name of the market. [optional]

Return type

EnvelopeMarketModelsMarket

Authorization

apiKey, basicAuth

HTTP request headers

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

listMarkets

[MarketModelsMarket] listMarkets()

List markets

Gets a list of all markets

Example

import GeinsSdkApiMgmtJavascript from '@geins/sdk-api-mgmt-javascript';
let defaultClient = GeinsSdkApiMgmtJavascript.ApiClient.instance;
// Configure API key authorization: apiKey
let apiKey = defaultClient.authentications['apiKey'];
apiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: basicAuth
let basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR USERNAME';
basicAuth.password = 'YOUR PASSWORD';

let apiInstance = new GeinsSdkApiMgmtJavascript.MarketApi();
apiInstance.listMarkets((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

[MarketModelsMarket]

Authorization

apiKey, basicAuth

HTTP request headers

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