OKCoin Market Orders: Buy Amounts Use Cash While Sell Amounts Use Coins
Summary
This tutorial explains how the OKCoin spot API’s market orders interpret the amount parameter. It describes a backtest example that estimates a buy quantity from the latest price, then submits a market buy with a cash-denominated amount. The author contrasts this with a market sell, where the amount is the quantity of BTC to sell.
The examples compare account balances before and after orders in backtesting and live trading. They report that a simulator used in the tutorial did not support market orders, and that small buy amounts were treated as RMB values rather than fractions of a coin. These observations are specific to the exchange, API, and software behavior described; the document gives no systematic execution, slippage, or performance analysis. Traders should verify current interface conventions and minimum order sizes before applying the examples.
Key ideas
- The tutorial says to specify a market buy price as -1 in the described API.
- For the illustrated OKCoin spot interface, a market buy amount is denominated in fiat currency.
- A market sell amount is the quantity of cryptocurrency to sell.
- The author reports that the simulator used in the examples did not support market orders.
- The examples compare account information before and after placing orders.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.