GET /keys/challenge
The message to sign to create an API key.
GET https://marketmayhem.co/api/v1/keys/challengeParameters
Section titled “Parameters”| Name | In | Required | Meaning |
|---|---|---|---|
address | query | yes | The wallet |
Response
Section titled “Response”| Field | Type | Required | Meaning |
|---|---|---|---|
nonce | string | yes | |
expires | integer | yes | Unix milliseconds; 5 minutes after it was issued |
message | string | yes | Sign this exact text with the wallet (personal_sign / EIP-191) |
next | string | yes |
A real response
Section titled “A real response”Captured from BSC testnet, exactly as the API sent it (long calldata shortened).
{ "nonce": "dc6e92c43c1d3f116a24932fc7d5f3ca6b76be2a56768626", "expires": 1790413078980, "message": "Market Mayhem: create an API key\n\nWallet: 0x2bf842241129be12f3a0e4f21e25d2fd43d9e6da\nNonce: dc6e92c43c1d3f116a24932fc7d5f3ca6b76be2a56768626\n\nTrades built with this key pay this wallet as referrer unless the request names another.\nThis signature costs nothing and moves no money.", "next": "Sign `message`, then POST /api/v1/keys { nonce, signature, label }."}Errors
Section titled “Errors”Every error is { "error": { "code", "message", "fix"? } }. This endpoint can answer:
INVALID_ADDRESS: A field that must be a 0x address is not one.KEYS_OFF: API keys are switched off on this server.