Skip to content

gateio/gateapi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for gateapi

Welcome to Gate API APIv4 provides operations related to spot, margin, and contract trading, including public interfaces for querying market data and authenticated private interfaces for implementing API-based automated trading.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: v4.104.3
  • Package version: 6.104.3
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://www.gate.com/page/contacts

Versioning

Trying our best to follow the semantic versioning, while enjoying recent features provided by programming language and libraries, from 4.15.2, one major versioning difference will be introduced:

If extra code rewrite is required when you upgrade the SDK, such as:

  • some outdated programming language version support is dropped
  • API method signature has breaking changes.

the MAJOR version will be incremented, but the MINOR and PATCH version are still following REST API's instead of resetting to 0, so that you can recognize it has some breaking changes, but still getting the idea of from which REST API version the change is introduced.

For example, the previous REST API and SDK version are both 4.14.0. But if we decide to introduce some breaking changes in SDK along with REST API 4.15.2 upgrade, then the version of next SDK release will be 5.15.2(the MAJOR version is incremented to denote breaking changes, but the MINOR and PATCH version are identical to REST API's instead of resetting them to 0)

If MAJOR version is incremented, make sure you read the release note on Releases page

Installation

go get github.com/gateio/gateapi-go/v6

Getting Started

Please follow the installation instruction and execute the following Go code:

package main

import (
    "context"
    "fmt"

    "github.com/gateio/gateapi-go/v6"
)

func main() {
    client := gateapi.NewAPIClient(gateapi.NewConfiguration())
    // uncomment the next line if your are testing against testnet
    // client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
    ctx := context.WithValue(context.Background(),
                             gateapi.ContextGateAPIV4,
                             gateapi.GateAPIV4{
                                 Key:    "YOUR_API_KEY",
                                 Secret: "YOUR_API_SECRET",
                             }
                            )
    
    result, _, err := client.AccountApi.GetAccountDetail(ctx)
    if err != nil {
        if e, ok := err.(gateapi.GateAPIError); ok {
            fmt.Printf("gate api error: %s\n", e.Error())
        } else {
            fmt.Printf("generic error: %s\n", err.Error())
        }
    } else {
        fmt.Println(result)
    }
}

For a more complete API usage example, refer to the demo application in example directory

Documentation for API Endpoints

All URIs are relative to https://api.gateio.ws/api/v4

Class Method HTTP request Description
AccountApi GetAccountDetail Get /account/detail Retrieve user account information
AccountApi GetAccountRateLimit Get /account/rate_limit Get user transaction rate limit information
AccountApi ListSTPGroups Get /account/stp_groups Query STP user groups created by the user
AccountApi CreateSTPGroup Post /account/stp_groups Create STP user group
AccountApi ListSTPGroupsUsers Get /account/stp_groups/{stp_id}/users Query users in the STP user group
AccountApi AddSTPGroupUsers Post /account/stp_groups/{stp_id}/users Add users to the STP user group
AccountApi DeleteSTPGroupUsers Delete /account/stp_groups/{stp_id}/users Delete users from the STP user group
AccountApi GetDebitFee Get /account/debit_fee Query GT fee deduction configuration
AccountApi SetDebitFee Post /account/debit_fee Configure GT fee deduction
CollateralLoanApi ListCollateralLoanOrders Get /loan/collateral/orders Query collateral loan order list
CollateralLoanApi CreateCollateralLoan Post /loan/collateral/orders Place collateral loan order
CollateralLoanApi GetCollateralLoanOrderDetail Get /loan/collateral/orders/{order_id} Query single order details
CollateralLoanApi RepayCollateralLoan Post /loan/collateral/repay Collateral loan repayment
CollateralLoanApi ListRepayRecords Get /loan/collateral/repay_records Query collateral loan repayment records
CollateralLoanApi ListCollateralRecords Get /loan/collateral/collaterals Query collateral adjustment records
CollateralLoanApi OperateCollateral Post /loan/collateral/collaterals Increase or redeem collateral
CollateralLoanApi GetUserTotalAmount Get /loan/collateral/total_amount Query user's total borrowing and collateral amount
CollateralLoanApi GetUserLtvInfo Get /loan/collateral/ltv Query user's collateralization ratio and remaining borrowable currencies
CollateralLoanApi ListCollateralCurrencies Get /loan/collateral/currencies Query supported borrowing and collateral currencies
DeliveryApi ListDeliveryContracts Get /delivery/{settle}/contracts Query all futures contracts
DeliveryApi GetDeliveryContract Get /delivery/{settle}/contracts/{contract} Query single contract information
DeliveryApi ListDeliveryOrderBook Get /delivery/{settle}/order_book Query futures market depth information
DeliveryApi ListDeliveryTrades Get /delivery/{settle}/trades Futures market transaction records
DeliveryApi ListDeliveryCandlesticks Get /delivery/{settle}/candlesticks Futures market K-line chart
DeliveryApi ListDeliveryTickers Get /delivery/{settle}/tickers Get all futures trading statistics
DeliveryApi ListDeliveryInsuranceLedger Get /delivery/{settle}/insurance Futures market insurance fund history
DeliveryApi ListDeliveryAccounts Get /delivery/{settle}/accounts Get futures account
DeliveryApi ListDeliveryAccountBook Get /delivery/{settle}/account_book Query futures account change history
DeliveryApi ListDeliveryPositions Get /delivery/{settle}/positions Get user position list
DeliveryApi GetDeliveryPosition Get /delivery/{settle}/positions/{contract} Get single position information
DeliveryApi UpdateDeliveryPositionMargin Post /delivery/{settle}/positions/{contract}/margin Update position margin
DeliveryApi UpdateDeliveryPositionLeverage Post /delivery/{settle}/positions/{contract}/leverage Update position leverage
DeliveryApi UpdateDeliveryPositionRiskLimit Post /delivery/{settle}/positions/{contract}/risk_limit Update position risk limit
DeliveryApi ListDeliveryOrders Get /delivery/{settle}/orders Query futures order list
DeliveryApi CreateDeliveryOrder Post /delivery/{settle}/orders Place futures order
DeliveryApi CancelDeliveryOrders Delete /delivery/{settle}/orders Cancel all orders with 'open' status
DeliveryApi GetDeliveryOrder Get /delivery/{settle}/orders/{order_id} Query single order details
DeliveryApi CancelDeliveryOrder Delete /delivery/{settle}/orders/{order_id} Cancel single order
DeliveryApi GetMyDeliveryTrades Get /delivery/{settle}/my_trades Query personal trading records
DeliveryApi ListDeliveryPositionClose Get /delivery/{settle}/position_close Query position close history
DeliveryApi ListDeliveryLiquidates Get /delivery/{settle}/liquidates Query liquidation history
DeliveryApi ListDeliverySettlements Get /delivery/{settle}/settlements Query settlement records
DeliveryApi ListDeliveryRiskLimitTiers Get /delivery/{settle}/risk_limit_tiers Query risk limit tiers
DeliveryApi ListPriceTriggeredDeliveryOrders Get /delivery/{settle}/price_orders Query auto order list
DeliveryApi CreatePriceTriggeredDeliveryOrder Post /delivery/{settle}/price_orders Create price-triggered order
DeliveryApi CancelPriceTriggeredDeliveryOrderList Delete /delivery/{settle}/price_orders Cancel all auto orders
DeliveryApi GetPriceTriggeredDeliveryOrder Get /delivery/{settle}/price_orders/{order_id} Query single auto order details
DeliveryApi CancelPriceTriggeredDeliveryOrder Delete /delivery/{settle}/price_orders/{order_id} Cancel single auto order
EarnApi SwapETH2 Post /earn/staking/eth2/swap ETH2 swap
EarnApi RateListETH2 Get /earn/staking/eth2/rate_records ETH2 historical return rate query
EarnApi ListDualInvestmentPlans Get /earn/dual/investment_plan Dual Investment product list
EarnApi ListDualOrders Get /earn/dual/orders Dual Investment order list
EarnApi PlaceDualOrder Post /earn/dual/orders Place Dual Investment order
EarnApi ListStructuredProducts Get /earn/structured/products Structured Product List
EarnApi ListStructuredOrders Get /earn/structured/orders Structured Product Order List
EarnApi PlaceStructuredOrder Post /earn/structured/orders Place Structured Product Order
EarnApi FindCoin Get /earn/staking/coins Staking coins
EarnApi SwapStakingCoin Post /earn/staking/swap On-chain token swap for earned coins
EarnUniApi ListUniCurrencies Get /earn/uni/currencies Query lending currency list
EarnUniApi GetUniCurrency Get /earn/uni/currencies/{currency} Query single lending currency details
EarnUniApi ListUserUniLends Get /earn/uni/lends Query user's lending order list
EarnUniApi CreateUniLend Post /earn/uni/lends Create lending or redemption
EarnUniApi ChangeUniLend Patch /earn/uni/lends Amend user lending information
EarnUniApi ListUniLendRecords Get /earn/uni/lend_records Query lending transaction records
EarnUniApi GetUniInterest Get /earn/uni/interests/{currency} Query user's total interest income for specified currency
EarnUniApi ListUniInterestRecords Get /earn/uni/interest_records Query user dividend records
EarnUniApi GetUniInterestStatus Get /earn/uni/interest_status/{currency} Query currency interest compounding status
EarnUniApi ListUniChart Get /earn/uni/chart UniLoan currency annualized trend chart
EarnUniApi ListUniRate Get /earn/uni/rate Currency estimated annualized interest rate
FlashSwapApi ListFlashSwapCurrencyPair Get /flash_swap/currency_pairs List All Supported Currency Pairs In Flash Swap
FlashSwapApi ListFlashSwapOrders Get /flash_swap/orders Query flash swap order list
FlashSwapApi CreateFlashSwapOrder Post /flash_swap/orders Create a flash swap order
FlashSwapApi GetFlashSwapOrder Get /flash_swap/orders/{order_id} Query single flash swap order
FlashSwapApi PreviewFlashSwapOrder Post /flash_swap/orders/preview Flash swap order preview
FuturesApi ListFuturesContracts Get /futures/{settle}/contracts Query all futures contracts
FuturesApi GetFuturesContract Get /futures/{settle}/contracts/{contract} Query single contract information
FuturesApi ListFuturesOrderBook Get /futures/{settle}/order_book Query futures market depth information
FuturesApi ListFuturesTrades Get /futures/{settle}/trades Futures market transaction records
FuturesApi ListFuturesCandlesticks Get /futures/{settle}/candlesticks Futures market K-line chart
FuturesApi ListFuturesPremiumIndex Get /futures/{settle}/premium_index Premium Index K-line chart
FuturesApi ListFuturesTickers Get /futures/{settle}/tickers Get all futures trading statistics
FuturesApi ListFuturesFundingRateHistory Get /futures/{settle}/funding_rate Futures market historical funding rate
FuturesApi ListFuturesInsuranceLedger Get /futures/{settle}/insurance Futures market insurance fund history
FuturesApi ListContractStats Get /futures/{settle}/contract_stats Futures statistics
FuturesApi GetIndexConstituents Get /futures/{settle}/index_constituents/{index} Query index constituents
FuturesApi ListLiquidatedOrders Get /futures/{settle}/liq_orders Query liquidation order history
FuturesApi ListFuturesRiskLimitTiers Get /futures/{settle}/risk_limit_tiers Query risk limit tiers
FuturesApi ListFuturesAccounts Get /futures/{settle}/accounts Get futures account
FuturesApi ListFuturesAccountBook Get /futures/{settle}/account_book Query futures account change history
FuturesApi ListPositions Get /futures/{settle}/positions Get user position list
FuturesApi GetPosition Get /futures/{settle}/positions/{contract} Get single position information
FuturesApi UpdatePositionMargin Post /futures/{settle}/positions/{contract}/margin Update position margin
FuturesApi UpdatePositionLeverage Post /futures/{settle}/positions/{contract}/leverage Update position leverage
FuturesApi UpdatePositionCrossMode Post /futures/{settle}/positions/cross_mode Switch Position Margin Mode
FuturesApi UpdateDualCompPositionCrossMode Post /futures/{settle}/dual_comp/positions/cross_mode Switch Between Cross and Isolated Margin Modes Under Hedge Mode
FuturesApi UpdatePositionRiskLimit Post /futures/{settle}/positions/{contract}/risk_limit Update position risk limit
FuturesApi SetDualMode Post /futures/{settle}/dual_mode Set position mode
FuturesApi GetDualModePosition Get /futures/{settle}/dual_comp/positions/{contract} Get position information in dual mode
FuturesApi UpdateDualModePositionMargin Post /futures/{settle}/dual_comp/positions/{contract}/margin Update position margin in dual mode
FuturesApi UpdateDualModePositionLeverage Post /futures/{settle}/dual_comp/positions/{contract}/leverage Update position leverage in dual mode
FuturesApi UpdateDualModePositionRiskLimit Post /futures/{settle}/dual_comp/positions/{contract}/risk_limit Update position risk limit in dual mode
FuturesApi ListFuturesOrders Get /futures/{settle}/orders Query futures order list
FuturesApi CreateFuturesOrder Post /futures/{settle}/orders Place futures order
FuturesApi CancelFuturesOrders Delete /futures/{settle}/orders Cancel all orders with 'open' status
FuturesApi GetOrdersWithTimeRange Get /futures/{settle}/orders_timerange Query futures order list by time range
FuturesApi CreateBatchFuturesOrder Post /futures/{settle}/batch_orders Place batch futures orders
FuturesApi GetFuturesOrder Get /futures/{settle}/orders/{order_id} Query single order details
FuturesApi AmendFuturesOrder Put /futures/{settle}/orders/{order_id} Amend single order
FuturesApi CancelFuturesOrder Delete /futures/{settle}/orders/{order_id} Cancel single order
FuturesApi GetMyTrades Get /futures/{settle}/my_trades Query personal trading records
FuturesApi GetMyTradesWithTimeRange Get /futures/{settle}/my_trades_timerange Query personal trading records by time range
FuturesApi ListPositionClose Get /futures/{settle}/position_close Query position close history
FuturesApi ListLiquidates Get /futures/{settle}/liquidates Query liquidation history
FuturesApi ListAutoDeleverages Get /futures/{settle}/auto_deleverages Query ADL auto-deleveraging order information
FuturesApi CountdownCancelAllFutures Post /futures/{settle}/countdown_cancel_all Countdown cancel orders
FuturesApi GetFuturesFee Get /futures/{settle}/fee Query futures market trading fee rates
FuturesApi CancelBatchFutureOrders Post /futures/{settle}/batch_cancel_orders Cancel batch orders by specified ID list
FuturesApi AmendBatchFutureOrders Post /futures/{settle}/batch_amend_orders Batch modify orders by specified IDs
FuturesApi GetFuturesRiskLimitTable Get /futures/{settle}/risk_limit_table Query risk limit table by table_id
FuturesApi ListPriceTriggeredOrders Get /futures/{settle}/price_orders Query auto order list
FuturesApi CreatePriceTriggeredOrder Post /futures/{settle}/price_orders Create price-triggered order
FuturesApi CancelPriceTriggeredOrderList Delete /futures/{settle}/price_orders Cancel all auto orders
FuturesApi GetPriceTriggeredOrder Get /futures/{settle}/price_orders/{order_id} Query single auto order details
FuturesApi CancelPriceTriggeredOrder Delete /futures/{settle}/price_orders/{order_id} Cancel single auto order
MarginApi ListMarginAccounts Get /margin/accounts Margin account list
MarginApi ListMarginAccountBook Get /margin/account_book Query margin account balance change history
MarginApi ListFundingAccounts Get /margin/funding_accounts Funding account list
MarginApi GetAutoRepayStatus Get /margin/auto_repay Query user auto repayment settings
MarginApi SetAutoRepay Post /margin/auto_repay Update user auto repayment settings
MarginApi GetMarginTransferable Get /margin/transferable Get maximum transferable amount for isolated margin
MarginApi GetUserMarginTier Get /margin/user/loan_margin_tiers Query user's own leverage lending tiers in current market
MarginApi GetMarketMarginTier Get /margin/loan_margin_tiers Query current market leverage lending tiers
MarginApi SetUserMarketLeverage Post /margin/leverage/user_market_setting Set user market leverage multiplier
MarginApi ListMarginUserAccount Get /margin/user/account Query user's isolated margin account list
MarginApi ListCrossMarginLoans Get /margin/cross/loans Query cross margin borrow history (deprecated)
MarginApi ListCrossMarginRepayments Get /margin/cross/repayments Retrieve cross margin repayments. (deprecated)
MarginUniApi ListUniCurrencyPairs Get /margin/uni/currency_pairs List lending markets
MarginUniApi GetUniCurrencyPair Get /margin/uni/currency_pairs/{currency_pair} Get lending market details
MarginUniApi GetMarginUniEstimateRate Get /margin/uni/estimate_rate Estimate interest rate for isolated margin currencies
MarginUniApi ListUniLoans Get /margin/uni/loans Query loans
MarginUniApi CreateUniLoan Post /margin/uni/loans Borrow or repay
MarginUniApi ListUniLoanRecords Get /margin/uni/loan_records Query loan records
MarginUniApi ListUniLoanInterestRecords Get /margin/uni/interest_records Query interest deduction records
MarginUniApi GetUniBorrowable Get /margin/uni/borrowable Query maximum borrowable amount by currency
MultiCollateralLoanApi ListMultiCollateralOrders Get /loan/multi_collateral/orders Query multi-currency collateral order list
MultiCollateralLoanApi CreateMultiCollateral Post /loan/multi_collateral/orders Place multi-currency collateral order
MultiCollateralLoanApi GetMultiCollateralOrderDetail Get /loan/multi_collateral/orders/{order_id} Query order details
MultiCollateralLoanApi ListMultiRepayRecords Get /loan/multi_collateral/repay Query multi-currency collateral repayment records
MultiCollateralLoanApi RepayMultiCollateralLoan Post /loan/multi_collateral/repay Multi-currency collateral repayment
MultiCollateralLoanApi ListMultiCollateralRecords Get /loan/multi_collateral/mortgage Query collateral adjustment records
MultiCollateralLoanApi OperateMultiCollateral Post /loan/multi_collateral/mortgage Add or withdraw collateral
MultiCollateralLoanApi ListUserCurrencyQuota Get /loan/multi_collateral/currency_quota Query user's collateral and borrowing currency quota information
MultiCollateralLoanApi ListMultiCollateralCurrencies Get /loan/multi_collateral/currencies Query supported borrowing and collateral currencies for multi-currency collateral
MultiCollateralLoanApi GetMultiCollateralLtv Get /loan/multi_collateral/ltv Query collateralization ratio information
MultiCollateralLoanApi GetMultiCollateralFixRate Get /loan/multi_collateral/fixed_rate Query currency's 7-day and 30-day fixed interest rates
MultiCollateralLoanApi GetMultiCollateralCurrentRate Get /loan/multi_collateral/current_rate Query currency's current interest rate
OptionsApi ListOptionsUnderlyings Get /options/underlyings List all underlying assets
OptionsApi ListOptionsExpirations Get /options/expirations List all expiration dates
OptionsApi ListOptionsContracts Get /options/contracts List all contracts for specified underlying and expiration date
OptionsApi GetOptionsContract Get /options/contracts/{contract} Query specified contract details
OptionsApi ListOptionsSettlements Get /options/settlements List settlement history
OptionsApi GetOptionsSettlement Get /options/settlements/{contract} Get specified contract settlement information
OptionsApi ListMyOptionsSettlements Get /options/my_settlements Query personal settlement records
OptionsApi ListOptionsOrderBook Get /options/order_book Query options contract order book
OptionsApi ListOptionsTickers Get /options/tickers Query options market ticker information
OptionsApi ListOptionsUnderlyingTickers Get /options/underlying/tickers/{underlying} Query underlying ticker information
OptionsApi ListOptionsCandlesticks Get /options/candlesticks Options contract market candlestick chart
OptionsApi ListOptionsUnderlyingCandlesticks Get /options/underlying/candlesticks Underlying index price candlestick chart
OptionsApi ListOptionsTrades Get /options/trades Market trade records
OptionsApi ListOptionsAccount Get /options/accounts Query account information
OptionsApi ListOptionsAccountBook Get /options/account_book Query account change history
OptionsApi ListOptionsPositions Get /options/positions List user's positions of specified underlying
OptionsApi GetOptionsPosition Get /options/positions/{contract} Get specified contract position
OptionsApi ListOptionsPositionClose Get /options/position_close List user's liquidation history of specified underlying
OptionsApi ListOptionsOrders Get /options/orders List options orders
OptionsApi CreateOptionsOrder Post /options/orders Create an options order
OptionsApi CancelOptionsOrders Delete /options/orders Cancel all orders with 'open' status
OptionsApi GetOptionsOrder Get /options/orders/{order_id} Query single order details
OptionsApi CancelOptionsOrder Delete /options/orders/{order_id} Cancel single order
OptionsApi CountdownCancelAllOptions Post /options/countdown_cancel_all Countdown cancel orders
OptionsApi ListMyOptionsTrades Get /options/my_trades Query personal trading records
OptionsApi GetOptionsMMP Get /options/mmp MMP Query.
OptionsApi SetOptionsMMP Post /options/mmp MMP Settings
OptionsApi ResetOptionsMMP Post /options/mmp/reset MMP Reset
RebateApi AgencyTransactionHistory Get /rebate/agency/transaction_history Broker obtains transaction history of recommended users
RebateApi AgencyCommissionsHistory Get /rebate/agency/commission_history Broker obtains rebate history of recommended users
RebateApi PartnerTransactionHistory Get /rebate/partner/transaction_history Partner obtains transaction history of recommended users
RebateApi PartnerCommissionsHistory Get /rebate/partner/commission_history Partner obtains rebate records of recommended users
RebateApi PartnerSubList Get /rebate/partner/sub_list Partner subordinate list
RebateApi RebateBrokerCommissionHistory Get /rebate/broker/commission_history Broker obtains user's rebate records
RebateApi RebateBrokerTransactionHistory Get /rebate/broker/transaction_history Broker obtains user's trading history
RebateApi RebateUserInfo Get /rebate/user/info User obtains rebate information
RebateApi UserSubRelation Get /rebate/user/sub_relation User subordinate relationship
SpotApi ListCurrencies Get /spot/currencies Query all currency information
SpotApi GetCurrency Get /spot/currencies/{currency} Query single currency information
SpotApi ListCurrencyPairs Get /spot/currency_pairs Query all supported currency pairs
SpotApi GetCurrencyPair Get /spot/currency_pairs/{currency_pair} Query single currency pair details
SpotApi ListTickers Get /spot/tickers Get currency pair ticker information
SpotApi ListOrderBook Get /spot/order_book Get market depth information
SpotApi ListTrades Get /spot/trades Query market transaction records
SpotApi ListCandlesticks Get /spot/candlesticks Market K-line chart
SpotApi GetFee Get /spot/fee Query account fee rates
SpotApi GetBatchSpotFee Get /spot/batch_fee Batch query account fee rates
SpotApi ListSpotAccounts Get /spot/accounts List spot trading accounts
SpotApi ListSpotAccountBook Get /spot/account_book Query spot account transaction history
SpotApi CreateBatchOrders Post /spot/batch_orders Batch place orders
SpotApi ListAllOpenOrders Get /spot/open_orders List all open orders
SpotApi CreateCrossLiquidateOrder Post /spot/cross_liquidate_orders Close position when cross-currency is disabled
SpotApi ListOrders Get /spot/orders List orders
SpotApi CreateOrder Post /spot/orders Create an order
SpotApi CancelOrders Delete /spot/orders Cancel all `open` orders in specified currency pair
SpotApi CancelBatchOrders Post /spot/cancel_batch_orders Cancel batch orders by specified ID list
SpotApi GetOrder Get /spot/orders/{order_id} Query single order details
SpotApi CancelOrder Delete /spot/orders/{order_id} Cancel single order
SpotApi AmendOrder Patch /spot/orders/{order_id} Amend single order
SpotApi ListMyTrades Get /spot/my_trades Query personal trading records
SpotApi GetSystemTime Get /spot/time Get server current time
SpotApi CountdownCancelAllSpot Post /spot/countdown_cancel_all Countdown cancel orders
SpotApi AmendBatchOrders Post /spot/amend_batch_orders Batch modification of orders
SpotApi GetSpotInsuranceHistory Get /spot/insurance_history Query spot insurance fund historical data
SpotApi ListSpotPriceTriggeredOrders Get /spot/price_orders Query running auto order list
SpotApi CreateSpotPriceTriggeredOrder Post /spot/price_orders Create price-triggered order
SpotApi CancelSpotPriceTriggeredOrderList Delete /spot/price_orders Cancel all auto orders
SpotApi GetSpotPriceTriggeredOrder Get /spot/price_orders/{order_id} Query single auto order details
SpotApi CancelSpotPriceTriggeredOrder Delete /spot/price_orders/{order_id} Cancel single auto order
SubAccountApi ListSubAccounts Get /sub_accounts List sub-accounts
SubAccountApi CreateSubAccounts Post /sub_accounts Create a new sub-account
SubAccountApi GetSubAccount Get /sub_accounts/{user_id} Get sub-account
SubAccountApi ListSubAccountKeys Get /sub_accounts/{user_id}/keys List all API key pairs of the sub-account
SubAccountApi CreateSubAccountKeys Post /sub_accounts/{user_id}/keys Create new sub-account API key pair
SubAccountApi GetSubAccountKey Get /sub_accounts/{user_id}/keys/{key} Get specific API key pair of the sub-account
SubAccountApi UpdateSubAccountKeys Put /sub_accounts/{user_id}/keys/{key} Update sub-account API key pair
SubAccountApi DeleteSubAccountKeys Delete /sub_accounts/{user_id}/keys/{key} Delete sub-account API key pair
SubAccountApi LockSubAccount Post /sub_accounts/{user_id}/lock Lock sub-account
SubAccountApi UnlockSubAccount Post /sub_accounts/{user_id}/unlock Unlock sub-account
SubAccountApi ListUnifiedMode Get /sub_accounts/unified_mode Get sub-account mode
UnifiedApi ListUnifiedAccounts Get /unified/accounts Get unified account information
UnifiedApi GetUnifiedBorrowable Get /unified/borrowable Query maximum borrowable amount for unified account
UnifiedApi GetUnifiedTransferable Get /unified/transferable Query maximum transferable amount for unified account
UnifiedApi GetUnifiedTransferables Get /unified/transferables Batch query maximum transferable amount for unified accounts. Each currency shows the maximum value. After user withdrawal, the transferable amount for all currencies will change
UnifiedApi GetUnifiedBorrowableList Get /unified/batch_borrowable Batch query unified account maximum borrowable amount
UnifiedApi ListUnifiedLoans Get /unified/loans Query loans
UnifiedApi CreateUnifiedLoan Post /unified/loans Borrow or repay
UnifiedApi ListUnifiedLoanRecords Get /unified/loan_records Query loan records
UnifiedApi ListUnifiedLoanInterestRecords Get /unified/interest_records Query interest deduction records
UnifiedApi GetUnifiedRiskUnits Get /unified/risk_units Get user risk unit details
UnifiedApi GetUnifiedMode Get /unified/unified_mode Query mode of the unified account
UnifiedApi SetUnifiedMode Put /unified/unified_mode Set unified account mode
UnifiedApi GetUnifiedEstimateRate Get /unified/estimate_rate Query unified account estimated interest rate
UnifiedApi ListCurrencyDiscountTiers Get /unified/currency_discount_tiers Query unified account tiered discount
UnifiedApi ListLoanMarginTiers Get /unified/loan_margin_tiers Query unified account tiered loan margin
UnifiedApi CalculatePortfolioMargin Post /unified/portfolio_calculator Portfolio margin calculator
UnifiedApi GetUserLeverageCurrencyConfig Get /unified/leverage/user_currency_config Maximum and minimum currency leverage that can be set
UnifiedApi GetUserLeverageCurrencySetting Get /unified/leverage/user_currency_setting Get user currency leverage
UnifiedApi SetUserLeverageCurrencySetting Post /unified/leverage/user_currency_setting Set loan currency leverage
UnifiedApi ListUnifiedCurrencies Get /unified/currencies List of loan currencies supported by unified account
UnifiedApi GetHistoryLoanRate Get /unified/history_loan_rate Get historical lending rates
UnifiedApi SetUnifiedCollateral Post /unified/collateral_currencies Set collateral currency
WalletApi ListCurrencyChains Get /wallet/currency_chains Query chains supported for specified currency
WalletApi GetDepositAddress Get /wallet/deposit_address Generate currency deposit address
WalletApi ListWithdrawals Get /wallet/withdrawals Get withdrawal records
WalletApi ListDeposits Get /wallet/deposits Get deposit records
WalletApi Transfer Post /wallet/transfers Transfer between trading accounts
WalletApi ListSubAccountTransfers Get /wallet/sub_account_transfers Get transfer records between main and sub accounts
WalletApi TransferWithSubAccount Post /wallet/sub_account_transfers Transfer between main and sub accounts
WalletApi SubAccountToSubAccount Post /wallet/sub_account_to_sub_account Transfer between sub-accounts
WalletApi GetTransferOrderStatus Get /wallet/order_status Transfer status query
WalletApi ListWithdrawStatus Get /wallet/withdraw_status Query withdrawal status
WalletApi ListSubAccountBalances Get /wallet/sub_account_balances Query sub-account balance information
WalletApi ListSubAccountMarginBalances Get /wallet/sub_account_margin_balances Query sub-account isolated margin account balance information
WalletApi ListSubAccountFuturesBalances Get /wallet/sub_account_futures_balances Query sub-account perpetual futures account balance information
WalletApi ListSubAccountCrossMarginBalances Get /wallet/sub_account_cross_margin_balances Query sub-account cross margin account balance information
WalletApi ListSavedAddress Get /wallet/saved_address Query withdrawal address whitelist
WalletApi GetTradeFee Get /wallet/fee Query personal trading fees
WalletApi GetTotalBalance Get /wallet/total_balance Query personal account totals
WalletApi ListSmallBalance Get /wallet/small_balance Get list of convertible small balance currencies
WalletApi ConvertSmallBalance Post /wallet/small_balance Convert small balance currency
WalletApi ListSmallBalanceHistory Get /wallet/small_balance_history Get convertible small balance currency history
WalletApi ListPushOrders Get /wallet/push Get UID transfer history
WithdrawalApi Withdraw Post /withdrawals Withdraw
WithdrawalApi WithdrawPushOrder Post /withdrawals/push UID transfer
WithdrawalApi CancelWithdrawal Delete /withdrawals/{withdrawal_id} Cancel withdrawal with specified ID

Documentation For Models

Documentation For Authorization

apiv4

  • Type: Gate APIv4

Example

ctx := context.WithValue(context.Background(), gateapi.ContextAPIKey, gateapi.GateAPIV4{
    Key:    "YOUR_API_KEY",
    Secret: "YOUR_API_SECRET",
})
r, err := client.Service.Operation(ctx, args)

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published