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 |
EnvelopeMarketModelsMarket getMarket(marketId, opts)
Get market
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);
}
});
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] |
- Content-Type: Not defined
- Accept: application/json
[MarketModelsMarket] listMarkets()
List markets
Gets a list of all markets
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);
}
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json