All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| ListOptionsUnderlyings | GET /options/underlyings | List all underlying assets |
| ListOptionsExpirations | GET /options/expirations | List all expiration dates |
| ListOptionsContracts | GET /options/contracts | List all contracts for specified underlying and expiration date |
| GetOptionsContract | GET /options/contracts/{contract} | Query specified contract details |
| ListOptionsSettlements | GET /options/settlements | List settlement history |
| GetOptionsSettlement | GET /options/settlements/{contract} | Get specified contract settlement information |
| ListMyOptionsSettlements | GET /options/my_settlements | Query personal settlement records |
| ListOptionsOrderBook | GET /options/order_book | Query options contract order book |
| ListOptionsTickers | GET /options/tickers | Query options market ticker information |
| ListOptionsUnderlyingTickers | GET /options/underlying/tickers/{underlying} | Query underlying ticker information |
| ListOptionsCandlesticks | GET /options/candlesticks | Options contract market candlestick chart |
| ListOptionsUnderlyingCandlesticks | GET /options/underlying/candlesticks | Underlying index price candlestick chart |
| ListOptionsTrades | GET /options/trades | Market trade records |
| ListOptionsAccount | GET /options/accounts | Query account information |
| ListOptionsAccountBook | GET /options/account_book | Query account change history |
| ListOptionsPositions | GET /options/positions | List user's positions of specified underlying |
| GetOptionsPosition | GET /options/positions/{contract} | Get specified contract position |
| ListOptionsPositionClose | GET /options/position_close | List user's liquidation history of specified underlying |
| ListOptionsOrders | GET /options/orders | List options orders |
| CreateOptionsOrder | POST /options/orders | Create an options order |
| CancelOptionsOrders | DELETE /options/orders | Cancel all orders with 'open' status |
| GetOptionsOrder | GET /options/orders/{order_id} | Query single order details |
| CancelOptionsOrder | DELETE /options/orders/{order_id} | Cancel single order |
| CountdownCancelAllOptions | POST /options/countdown_cancel_all | Countdown cancel orders |
| ListMyOptionsTrades | GET /options/my_trades | Query personal trading records |
| GetOptionsMMP | GET /options/mmp | MMP Query. |
| SetOptionsMMP | POST /options/mmp | MMP Settings |
| ResetOptionsMMP | POST /options/mmp/reset | MMP Reset |
List<OptionsUnderlying> ListOptionsUnderlyings ()
List all underlying assets
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsUnderlyingsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
try
{
// List all underlying assets
List<OptionsUnderlying> result = apiInstance.ListOptionsUnderlyings();
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsUnderlyings: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<long> ListOptionsExpirations (string underlying)
List all expiration dates
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsExpirationsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
try
{
// List all expiration dates
List<long> result = apiInstance.ListOptionsExpirations(underlying);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsExpirations: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) |
List
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List expiration dates for specified underlying | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsContract> ListOptionsContracts (string underlying, long? expiration = null)
List all contracts for specified underlying and expiration date
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsContractsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var expiration = 1636588800; // long? | Unix timestamp of expiration date (optional)
try
{
// List all contracts for specified underlying and expiration date
List<OptionsContract> result = apiInstance.ListOptionsContracts(underlying, expiration);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsContracts: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| expiration | long? | Unix timestamp of expiration date | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsContract GetOptionsContract (string contract)
Query specified contract details
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetOptionsContractExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20211130-65000-C"; // string |
try
{
// Query specified contract details
OptionsContract result = apiInstance.GetOptionsContract(contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.GetOptionsContract: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsSettlement> ListOptionsSettlements (string underlying, int? limit = null, int? offset = null, long? from = null, long? to = null)
List settlement history
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsSettlementsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try
{
// List settlement history
List<OptionsSettlement> result = apiInstance.ListOptionsSettlements(underlying, limit, offset, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsSettlements: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsSettlement GetOptionsSettlement (string contract, string underlying, long at)
Get specified contract settlement information
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetOptionsSettlementExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20211130-65000-C"; // string |
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var at = 56; // long |
try
{
// Get specified contract settlement information
OptionsSettlement result = apiInstance.GetOptionsSettlement(contract, underlying, at);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.GetOptionsSettlement: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string | ||
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| at | long |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsMySettlements> ListMyOptionsSettlements (string underlying, string contract = null, int? limit = null, int? offset = null, long? from = null, long? to = null)
Query personal settlement records
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListMyOptionsSettlementsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try
{
// Query personal settlement records
List<OptionsMySettlements> result = apiInstance.ListMyOptionsSettlements(underlying, contract, limit, offset, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListMyOptionsSettlements: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| contract | string | Options contract name | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesOrderBook ListOptionsOrderBook (string contract, string interval = null, int? limit = null, bool? withId = null)
Query options contract order book
Bids will be sorted by price from high to low, while asks sorted reversely
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsOrderBookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name
var interval = "0"; // string | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified (optional) (default to 0)
var limit = 10; // int? | Number of depth levels (optional) (default to 10)
var withId = false; // bool? | Whether to return depth update ID. This ID increments by 1 each time depth changes (optional) (default to false)
try
{
// Query options contract order book
FuturesOrderBook result = apiInstance.ListOptionsOrderBook(contract, interval, limit, withId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsOrderBook: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string | Options contract name | |
| interval | string | Price precision for depth aggregation, 0 means no aggregation, defaults to 0 if not specified | [optional] [default to 0] |
| limit | int? | Number of depth levels | [optional] [default to 10] |
| withId | bool? | Whether to return depth update ID. This ID increments by 1 each time depth changes | [optional] [default to false] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Depth query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsTicker> ListOptionsTickers (string underlying)
Query options market ticker information
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsTickersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
try
{
// Query options market ticker information
List<OptionsTicker> result = apiInstance.ListOptionsTickers(underlying);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsTickers: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsUnderlyingTicker ListOptionsUnderlyingTickers (string underlying)
Query underlying ticker information
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsUnderlyingTickersExample
{
public static void Main()
{
Configuration config = new Config
17C7
uration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying
try
{
// Query underlying ticker information
OptionsUnderlyingTicker result = apiInstance.ListOptionsUnderlyingTickers(underlying);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsUnderlyingTickers: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsCandlestick> ListOptionsCandlesticks (string contract, int? limit = null, long? from = null, long? to = null, string interval = null)
Options contract market candlestick chart
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsCandlesticksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
var interval = "5m"; // string | Time interval between data points (optional) (default to 5m)
try
{
// Options contract market candlestick chart
List<OptionsCandlestick> result = apiInstance.ListOptionsCandlesticks(contract, limit, from, to, interval);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsCandlesticks: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string | Options contract name | |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
| interval | string | Time interval between data points | [optional] [default to 5m] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesCandlestick> ListOptionsUnderlyingCandlesticks (string underlying, int? limit = null, long? from = null, long? to = null, string interval = null)
Underlying index price candlestick chart
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsUnderlyingCandlesticksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
var interval = "5m"; // string | Time interval between data points (optional) (default to 5m)
try
{
// Underlying index price candlestick chart
List<FuturesCandlestick> result = apiInstance.ListOptionsUnderlyingCandlesticks(underlying, limit, from, to, interval);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsUnderlyingCandlesticks: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
| interval | string | Time interval between data points | [optional] [default to 5m] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesTrade> ListOptionsTrades (string contract = null, string type = null, int? limit = null, int? offset = null, long? from = null, long? to = null)
Market trade records
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsTradesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
var type = "1546935600"; // string | `C` for call, `P` for put (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try
{
// Market trade records
List<FuturesTrade> result = apiInstance.ListOptionsTrades(contract, type, limit, offset, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsTrades: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string | Options contract name | [optional] |
| type | string | `C` for call, `P` for put | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsAccount ListOptionsAccount ()
Query account information
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
try
{
// Query account information
OptionsAccount result = apiInstance.ListOptionsAccount();
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsAccount: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsAccountBook> ListOptionsAccountBook (int? limit = null, int? offset = null, long? from = null, long? to = null, string type = null)
Query account change history
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsAccountBookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
var type = "dnw"; // string | Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L (optional)
try
{
// Query account change history
List<OptionsAccountBook> result = apiInstance.ListOptionsAccountBook(limit, offset, from, to, type);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsAccountBook: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
| type | string | Change types: - dnw: Deposit & Withdrawal - prem: Trading premium - fee: Trading fee - refr: Referrer rebate - set: Settlement P&L | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsPosition> ListOptionsPositions (string underlying = null)
List user's positions of specified underlying
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsPositionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (optional)
try
{
// List user's positions of specified underlying
List<OptionsPosition> result = apiInstance.ListOptionsPositions(underlying);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsPositions: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsPosition GetOptionsPosition (string contract)
Get specified contract position
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetOptionsPositionExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20211130-65000-C"; // string |
try
{
// Get specified contract position
OptionsPosition result = apiInstance.GetOptionsPosition(contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.GetOptionsPosition: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsPositionClose> ListOptionsPositionClose (string underlying, string contract = null)
List user's liquidation history of specified underlying
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsPositionCloseExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
try
{
// List user's liquidation history of specified underlying
List<OptionsPositionClose> result = apiInstance.ListOptionsPositionClose(underlying, contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsPositionClose: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| contract | string | Options contract name | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsOrder> ListOptionsOrders (string status, string contract = null, string underlying = null, int? limit = null, int? offset = null, long? from = null, long? to = null)
List options orders
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListOptionsOrdersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var status = "open"; // string | Query order list based on status
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
var underlying = "BTC_USDT"; // string | Underlying (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try
{
// List options orders
List<OptionsOrder> result = apiInstance.ListOptionsOrders(status, contract, underlying, limit, offset, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListOptionsOrders: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| status | string | Query order list based on status | |
| contract | string | Options contract name | [optional] |
| underlying | string | Underlying | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsOrder CreateOptionsOrder (OptionsOrder optionsOrder)
Create an options order
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class CreateOptionsOrderExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var optionsOrder = new OptionsOrder(); // OptionsOrder |
try
{
// Create an options order
OptionsOrder result = apiInstance.CreateOptionsOrder(optionsOrder);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.CreateOptionsOrder: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| optionsOrder | OptionsOrder |
- Content-Type: application/json < 73D9 li>Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Order detail | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsOrder> CancelOptionsOrders (string contract = null, string underlying = null, string side = null)
Cancel all orders with 'open' status
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class CancelOptionsOrdersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
var underlying = "BTC_USDT"; // string | Underlying (optional)
var side = "ask"; // string | Specify all bids or all asks, both included if not specified (optional)
try
{
// Cancel all orders with 'open' status
List<OptionsOrder> result = apiInstance.CancelOptionsOrders(contract, underlying, side);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.CancelOptionsOrders: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| contract | string | Options contract name | [optional] |
| underlying | string | Underlying | [optional] |
| side | string | Specify all bids or all asks, both included if not specified | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Batch cancellation successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsOrder GetOptionsOrder (long orderId)
Query single order details
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetOptionsOrderExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var orderId = 12345; // long | Order ID returned when order is successfully created
try
{
// Query single order details
OptionsOrder result = apiInstance.GetOptionsOrder(orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.GetOptionsOrder: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | long | Order ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order detail | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsOrder CancelOptionsOrder (long orderId)
Cancel single order
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class CancelOptionsOrderExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var orderId = 12345; // long | Order ID returned when order is successfully created
try
{
// Cancel single order
OptionsOrder result = apiInstance.CancelOptionsOrder(orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.CancelOptionsOrder: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | long | Order ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order detail | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TriggerTime CountdownCancelAllOptions (CountdownCancelAllOptionsTask countdownCancelAllOptionsTask)
Countdown cancel orders
Option order heartbeat detection, when the timeout time set by the user is reached, if the existing countdown is not canceled or a new countdown is set, the related option pending order will be automatically canceled. This interface can be called repeatedly to set a new countdown or cancel the countdown. Usage example: Repeat this interface at intervals of 30 seconds, with each countdown timeout set to 30 (seconds). If this interface is not called again within 30 seconds, all pending orders on the underlying contract you specified will be automatically cancelled. If underlying contract is not specified, user will be automatically cancelled If timeout is set to 0 within 30 seconds, the countdown timer will expire and the automatic order cancellation function will be cancelled.
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class CountdownCancelAllOptionsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var countdownCancelAllOptionsTask = new CountdownCancelAllOptionsTask(); // CountdownCancelAllOptionsTask |
try
{
// Countdown cancel orders
TriggerTime result = apiInstance.CountdownCancelAllOptions(countdownCancelAllOptionsTask);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.CountdownCancelAllOptions: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| countdownCancelAllOptionsTask | CountdownCancelAllOptionsTask |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Countdown set successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsMyTrade> ListMyOptionsTrades (string underlying, string contract = null, int? limit = null, int? offset = null, long? from = null, long? to = null)
Query personal trading records
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ListMyOptionsTradesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (Obtained by listing underlying endpoint)
var contract = "BTC_USDT-20210916-5000-C"; // string | Options contract name (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
var from = 1547706332; // long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) (optional)
var to = 1547706332; // long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp (optional)
try
{
// Query personal trading records
List<OptionsMyTrade> result = apiInstance.ListMyOptionsTrades(underlying, contract, limit, offset, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ListMyOptionsTrades: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying (Obtained by listing underlying endpoint) | |
| contract | string | Options contract name | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| offset | int? | List offset, starting from 0 | [optional] [default to 0] |
| from | long? | Start timestamp Specify start time, time format is Unix timestamp. If not specified, it defaults to (the data start time of the time range actually returned by to and limit) | [optional] |
| to | long? | Termination Timestamp Specify the end time. If not specified, it defaults to the current time, and the time format is a Unix timestamp | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<OptionsMMP> GetOptionsMMP (string underlying = null)
MMP Query.
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class GetOptionsMMPExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var underlying = "BTC_USDT"; // string | Underlying (optional)
try
{
// MMP Query.
List<OptionsMMP> result = apiInstance.GetOptionsMMP(underlying);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.GetOptionsMMP: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| underlying | string | Underlying | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsMMP SetOptionsMMP (OptionsMMP optionsMMP)
MMP Settings
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class SetOptionsMMPExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var optionsMMP = new OptionsMMP(); // OptionsMMP |
try
{
// MMP Settings
OptionsMMP result = apiInstance.SetOptionsMMP(optionsMMP);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.SetOptionsMMP: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| optionsMMP | OptionsMMP |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | MMP Information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OptionsMMP ResetOptionsMMP (OptionsMMPReset optionsMMPReset)
MMP Reset
using System.Collections.Generic;
using System.Diagnostics;
using Io.Gate.GateApi.Api;
using Io.Gate.GateApi.Client;
using Io.Gate.GateApi.Model;
namespace Example
{
public class ResetOptionsMMPExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
config.SetGateApiV4KeyPair("YOUR_API_KEY", "YOUR_API_SECRET");
var apiInstance = new OptionsApi(config);
var optionsMMPReset = new OptionsMMPReset(); // OptionsMMPReset |
try
{
// MMP Reset
OptionsMMP result = apiInstance.ResetOptionsMMP(optionsMMPReset);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling OptionsApi.ResetOptionsMMP: " + e.Message);
Debug.Print("Exception label: {0}, message: {1}", e.ErrorLabel, e.ErrorMessage);
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| optionsMMPReset | OptionsMMPReset |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | MMP Information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]