Files
ritmex-bot/docs/binance/binance-spot/faqs_opo.md
T
DisneyandGitHub d6399b92aa Feat/support binance (#22)
* add docs

* Add Binance exchange support

- Updated the environment configuration to include Binance as a selectable exchange option.
- Enhanced the README documentation to reflect the addition of Binance.
- Implemented the Binance exchange adapter and integrated it into the existing exchange framework.
- Modified the basis arbitrage strategy to support Binance alongside existing exchanges.
- Added tests to ensure proper functionality and integration of Binance within the trading system.

* Enhance README with detailed Binance exchange configuration

- Added comprehensive instructions for setting up Binance as an exchange option.
- Included environment variable specifications for API keys, market types, and trading symbols.
- Provided examples for both perpetual and spot trading strategies.
- Clarified the use of WebSocket and REST for the Binance adapter.

* Enhance exchange support and testing framework

- Added a new test suite for exchange contracts to ensure consistency and functionality across supported exchanges.
- Refactored exchange ID handling to utilize a centralized list of supported exchanges, improving maintainability.
- Updated CLI argument parsing and help documentation to reflect the new exchange structure.
- Introduced utility functions for validating supported exchanges and their display names.
- Enhanced the BasisApp and strategy runner to leverage the new exchange validation logic.
- Added a new test command for running exchange-related tests.

* Refactor exchange contract tests and update CLI commands

- Removed the trailing supported exchanges set and simplified the logic for trailing stop support in the exchange contract tests.
- Updated the test command for exchange contracts to exclude unnecessary tests, streamlining the testing process.
- Enhanced test descriptions for clarity and improved understanding of the functionality being tested.
2026-02-27 11:37:44 +08:00

2.9 KiB
Raw Blame History

title, source, fetched_at
title source fetched_at
OPO | Binance Open Platform https://developers.binance.com/docs/binance-spot-api-docs/faqs/opo 2026-02-26T10:38:07.501Z

One Pays the Other (OPO)

What is One Pays the Other?

This is a special behavior of OTO and OTOCO where the received amount from the working order is used for the quantity of the pending order(s). Thus the only balance requirement on order placement is that of the working order.

The received funds from the working order are locked for use by the pending order(s) and not available for trading or withdrawal. If the order list is canceled before the pending order is placed on the Matching Engine then these locked funds are unlocked.

OPO is almost identical to OTO, with the exception of the absence of the quantity of the pending order(s).

How can I use this?

Please refer to the following table:

API

Request

REST API

POST /api/v3/orderList/opo
POST /api/v3/orderList/opoco

WebSocket API

orderList.place.opo
orderList.place.opoco

FIX API

NewOrderList <E> where OPO (25046)=true

What is the difference with this order list from other order lists?

  • The pending order(s) are placed into the Matching Engine without quantity; the quantity will be based on the received quantity from the working order once it fully fills.
  • The received quantity will have commission deducted as appropriate. The commission is taken from the available funds instead (i.e. free balances) if the received asset is not BNB and there are enough available funds.
  • The quantity of the pending order(s) are evaluated (e.g. filters) after the working order fully fills.
  • If a symbol has LOT_SIZE and/or MARKET_LOT_SIZE filters configured, the quantity of the pending order(s) are adjusted to meet them. Any of the locked quantity not used in the pending order(s) will be unlocked and returned to the free balances.
  • A pending OPO order's quantity may not be amended until the working order has been fully filled.
  • Only working orders on the BUY side and pending order(s) on the SELL side are accepted.

Which symbols allow OPO orders?

Order

Reqired in Exchange Information

OPO

otoAllowed and opoAllowed

OPOCO

otoAllowed, opoAllowed, and ocoAllowed