All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| ListDeliveryContracts | GET /delivery/{settle}/contracts | Query all futures contracts |
| GetDeliveryContract | GET /delivery/{settle}/contracts/{contract} | Query single contract information |
| ListDeliveryOrderBook | GET /delivery/{settle}/order_book | Query futures market depth information |
| ListDeliveryTrades | GET /delivery/{settle}/trades | Futures market transaction records |
| ListDeliveryCandlesticks | GET /delivery/{settle}/candlesticks | Futures market K-line chart |
| ListDeliveryTickers | GET /delivery/{settle}/tickers | Get all futures trading statistics |
| ListDeliveryInsuranceLedger | GET /delivery/{settle}/insurance | Futures market insurance fund history |
| ListDeliveryAccounts | GET /delivery/{settle}/accounts | Get futures account |
| ListDeliveryAccountBook | GET /delivery/{settle}/account_book | Query futures account change history |
| ListDeliveryPositions | GET /delivery/{settle}/positions | Get user position list |
| GetDeliveryPosition | GET /delivery/{settle}/positions/{contract} | Get single position information |
| UpdateDeliveryPositionMargin | POST /delivery/{settle}/positions/{contract}/margin | Update position margin |
| UpdateDeliveryPositionLeverage | POST /delivery/{settle}/positions/{contract}/leverage | Update position leverage |
| UpdateDeliveryPositionRiskLimit | POST /delivery/{settle}/positions/{contract}/risk_limit | Update position risk limit |
| ListDeliveryOrders | GET /delivery/{settle}/orders | Query futures order list |
| CreateDeliveryOrder | POST /delivery/{settle}/orders | Place futures order |
| CancelDeliveryOrders | DELETE /delivery/{settle}/orders | Cancel all orders with 'open' status |
| GetDeliveryOrder | GET /delivery/{settle}/orders/{order_id} | Query single order details |
| CancelDeliveryOrder | DELETE /delivery/{settle}/orders/{order_id} | Cancel single order |
| GetMyDeliveryTrades | GET /delivery/{settle}/my_trades | Query personal trading records |
| ListDeliveryPositionClose | GET /delivery/{settle}/position_close | Query position close history |
| ListDeliveryLiquidates | GET /delivery/{settle}/liquidates | Query liquidation history |
| ListDeliverySettlements | GET /delivery/{settle}/settlements | Query settlement records |
| ListDeliveryRiskLimitTiers | GET /delivery/{settle}/risk_limit_tiers | Query risk limit tiers |
| ListPriceTriggeredDeliveryOrders | GET /delivery/{settle}/price_orders | Query auto order list |
| CreatePriceTriggeredDeliveryOrder | POST /delivery/{settle}/price_orders | Create price-triggered order |
| CancelPriceTriggeredDeliveryOrderList | DELETE /delivery/{settle}/price_orders | Cancel all auto orders |
| GetPriceTriggeredDeliveryOrder | GET /delivery/{settle}/price_orders/{order_id} | Query single auto order details |
| CancelPriceTriggeredDeliveryOrder | DELETE /delivery/{settle}/price_orders/{order_id} | Cancel single auto order |
List<DeliveryContract> ListDeliveryContracts (string settle)
Query all futures contracts
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 ListDeliveryContractsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
try
{
// Query all futures contracts
List<DeliveryContract> result = apiInstance.ListDeliveryContracts(settle);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryContracts: " + 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 |
|---|---|---|---|
| settle | string | Settle currency |
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]
DeliveryContract GetDeliveryContract (string settle, string contract)
Query single contract 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 GetDeliveryContractExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
try
{
// Query single contract information
DeliveryContract result = apiInstance.GetDeliveryContract(settle, contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.GetDeliveryContract: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Contract information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryOrderBook ListDeliveryOrderBook (string settle, string contract, string interval = null, int? limit = null, bool? withId = null)
Query futures market depth information
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 ListDeliveryOrderBookExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var interval = "0"; // string | Price precision for merged depth. 0 means no merging. If not specified, defaults to 0 (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 the depth changes (optional) (default to false)
try
{
// Query futures market depth information
DeliveryOrderBook result = apiInstance.ListDeliveryOrderBook(settle, contract, interval, limit, withId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryOrderBook: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| interval | string | Price precision for merged depth. 0 means no merging. If not specified, defaults to 0 | [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 the 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<DeliveryTrade> ListDeliveryTrades (string settle, string contract, int? limit = null, string lastId = null, long? from = null, long? to = null)
Futures market transaction 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 ListDeliveryTradesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var lastId = "12345"; // string | Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang (optional)
var from = 1546905600; // long? | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. (optional)
var to = 1546935600; // long? | Specify end time in Unix seconds, default to current time. (optional)
try
{
// Futures market transaction records
List<DeliveryTrade> result = apiInstance.ListDeliveryTrades(settle, contract, limit, lastId, from, to);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryTrades: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| lastId | string | Use the ID of the last record in the previous list as the starting point for the next list.This field is no longer supported. For new requests, please use the fromand tofields to specify the time rang | [optional] |
| from | long? | Specify starting time in Unix seconds. If not specified, `to` and `limit` will be used to limit response items. If items between `from` and `to` are more than `limit`, only `limit` number will be returned. | [optional] |
| to | long? | Specify end time in Unix seconds, default to current time. | [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]
List<DeliveryCandlestick> ListDeliveryCandlesticks (string settle, string contract, long? from = null, long? to = null, int? limit = null, string interval = null)
Futures market K-line chart
Return specified contract candlesticks. If prefix contract with mark_, the contract's mark price candlesticks are returned; if prefix with index_, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying from, to and interval
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 ListDeliveryCandlesticksExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var from = 1546905600; // long? | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified (optional)
var to = 1546935600; // long? | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision (optional)
var limit = 100; // int? | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
var interval = "5m"; // string | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time (optional) (default to 5m)
try
{
// Futures market K-line chart
List<DeliveryCandlestick> result = apiInstance.ListDeliveryCandlesticks(settle, contract, from, to, limit, interval);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryCandlesticks: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| from | long? | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified | [optional] |
| to | long? | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision | [optional] |
| limit | int? | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] |
| interval | string | Time interval between data points, note that 1w represents a natural week, 7d time is aligned with Unix initial time | [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<DeliveryTicker> ListDeliveryTickers (string settle, string contract = null)
Get all futures trading statistics
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 ListDeliveryTickersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
try
{
// Get all futures trading statistics
List<DeliveryTicker> result = apiInstance.ListDeliveryTickers(settle, contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryTickers: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [optional] |
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<InsuranceRecord> ListDeliveryInsuranceLedger (string settle, int? limit = null)
Futures market insurance fund 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 ListDeliveryInsuranceLedgerExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
try
{
// Futures market insurance fund history
List<InsuranceRecord> result = apiInstance.ListDeliveryInsuranceLedger(settle, limit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryInsuranceLedger: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
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]
DeliveryAccount ListDeliveryAccounts (string settle)
Get futures account
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 ListDeliveryAccountsExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
try
{
// Get futures account
DeliveryAccount result = apiInstance.ListDeliveryAccounts(settle);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryAccounts: " + 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 |
|---|---|---|---|
| settle | string | Settle currency |
- 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<DeliveryAccountBook> ListDeliveryAccountBook (string settle, int? limit = null, long? from = null, long? to = null, string type = null)
Query futures 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 ListDeliveryAccountBookExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
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 type = "dnw"; // string | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates (optional)
try
{
// Query futures account change history
List<DeliveryAccountBook> result = apiInstance.ListDeliveryAccountBook(settle, limit, from, to, type);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryAccountBook: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| 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] |
| type | string | Change types: - dnw: Deposit and withdrawal - pnl: Profit and loss from position reduction - fee: Trading fees - refr: Referrer rebates - fund: Funding fees - point_dnw: Point card deposit and withdrawal - point_fee: Point card trading fees - point_refr: Point card referrer rebates | [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<DeliveryPosition> ListDeliveryPositions (string settle)
Get user position list
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 ListDeliveryPositionsExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
try
{
// Get user position list
List<DeliveryPosition> result = apiInstance.ListDeliveryPositions(settle);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryPositions: " + 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 |
|---|---|---|---|
| settle | string | Settle currency |
- 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]
DeliveryPosition GetDeliveryPosition (string settle, string contract)
Get single position 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 GetDeliveryPositionExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
try
{
// Get single position information
DeliveryPosition result = apiInstance.GetDeliveryPosition(settle, contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.GetDeliveryPosition: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Position information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryPosition UpdateDeliveryPositionMargin (string settle, string contract, string change)
Update position margin
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 UpdateDeliveryPositionMarginExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var change = "0.01"; // string | Margin change amount, positive number increases, negative number decreases
try
{
// Update position margin
DeliveryPosition result = apiInstance.UpdateDeliveryPositionMargin(settle, contract, change);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.UpdateDeliveryPositionMargin: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| change | string | Margin change amount, positive number increases, negative number decreases |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Position information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryPosition UpdateDeliveryPositionLeverage (string settle, string contract, string leverage)
Update position leverage
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 UpdateDeliveryPositionLeverageExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var leverage = "10"; // string | New position leverage
try
{
// Update position leverage
DeliveryPosition result = apiInstance.UpdateDeliveryPositionLeverage(settle, contract, leverage);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.UpdateDeliveryPositionLeverage: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| leverage | string | New position leverage |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Position information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryPosition UpdateDeliveryPositionRiskLimit (string settle, string contract, string riskLimit)
Update position risk limit
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 UpdateDeliveryPositionRiskLimitExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var riskLimit = "10"; // string | New position risk limit
try
{
// Update position risk limit
DeliveryPosition result = apiInstance.UpdateDeliveryPositionRiskLimit(settle, contract, riskLimit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.UpdateDeliveryPositionRiskLimit: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| riskLimit | string | New position risk limit |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Position information | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<DeliveryOrder> ListDeliveryOrders (string settle, string status, string contract = null, int? limit = null, int? offset = null, string lastId = null, int? countTotal = null)
Query futures order list
Zero-fill orders cannot be retrieved 10 minutes after order cancellation
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 ListDeliveryOrdersExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var status = "open"; // string | Query order list based on status
var contract = "BTC_USDT_20200814"; // string | Futures contract (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 lastId = "12345"; // string | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
var countTotal = 0; // int? | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0)
try
{
// Query futures order list
List<DeliveryOrder> result = apiInstance.ListDeliveryOrders(settle, status, contract, limit, offset, lastId, countTotal);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryOrders: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| status | string | Query order list based on status | |
| contract | string | Futures contract | [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] |
| lastId | string | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] |
| countTotal | int? | Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination * X-Pagination-Offset - Offset specified for pagination * X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryOrder CreateDeliveryOrder (string settle, DeliveryOrder deliveryOrder)
Place futures order
Zero-fill orders cannot be retrieved 10 minutes after order cancellation
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 CreateDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var deliveryOrder = new DeliveryOrder(); // DeliveryOrder |
try
{
// Place futures order
DeliveryOrder result = apiInstance.CreateDeliveryOrder(settle, deliveryOrder);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CreateDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| deliveryOrder | DeliveryOrder |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Order details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<DeliveryOrder> CancelDeliveryOrders (string settle, string contract, string side = null)
Cancel all orders with 'open' status
Zero-fill orders cannot be retrieved 10 minutes after order cancellation
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 CancelDeliveryOrdersExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract
var side = "ask"; // string | Specify all bids or all asks, both included if not specified (optional)
try
{
// Cancel all orders with 'open' status
List<DeliveryOrder> result = apiInstance.CancelDeliveryOrders(settle, contract, side);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CancelDeliveryOrders: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | |
| 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]
DeliveryOrder GetDeliveryOrder (string settle, string orderId)
Query single order details
Zero-fill orders cannot be retrieved 10 minutes after order cancellation
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 GetDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var orderId = "12345"; // string | ID returned when order is successfully created
try
{
// Query single order details
DeliveryOrder result = apiInstance.GetDeliveryOrder(settle, orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.GetDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| orderId | string | ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryOrder CancelDeliveryOrder (string settle, string 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 CancelDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var orderId = "12345"; // string | ID returned when order is successfully created
try
{
// Cancel single order
DeliveryOrder result = apiInstance.CancelDeliveryOrder(settle, orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CancelDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| orderId | string | ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<DeliveryMyTrade> GetMyDeliveryTrades (string settle, string contract = null, long? order = null, int? limit = null, int? offset = null, string lastId = null, int? countTotal = 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 GetMyDeliveryTradesExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
var order = 12345; // long? | Futures order ID, return related data only if specified (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 lastId = "12345"; // string | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used (optional)
var countTotal = 0; // int? | Whether to return total number matched, defaults to 0 (no return) (optional) (default to 0)
try
{
// Query personal trading records
List<DeliveryMyTrade> result = apiInstance.GetMyDeliveryTrades(settle, contract, order, limit, offset, lastId, countTotal);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.GetMyDeliveryTrades: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [optional] |
| order | long? | Futures order ID, return related data only if specified | [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] |
| lastId | string | Use the ID of the last record in the previous list as the starting point for the next list Operations based on custom IDs can only be checked when orders are pending. After orders are completed (filled/cancelled), they can be checked within 1 hour after completion. After expiration, only order IDs can be used | [optional] |
| countTotal | int? | Whether to return total number matched, defaults to 0 (no return) | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | * X-Pagination-Limit - Limit specified for pagination * X-Pagination-Offset - Offset specified for pagination * X-Pagination-Total - Total number matched, only returned if `count_total` is set to 1 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<DeliveryPositionClose> ListDeliveryPositionClose (string settle, string contract = null, int? limit = null)
Query position close 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 ListDeliveryPositionCloseExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
try
{
// Query position close history
List<DeliveryPositionClose> result = apiInstance.ListDeliveryPositionClose(settle, contract, limit);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryPositionClose: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
- 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<DeliveryLiquidate> ListDeliveryLiquidates (string settle, string contract = null, int? limit = null, int? at = null)
Query liquidation 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 ListDeliveryLiquidatesExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var at = 0; // int? | Specify liquidation timestamp (optional) (default to 0)
try
{
// Query liquidation history
List<DeliveryLiquidate> result = apiInstance.ListDeliveryLiquidates(settle, contract, limit, at);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryLiquidates: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| at | int? | Specify liquidation timestamp | [optional] [default to 0] |
- 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<DeliverySettlement> ListDeliverySettlements (string settle, string contract = null, int? limit = null, int? at = null)
Query 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 ListDeliverySettlementsExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
var limit = 100; // int? | Maximum number of records returned in a single list (optional) (default to 100)
var at = 0; // int? | Specify settlement timestamp (optional) (default to 0)
try
{
// Query settlement records
List<DeliverySettlement> result = apiInstance.ListDeliverySettlements(settle, contract, limit, at);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliverySettlements: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [optional] |
| limit | int? | Maximum number of records returned in a single list | [optional] [default to 100] |
| at | int? | Specify settlement timestamp | [optional] [default to 0] |
- 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<DeliveryLimitRiskTiers> ListDeliveryRiskLimitTiers (string settle, string contract = null, int? limit = null, int? offset = null)
Query risk limit tiers
When the 'contract' parameter is not passed, the default is to query the risk limits for the top 100 markets. 'Limit' and 'offset' correspond to pagination queries at the market level, not to the length of the returned array. This only takes effect when the contract parameter is empty.
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 ListDeliveryRiskLimitTiersExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.gateio.ws/api/v4";
var apiInstance = new DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT_20200814"; // string | Futures contract (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)
try
{
// Query risk limit tiers
List<DeliveryLimitRiskTiers> result = apiInstance.ListDeliveryRiskLimitTiers(settle, contract, limit, offset);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListDeliveryRiskLimitTiers: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract | [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] |
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<FuturesPriceTriggeredOrder> ListPriceTriggeredDeliveryOrders (string settle, string status, string contract = null, int? limit = null, int? offset = null)
Query auto order list
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 ListPriceTriggeredDeliveryOrdersExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var status = "status_example"; // string | Query order list based on status
var contract = "BTC_USDT"; // string | Futures contract, return related data only if specified (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)
try
{
// Query auto order list
List<FuturesPriceTriggeredOrder> result = apiInstance.ListPriceTriggeredDeliveryOrders(settle, status, contract, limit, offset);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.ListPriceTriggeredDeliveryOrders: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| status | string | Query order list based on status | |
| contract | string | Futures contract, return related data only if specified | [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] |
List<FuturesPriceTriggeredOrder>
- 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]
TriggerOrderResponse CreatePriceTriggeredDeliveryOrder (string settle, FuturesPriceTriggeredOrder futuresPriceTriggeredOrder)
Create price-triggered 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 CreatePriceTriggeredDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var futuresPriceTriggeredOrder = new FuturesPriceTriggeredOrder(); // FuturesPriceTriggeredOrder |
try
{
// Create price-triggered order
TriggerOrderResponse result = apiInstance.CreatePriceTriggeredDeliveryOrder(settle, futuresPriceTriggeredOrder);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CreatePriceTriggeredDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| futuresPriceTriggeredOrder | FuturesPriceTriggeredOrder |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Order created successfully | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesPriceTriggeredOrder> CancelPriceTriggeredDeliveryOrderList (string settle, string contract)
Cancel all auto 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 CancelPriceTriggeredDeliveryOrderListExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var contract = "BTC_USDT"; // string | Futures contract
try
{
// Cancel all auto orders
List<FuturesPriceTriggeredOrder> result = apiInstance.CancelPriceTriggeredDeliveryOrderList(settle, contract);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CancelPriceTriggeredDeliveryOrderList: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| contract | string | Futures contract |
List<FuturesPriceTriggeredOrder>
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Batch cancel request is received and processed. Success is determined based on the order list | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesPriceTriggeredOrder GetPriceTriggeredDeliveryOrder (string settle, string orderId)
Query single auto 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 GetPriceTriggeredDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var orderId = "orderId_example"; // string | ID returned when order is successfully created
try
{
// Query single auto order details
FuturesPriceTriggeredOrder result = apiInstance.GetPriceTriggeredDeliveryOrder(settle, orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.GetPriceTriggeredDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| orderId | string | ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Auto order details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesPriceTriggeredOrder CancelPriceTriggeredDeliveryOrder (string settle, string orderId)
Cancel single auto 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 CancelPriceTriggeredDeliveryOrderExample
{
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 DeliveryApi(config);
var settle = "usdt"; // string | Settle currency
var orderId = "orderId_example"; // string | ID returned when order is successfully created
try
{
// Cancel single auto order
FuturesPriceTriggeredOrder result = apiInstance.CancelPriceTriggeredDeliveryOrder(settle, orderId);
Debug.WriteLine(result);
}
catch (GateApiException e)
{
Debug.Print("Exception when calling DeliveryApi.CancelPriceTriggeredDeliveryOrder: " + 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 |
|---|---|---|---|
| settle | string | Settle currency | |
| orderId | string | ID returned when order is successfully created |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Auto order details | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]