Binance Connector JS
    Preparing search index...

    OtcApi - object-oriented interface OtcApi

    Implements

    Index

    Constructors

    Methods

    • 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:

      • Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
      • Side & Amount Rules:
      side makerAmount takerAmount
      BUY USDT (wei) shares (wei)
      SELL shares (wei) USDT (wei)
      • "Note on side encoding: this request uses a string enum (BUY/SELL). Responses from Get Blocktrade Detail / Preview / List return side as an integer and also include a quoteType string — both encode the same concept."
      Request side Response side (Integer) Response quoteType
      BUY 0 "Bid"
      SELL 1 "Ask"

      Parameters

      Returns Promise<RestApiResponse<CreateOtcBlocktradeResponse>>

      OtcApi

    • 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:

      • Restricted to authorized market makers. Requests from unauthorized accounts are rejected — contact BD to request access.
      • AssetQuery:
      Name Type Mandatory Description
      type STRING YES Asset type. Enum: USDT, SHARE
      tokenId STRING NO Outcome token id (present for SHARE entries only)

      Parameters

      Returns Promise<RestApiResponse<GetOtcReservedBalancesResponse>>

      OtcApi