|
Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
|
W3WPrediction REST API client. More...
#include <rest_api.hpp>
Public Member Functions | |
| RestApi (common::RestApiConfig configuration) | |
| Throws common::ConfigError if the configuration is invalid. | |
| const common::RestApiConfig & | configuration () const noexcept |
| template<class T> | |
| common::RestApiResponse< T > | send_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const |
| Calls an endpoint the SDK does not wrap yet. T may be boost::json::value. | |
| template<class T> | |
| common::RestApiResponse< T > | send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query={}, common::Params body={}) const |
| Like send_request, but signed (adds timestamp and signature). | |
| template<class T, class CompletionToken> | |
| auto | async_send_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const |
| template<class T, class CompletionToken> | |
| auto | async_send_signed_request (std::string endpoint, common::HttpMethod method, common::Params query, common::Params body, CompletionToken &&token) const |
| common::RestApiResponse< GetMarketDetailResponse > | get_market_detail (const GetMarketDetailParams ¶ms) const |
| Get Market Detail. | |
| template<class CompletionToken> | |
| auto | async_get_market_detail (const GetMarketDetailParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_market_detail(). | |
| common::RestApiResponse< ListPredictionCategoriesResponse > | list_prediction_categories () const |
| List Prediction Categories. | |
| template<class CompletionToken> | |
| auto | async_list_prediction_categories (CompletionToken &&token) const |
| Asynchronous list_prediction_categories(). | |
| common::RestApiResponse< ListPredictionMarketsResponse > | list_prediction_markets (const ListPredictionMarketsParams ¶ms={}) const |
| List Prediction Markets. | |
| template<class CompletionToken> | |
| auto | async_list_prediction_markets (const ListPredictionMarketsParams ¶ms, CompletionToken &&token) const |
| Asynchronous list_prediction_markets(). | |
| common::RestApiResponse< std::vector< MarketSearchResponseInner > > | market_search (const MarketSearchParams ¶ms) const |
| Market Search. | |
| template<class CompletionToken> | |
| auto | async_market_search (const MarketSearchParams ¶ms, CompletionToken &&token) const |
| Asynchronous market_search(). | |
| common::RestApiResponse< QueryLastTradePriceResponse > | query_last_trade_price (const QueryLastTradePriceParams ¶ms) const |
| Query Last Trade Price. | |
| template<class CompletionToken> | |
| auto | async_query_last_trade_price (const QueryLastTradePriceParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_last_trade_price(). | |
| common::RestApiResponse< QueryOrderBookResponse > | query_order_book (const QueryOrderBookParams ¶ms) const |
| Query Order Book. | |
| template<class CompletionToken> | |
| auto | async_query_order_book (const QueryOrderBookParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_order_book(). | |
| common::RestApiResponse< CreateOtcBlocktradeResponse > | create_otc_blocktrade (const CreateOtcBlocktradeParams ¶ms) const |
| Create OTC Blocktrade (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_create_otc_blocktrade (const CreateOtcBlocktradeParams ¶ms, CompletionToken &&token) const |
| Asynchronous create_otc_blocktrade(). | |
| common::RestApiResponse< FulfilOtcBlocktradeResponse > | fulfil_otc_blocktrade (const FulfilOtcBlocktradeParams ¶ms) const |
| Fulfil OTC Blocktrade (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_fulfil_otc_blocktrade (const FulfilOtcBlocktradeParams ¶ms, CompletionToken &&token) const |
| Asynchronous fulfil_otc_blocktrade(). | |
| common::RestApiResponse< GetOtcBlocktradeDetailResponse > | get_otc_blocktrade_detail (const GetOtcBlocktradeDetailParams ¶ms) const |
| Get OTC Blocktrade Detail (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_otc_blocktrade_detail (const GetOtcBlocktradeDetailParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_otc_blocktrade_detail(). | |
| common::RestApiResponse< GetOtcBlocktradeEventsResponse > | get_otc_blocktrade_events (const GetOtcBlocktradeEventsParams ¶ms={}) const |
| Get OTC Blocktrade Events (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_otc_blocktrade_events (const GetOtcBlocktradeEventsParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_otc_blocktrade_events(). | |
| common::RestApiResponse< GetOtcReservedBalancesResponse > | get_otc_reserved_balances (const GetOtcReservedBalancesParams ¶ms) const |
| Get OTC Reserved Balances (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_otc_reserved_balances (const GetOtcReservedBalancesParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_otc_reserved_balances(). | |
| common::RestApiResponse< ListOtcBlocktradesResponse > | list_otc_blocktrades (const ListOtcBlocktradesParams ¶ms={}) const |
| List OTC Blocktrades (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_list_otc_blocktrades (const ListOtcBlocktradesParams ¶ms, CompletionToken &&token) const |
| Asynchronous list_otc_blocktrades(). | |
| common::RestApiResponse< PreviewOtcBlocktradeResponse > | preview_otc_blocktrade (const PreviewOtcBlocktradeParams ¶ms) const |
| Preview OTC Blocktrade (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_preview_otc_blocktrade (const PreviewOtcBlocktradeParams ¶ms, CompletionToken &&token) const |
| Asynchronous preview_otc_blocktrade(). | |
| common::RestApiResponse< RemoveOtcBlocktradesResponse > | remove_otc_blocktrades (const RemoveOtcBlocktradesParams ¶ms) const |
| Remove OTC Blocktrades (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_remove_otc_blocktrades (const RemoveOtcBlocktradesParams ¶ms, CompletionToken &&token) const |
| Asynchronous remove_otc_blocktrades(). | |
| common::RestApiResponse< GetPositionByTokenResponse > | get_position_by_token (const GetPositionByTokenParams ¶ms) const |
| Get Position by Token (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_position_by_token (const GetPositionByTokenParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_position_by_token(). | |
| common::RestApiResponse< QueryPnLResponse > | query_pnl (const QueryPnLParams ¶ms) const |
| Query PnL (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_pnl (const QueryPnLParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_pnl(). | |
| common::RestApiResponse< QueryPositionsResponse > | query_positions (const QueryPositionsParams ¶ms) const |
| Query Positions (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_positions (const QueryPositionsParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_positions(). | |
| common::RestApiResponse< QueryPositionsByFilterResponse > | query_positions_by_filter (const QueryPositionsByFilterParams ¶ms={}) const |
| Query Positions by Filter (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_positions_by_filter (const QueryPositionsByFilterParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_positions_by_filter(). | |
| common::RestApiResponse< QuerySettledPositionHistoryResponse > | query_settled_position_history (const QuerySettledPositionHistoryParams ¶ms) const |
| Query Settled Position History (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_settled_position_history (const QuerySettledPositionHistoryParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_settled_position_history(). | |
| common::RestApiResponse< BatchRedeemResponse > | batch_redeem (const BatchRedeemParams ¶ms) const |
| Batch Redeem (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_batch_redeem (const BatchRedeemParams ¶ms, CompletionToken &&token) const |
| Asynchronous batch_redeem(). | |
| common::RestApiResponse< GetRedeemStatusResponse > | get_redeem_status (const GetRedeemStatusParams ¶ms) const |
| Get Redeem Status (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_redeem_status (const GetRedeemStatusParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_redeem_status(). | |
| common::RestApiResponse< BatchCancelOrdersResponse > | batch_cancel_orders (const BatchCancelOrdersParams ¶ms) const |
| Batch Cancel Orders (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_batch_cancel_orders (const BatchCancelOrdersParams ¶ms, CompletionToken &&token) const |
| Asynchronous batch_cancel_orders(). | |
| common::RestApiResponse< GetQuoteResponse > | get_quote (const GetQuoteParams ¶ms) const |
| Get Quote (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_quote (const GetQuoteParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_quote(). | |
| common::RestApiResponse< PlaceOrderResponse > | place_order (const PlaceOrderParams ¶ms) const |
| Place Order (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_place_order (const PlaceOrderParams ¶ms, CompletionToken &&token) const |
| Asynchronous place_order(). | |
| common::RestApiResponse< QueryActiveOrdersResponse > | query_active_orders (const QueryActiveOrdersParams ¶ms) const |
| Query Active Orders (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_active_orders (const QueryActiveOrdersParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_active_orders(). | |
| common::RestApiResponse< QueryOrderHistoryResponse > | query_order_history (const QueryOrderHistoryParams ¶ms) const |
| Query Order History (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_order_history (const QueryOrderHistoryParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_order_history(). | |
| common::RestApiResponse< ApplyMmDepositResponse > | apply_mm_deposit (const ApplyMmDepositParams ¶ms) const |
| Apply MM Deposit (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_apply_mm_deposit (const ApplyMmDepositParams ¶ms, CompletionToken &&token) const |
| Asynchronous apply_mm_deposit(). | |
| common::RestApiResponse< ApplyMmWithdrawResponse > | apply_mm_withdraw (const ApplyMmWithdrawParams ¶ms) const |
| Apply MM Withdraw (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_apply_mm_withdraw (const ApplyMmWithdrawParams ¶ms, CompletionToken &&token) const |
| Asynchronous apply_mm_withdraw(). | |
| common::RestApiResponse< CreateInboundTransferResponse > | create_inbound_transfer (const CreateInboundTransferParams ¶ms) const |
| Create Inbound Transfer (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_create_inbound_transfer (const CreateInboundTransferParams ¶ms, CompletionToken &&token) const |
| Asynchronous create_inbound_transfer(). | |
| common::RestApiResponse< CreateOutboundTransferResponse > | create_outbound_transfer (const CreateOutboundTransferParams ¶ms) const |
| Create Outbound Transfer (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_create_outbound_transfer (const CreateOutboundTransferParams ¶ms, CompletionToken &&token) const |
| Asynchronous create_outbound_transfer(). | |
| common::RestApiResponse< QueryTransferListResponse > | query_transfer_list (const QueryTransferListParams ¶ms) const |
| Query Transfer List (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_transfer_list (const QueryTransferListParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_transfer_list(). | |
| common::RestApiResponse< QueryTransferStatusResponse > | query_transfer_status (const QueryTransferStatusParams ¶ms) const |
| Query Transfer Status (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_transfer_status (const QueryTransferStatusParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_transfer_status(). | |
| common::RestApiResponse< GetPortfolioResponse > | get_portfolio (const GetPortfolioParams ¶ms) const |
| Get Portfolio (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_portfolio (const GetPortfolioParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_portfolio(). | |
| common::RestApiResponse< GetQuotaStatusResponse > | get_quota_status (const GetQuotaStatusParams ¶ms={}) const |
| Get Quota Status (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_get_quota_status (const GetQuotaStatusParams ¶ms, CompletionToken &&token) const |
| Asynchronous get_quota_status(). | |
| common::RestApiResponse< ListPredictionWalletsResponse > | list_prediction_wallets (const ListPredictionWalletsParams ¶ms={}) const |
| List Prediction Wallets (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_list_prediction_wallets (const ListPredictionWalletsParams ¶ms, CompletionToken &&token) const |
| Asynchronous list_prediction_wallets(). | |
| common::RestApiResponse< QueryPaymentOptionBalancesResponse > | query_payment_option_balances (const QueryPaymentOptionBalancesParams ¶ms={}) const |
| Query Payment Option Balances (PREDICTION_TRADE). | |
| template<class CompletionToken> | |
| auto | async_query_payment_option_balances (const QueryPaymentOptionBalancesParams ¶ms, CompletionToken &&token) const |
| Asynchronous query_payment_option_balances(). | |
Static Public Member Functions | |
| static RestApi | from_config (common::RestApiConfig config) |
| A client for config.base_path, production when it is not set. | |
| static RestApi | production (common::RestApiConfig config) |
| A client for production (W3w Prediction REST API). | |
W3WPrediction REST API client.
Cheap to copy: copies share one common::RestClient (connection pool and executor).
Every endpoint has a blocking form (name(params)) and an asynchronous form (async_name(params, token)) that accepts any Asio completion token.
|
explicit |
Throws common::ConfigError if the configuration is invalid.
|
staticnodiscard |
A client for config.base_path, production when it is not set.
|
staticnodiscard |
A client for production (W3w Prediction REST API).
|
nodiscardnoexcept |
|
inlinenodiscard |
Calls an endpoint the SDK does not wrap yet. T may be boost::json::value.
|
inlinenodiscard |
Like send_request, but signed (adds timestamp and signature).
|
inline |
|
inline |
|
inlinenodiscard |
Get Market Detail.
GET /sapi/v1/w3w/wallet/prediction/market/detail.
Get full details for a specific prediction market topic, including variant data and timeline.
Weight(IP): 1
Response Notes:
|
inline |
Asynchronous get_market_detail().
|
inlinenodiscard |
List Prediction Categories.
GET /sapi/v1/w3w/wallet/prediction/category/list.
Get all available prediction market categories (L1 and L2).
Weight(IP): 1
|
inline |
Asynchronous list_prediction_categories().
|
inlinenodiscard |
List Prediction Markets.
GET /sapi/v1/w3w/wallet/prediction/market/list.
Get a paginated list of prediction market topics, with optional category and sort filters.
Weight(IP): 1
Response Notes:
|
inline |
Asynchronous list_prediction_markets().
|
inlinenodiscard |
Market Search.
GET /sapi/v1/w3w/wallet/prediction/market/search.
Semantic search for prediction market topics by keyword.
Weight(IP): 1
|
inline |
Asynchronous market_search().
|
inlinenodiscard |
Query Last Trade Price.
GET /sapi/v1/w3w/wallet/prediction/order-book/last-trade-price.
Get the most recent trade price for a prediction market.
Weight(IP): 1
|
inline |
Asynchronous query_last_trade_price().
|
inlinenodiscard |
Query Order Book.
GET /sapi/v1/w3w/wallet/prediction/order-book.
Get the current order book (bids and asks) for a specific prediction market outcome token.
Weight(IP): 1
|
inline |
Asynchronous query_order_book().
|
inlinenodiscard |
Create OTC Blocktrade (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/create.
Create an OTC blocktrade as the maker (BID to buy outcome shares with USDT, or ASK to sell outcome shares for USDT). The maker wallet is resolved server-side by userId; signing is done server-side via SAS typedDataSign. Returns orderId and a one-time secretToken to share out-of-band with the intended taker.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
| side | makerAmount | takerAmount |
|---|---|---|
| BUY | USDT (wei) | shares (wei) |
| SELL | shares (wei) | USDT (wei) |
| Request side | Response side (Integer) | Response quoteType |
|---|---|---|
| BUY | 0 | "Bid" |
| SELL | 1 | "Ask" |
|
inline |
Asynchronous create_otc_blocktrade().
|
inlinenodiscard |
Fulfil OTC Blocktrade (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/fulfil.
Fulfil an open maker blocktrade as the taker, using the secretToken the maker shared out-of-band. All-or-nothing fill (no partial fill); the taker order is the server-derived symmetric inverse of the maker order.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous fulfil_otc_blocktrade().
|
inlinenodiscard |
Get OTC Blocktrade Detail (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/detail.
Query the maker's own blocktrade by orderId. Returns full order data including status and secretToken.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous get_otc_blocktrade_detail().
|
inlinenodiscard |
Get OTC Blocktrade Events (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/events.
Paginated feed of blocktrade lifecycle and settlement events (CREATE, FULFIL, MATCH_SUBMIT, MATCH_SUCCESS, EXPIRE, FAILED, etc.).
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous get_otc_blocktrade_events().
|
inlinenodiscard |
Get OTC Reserved Balances (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/reserved-balances.
Query PredictFun reserved balances for the caller's bound wallet — these are funds locked by the caller's open OTC blocktrade orders (maker BID locks USDT, maker ASK locks shares). Not tied to a specific blocktrade id; the path nesting under otc/blocktrade reflects the cause of the lock, not a per-order query. Returns one entry per requested asset, aligned with the request order. Pass {type:"USDT"} for reserved USDT, or {type:"SHARE", tokenId:"..."} for a specific outcome token's reserved shares.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| type | STRING | YES | Asset type. Enum: USDT, SHARE |
| tokenId | STRING | NO | Outcome token id (present for SHARE entries only) |
|
inline |
Asynchronous get_otc_reserved_balances().
|
inlinenodiscard |
List OTC Blocktrades (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/list.
List the maker's own blocktrades with optional status filter and cursor pagination.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous list_otc_blocktrades().
|
inlinenodiscard |
Preview OTC Blocktrade (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/preview.
Inspect an open blocktrade by secretToken (no orderId needed). Taker uses this to preview the maker order before fulfilling. Returns the same shape as Get Blocktrade Detail, but orderId is null and secretToken is never returned from this endpoint.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous preview_otc_blocktrade().
|
inlinenodiscard |
Remove OTC Blocktrades (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/otc/blocktrade/remove.
Cancel open or fulfilled-but-unsettled blocktrades. Terminal orders (already MATCHED/CANCELLED/EXPIRED/FAILED) are returned in noop instead of removed.
Weight(IP): 200
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous remove_otc_blocktrades().
|
inlinenodiscard |
Get Position by Token (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/position/token.
Get the authenticated user's position detail for a specific prediction token.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous get_position_by_token().
|
inlinenodiscard |
Query PnL (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/pnl/query.
Query profit and loss records for the authenticated user's prediction positions. When tokenId is provided, returns a single record in pnl; otherwise returns a list in pnlList.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_pnl().
|
inlinenodiscard |
Query Positions (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/position/list.
Get the authenticated user's prediction token positions with portfolio summary and tab-based filtering.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_positions().
|
inlinenodiscard |
Query Positions by Filter (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/position/filter.
Get prediction positions filtered by wallet address and/or market topic ID. Both parameters are optional.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_positions_by_filter().
|
inlinenodiscard |
Query Settled Position History (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/position/settled-history.
Get the authenticated user's settled (resolved) prediction position history with optional filters.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Response Notes:
|
inline |
Asynchronous query_settled_position_history().
|
inlinenodiscard |
Batch Redeem (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/batch-redeem.
Redeem one or more settled prediction tokens on-chain to claim winnings. Requires SAS authorization.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous batch_redeem().
|
inlinenodiscard |
Get Redeem Status (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/redeem/status.
Query the on-chain transaction status of a previously submitted redeem request.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Response Notes:
| Value | Description |
|---|---|
| PENDING | Transaction submitted, awaiting confirmation |
| CONFIRMED | Transaction confirmed on-chain |
| FAILED | Transaction failed |
| NOT_FOUND | Transaction hash not found |
|
inline |
Asynchronous get_redeem_status().
|
inlinenodiscard |
Batch Cancel Orders (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/trade/batch-cancel.
Cancel one or more active prediction orders in a single request. Requires SAS authorization.
Known Issue — Bracket Encoding Incompatibility: This endpoint uses indexed bracket notation (cancelInfoList[0].orderId). Binance SAPI signature verification runs over the raw, unencoded canonical string. However, mainstream HTTP libraries (Python requests, Java HttpURLConnection/URI, Go net/url, Node.js url) automatically percent-encode [ → %5B and ] → %5D, producing a signature mismatch with error -1022 Signature for this request is not valid. Postman is unaffected because it does not encode keys.
Workarounds (use low-level HTTP APIs that do not normalize URLs):
Weight(IP): 1
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous batch_cancel_orders().
|
inlinenodiscard |
Get Quote (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/trade/get-quote.
Get a price quote for a prediction order. The returned quoteId must be used in the subsequent Place Order request.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Response Notes:
|
inline |
Asynchronous get_quote().
|
inlinenodiscard |
Place Order (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/trade/place-order-bundle.
Place a prediction order using a previously obtained quote. Requires SAS authorization.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Notes:
| orderType | timeInForce | priceLimit |
|---|---|---|
| MARKET | Must be FOK | Not required |
| LIMIT | Must be GTC | Required, must be > 0 |
|
inline |
Asynchronous place_order().
|
inlinenodiscard |
Query Active Orders (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/order/list.
Get active (open) prediction orders for the authenticated user.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_active_orders().
|
inlinenodiscard |
Query Order History (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/order/history.
Get historical prediction orders (all statuses) for the authenticated user, with optional filters.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_order_history().
|
inlinenodiscard |
Apply MM Deposit (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/deposit/apply.
Move funds from the user's bound CeDeFi MPC wallet to their CEX account (SPOT/FUNDING) via a contract escrow + credit flow. The maker wallet is resolved server-side by userId; the caller does not pass wallet or signature.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Notes:
|
inline |
Asynchronous apply_mm_deposit().
|
inlinenodiscard |
Apply MM Withdraw (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/withdraw/apply.
Withdraw funds from the user's CEX account (SPOT/FUNDING) to their bound CeDeFi MPC wallet address. Unlike v1/capital/withdraw/apply, the caller does NOT pass address; the backend resolves the user's bound CeDeFi MPC wallet address by userId and reuses the existing capital withdraw flow with that address as the target.
Weight(IP): 1
Security Type: PREDICTION_TRADE
Notes:
| Value | Behavior |
|---|---|
| null | Allowed — defaults to SPOT |
| 0 | Allowed — source = SPOT |
| 1 | Allowed — source = FUNDING |
| Other (e.g. 99) | Rejected — returns validation error |
|
inline |
Asynchronous apply_mm_withdraw().
|
inlinenodiscard |
Create Inbound Transfer (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/transfer/inbound.
Transfer funds from the prediction wallet back to the user's CEX account (SPOT or FUNDING). Requires SAS authorization.
⚠️ SAS Authorization Required: This endpoint enforces SAS (Self-Authorization Service) authorization. If SAS is not enabled for the wallet, the request will be rejected with -31003 SAS authorization required. Enable SAS for your wallet before calling this endpoint.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous create_inbound_transfer().
|
inlinenodiscard |
Create Outbound Transfer (PREDICTION_TRADE).
POST /sapi/v1/w3w/wallet/prediction/transfer/outbound.
Transfer funds from the user's CEX account (SPOT or FUNDING) into the prediction wallet. Requires SAS authorization.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous create_outbound_transfer().
|
inlinenodiscard |
Query Transfer List (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/transfer/list.
Get the authenticated user's prediction wallet transfer history within a date range.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_transfer_list().
|
inlinenodiscard |
Query Transfer Status (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/transfer/status.
Query the current status of a prediction wallet transfer by transfer ID.
status values: Terminal states are COMPLETED and FAILED. Intermediate states are PROCESSING and PENDING. Do not poll for SUCCESS — it is not a valid terminal state.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_transfer_status().
|
inlinenodiscard |
Get Portfolio (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/pnl/portfolio.
Get the authenticated user's prediction portfolio overview including active positions count, aggregated PnL, and full position list.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous get_portfolio().
|
inlinenodiscard |
Get Quota Status (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/quota/limit/status.
Query the current user's daily trading quota limit and remaining allowance for prediction markets.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous get_quota_status().
|
inlinenodiscard |
List Prediction Wallets (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/wallet/list.
Get all prediction wallets registered for the authenticated user.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous list_prediction_wallets().
|
inlinenodiscard |
Query Payment Option Balances (PREDICTION_TRADE).
GET /sapi/v1/w3w/wallet/prediction/balance/payment-options.
Get available balances for each payment option that can be used for prediction trading.
Weight(IP): 1
Security Type: PREDICTION_TRADE
|
inline |
Asynchronous query_payment_option_balances().