Binance Web3 Connector JS
    Preparing search index...
    Index

    Constructors

    Methods

    • Generic function to send a request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • Generic function to send a signed request.

      Type Parameters

      • T

      Parameters

      • endpoint: string

        The API endpoint to call.

      • method: "GET" | "POST" | "DELETE" | "PUT" | "PATCH"

        HTTP method to use (GET, POST, DELETE, etc.).

      • queryParams: Record<string, unknown> = {}

        Query parameters for the request.

      • bodyParams: Record<string, unknown> = {}

        Body parameters for the request.

      Returns Promise<RestApiResponse<T>>

      A promise resolving to the response data object.

    • Submit a signed RFQ order to the backend for on-chain settlement via the corresponding vendor relayer. Only used when executionMode=RFQ (equity / RWA tokens such as Ondo and BStock).

      Flow*: GET /quote → pick an RFQ route → GET /swap → sign rfq.typedDataToSign with EIP-712 (eth_signTypedData_v4) → call this endpoint → poll GET /order/{orderId} until FILLED or FAILED.

      Idempotency*: Submitting with the same requestId within 30 minutes returns the original result without re-calling the vendor. Use a new UUID for each distinct order; reuse the same UUID when retrying.

      Parameters

      Returns Promise<RestApiResponse<SubmitRfqOrderResponse>>