binance / binance/binance-api-swagger

missing headers for X-MBX-USED-WEIGHT and Retry-After

Open
#56 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
HTML
Stars
169
Forks
47
PR merge metrics
No merged PRs in 30d

Description

the documentation states:

https://binance-docs.github.io/apidocs/spot/en/#limits

```
IP Limits

Every request will contain X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) in the response headers which has the current used weight for the IP for all request rate limiters defined.
Each route has a weight which determines for the number of requests each endpoint counts for. Heavier endpoints and endpoints that do operations on multiple symbols will have a heavier weight.
When a 429 is received, it's your obligation as an API to back off and not spam the API.
Repeatedly violating rate limits and/or failing to back off after receiving 429s will result in an automated IP ban (HTTP status 418).
IP bans are tracked and scale in duration for repeat offenders, from 2 minutes to 3 days.
A Retry-After header is sent with a 418 or 429 responses and will give the number of seconds required to wait, in the case of a 429, to prevent a ban, or, in the case of a 418, until the ban is over.
The limits on the API are based on the IPs, not the API keys.

```

but when generating the code these headers are missing since not in the spec

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the OpenAPI specification with the Binance limits documentation linked in the issue, focusing on response-header definitions. Trace how those definitions feed code generation and verify that X-MBX-USED-WEIGHT-(intervalNum)(intervalLetter) and Retry-After are represented in the generated code. Done means both documented headers are available from generated responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.