Gate.IO.Api 4.4.1222

dotnet add package Gate.IO.Api --version 4.4.1222                
NuGet\Install-Package Gate.IO.Api -Version 4.4.1222                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gate.IO.Api" Version="4.4.1222" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Gate.IO.Api --version 4.4.1222                
#r "nuget: Gate.IO.Api, 4.4.1222"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Gate.IO.Api as a Cake Addin
#addin nuget:?package=Gate.IO.Api&version=4.4.1222

// Install Gate.IO.Api as a Cake Tool
#tool nuget:?package=Gate.IO.Api&version=4.4.1222                

Gate.IO.Api

A .Net wrapper for the Gate.IO API as described on Gate.IO, including all features the API provides using clear and readable objects.

If you think something is broken, something is missing or have any questions, please open an Issue

Donations

Donations are greatly appreciated and a motivation to keep improving.

BTC: 33WbRKqt7wXARVdAJSu1G1x3QnbyPtZ2bH
ETH: 0x65b02DB9b67B73f5f1E983ae10796f91dEd57B64
USDT (TRC-20): TXwqoD7doMESgitfWa8B2gHL7HuweMmNBJ

Installation

Nuget version Nuget downloads Available on Nuget.

PM> Install-Package Gate.IO.Api

To get started with Gate.IO.Api first you will need to get the library itself. The easiest way to do this is to install the package into your project using NuGet. Using Visual Studio this can be done in two ways.

Using the package manager

In Visual Studio right click on your solution and select 'Manage NuGet Packages for solution...'. A screen will appear which initially shows the currently installed packages. In the top bit select 'Browse'. This will let you download net package from the NuGet server. In the search box type 'Gate.IO.Api' and hit enter. The Gate.IO.Api package should come up in the results. After selecting the package you can then on the right hand side select in which projects in your solution the package should install. After you've selected all project you wish to install and use Gate.IO.Api in hit 'Install' and the package will be downloaded and added to you projects.

Using the package manager console

In Visual Studio in the top menu select 'Tools' → 'NuGet Package Manager' → 'Package Manager Console'. This should open up a command line interface. On top of the interface there is a dropdown menu where you can select the Default Project. This is the project that Gate.IO.Api will be installed in. After selecting the correct project type Install-Package Gate.IO.Api in the command line interface. This should install the latest version of the package in your project.

After doing either of above steps you should now be ready to actually start using Gate.IO.Api.

Getting started

After installing it's time to actually use it. To get started we have to add the Gate.IO.Api namespace: using Gate.IO.Api;.

Gate.IO.Api provides two clients to interact with the Gate.IO.Api. The GateRestApiClient provides all rest API calls. The GateWebSocketClientOptions provides functions to interact with the websocket provided by the Gate.IO.Api. Both clients are disposable and as such can be used in a usingstatement.

Rest Api Examples

using Gate.IO.Api.Futures;
using Gate.IO.Api.Margin;
using Gate.IO.Api.Options;
using Gate.IO.Api.Spot;
using Gate.IO.Api.Swap;
using Gate.IO.Api.Wallet;

var api = new GateRestApiClient();
api.SetApiCredentials("XXXXXXXX-API-KEY-XXXXXXXX", "XXXXXXXX-API-SECRET-XXXXXXXX");

// Wallet Methods
var wallet_01 = await api.Wallet.WithdrawAsync("CURRENCY", 1.0m, "CHAIN", "ADDRESS", "MEMO", "CLIENT-ORDER-ID", ...);
var wallet_02 = await api.Wallet.PushAsync(1_000_000_000, "CURRENCY", 1.0m, ...);
var wallet_03 = await api.Wallet.CancelWithdrawalAsync(1_000_000_000, ...);
var wallet_04 = await api.Wallet.GetCurrencyChainsAsync("CURRENCY", ...);
var wallet_05 = await api.Wallet.GetDepositAddressAsync("CURRENCY", ...);
var wallet_06 = await api.Wallet.GetWithdrawalsAsync(...);
var wallet_07 = await api.Wallet.GetDepositsAsync(...);
var wallet_08 = await api.Wallet.TransfersBetweenTradingAccountsAsync("CURRENCY", GateWalletAccountType.Spot, GateWalletAccountType.Futures, 100.0m, ...);
var wallet_09 = await api.Wallet.TransferBetweenMainAndSubAccountsAsync("CURRENCY", 1_000_000_000, GateWalletTransferDirection.From, 100.0m, ...);
var wallet_10 = await api.Wallet.GetTransfersBetweenMainAndSubAccountsAsync(...);
var wallet_11 = await api.Wallet.TransferBetweenSubAccountsAsync("CURRENCY", 1_000_000_000, GateWalletSubAccountType.Spot, 2_000_000_000, GateWalletSubAccountType.Futures, 100.0m, ...);
var wallet_12 = await api.Wallet.GetWithdrawalStatusAsync(...);
var wallet_13 = await api.Wallet.GetSubAccountBalancesAsync(...);
var wallet_14 = await api.Wallet.GetSubAccountMarginBalancesAsync(...);
var wallet_15 = await api.Wallet.GetSubAccountFuturesBalancesAsync(...);
var wallet_16 = await api.Wallet.GetSubAccountCrossMarginBalancesAsync(...);
var wallet_17 = await api.Wallet.GetSavedAddressesAsync("CURRENCY", ...);
var wallet_18 = await api.Wallet.GetTotalBalanceAsync(...);

// SubAccount Methods
var subaccount_01 = await api.SubAccount.CreateSubAccountAsync("LOGIN-NAME", "PASSWORD", "EMAIL", "REMARKS", ...);
var subaccount_02 = await api.SubAccount.GetSubAccountsAsync(...);
var subaccount_03 = await api.SubAccount.GetSubAccountAsync(1_000_000_000, ...);
var subaccount_04 = await api.SubAccount.CreateApiKeyAsync(1_000_000_000, ...);
var subaccount_05 = await api.SubAccount.GetApiKeysAsync(1_000_000_000, ...);
var subaccount_06 = await api.SubAccount.UpdateApiKeyAsync(1_000_000_000, "API-KEY", ...);
var subaccount_07 = await api.SubAccount.DeleteApiKeyAsync(1_000_000_000, "API-KEY", ...);
var subaccount_08 = await api.SubAccount.GetApiKeyAsync(1_000_000_000, "API-KEY", ...);
var subaccount_09 = await api.SubAccount.LockSubAccountAsync(1_000_000_000, ...);
var subaccount_10 = await api.SubAccount.UnlockSubAccountAsync(1_000_000_000, ...);

// Spot Methods
var spot_01 = await api.Spot.GetCurrenciesAsync(...);
var spot_02 = await api.Spot.GetCurrencyAsync("CURRENCY", ...);
var spot_03 = await api.Spot.GetMarketsAsync(...);
var spot_04 = await api.Spot.GetMarketAsync("SYMBOL", ...);
var spot_05 = await api.Spot.GetTickersAsync(...);
var spot_06 = await api.Spot.GetOrderBookAsync("SYMBOL", ...);
var spot_07 = await api.Spot.GetTradesAsync("SYMBOL", ...);
var spot_08 = await api.Spot.GetCandlesticksAsync("SYMBOL", GateSpotCandlestickInterval.FourHours, ...);
var spot_09 = await api.Spot.GetUserFeeRatesAsync(...);
var spot_12 = await api.Spot.GetBalancesAsync(...);
var spot_13 = await api.Spot.PlaceOrdersAsync(new List<GateSpotOrderRequest>
{
    new GateSpotOrderRequest
    {
        Symbol = "SYMBOL",
        Side = GateSpotOrderSide.Buy,
        Type = GateSpotOrderType.Limit,
        Amount = 1.0m,
        Price = 1.0m
    }
}
, ...);
var spot_14 = await api.Spot.GetOpenOrdersAsync(...);
var spot_15 = await api.Spot.CloseLiquidatedPositionsAsync(new GateSpotCloseRequest
{
    Symbol = "SYMBOL",
    Price = 1001.01m,
    ProcessingMode = GateSpotActionMode.Full,
}, ...);
var spot_16 = await api.Spot.PlaceOrderAsync("SYMBOL", GateSpotAccountType.Spot, GateSpotOrderType.Market, GateSpotOrderSide.Buy, GateSpotTimeInForce.GoodTillCancelled, 100.01m, ...);
var spot_17 = await api.Spot.PlaceOrderAsync(new GateSpotOrderRequest
{
    Symbol = "SYMBOL",
    Account = GateSpotAccountType.Spot,
    Type = GateSpotOrderType.Market,
    Side = GateSpotOrderSide.Buy,
    TimeInForce = GateSpotTimeInForce.GoodTillCancelled,
    Amount = 100.01m
}, ...);
var spot_18 = await api.Spot.GetOrdersAsync("SYMBOL", GateSpotOrderQueryStatus.Open, ...);
var spot_19 = await api.Spot.CancelOrdersAsync("SYMBOL", ...);
var spot_20 = await api.Spot.GetOrderAsync("SYMBOL", 1_000_000_000, ...);
var spot_21 = await api.Spot.CancelOrderAsync("SYMBOL", 1_000_000_000, ...);
var spot_22 = await api.Spot.GetTradeHistoryAsync(...);
var spot_23 = await api.Spot.GetServerTimeAsync(...);
var spot_24 = await api.Spot.CancelAllAsync(30, ...);
var spot_25 = await api.Spot.PlacePriceTriggeredOrderAsync(
    "SYMBOL",
    100.01m,
    GateSpotTriggerCondition.GreaterThanOrEqualTo,
    TimeSpan.FromMinutes(15),
    GateSpotAccountType.Spot,
    GateSpotOrderType.Limit,
    GateSpotOrderSide.Buy,
    GateSpotTriggerTimeInForce.GoodTillCancelled,
    100.00m, 100.02m, "CLIENT-ORDER-ID"
    , ...);
var spot_26 = await api.Spot.PlacePriceTriggeredOrderAsync(new GateSpotPriceTriggeredOrderRequest
{
    Symbol = "SYMBOL",
    Trigger = new GateSpotTriggerPrice
    {
        Price = "100.01",
        Rule = GateSpotTriggerCondition.GreaterThanOrEqualTo,
        Expiration = Convert.ToInt32(TimeSpan.FromMinutes(15).TotalSeconds),
    },
    Order = new GateSpotTriggerOrder
    {
        Account = GateSpotAccountType.Spot,
        Type = GateSpotOrderType.Limit,
        Side = GateSpotOrderSide.Buy,
        TimeInForce = GateSpotTriggerTimeInForce.GoodTillCancelled,
        Price = "100.00",
        Amount = "100.02",
        ClientOrderId = "CLIENT-ORDER-ID"
    }
}, ...);
var spot_27 = await api.Spot.GetPriceTriggeredOrdersAsync(GateSpotTriggerFilter.Open, ...);
var spot_28 = await api.Spot.CancelPriceTriggeredOrdersAsync(...);
var spot_29 = await api.Spot.GetPriceTriggeredOrderAsync(...);
var spot_30 = await api.Spot.CancelPriceTriggeredOrderAsync(...);

// Cross-Margin Methods
var cross_01 = await api.Margin.Cross.GetCurrenciesAsync(...);
var cross_02 = await api.Margin.Cross.GetCurrencyAsync("CURRENCY", ...);
var cross_03 = await api.Margin.Cross.GetBalancesAsync(...);
var cross_04 = await api.Margin.Cross.GetBalanceHistoryAsync(...);
var cross_05 = await api.Margin.Cross.LoanAsync("CURRENCY", 100.01m, ...);
var cross_06 = await api.Margin.Cross.GetLoansAsync(...);
var cross_07 = await api.Margin.Cross.GetLoanAsync(1_000_000_000, ...);
var cross_08 = await api.Margin.Cross.RepayAsync("CURRENCY", 100.01m, ...);
var cross_09 = await api.Margin.Cross.GetRepaymentsAsync(...);
var cross_10 = await api.Margin.Cross.GetTransferableAmountAsync("CURRENCY", ...);
var cross_11 = await api.Margin.Cross.GetBorrowableAmountAsync("CURRENCY", ...);

// Isolated-Margin Methods
var isolated_01 = await api.Margin.Isolated.GetBalancesAsync(...);
var isolated_02 = await api.Margin.Isolated.GetBalanceHistoryAsync(...);
var isolated_03 = await api.Margin.Isolated.GetFundingBalancesAsync(...);
var isolated_04 = await api.Margin.Isolated.SetAutoRepaymentAsync(GateMarginAutoRepaymentStatus.Enabled, ...);
var isolated_05 = await api.Margin.Isolated.GetAutoRepaymentAsync(...);
var isolated_06 = await api.Margin.Isolated.GetTransferableAmountAsync("CURRENCY", ...);

// Flash-Swap Methods
var swap_01 = await api.Swap.GetCurrenciesAsync(...);
var swap_02 = await api.Swap.GetMarketsAsync(...);
var swap_03 = await api.Swap.PreviewOrderAsync("SELL-CURRENCY", 100.0M, "BUY-CURRENCY", 1000.0M, ...);
var swap_04 = await api.Swap.PreviewOrderAsync(new GateSwapOrderRequest
{
    SellCurrency = "SELL-CURRENCY",
    SellAmount = 100.0m,
    BuyCurrency = "BUY-CURRENCY",
    BuyAmount = 1000.0m,
}, ...);
var swap_05 = await api.Swap.PlaceOrderAsync(swap_04.Data.PreviewId, "SELL-CURRENCY", 100.0m, "BUY-CURRENCY", 1000.0m, ...);
var swap_06 = await api.Swap.PlaceOrderAsync(new GateSwapOrderRequest
{
    BuyCurrency = "SELL-CURRENCY",
    BuyAmount = 1000.0m,
    SellCurrency = "BUY-CURRENCY",
    SellAmount = 100.0m,
    PreviewId = swap_04.Data.PreviewId
}, ...);
var swap_07 = await api.Swap.GetOrdersAsync(...);
var swap_08 = await api.Swap.GetOrderAsync(1_000_000_000, ...);

// Access for Futures (Perpetual & Delivery) Methods
var sample_01 = await api.Futures.Perpetual.BTC.GetContractsAsync(...);
var sample_02 = await api.Futures.Perpetual.USD.GetContractsAsync(...);
var sample_03 = await api.Futures.Perpetual.USDT.GetContractsAsync(...);
var sample_04 = await api.Futures.Delivery.USDT.GetContractsAsync(...);

// Dictionary Access for Futures (Perpetual & Delivery) Methods
var sample_11 = await api.Futures.Perpetual[GateFuturesSettlement.BTC].GetContractsAsync(...);
var sample_12 = await api.Futures.Perpetual[GateFuturesSettlement.USD].GetContractsAsync(...);
var sample_13 = await api.Futures.Perpetual[GateFuturesSettlement.USDT].GetContractsAsync(...);
var sample_14 = await api.Futures.Delivery[GateDeliverySettlement.USDT].GetContractsAsync(...);

// Perpetual Futures Methods
var settle = GateFuturesSettlement.USDT;
var perpetual_01 = await api.Futures.Perpetual[settle].GetContractsAsync(...);
var perpetual_02 = await api.Futures.Perpetual[settle].GetContractAsync("CONTRACT", ...);
var perpetual_03 = await api.Futures.Perpetual[settle].GetOrderBookAsync("CONTRACT", ...);
var perpetual_04 = await api.Futures.Perpetual[settle].GetTradesAsync("CONTRACT", ...);
var perpetual_05 = await api.Futures.Perpetual[settle].GetMarkPriceCandlesticksAsync("CONTRACT", GateFuturesCandlestickInterval.OneDay, ...);
var perpetual_06 = await api.Futures.Perpetual[settle].GetIndexPriceCandlesticksAsync("CONTRACT", GateFuturesCandlestickInterval.OneDay, ...);
var perpetual_07 = await api.Futures.Perpetual[settle].GetPremiumIndexCandlesticksAsync("CONTRACT", GateFuturesCandlestickInterval.OneDay, ...);
var perpetual_08 = await api.Futures.Perpetual[settle].GetTickersAsync(...);
var perpetual_09 = await api.Futures.Perpetual[settle].GetFundingRateHistoryAsync("CONTRACT", ...);
var perpetual_10 = await api.Futures.Perpetual[settle].GetInsuranceHistoryAsync(...);
var perpetual_11 = await api.Futures.Perpetual[settle].GetStatsAsync("CONTRACT", ...);
var perpetual_12 = await api.Futures.Perpetual[settle].GetIndexConstituentsAsync("INDEX", ...);
var perpetual_13 = await api.Futures.Perpetual[settle].GetLiquidationsAsync("CONTRACT", ...);
var perpetual_14 = await api.Futures.Perpetual[settle].GetBalancesAsync(...);
var perpetual_15 = await api.Futures.Perpetual[settle].GetBalanceHistoryAsync(...);
var perpetual_16 = await api.Futures.Perpetual[settle].GetPositionsAsync(...);
var perpetual_17 = await api.Futures.Perpetual[settle].GetPositionAsync("CONTRACT", ...);
var perpetual_18 = await api.Futures.Perpetual[settle].SetPositionMarginAsync("CONTRACT", 100.0M, ...);
var perpetual_19 = await api.Futures.Perpetual[settle].SetLeverageAsync("CONTRACT", 10, ...);
var perpetual_20 = await api.Futures.Perpetual[settle].SetRiskLimitAsync("CONTRACT", 25, ...);
var perpetual_21 = await api.Futures.Perpetual[settle].SetDualModeAsync(true, ...);
var perpetual_22 = await api.Futures.Perpetual[settle].GetDualModePositionsAsync("CONTRACT", ...);
var perpetual_23 = await api.Futures.Perpetual[settle].SetDualModeMarginAsync("CONTRACT", GateFuturesDualModeSide.DualLong, 100, ...);
var perpetual_24 = await api.Futures.Perpetual[settle].SetDualModeLeverageAsync("CONTRACT", 10, ...);
var perpetual_25 = await api.Futures.Perpetual[settle].SetDualModeRiskLimitAsync("CONTRACT", 25, ...);
var perpetual_26 = await api.Futures.Perpetual[settle].PlaceOrderAsync("CONTRACT", 25, ...);
var perpetual_27 = await api.Futures.Perpetual[settle].PlaceOrderAsync(new GateFuturesOrderRequest { }, ...);
var perpetual_28 = await api.Futures.Perpetual[settle].GetOrderAsync(...);
var perpetual_29 = await api.Futures.Perpetual[settle].CancelOrderAsync(...);
var perpetual_30 = await api.Futures.Perpetual[settle].AmendOrderAsync(...);
var perpetual_31 = await api.Futures.Perpetual[settle].GetUserTradesAsync("CONTRACT", orderId: 1_000_000_001, ...);
var perpetual_32 = await api.Futures.Perpetual[settle].GetUserTradesAsync("CONTRACT", role: GateFuturesTradeRole.Maker, ...);
var perpetual_33 = await api.Futures.Perpetual[settle].GetPositionClosesAsync(...);
var perpetual_34 = await api.Futures.Perpetual[settle].GetPositionClosesAsync(...);
var perpetual_35 = await api.Futures.Perpetual[settle].GetUserLiquidationsAsync(...);
var perpetual_36 = await api.Futures.Perpetual[settle].CancelAllAsync(30, ...);
var perpetual_37 = await api.Futures.Perpetual[settle].PlacePriceTriggeredOrderAsync(
    GateFuturesTriggerType.CloseShortPosition,
    GateFuturesTriggerPrice.MarkPrice,
    GateFuturesTriggerStrategy.ByPrice,
    GateSpotTriggerCondition.GreaterThanOrEqualTo,
    100.01m, TimeSpan.FromMinutes(15), "CONTRACT", 100.00m, 25, true,
    GateFuturesTimeInForce.GoodTillCancelled,
    "CLIENT-ORDER-ID", false, GateFuturesOrderAutoSize.CloseLong
, ...);
var perpetual_38 = await api.Futures.Perpetual[settle].PlacePriceTriggeredOrderAsync(new GateFuturesPriceTriggeredOrderRequest { }, ...);
var perpetual_39 = await api.Futures.Perpetual[settle].GetPriceTriggeredOrdersAsync(GateSpotTriggerFilter.Open, ...);
var perpetual_40 = await api.Futures.Perpetual[settle].CancelPriceTriggeredOrdersAsync(...);
var perpetual_41 = await api.Futures.Perpetual[settle].GetPriceTriggeredOrderAsync(1_000_000_001, ...);
var perpetual_42 = await api.Futures.Perpetual[settle].CancelPriceTriggeredOrderAsync(1_000_000_001, ...);

// Delivery Futures Methods
var delivery_01 = await api.Futures.Delivery.USDT.GetContractsAsync(...);
var delivery_02 = await api.Futures.Delivery.USDT.GetContractAsync("CONTRACT", ...);
var delivery_03 = await api.Futures.Delivery.USDT.GetOrderBookAsync("CONTRACT", ...);
var delivery_04 = await api.Futures.Delivery.USDT.GetTradesAsync("CONTRACT", ...);
var delivery_05 = await api.Futures.Delivery.USDT.GetMarkPriceCandlesticksAsync("CONTRACT", GateFuturesCandlestickInterval.OneDay, ...);
var delivery_06 = await api.Futures.Delivery.USDT.GetIndexPriceCandlesticksAsync("CONTRACT", GateFuturesCandlestickInterval.OneDay, ...);
var delivery_07 = await api.Futures.Delivery.USDT.GetTickersAsync(...);
var delivery_08 = await api.Futures.Delivery.USDT.GetInsuranceHistoryAsync(...);
var delivery_09 = await api.Futures.Delivery.USDT.GetBalancesAsync(...);
var delivery_10 = await api.Futures.Delivery.USDT.GetBalanceHistoryAsync(GateFuturesBalanceChangeType.Funding, ...);
var delivery_11 = await api.Futures.Delivery.USDT.GetPositionsAsync(...);
var delivery_12 = await api.Futures.Delivery.USDT.GetPositionAsync("CONTRACT", ...);
var delivery_13 = await api.Futures.Delivery.USDT.SetPositionMarginAsync("CONTRACT", 100.0m, ...);
var delivery_14 = await api.Futures.Delivery.USDT.SetLeverageAsync("CONTRACT", 10, ...);
var delivery_15 = await api.Futures.Delivery.USDT.SetRiskLimitAsync("CONTRACT", 25, ...);
var delivery_16 = await api.Futures.Delivery.USDT.PlaceOrderAsync("CONTRACT", 25, ...);
var delivery_17 = await api.Futures.Delivery.USDT.PlaceOrderAsync(new GateFuturesOrderRequest { }, ...);
var delivery_18 = await api.Futures.Delivery.USDT.GetOrdersAsync("CONTRACT", GateFuturesOrderStatus.Open, ...);
var delivery_19 = await api.Futures.Delivery.USDT.CancelOrdersAsync("CONTRACT", GateFuturesOrderSide.Bid, ...);
var delivery_20 = await api.Futures.Delivery.USDT.GetOrderAsync(...);
var delivery_21 = await api.Futures.Delivery.USDT.CancelOrderAsync(...);
var delivery_22 = await api.Futures.Delivery.USDT.GetUserTradesAsync(...);
var delivery_23 = await api.Futures.Delivery.USDT.GetPositionClosesAsync(...);
var delivery_24 = await api.Futures.Delivery.USDT.GetUserLiquidationsAsync(...);
var delivery_25 = await api.Futures.Delivery.USDT.GetUserSettlementsAsync(...);
var delivery_26 = await api.Futures.Delivery.USDT.PlacePriceTriggeredOrderAsync(
    GateFuturesTriggerType.CloseShortPosition,
    GateFuturesTriggerPrice.MarkPrice,
    GateFuturesTriggerStrategy.ByPrice,
    GateSpotTriggerCondition.GreaterThanOrEqualTo,
    100.01m, TimeSpan.FromMinutes(15), "CONTRACT", 100.00m, 25, true,
    GateFuturesTimeInForce.GoodTillCancelled,
    "CLIENT-ORDER-ID", false, GateFuturesOrderAutoSize.CloseLong
, ...);
var delivery_27 = await api.Futures.Delivery.USDT.PlacePriceTriggeredOrderAsync(new GateFuturesPriceTriggeredOrderRequest { }, ...);
var delivery_28 = await api.Futures.Delivery.USDT.GetPriceTriggeredOrdersAsync(GateSpotTriggerFilter.Open, ...);
var delivery_29 = await api.Futures.Delivery.USDT.CancelPriceTriggeredOrdersAsync("CONTRACT", ...);
var delivery_30 = await api.Futures.Delivery.USDT.GetPriceTriggeredOrderAsync(1_000_000_001, ...);
var delivery_31 = await api.Futures.Delivery.USDT.CancelPriceTriggeredOrderAsync(1_000_000_001, ...);

// Options Methods
var options_01 = await api.Options.GetUnderlyingsAsync(...);
var options_02 = await api.Options.GetExpirationsAsync("UNDERLYING", ...);
var options_03 = await api.Options.GetContractsAsync("UNDERLYING", ...);
var options_04 = await api.Options.GetContractAsync("CONTRACT", ...);
var options_05 = await api.Options.GetSettlementsAsync("UNDERLYING", ...);
var options_06 = await api.Options.GetSettlementAsync("UNDERLYING", "CONTRACT", 1728321316, ...);
var options_07 = await api.Options.GetUserSettlementsAsync("UNDERLYING", ...);
var options_08 = await api.Options.GetOrderBookAsync("CONTRACT", ...);
var options_09 = await api.Options.GetContractTickersAsync("UNDERLYING", ...);
var options_10 = await api.Options.GetUnderlyingTickersAsync("UNDERLYING", ...);
var options_11 = await api.Options.GetCandlesticksAsync("CONTRACT", GateOptionsCandlestickInterval.OneHour, ...);
var options_12 = await api.Options.GetUnderlyingCandlesticksAsync("UNDERLYIN", GateOptionsCandlestickInterval.OneMinute, ...);
var options_13 = await api.Options.GetTradesAsync("CONTRACT", GateOptionsType.Put, ...);
var options_14 = await api.Options.GetBalanceAsync(...);
var options_15 = await api.Options.GetBalanceHistoryAsync(GateOptionsBalanceChangeType.Rebate, ...);
var options_16 = await api.Options.GetUnderlyingPositionsAsync("UNDERLYING", ...);
var options_17 = await api.Options.GetContractPositionAsync("CONTRACT", ...);
var options_18 = await api.Options.GetUserLiquidationsAsync("UNDERLYING", ...);
var options_19 = await api.Options.PlaceOrderAsync("CONTRACT", 25, ...);
var options_20 = await api.Options.GetOrdersAsync(GateOptionsOrderStatus.Open, ...);
var options_21 = await api.Options.CancelOrdersAsync(...);
var options_22 = await api.Options.GetOrderAsync(1_000_000_001, ...);
var options_23 = await api.Options.CancelOrderAsync(1_000_000_001, ...);
var options_24 = await api.Options.GetUserTradesAsync("UNDERLYING", ...);

// Rebate Methods
var rebate_01 = await api.Rebate.GetTransactionHistoryAsync(...);
var rebate_02 = await api.Rebate.GetCommissionHistoryAsync(...);

WebSocket Api Examples

The Gate.IO.Api socket client provides several socket endpoint to which can be subscribed.

var ws = new GateWebSocketClient();
ws.SetApiCredentials("XXXXXXXX-API-KEY-XXXXXXXX", "XXXXXXXX-API-SECRET-XXXXXXXX");

// TODO: Readme
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
4.4.1222 108 12/22/2024
4.4.1113 10,514 11/13/2024
4.4.1106 92 11/5/2024
4.4.1105 93 11/5/2024
4.4.1026 9,396 10/26/2024
4.4.1019 4,421 10/19/2024
4.4.1010 9,844 10/10/2024
4.4.1008 10,206 10/8/2024
4.4.1007 3,586 10/7/2024
4.4.1006 9,754 10/6/2024
4.4.1004 9,606 10/4/2024
4.4.1003 10,871 10/3/2024
1.3.7 3,123 4/25/2024
1.3.6 10,561 9/3/2023
1.3.5 1,776 5/21/2023
1.3.4 1,315 5/11/2023
1.3.3 1,203 5/11/2023
1.3.1 1,147 4/25/2023
1.2.7 1,185 4/18/2023
1.2.6 830 3/24/2023