Binance User Data Stream API

User data stream listen key management for COIN-M futures.

GitHub OpenAPI

Operations 15

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /dapi/v1/listenKey Start a COIN-M futures user data stream · Start user data stream #
Ask an LLM
“How do I start a user data stream for COIN-M futures?”
“What does a new coin futures listen key return?”
Tell an agent
Start a new COIN-M futures user data stream.
Create a listen key for my coin futures account.
PUT /dapi/v1/listenKey Keep a COIN-M futures user data stream alive · Keepalive user data stream #
Ask an LLM
“How do I keep my COIN-M futures user data stream from timing out?”
“Can I ping a coin futures listen key to extend its validity?”
Tell an agent
Keep my COIN-M futures user data stream alive.
Ping the coin futures listen key so the user data stream stays open.
DELETE /dapi/v1/listenKey Close a COIN-M futures user data stream · Close user data stream #
Ask an LLM
“How do I close my COIN-M futures user data stream?”
“Can I shut down a coin futures listen key?”
Tell an agent destructive · confirm first
Close my COIN-M futures user data stream.
Shut down the coin futures listen key.
POST /eapi/v1/listenKey Start an options user data stream · Start user data stream #
Ask an LLM
“How do I start a user data stream for options?”
“What does a new options listen key return?”
Tell an agent
Start a new options user data stream.
Create a listen key for my options account.
PUT /eapi/v1/listenKey Keep an options user data stream alive · Keepalive user data stream #
Ask an LLM
“How do I keep my options user data stream alive?”
“Can I ping an options listen key to prevent timeout?”
Tell an agent
Keep my options user data stream alive.
Ping the options listen key so the stream stays open.
DELETE /eapi/v1/listenKey Close an options user data stream · Close user data stream #
Ask an LLM
“How do I close my options user data stream?”
“Can I shut down an options listen key?”
Tell an agent destructive · confirm first
Close my options user data stream.
Shut down the options listen key.
POST /papi/v1/listenKey Start a portfolio margin user data stream · Start user data stream #
Ask an LLM
“How do I start a user data stream for portfolio margin?”
“What does a new portfolio margin listen key return?”
Tell an agent
Start a portfolio margin user data stream.
Create a listen key for my portfolio margin account.
PUT /papi/v1/listenKey Keep a portfolio margin user data stream alive · Keepalive user data stream #
Ask an LLM
“How do I keep my portfolio margin user data stream alive?”
“Can I ping a portfolio margin listen key to extend it?”
Tell an agent
Keep my portfolio margin user data stream alive.
Ping the portfolio margin listen key so the stream stays open.
DELETE /papi/v1/listenKey Close a portfolio margin user data stream · Close user data stream #
Ask an LLM
“How do I close my portfolio margin user data stream?”
“Can I shut down a portfolio margin listen key?”
Tell an agent destructive · confirm first
Close my portfolio margin user data stream.
Shut down the portfolio margin listen key.
POST /api/v3/userDataStream Start a spot user data stream · Create a listen key #
Ask an LLM
“How do I start a user data stream for spot trading?”
“What does a new spot listen key return?”
Tell an agent
Start a new spot user data stream.
Create a listen key for my spot account.
PUT /api/v3/userDataStream Keep a spot user data stream alive · Ping/Keep-alive a listen key #
Ask an LLM
“How do I prevent my spot user data stream from timing out?”
“Can I ping an existing spot listen key?”
Tell an agent
Keep spot user data stream {listen_key} alive.
Ping the spot listen key {listen_key} before it expires.
DELETE /api/v3/userDataStream Close a spot user data stream · Close a listen key #
Ask an LLM
“How do I close out my spot user data stream?”
“Can an existing spot listen key be deactivated?”
Tell an agent destructive · confirm first
Close spot user data stream {listen_key}.
Deactivate the spot listen key {listen_key} permanently.
POST /fapi/v1/listenKey Start a futures user data stream · Start user data stream #
Ask an LLM
“How do I start a user data stream for my futures account?”
“Where do I get a listen key for futures?”
Tell an agent
Start a futures user data stream.
Create a new listen key for my futures account.
PUT /fapi/v1/listenKey Keep a futures user data stream alive · Keepalive user data stream #
Ask an LLM
“Can I keep my futures user data stream from timing out?”
“What is the way to ping a futures listen key?”
Tell an agent
Keep the futures user data stream alive.
Send a keepalive for my futures listen key.
DELETE /fapi/v1/listenKey Close a futures user data stream · Close user data stream #
Ask an LLM
“How do I close out my futures user data stream?”
“Can a futures listen key be removed?”
Tell an agent destructive · confirm first
Close the futures user data stream.
Remove my futures listen key.

Documentation

📖
Documentation
https://developers.binance.com/docs/binance-spot-api-docs/rest-api
📖
Documentation
https://developers.binance.com/docs/derivatives/usds-margined-futures/general-info
📖
Documentation
https://developers.binance.com/docs/derivatives/coin-margined-futures/general-info
📖
Documentation
https://developers.binance.com/docs/derivatives/option/general-info
📖
Documentation
https://developers.binance.com/docs/derivatives/portfolio-margin/general-info
📖
Documentation
https://developers.binance.com/docs/margin_trading/general-info
📖
Documentation
https://developers.binance.com/docs/wallet/introduction
📖
Documentation
https://developers.binance.com/docs/sub_account/general-info
📖
Documentation
https://developers.binance.com/docs/simple_earn/general-info
📖
Documentation
https://developers.binance.com/docs/mining/general-info
📖
Documentation
https://developers.binance.com/docs/copy_trading/general-info
📖
Documentation
https://developers.binance.com/docs/convert/general-info
📖
Documentation
https://developers.binance.com/docs/binance-pay/introduction
📖
Documentation
https://developers.binance.com/docs/algo/general-info
📖
Documentation
https://developers.binance.com/docs/auto_invest/general-info
📖
Documentation
https://developers.binance.com/docs/crypto_loan/general-info
📖
Documentation
https://developers.binance.com/docs/gift_card/general-info
📖
Documentation
https://developers.binance.com/docs/nft/general-info
📖
Documentation
https://developers.binance.com/docs/fiat/general-info

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/binance:binance-user-data-stream-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

binance-user-data-stream-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Binance User Data Stream API
  contact:
    name: Binance Support
    url: https://www.binance.com/en/support
  termsOfService: https://www.binance.com/en/terms
  version: '1.0'
  description: 'Operations tagged User Data Stream across 5 of this provider''s published API definitions: binance-coin-margined-futures-openapi.yml, binance-european-options-openapi.yml, binance-portfolio-margin-openapi.yml, binance-spot-trading-openapi.yml, binance-usds-margined-futures-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://dapi.binance.com
  description: Production Server
- url: https://demo-dapi.binance.com
  description: Testnet Server
- url: https://eapi.binance.com
  description: Production Server
- url: https://papi.binance.com
  description: Production Server
- url: https://api.binance.com
  description: Production Server
- url: https://api1.binance.com
  description: Production Server (Backup 1)
- url: https://api2.binance.com
  description: Production Server (Backup 2)
- url: https://api3.binance.com
  description: Production Server (Backup 3)
- url: https://api4.binance.com
  description: Production Server (Backup 4)
- url: https://testnet.binance.vision
  description: Testnet Server
- url: https://fapi.binance.com
  description: Production Server
- url: https://demo-fapi.binance.com
  description: Testnet Server
security:
- apiKey: []
tags:
- name: User Data Stream
  description: User data stream listen key management for COIN-M futures.
paths:
  /dapi/v1/listenKey:
    post:
      operationId: createListenKey
      summary: Start user data stream
      description: Start a new COIN-M futures user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  listenKey:
                    type: string
      security:
      - apiKey: []
    put:
      operationId: keepAliveListenKey
      summary: Keepalive user data stream
      description: Keepalive a COIN-M futures user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
    delete:
      operationId: closeListenKey
      summary: Close user data stream
      description: Close a COIN-M futures user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
    servers:
    - url: https://dapi.binance.com
      description: Production Server
    - url: https://demo-dapi.binance.com
      description: Testnet Server
  /eapi/v1/listenKey:
    post:
      operationId: postEapiV1ListenKey
      summary: Start user data stream
      description: Start a new options user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  listenKey:
                    type: string
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: createListenKey
    put:
      operationId: putEapiV1ListenKey
      summary: Keepalive user data stream
      description: Keepalive an options user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: keepAliveListenKey
    delete:
      operationId: deleteEapiV1ListenKey
      summary: Close user data stream
      description: Close an options user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: closeListenKey
    servers:
    - url: https://eapi.binance.com
      description: Production Server
  /papi/v1/listenKey:
    post:
      operationId: postPapiV1ListenKey
      summary: Start user data stream
      description: Start a portfolio margin user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  listenKey:
                    type: string
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: createListenKey
    put:
      operationId: putPapiV1ListenKey
      summary: Keepalive user data stream
      description: Keepalive a portfolio margin user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: keepAliveListenKey
    delete:
      operationId: deletePapiV1ListenKey
      summary: Close user data stream
      description: Close a portfolio margin user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: closeListenKey
    servers:
    - url: https://papi.binance.com
      description: Production Server
  /api/v3/userDataStream:
    post:
      operationId: postApiV3UserDataStream
      summary: Create a listen key
      description: Start a new user data stream. The stream is closed after 60 minutes unless a keepalive is sent. If the account has an active listenKey, that listenKey will be returned and its validity extended for 60 minutes.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  listenKey:
                    type: string
                    description: The listen key to use for the user data WebSocket stream subscription.
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: createListenKey
    put:
      operationId: putApiV3UserDataStream
      summary: Ping/Keep-alive a listen key
      description: Keepalive a user data stream to prevent a timeout. User data streams will close after 60 minutes. It is recommended to send a ping about every 30 minutes.
      tags:
      - User Data Stream
      parameters:
      - name: listenKey
        in: query
        required: true
        description: The listen key to keep alive.
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: keepAliveListenKey
    delete:
      operationId: deleteApiV3UserDataStream
      summary: Close a listen key
      description: Close out a user data stream.
      tags:
      - User Data Stream
      parameters:
      - name: listenKey
        in: query
        required: true
        description: The listen key to close.
        schema:
          type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: closeListenKey
    servers:
    - url: https://api.binance.com
      description: Production Server
    - url: https://api1.binance.com
      description: Production Server (Backup 1)
    - url: https://api2.binance.com
      description: Production Server (Backup 2)
    - url: https://api3.binance.com
      description: Production Server (Backup 3)
    - url: https://api4.binance.com
      description: Production Server (Backup 4)
    - url: https://testnet.binance.vision
      description: Testnet Server
  /fapi/v1/listenKey:
    post:
      operationId: postFapiV1ListenKey
      summary: Start user data stream
      description: Start a new user data stream for futures. Returns a listen key that can be used to subscribe to user data WebSocket streams.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  listenKey:
                    type: string
                    description: Listen key for WebSocket subscription.
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: createListenKey
    put:
      operationId: putFapiV1ListenKey
      summary: Keepalive user data stream
      description: Keepalive a user data stream to prevent timeout.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: keepAliveListenKey
    delete:
      operationId: deleteFapiV1ListenKey
      summary: Close user data stream
      description: Close out a user data stream.
      tags:
      - User Data Stream
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
      security:
      - apiKey: []
      x-operation-id-source: normalized
      x-operation-id-original: closeListenKey
    servers:
    - url: https://fapi.binance.com
      description: Production Server
    - url: https://demo-fapi.binance.com
      description: Testnet Server
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-MBX-APIKEY
    hmacSignature:
      type: apiKey
      in: query
      name: signature
x-refined-from:
- binance-coin-margined-futures-openapi.yml
- binance-european-options-openapi.yml
- binance-portfolio-margin-openapi.yml
- binance-spot-trading-openapi.yml
- binance-usds-margined-futures-openapi.yml