Appendix: concepts

Cost calculation

Learn which amount a quote gives you for buying, selling, and withdrawing, and why an amount can be unavailable.

A market price is not what you pay or what you receive. Every /prices quote therefore carries three fee-adjusted amounts: one for buying, one for selling, and one for selling and then withdrawing.

Three amounts

FieldMeaningFee chains applied
buy_amountCash cost of buyingDeposit chain
sale_amountSale proceeds in the market balanceSale chain
payout_amountCash received after withdrawalSale chain, then withdrawal chain

The amounts use the market's official fee chains. Your own fee chains do not change them. To run an amount through a chain of your own, use a preview as described in customize fees.

How the amounts are calculated

  • Fee processing works in CNY internally. The API converts the results into the response currency with the official reference rates.
  • The response currency is the currency you request. Without it, the API uses your account's base currency, and USD if you have not set one.
  • Calculations use decimal arithmetic and round to eight places at each step.

Unavailable amounts

null means the amount is not available. Typical causes:

  • The fee is unknown, or a required rate is missing.
  • The purpose is not offered, or its slot is undefined.
  • A step of the chain is incompatible.
  • The amount is not yet computed for the current price.

Do not read an unavailable amount as a zero fee or as a profitable trade.

Limits

There is no profit-screening endpoint. The CSCP valuation uses fee-adjusted evidence, as described in CSCP valuation.

If you calculate comparisons yourself, state your assumptions about fees, currency conversion, available quantity, and quote age. A price difference alone is not realized profit.

To see how fee chains are defined, read market fees.