Hello Binance Support Team,
I am getting error -2014: API-key format invalid. when trying to call Binance Futures API endpoints with my Ed25519 API Key. I have thoroughly checked all the steps and information, but still can’t find the cause.
Details of my issue:
Programming language: Node.js
API Key type in use: Ed25519
Environment: Binance Futures Mainnet
Endpoint trying to call: /fapi/v2/positionRisk (I also tried /fapi/v1/order with the same result).
Steps I took to fix:
I generated the Ed25519 key pair using Binance’s own “Key Pair Generator” tool.
I was careful to copy and paste the Public Key PEM directly into Binance when generating the API Key (making sure there are no extra spaces or hidden characters).
I am using the corresponding PEM Private Key (also from Binance’s tool) in my Node.js code, using the node:crypto module for signing.
I have verified that the HEX Public Key derived from the Private Key in my code exactly matches the Public Key I pasted on Binance.
I have made sure to synchronize my system time with NTP to rule out timezone errors.
I have used the payload structure for signing as ${timestamp}${method}${path}${queryString} as per the Ed25519 documentation.
I have removed the Content-Type header from the GET requests to avoid conflicts.
Debug data from the code output:
Public Key HEX derived: fbde81b944add1efa4…
Signed Payload: “1748353717518GET/fapi/v2/positionRiskrecvWindow=5000×tamp=1748353717518”
Signature HEX sent: 4cd18b87fdfb71bcf0ab4…
Timestamp used: 1748353717518
My API Key: 7BdE5abW79tb7V9qXglqGra4cA… (This is the API Key that received the error)
Despite thorough testing, I still cannot resolve this error myself. With all the information provided, I hope your team and the members of this group can help me identify the cause and fix the problem.
Thanks for your support.