get_open_orders() raises "orderId is mandatory" when symbol is provided for USDT-M Futures

Open Beginner friendly
#263 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
api

Research direction

Start at the UMFutures.get_open_orders(symbol="BTCUSDT") entry point and inspect how its parameters are validated before calling GET /fapi/v1/openOrders. Reproduce the reported error, then verify that symbol-only requests succeed without orderId and return the endpoint response.

Written by the indexing model from the issue text.

Description

When calling the get_open_orders() method on the UMFutures client and passing only the symbol parameter, the library throws a validation error: orderId is mandatory, but received empty.

According to the Binance API documentation, passing symbol to the open orders endpoint should return all open/conditional orders for that specific trading pair, and orderId should be optional. However, the library incorrectly treats orderId as a mandatory parameter inside this method, making it impossible to fetch open orders by symbol using the built-in high-level method.

Steps to Reproduce:
from binance.um_futures import UMFutures

client = UMFutures(key='YOUR_API_KEY', secret='YOUR_API_SECRET')

# Trying to get all open orders for a specific symbol
try:
    open_orders = client.get_open_orders(symbol="BTCUSDT")
    print(open_orders)
except Exception as e:
    print(f"Error: {e}")
Expected Behavior:

The method should successfully call GET /fapi/v1/openOrders?symbol=BTCUSDT and return a list of all currently open and conditional (trigger) orders for BTCUSDT without requiring an orderId.

Actual Behavior / Error Log:

Error: orderId is mandatory, but received empty.

Temporary Workaround:

Currently, the only way to bypass this bug is to use the low-level sign_request method directly, which proves the API endpoint itself works fine:

open_orders = client.sign_request('GET', '/fapi/v1/openOrders', payload={'symbol': 'BTCUSDT'})

Dominant language
Python
Stars
1.2k
Forks
325
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from binance/binance-futures-connector-python

All issues in binance/binance-futures-connector-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.