The resource loading... loading...

Transaction Functions

Function Name Brief Introduction
exchange.Buy Submit a buy order, futures contracts must pay attention to the direction of the transaction is set correctly, if the direction of the transaction and the transaction function does not match, the error will be reported!
exchange.Sell Submit sell orders, futures contracts when placing orders must pay attention to the transaction direction is set correctly, if the transaction direction and the transaction function does not match, it will report an error
exchange.CreateOrder Submit an order and specify the transaction type, transaction direction, price, and quantity through parameters
exchange.CancelOrder Cancel order
exchange.GetOrder Get order information, data structure is Order structure
exchange.GetOrders Get unfilled orders with data structure Order struct array (list)
exchange.GetHistoryOrders Get the historical orders of the current trading pair and contract; support specifying specific trading products
exchange.SetPrecision Set the precision of the price and order quantity of the exchange object, after setting the system will automatically ignore the data redundancy.
exchange.SetRate Set the exchange rate
exchange.IO For other interface calls related to exchange objects
exchange.Log Output, record transaction logs and do not place orders
exchange.Encode signature encryption calculation
exchange.Go Multi-threaded asynchronous support functions
exchange.GetAccount Get account information
exchange.GetAssets Request exchange account asset information
exchange.GetName Get the name of the exchange object
exchange.GetLabel Get the label of the exchange object
exchange.GetCurrency Get the current trading pair
exchange.SetCurrency Switch trading pairs
exchange.GetQuoteCurrency Get the name of the currency of the current trading pair
Ticker Functions Futures Functions