All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
ListDeliveryContracts | GET /delivery/{settle}/contracts | List all futures contracts |
GetDeliveryContract | GET /delivery/{settle}/contracts/{contract} | Get a single contract |
ListDeliveryOrderBook | GET /delivery/{settle}/order_book | Futures order book |
ListDeliveryTrades | GET /delivery/{settle}/trades | Futures trading history |
ListDeliveryCandlesticks | GET /delivery/{settle}/candlesticks | Get futures candlesticks |
ListDeliveryTickers | GET /delivery/{settle}/tickers | List futures tickers |
ListDeliveryInsuranceLedger | GET /delivery/{settle}/insurance | Futures insurance balance history |
ListDeliveryAccounts | GET /delivery/{settle}/accounts | Query futures account |
ListDeliveryAccountBook | GET /delivery/{settle}/account_book | Query account book |
ListDeliveryPositions | GET /delivery/{settle}/positions | List all positions of a user |
GetDeliveryPosition | GET /delivery/{settle}/positions/{contract} | Get single position |
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 | List futures orders |
CreateDeliveryOrder | POST /delivery/{settle}/orders | Create a futures order |
CancelDeliveryOrders | DELETE /delivery/{settle}/orders | Cancel all `open` orders matched |
GetDeliveryOrder | GET /delivery/{settle}/orders/{order_id} | Get a single order |
CancelDeliveryOrder | DELETE /delivery/{settle}/orders/{order_id} | Cancel a single order |
GetMyDeliveryTrades | GET /delivery/{settle}/my_trades | List personal trading history |
ListDeliveryPositionClose | GET /delivery/{settle}/position_close | List position close history |
ListDeliveryLiquidates | GET /delivery/{settle}/liquidates | List liquidation history |
ListDeliverySettlements | GET /delivery/{settle}/settlements | List settlement history |
ListPriceTriggeredDeliveryOrders | GET /delivery/{settle}/price_orders | List all auto orders |
CreatePriceTriggeredDeliveryOrder | POST /delivery/{settle}/price_orders | Create a price-triggered order |
CancelPriceTriggeredDeliveryOrderList | DELETE /delivery/{settle}/price_orders | Cancel all open orders |
GetPriceTriggeredDeliveryOrder | GET /delivery/{settle}/price_orders/{order_id} | Get a price-triggered order |
CancelPriceTriggeredDeliveryOrder | DELETE /delivery/{settle}/price_orders/{order_id} | cancel a price-triggered order |
List<DeliveryContract> ListDeliveryContracts (string settle)
List 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
{
// List 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeliveryContract GetDeliveryContract (string settle, string contract)
Get a single contract
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
{
// Get a single contract
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]
FuturesOrderBook ListDeliveryOrderBook (string settle, string contract, string interval = null, int? limit = null, bool? withId = null)
Futures 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 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 | Order depth. 0 means no aggregation is applied. default to 0 (optional) (default to 0)
var limit = 10; // int? | Maximum number of order depth data in asks or bids (optional) (default to 10)
var withId = false; // bool? | Whether the order book update ID will be returned. This ID increases by 1 on every order book update (optional) (default to false)
try
{
// Futures order book
FuturesOrderBook 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 | Order depth. 0 means no aggregation is applied. default to 0 | [optional] [default to 0] |
limit | int? | Maximum number of order depth data in asks or bids | [optional] [default to 10] |
withId | bool? | Whether the order book update ID will be returned. This ID increases by 1 on every order book update | [optional] [default to false] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Order book retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesTrade> ListDeliveryTrades (string settle, string contract, int? limit = null, string lastId = null, long? from = null, long? to = null)
Futures trading 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 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 to be returned in a single list (optional) (default to 100)
var lastId = "12345"; // string | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range (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 trading history
List<FuturesTrade> 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 to be returned in a single list | [optional] [default to 100] |
lastId | string | Specify the starting point for this list based on a previously retrieved id This parameter is deprecated. Use `from` and `to` instead to limit time range | [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 | - |
[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)
Get futures candlesticks
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? | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time (optional)
var limit = 100; // int? | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. (optional) (default to 100)
var interval = "5m"; // string | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 (optional) (default to 5m)
try
{
// Get futures candlesticks
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? | End time of candlesticks, formatted in Unix timestamp in seconds. Default to current time | [optional] |
limit | int? | Maximum recent data points to return. `limit` is conflicted with `from` and `to`. If either `from` or `to` is specified, request will be rejected. | [optional] [default to 100] |
interval | string | Interval time between data points. Note that `1w` means natual week(Mon-Sun), while `7d` means every 7d since unix 0 | [optional] [default to 5m] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesTicker> ListDeliveryTickers (string settle, string contract = null)
List futures tickers
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
{
// List futures tickers
List<FuturesTicker> 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 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<InsuranceRecord> ListDeliveryInsuranceLedger (string settle, int? limit = null)
Futures insurance balance 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 to be returned in a single list (optional) (default to 100)
try
{
// Futures insurance balance 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 to be 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 | Successfully retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesAccount ListDeliveryAccounts (string settle)
Query 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
{
// Query futures account
FuturesAccount 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesAccountBook> ListDeliveryAccountBook (string settle, int? limit = null, long? from = null, long? to = null, string type = null)
Query account book
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 to be returned in a single list (optional) (default to 100)
var from = 1547706332; // long? | Start timestamp (optional)
var to = 1547706332; // long? | End timestamp (optional)
var type = "dnw"; // string | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate (optional)
try
{
// Query account book
List<FuturesAccountBook> 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 to be returned in a single list | [optional] [default to 100] |
from | long? | Start timestamp | [optional] |
to | long? | End timestamp | [optional] |
type | string | Changing Type: - dnw: Deposit & Withdraw - pnl: Profit & Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit & Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<Position> ListDeliveryPositions (string settle)
List all positions of a user
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
{
// List all positions of a user
List<Position> 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Position GetDeliveryPosition (string settle, string contract)
Get single 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 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
Position 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]
Position 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. Use positive number to increase margin, negative number otherwise.
try
{
// Update position margin
Position 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. Use positive number to increase margin, negative number otherwise. |
- 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]
Position 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
Position 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]
Position 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
Position 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<FuturesOrder> ListDeliveryOrders (string settle, string status, string contract = null, int? limit = null, int? offset = null, string lastId = null, int? countTotal = null)
List futures orders
Zero-filled order 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 | Only list the orders with this status
var contract = "BTC_USDT_20200814"; // string | Futures contract (optional)
var limit = 100; // int? | Maximum number of records to be 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 | Specify list staring point using the `id` of last record in previous list-query results (optional)
var countTotal = 0; // int? | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
try
{
// List futures orders
List<FuturesOrder> 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 | Only list the orders with this status | |
contract | string | Futures contract | [optional] |
limit | int? | Maximum number of records to be returned in a single list | [optional] [default to 100] |
offset | int? | List offset, starting from 0 | [optional] [default to 0] |
lastId | string | Specify list staring point using the `id` of last record in previous list-query results | [optional] |
countTotal | int? | Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | * X-Pagination-Limit - Request limit specified * X-Pagination-Offset - Request offset specified * X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesOrder CreateDeliveryOrder (string settle, FuturesOrder futuresOrder)
Create a futures order
Zero-filled order 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 futuresOrder = new FuturesOrder(); // FuturesOrder |
try
{
// Create a futures order
FuturesOrder result = apiInstance.CreateDeliveryOrder(settle, futuresOrder);
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 | |
futuresOrder | FuturesOrder |
- 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<FuturesOrder> CancelDeliveryOrders (string settle, string contract, string side = null)
Cancel all open
orders matched
Zero-filled order 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 | All bids or asks. Both included if not specified (optional)
try
{
// Cancel all `open` orders matched
List<FuturesOrder> 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 | All bids or asks. Both included if not specified | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | All orders matched cancelled | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesOrder GetDeliveryOrder (string settle, string orderId)
Get a single order
Zero-filled order 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 | Retrieve the data of the order with the specified ID
try
{
// Get a single order
FuturesOrder 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 | Retrieve the data of the order with the specified ID |
- 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]
FuturesOrder CancelDeliveryOrder (string settle, string orderId)
Cancel a 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 | Retrieve the data of the order with the specified ID
try
{
// Cancel a single order
FuturesOrder 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 | Retrieve the data of the order with the specified ID |
- 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<MyFuturesTrade> GetMyDeliveryTrades (string settle, string contract = null, long? order = null, int? limit = null, int? offset = null, string lastId = null, int? countTotal = null)
List personal trading 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 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 to be 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 | Specify list staring point using the `id` of last record in previous list-query results (optional)
var countTotal = 0; // int? | Whether to return total number matched. Default to 0(no return) (optional) (default to 0)
try
{
// List personal trading history
List<MyFuturesTrade> 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 to be returned in a single list | [optional] [default to 100] |
offset | int? | List offset, starting from 0 | [optional] [default to 0] |
lastId | string | Specify list staring point using the `id` of last record in previous list-query results | [optional] |
countTotal | int? | Whether to return total number matched. Default to 0(no return) | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | * X-Pagination-Limit - Request limit specified * X-Pagination-Offset - Request offset specified * X-Pagination-Total - Total number matched. Only returned if `count_total` set to 1 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<PositionClose> ListDeliveryPositionClose (string settle, string contract = null, int? limit = null)
List 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 to be returned in a single list (optional) (default to 100)
try
{
// List position close history
List<PositionClose> 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 to be returned in a single list | [optional] [default to 100] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesLiquidate> ListDeliveryLiquidates (string settle, string contract = null, int? limit = null, int? at = null)
List 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 to be returned in a single list (optional) (default to 100)
var at = 0; // int? | Specify a liquidation timestamp (optional) (default to 0)
try
{
// List liquidation history
List<FuturesLiquidate> 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 to be returned in a single list | [optional] [default to 100] |
at | int? | Specify a liquidation timestamp | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | - |
[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)
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 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 to be returned in a single list (optional) (default to 100)
var at = 0; // int? | Specify a settlement timestamp (optional) (default to 0)
try
{
// List settlement history
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 to be returned in a single list | [optional] [default to 100] |
at | int? | Specify a settlement timestamp | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | List retrieved | - |
[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)
List 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 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 | Only list the orders with this status
var contract = "BTC_USDT"; // string | Futures contract, return related data only if specified (optional)
var limit = 100; // int? | Maximum number of records to be returned in a single list (optional) (default to 100)
var offset = 0; // int? | List offset, starting from 0 (optional) (default to 0)
try
{
// List all auto orders
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 | Only list the orders with this status | |
contract | string | Futures contract, return related data only if specified | [optional] |
limit | int? | Maximum number of records to be 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TriggerOrderResponse CreatePriceTriggeredDeliveryOrder (string settle, FuturesPriceTriggeredOrder futuresPriceTriggeredOrder)
Create a 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 a 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 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<FuturesPriceTriggeredOrder> CancelPriceTriggeredDeliveryOrderList (string settle, string contract)
Cancel all open 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 open 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 cancellation request accepted. Query order status by listing orders | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesPriceTriggeredOrder GetPriceTriggeredDeliveryOrder (string settle, string orderId)
Get a 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 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 | Retrieve the data of the order with the specified ID
try
{
// Get a price-triggered order
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 | Retrieve the data of the order with the specified ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Auto order detail | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FuturesPriceTriggeredOrder CancelPriceTriggeredDeliveryOrder (string settle, string orderId)
cancel a 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 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 | Retrieve the data of the order with the specified ID
try
{
// cancel a price-triggered 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 | Retrieve the data of the order with the specified ID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Auto order detail | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]