Binance C++ Connector 2.0.0
Official C++ connectors for the Binance APIs
Loading...
Searching...
No Matches
binance::w3w_prediction::rest_api::MarketDataApi Class Reference

#include <market_data_api.hpp>

Public Member Functions

 MarketDataApi (std::shared_ptr< common::RestClient > client)
common::RestApiResponse< GetMarketDetailResponse > get_market_detail (const GetMarketDetailParams &params) const
 Get Market Detail.
template<class CompletionToken>
auto async_get_market_detail (const GetMarketDetailParams &params, 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 &params={}) const
 List Prediction Markets.
template<class CompletionToken>
auto async_list_prediction_markets (const ListPredictionMarketsParams &params, CompletionToken &&token) const
 Asynchronous list_prediction_markets().
common::RestApiResponse< std::vector< MarketSearchResponseInner > > market_search (const MarketSearchParams &params) const
 Market Search.
template<class CompletionToken>
auto async_market_search (const MarketSearchParams &params, CompletionToken &&token) const
 Asynchronous market_search().
common::RestApiResponse< QueryLastTradePriceResponse > query_last_trade_price (const QueryLastTradePriceParams &params) const
 Query Last Trade Price.
template<class CompletionToken>
auto async_query_last_trade_price (const QueryLastTradePriceParams &params, CompletionToken &&token) const
 Asynchronous query_last_trade_price().
common::RestApiResponse< QueryOrderBookResponse > query_order_book (const QueryOrderBookParams &params) const
 Query Order Book.
template<class CompletionToken>
auto async_query_order_book (const QueryOrderBookParams &params, CompletionToken &&token) const
 Asynchronous query_order_book().

Constructor & Destructor Documentation

◆ MarketDataApi()

binance::w3w_prediction::rest_api::MarketDataApi::MarketDataApi ( std::shared_ptr< common::RestClient > client)
explicit

Member Function Documentation

◆ get_market_detail()

common::RestApiResponse< GetMarketDetailResponse > binance::w3w_prediction::rest_api::MarketDataApi::get_market_detail ( const GetMarketDetailParams & params) const
nodiscard

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:

  • status is a case-sensitive string. REGISTERED: registered and not yet resolved, this value alone does not guarantee that trading is available. RESOLVED: the outcome has been determined, it does not mean that the user has already claimed the payout. PAUSED: trading is temporarily suspended and may resume. CLOSED: closed for display, for example the end time has passed or the market was removed, it does not guarantee that trading is closed.
  • markets[].tradingStatus shows whether new orders may be attempted. OPEN: new orders may be attempted, this is the only value that allows new orders. MATCHING_NOT_ENABLED: order matching is not enabled. CANCEL_ONLY: only cancellation is allowed. CLOSED: trading has stopped. Use markets[].tradingStatus, not status, to decide whether to place an order, because a market whose status is CLOSED can still have tradingStatus OPEN. A topic can contain several markets and an order is placed on one market, so only the tradingStatus of that market matters. A successful quote does not guarantee that an order is accepted or filled.
  • outcomes[].winner is returned only after the market is resolved. There is no separate cancelled, invalid or refunded status. A resolved market can pay more than one outcome, in that case several outcomes have winner set to true and price is the settled value per share, for example 0.5 for each of two outcomes.

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#get-market-detail

◆ async_get_market_detail()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_get_market_detail ( const GetMarketDetailParams & params,
CompletionToken && token ) const
inline

Asynchronous get_market_detail().

Completes with void(std::exception_ptr, common::RestApiResponse<GetMarketDetailResponse>).

◆ list_prediction_categories()

common::RestApiResponse< ListPredictionCategoriesResponse > binance::w3w_prediction::rest_api::MarketDataApi::list_prediction_categories ( ) const
nodiscard

List Prediction Categories.

GET /sapi/v1/w3w/wallet/prediction/category/list.

Get all available prediction market categories (L1 and L2).

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-categories

◆ async_list_prediction_categories()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_list_prediction_categories ( CompletionToken && token) const
inline

Asynchronous list_prediction_categories().

Completes with void(std::exception_ptr, common::RestApiResponse<ListPredictionCategoriesResponse>).

◆ list_prediction_markets()

common::RestApiResponse< ListPredictionMarketsResponse > binance::w3w_prediction::rest_api::MarketDataApi::list_prediction_markets ( const ListPredictionMarketsParams & params = {}) const
nodiscard

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:

  • For the values of status and markets[].tradingStatus, see Get Market Detail.

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#list-prediction-markets

◆ async_list_prediction_markets()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_list_prediction_markets ( const ListPredictionMarketsParams & params,
CompletionToken && token ) const
inline

Asynchronous list_prediction_markets().

Completes with void(std::exception_ptr, common::RestApiResponse<ListPredictionMarketsResponse>).

◆ market_search()

common::RestApiResponse< std::vector< MarketSearchResponseInner > > binance::w3w_prediction::rest_api::MarketDataApi::market_search ( const MarketSearchParams & params) const
nodiscard

Market Search.

GET /sapi/v1/w3w/wallet/prediction/market/search.

Semantic search for prediction market topics by keyword.

Weight(IP): 1

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#market-search

◆ async_market_search()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_market_search ( const MarketSearchParams & params,
CompletionToken && token ) const
inline

Asynchronous market_search().

Completes with void(std::exception_ptr, common::RestApiResponse<std::vector<MarketSearchResponseInner>>).

◆ query_last_trade_price()

common::RestApiResponse< QueryLastTradePriceResponse > binance::w3w_prediction::rest_api::MarketDataApi::query_last_trade_price ( const QueryLastTradePriceParams & params) const
nodiscard

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

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-last-trade-price

◆ async_query_last_trade_price()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_query_last_trade_price ( const QueryLastTradePriceParams & params,
CompletionToken && token ) const
inline

Asynchronous query_last_trade_price().

Completes with void(std::exception_ptr, common::RestApiResponse<QueryLastTradePriceResponse>).

◆ query_order_book()

common::RestApiResponse< QueryOrderBookResponse > binance::w3w_prediction::rest_api::MarketDataApi::query_order_book ( const QueryOrderBookParams & params) const
nodiscard

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

See https://developers.binance.com/en/docs/catalog/web3-wallet-prediction-trading/api/rest-api/market-data#query-order-book

◆ async_query_order_book()

template<class CompletionToken>
auto binance::w3w_prediction::rest_api::MarketDataApi::async_query_order_book ( const QueryOrderBookParams & params,
CompletionToken && token ) const
inline

Asynchronous query_order_book().

Completes with void(std::exception_ptr, common::RestApiResponse<QueryOrderBookResponse>).