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.103.0
  • Package version: 6.103.0
  • 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 Get account detail.
AccountApi GetAccountRateLimit Get /account/rate_limit Get user transaction rate limit information.
AccountApi ListSTPGroups Get /account/stp_groups List STP Groups.
AccountApi CreateSTPGroup Post /account/stp_groups Create STP Group.
AccountApi ListSTPGroupsUsers Get /account/stp_groups/{stp_id}/users List users of the STP group.
AccountApi AddSTPGroupUsers Post /account/stp_groups/{stp_id}/users Add users to the STP group.
AccountApi DeleteSTPGroupUsers Delete /account/stp_groups/{stp_id}/users Delete the user in the STP group.
AccountApi GetDebitFee Get /account/debit_fee Query GT deduction configuration.
AccountApi SetDebitFee Post /account/debit_fee Set GT deduction.
CollateralLoanApi ListCollateralLoanOrders Get /loan/collateral/orders List Orders.
CollateralLoanApi CreateCollateralLoan Post /loan/collateral/orders Place order.
CollateralLoanApi GetCollateralLoanOrderDetail Get /loan/collateral/orders/{order_id} Get a single order.
CollateralLoanApi RepayCollateralLoan Post /loan/collateral/repay Repayment.
CollateralLoanApi ListRepayRecords Get /loan/collateral/repay_records Repayment history.
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 the total borrowing and collateral amount for the user.
CollateralLoanApi GetUserLtvInfo Get /loan/collateral/ltv Query user's collateralization ratio.
CollateralLoanApi ListCollateralCurrencies Get /loan/collateral/currencies Query supported borrowing and collateral currencies.
DeliveryApi ListDeliveryContracts Get /delivery/{settle}/contracts List all futures contracts.
DeliveryApi GetDeliveryContract Get /delivery/{settle}/contracts/{contract} Get a single contract.
DeliveryApi ListDeliveryOrderBook Get /delivery/{settle}/order_book Futures order book.
DeliveryApi ListDeliveryTrades Get /delivery/{settle}/trades Futures trading history.
DeliveryApi ListDeliveryCandlesticks Get /delivery/{settle}/candlesticks Get futures candlesticks.
DeliveryApi ListDeliveryTickers Get /delivery/{settle}/tickers List futures tickers.
DeliveryApi ListDeliveryInsuranceLedger Get /delivery/{settle}/insurance Futures insurance balance history.
DeliveryApi ListDeliveryAccounts Get /delivery/{settle}/accounts Query futures account.
DeliveryApi ListDeliveryAccountBook Get /delivery/{settle}/account_book Query account book.
DeliveryApi ListDeliveryPositions Get /delivery/{settle}/positions List all positions of a user.
DeliveryApi GetDeliveryPosition Get /delivery/{settle}/positions/{contract} Get single position.
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 List futures orders.
DeliveryApi CreateDeliveryOrder Post /delivery/{settle}/orders Create a futures order.
DeliveryApi CancelDeliveryOrders Delete /delivery/{settle}/orders Cancel all `open` orders matched.
DeliveryApi GetDeliveryOrder Get /delivery/{settle}/orders/{order_id} Get a single order.
DeliveryApi CancelDeliveryOrder Delete /delivery/{settle}/orders/{order_id} Cancel a single order.
DeliveryApi GetMyDeliveryTrades Get /delivery/{settle}/my_trades List personal trading history.
DeliveryApi ListDeliveryPositionClose Get /delivery/{settle}/position_close List position close history.
DeliveryApi ListDeliveryLiquidates Get /delivery/{settle}/liquidates List liquidation history.
DeliveryApi ListDeliverySettlements Get /delivery/{settle}/settlements List settlement history.
DeliveryApi ListDeliveryRiskLimitTiers Get /delivery/{settle}/risk_limit_tiers List risk limit tiers.
DeliveryApi ListPriceTriggeredDeliveryOrders Get /delivery/{settle}/price_orders List All Price-triggered Orders.
DeliveryApi CreatePriceTriggeredDeliveryOrder Post /delivery/{settle}/price_orders Create a price-triggered order.
DeliveryApi CancelPriceTriggeredDeliveryOrderList Delete /delivery/{settle}/price_orders Cancel All Price-triggered Orders.
DeliveryApi GetPriceTriggeredDeliveryOrder Get /delivery/{settle}/price_orders/{order_id} Get a price-triggered order.
DeliveryApi CancelPriceTriggeredDeliveryOrder Delete /delivery/{settle}/price_orders/{order_id} cancel a price-triggered order.
EarnApi SwapETH2 Post /earn/staking/eth2/swap ETH2 swap.
EarnApi RateListETH2 Get /earn/staking/eth2/rate_records ETH2 historical rate of return 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 List currencies for lending.
EarnUniApi GetUniCurrency Get /earn/uni/currencies/{currency} Get currency detail for lending.
EarnUniApi ListUserUniLends Get /earn/uni/lends List user's lending orders.
EarnUniApi CreateUniLend Post /earn/uni/lends Lend or redeem.
EarnUniApi ChangeUniLend Patch /earn/uni/lends Amend lending order.
EarnUniApi ListUniLendRecords Get /earn/uni/lend_records List records of lending.
EarnUniApi GetUniInterest Get /earn/uni/interests/{currency} Get the user's total interest income of specified currency.
EarnUniApi ListUniInterestRecords Get /earn/uni/interest_records List interest 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 estimate annualized interest rate.
FlashSwapApi ListFlashSwapCurrencyPair Get /flash_swap/currency_pairs List All Supported Currency Pairs In Flash Swap.
FlashSwapApi ListFlashSwapOrders Get /flash_swap/orders List all flash swap orders.
FlashSwapApi CreateFlashSwapOrder Post /flash_swap/orders Create a flash swap order.
FlashSwapApi GetFlashSwapOrder Get /flash_swap/orders/{order_id} Get a single flash swap order's detail.
FlashSwapApi PreviewFlashSwapOrder Post /flash_swap/orders/preview Initiate a flash swap order preview.
FuturesApi ListFuturesContracts Get /futures/{settle}/contracts List all futures contracts.
FuturesApi GetFuturesContract Get /futures/{settle}/contracts/{contract} Get a single contract.
FuturesApi ListFuturesOrderBook Get /futures/{settle}/order_book Futures order book.
FuturesApi ListFuturesTrades Get /futures/{settle}/trades Futures trading history.
FuturesApi ListFuturesCandlesticks Get /futures/{settle}/candlesticks Get futures candlesticks.
FuturesApi ListFuturesPremiumIndex Get /futures/{settle}/premium_index Premium Index K-Line.
FuturesApi ListFuturesTickers Get /futures/{settle}/tickers List futures tickers.
FuturesApi ListFuturesFundingRateHistory Get /futures/{settle}/funding_rate Funding rate history.
FuturesApi ListFuturesInsuranceLedger Get /futures/{settle}/insurance Futures insurance balance history.
FuturesApi ListContractStats Get /futures/{settle}/contract_stats Futures stats.
FuturesApi GetIndexConstituents Get /futures/{settle}/index_constituents/{index} Get index constituents.
FuturesApi ListLiquidatedOrders Get /futures/{settle}/liq_orders Retrieve liquidation history.
FuturesApi ListFuturesRiskLimitTiers Get /futures/{settle}/risk_limit_tiers List risk limit tiers.
FuturesApi ListFuturesAccounts Get /futures/{settle}/accounts Query futures account.
FuturesApi ListFuturesAccountBook Get /futures/{settle}/account_book Query account book.
FuturesApi ListPositions Get /futures/{settle}/positions List all positions of a user.
FuturesApi GetPosition Get /futures/{settle}/positions/{contract} Get single position.
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 to the full position-by-store mode.
FuturesApi UpdateDualCompPositionCrossMode Post /futures/{settle}/dual_comp/positions/cross_mode 双仓模式下切换全逐仓模式
FuturesApi UpdatePositionRiskLimit Post /futures/{settle}/positions/{contract}/risk_limit Update position risk limit.
FuturesApi SetDualMode Post /futures/{settle}/dual_mode Enable or disable dual mode.
FuturesApi GetDualModePosition Get /futures/{settle}/dual_comp/positions/{contract} Retrieve position detail 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 List futures orders.
FuturesApi CreateFuturesOrder Post /futures/{settle}/orders Create a futures order.
FuturesApi CancelFuturesOrders Delete /futures/{settle}/orders Cancel all `open` orders matched.
FuturesApi GetOrdersWithTimeRange Get /futures/{settle}/orders_timerange List Futures Orders By Time Range.
FuturesApi CreateBatchFuturesOrder Post /futures/{settle}/batch_orders Create a batch of futures orders.
FuturesApi GetFuturesOrder Get /futures/{settle}/orders/{order_id} Get a single order.
FuturesApi AmendFuturesOrder Put /futures/{settle}/orders/{order_id} Amend an order.
FuturesApi CancelFuturesOrder Delete /futures/{settle}/orders/{order_id} Cancel a single order.
FuturesApi GetMyTrades Get /futures/{settle}/my_trades List personal trading history.
FuturesApi GetMyTradesWithTimeRange Get /futures/{settle}/my_trades_timerange List personal trading history by time range.
FuturesApi ListPositionClose Get /futures/{settle}/position_close List position close history.
FuturesApi ListLiquidates Get /futures/{settle}/liquidates List liquidation history.
FuturesApi ListAutoDeleverages Get /futures/{settle}/auto_deleverages List Auto-Deleveraging History.
FuturesApi CountdownCancelAllFutures Post /futures/{settle}/countdown_cancel_all Countdown cancel orders.
FuturesApi GetFuturesFee Get /futures/{settle}/fee Query user trading fee rates.
FuturesApi CancelBatchFutureOrders Post /futures/{settle}/batch_cancel_orders Cancel a batch of orders with an ID list.
FuturesApi AmendBatchFutureOrders Post /futures/{settle}/batch_amend_orders Batch modify orders with specified IDs.
FuturesApi GetFuturesRiskLimitTable Get /futures/{settle}/risk_limit_table Query risk limit table by table_id.
FuturesApi ListPriceTriggeredOrders Get /futures/{settle}/price_orders List All Price-triggered Orders.
FuturesApi CreatePriceTriggeredOrder Post /futures/{settle}/price_orders Create a price-triggered order.
FuturesApi CancelPriceTriggeredOrderList Delete /futures/{settle}/price_orders Cancel All Price-triggered Orders.
FuturesApi GetPriceTriggeredOrder Get /futures/{settle}/price_orders/{order_id} Get a price-triggered order.
FuturesApi CancelPriceTriggeredOrder Delete /futures/{settle}/price_orders/{order_id} cancel a price-triggered order.
MarginApi ListMarginAccounts Get /margin/accounts Margin account list.
MarginApi ListMarginAccountBook Get /margin/account_book List margin account balance change history.
MarginApi ListFundingAccounts Get /margin/funding_accounts Funding account list.
MarginApi GetAutoRepayStatus Get /margin/auto_repay Retrieve user auto repayment setting.
MarginApi SetAutoRepay Post /margin/auto_repay Update user's auto repayment setting.
MarginApi GetMarginTransferable Get /margin/transferable Get the max transferable amount for a specific margin currency.
MarginApi GetUserMarginTier Get /margin/user/loan_margin_tiers Check the user's own leverage lending gradient in the current market.
MarginApi GetMarketMarginTier Get /margin/loan_margin_tiers Query the current market leverage lending gradient.
MarginApi SetUserMarketLeverage Post /margin/leverage/user_market_setting Set the user market leverage multiple.
MarginApi ListMarginUserAccount Get /margin/user/account Query the user's leverage account list.
MarginApi ListCrossMarginLoans Get /margin/cross/loans List 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 detail of lending market.
MarginUniApi GetMarginUniEstimateRate Get /margin/uni/estimate_rate Estimate interest Rate.
MarginUniApi ListUniLoans Get /margin/uni/loans List loans.
MarginUniApi CreateUniLoan Post /margin/uni/loans Borrow or repay.
MarginUniApi ListUniLoanRecords Get /margin/uni/loan_records Get load records.
MarginUniApi ListUniLoanInterestRecords Get /margin/uni/interest_records List interest records.
MarginUniApi GetUniBorrowable Get /margin/uni/borrowable Get maximum borrowable.
MultiCollateralLoanApi ListMultiCollateralOrders Get /loan/multi_collateral/orders List Multi-Collateral Orders.
MultiCollateralLoanApi CreateMultiCollateral Post /loan/multi_collateral/orders Create Multi-Collateral Order.
MultiCollateralLoanApi GetMultiCollateralOrderDetail Get /loan/multi_collateral/orders/{order_id} Get Multi-Collateral Order Detail.
MultiCollateralLoanApi ListMultiRepayRecords Get /loan/multi_collateral/repay List Multi-Collateral Repay Records.
MultiCollateralLoanApi RepayMultiCollateralLoan Post /loan/multi_collateral/repay Repay Multi-Collateral Loan.
MultiCollateralLoanApi ListMultiCollateralRecords Get /loan/multi_collateral/mortgage Query collateral adjustment records.
MultiCollateralLoanApi OperateMultiCollateral Post /loan/multi_collateral/mortgage Operate Multi-Collateral.
MultiCollateralLoanApi ListUserCurrencyQuota Get /loan/multi_collateral/currency_quota List User Currency Quota.
MultiCollateralLoanApi ListMultiCollateralCurrencies Get /loan/multi_collateral/currencies Query supported borrowing and collateral currencies in Multi-Collateral.
MultiCollateralLoanApi GetMultiCollateralLtv Get /loan/multi_collateral/ltv Get Multi-Collateral ratio.
MultiCollateralLoanApi GetMultiCollateralFixRate Get /loan/multi_collateral/fixed_rate Query fixed interest rates for the currency for 7 days and 30 days.
MultiCollateralLoanApi GetMultiCollateralCurrentRate Get /loan/multi_collateral/current_rate Query the current interest rate of the currency.
OptionsApi ListOptionsUnderlyings Get /options/underlyings List all underlyings.
OptionsApi ListOptionsExpirations Get /options/expirations List all expiration times.
OptionsApi ListOptionsContracts Get /options/contracts List all the contracts with specified underlying and expiration time.
OptionsApi GetOptionsContract Get /options/contracts/{contract} Query specified contract detail.
OptionsApi ListOptionsSettlements Get /options/settlements List settlement history.
OptionsApi GetOptionsSettlement Get /options/settlements/{contract} Get specified contract's settlement.
OptionsApi ListMyOptionsSettlements Get /options/my_settlements List my options settlements.
OptionsApi ListOptionsOrderBook Get /options/order_book Options order book.
OptionsApi ListOptionsTickers Get /options/tickers List tickers of options contracts.
OptionsApi ListOptionsUnderlyingTickers Get /options/underlying/tickers/{underlying} Get underlying ticker.
OptionsApi ListOptionsCandlesticks Get /options/candlesticks Get options candlesticks.
OptionsApi ListOptionsUnderlyingCandlesticks Get /options/underlying/candlesticks Mark price candlesticks of an underlying.
OptionsApi ListOptionsTrades Get /options/trades Options trade history.
OptionsApi ListOptionsAccount Get /options/accounts List options account.
OptionsApi ListOptionsAccountBook Get /options/account_book List account changing 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 `open` orders matched.
OptionsApi GetOptionsOrder Get /options/orders/{order_id} Get a single order.
OptionsApi CancelOptionsOrder Delete /options/orders/{order_id} Cancel a single order.
OptionsApi CountdownCancelAllOptions Post /options/countdown_cancel_all Countdown cancel orders.
OptionsApi ListMyOptionsTrades Get /options/my_trades List personal trading history.
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 The agency obtains the transaction history of the recommended user.
RebateApi AgencyCommissionsHistory Get /rebate/agency/commission_history The agency obtains the commission history of the recommended user.
RebateApi PartnerTransactionHistory Get /rebate/partner/transaction_history Partner obtains transaction records of recommended users.
RebateApi PartnerCommissionsHistory Get /rebate/partner/commission_history Partner obtains commission records of recommended users.
RebateApi PartnerSubList Get /rebate/partner/sub_list Partner subordinate list.
RebateApi RebateBrokerCommissionHistory Get /rebate/broker/commission_history The broker obtains the user's commission rebate records.
RebateApi RebateBrokerTransactionHistory Get /rebate/broker/transaction_history The broker obtains the user's trading history.
RebateApi RebateUserInfo Get /rebate/user/info User retrieves rebate information.
RebateApi UserSubRelation Get /rebate/user/sub_relation User-subordinate relationship.
SpotApi ListCurrencies Get /spot/currencies List all currencies' details.
SpotApi GetCurrency Get /spot/currencies/{currency} Get details of a specific currency.
SpotApi ListCurrencyPairs Get /spot/currency_pairs List all currency pairs supported.
SpotApi GetCurrencyPair Get /spot/currency_pairs/{currency_pair} Get details of a specifc currency pair.
SpotApi ListTickers Get /spot/tickers Retrieve ticker information.
SpotApi ListOrderBook Get /spot/order_book Retrieve order book.
SpotApi ListTrades Get /spot/trades Retrieve market trades.
SpotApi ListCandlesticks Get /spot/candlesticks Market candlesticks.
SpotApi GetFee Get /spot/fee Query user trading fee rates.
SpotApi GetBatchSpotFee Get /spot/batch_fee Query a batch of user trading fee rates.
SpotApi ListSpotAccounts Get /spot/accounts List spot accounts.
SpotApi ListSpotAccountBook Get /spot/account_book Query account book.
SpotApi CreateBatchOrders Post /spot/batch_orders Create a batch of 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 a batch of orders with an ID list.
SpotApi GetOrder Get /spot/orders/{order_id} Get a single order.
SpotApi CancelOrder Delete /spot/orders/{order_id} Cancel a single order.
SpotApi AmendOrder Patch /spot/orders/{order_id} Amend an order.
SpotApi ListMyTrades Get /spot/my_trades List personal trading history.
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 Retrieve running auto order list.
SpotApi CreateSpotPriceTriggeredOrder Post /spot/price_orders Create a price-triggered order.
SpotApi CancelSpotPriceTriggeredOrderList Delete /spot/price_orders Cancel All Price-triggered Orders.
SpotApi GetSpotPriceTriggeredOrder Get /spot/price_orders/{order_id} Get a price-triggered order.
SpotApi CancelSpotPriceTriggeredOrder Delete /spot/price_orders/{order_id} cancel a price-triggered 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 the sub-account.
SubAccountApi ListSubAccountKeys Get /sub_accounts/{user_id}/keys List all API Key of the sub-account.
SubAccountApi CreateSubAccountKeys Post /sub_accounts/{user_id}/keys Create API Key of the sub-account.
SubAccountApi GetSubAccountKey Get /sub_accounts/{user_id}/keys/{key} Get the API Key of the sub-account.
SubAccountApi UpdateSubAccountKeys Put /sub_accounts/{user_id}/keys/{key} Update API key of the sub-account.
SubAccountApi DeleteSubAccountKeys Delete /sub_accounts/{user_id}/keys/{key} Delete API key of the sub-account.
SubAccountApi LockSubAccount Post /sub_accounts/{user_id}/lock Lock the sub-account.
SubAccountApi UnlockSubAccount Post /sub_accounts/{user_id}/unlock Unlock the 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 about the maximum borrowing for the unified account.
UnifiedApi GetUnifiedTransferable Get /unified/transferable Query about the maximum transferable for the unified account.
UnifiedApi GetUnifiedTransferables Get /unified/transferables Batch query can be transferred out at most for unified accounts; each currency is the maximum value. After the user withdraws the currency, the amount of transferable currency will be changed.
UnifiedApi GetUnifiedBorrowableList Get /unified/batch_borrowable Batch query unified account can be borrowed up to a maximum.
UnifiedApi ListUnifiedLoans Get /unified/loans List loans.
UnifiedApi CreateUnifiedLoan Post /unified/loans Borrow or repay.
UnifiedApi ListUnifiedLoanRecords Get /unified/loan_records Get load records.
UnifiedApi ListUnifiedLoanInterestRecords Get /unified/interest_records List interest 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 mode of the unified account.
UnifiedApi GetUnifiedEstimateRate Get /unified/estimate_rate Get unified estimate rate.
UnifiedApi ListCurrencyDiscountTiers Get /unified/currency_discount_tiers List currency discount tiers.
UnifiedApi ListLoanMarginTiers Get /unified/loan_margin_tiers List loan margin tiers.
UnifiedApi CalculatePortfolioMargin Post /unified/portfolio_calculator Portfolio margin calculator.
UnifiedApi GetUserLeverageCurrencyConfig Get /unified/leverage/user_currency_config Minimum currency leverage that can be set.
UnifiedApi GetUserLeverageCurrencySetting Get /unified/leverage/user_currency_setting Get the leverage multiple of the user currency.
UnifiedApi SetUserLeverageCurrencySetting Post /unified/leverage/user_currency_setting Set the 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 List chains supported for specified currency.
WalletApi GetDepositAddress Get /wallet/deposit_address Generate currency deposit address.
WalletApi ListWithdrawals Get /wallet/withdrawals Retrieve withdrawal records.
WalletApi ListDeposits Get /wallet/deposits Retrieve deposit records.
WalletApi Transfer Post /wallet/transfers Transfer between trading accounts.
WalletApi ListSubAccountTransfers Get /wallet/sub_account_transfers Retrieve 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 Sub-account transfers to sub-account.
WalletApi GetTransferOrderStatus Get /wallet/order_status Transfer status query.
WalletApi ListWithdrawStatus Get /wallet/withdraw_status Retrieve withdrawal status.
WalletApi ListSubAccountBalances Get /wallet/sub_account_balances Retrieve sub account balances.
WalletApi ListSubAccountMarginBalances Get /wallet/sub_account_margin_balances Query sub accounts' margin balances.
WalletApi ListSubAccountFuturesBalances Get /wallet/sub_account_futures_balances Query sub accounts' futures account balances.
WalletApi ListSubAccountCrossMarginBalances Get /wallet/sub_account_cross_margin_balances Query subaccount's cross_margin account info.
WalletApi ListSavedAddress Get /wallet/saved_address Query saved address.
WalletApi GetTradeFee Get /wallet/fee Retrieve personal trading fee.
WalletApi GetTotalBalance Get /wallet/total_balance Retrieve user's total balances.
WalletApi ListSmallBalance Get /wallet/small_balance List small balance.
WalletApi ConvertSmallBalance Post /wallet/small_balance Convert small balance.
WalletApi ListSmallBalanceHistory Get /wallet/small_balance_history List small balance history.
WalletApi ListPushOrders Get /wallet/push Retrieve the 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

Contributors 2

  •  
  •