Skip to main content
POST
/
v1
/
auth
/
erc-4361
/
login
/
get_challenge
Get SIWE Login Challenge
curl --request POST \
  --url https://api.ondoperps.xyz/v1/auth/erc-4361/login/get_challenge \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18",
  "chainId": "1"
}
'
{
  "success": true,
  "result": {
    "id": "chg_9f8e7d6c5b4a3210",
    "message": "api.ondoperps.xyz wants you to sign in with your Ethereum account:\n0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18\n\nSign in to Ondo Perps\n\nURI: https://api.ondoperps.xyz\nVersion: 1\nChain ID: 1\nNonce: abc123\nIssued At: 2025-03-05T14:30:00Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
walletAddress
string
required

The wallet address requesting to sign in

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f2bD18"

chainId
enum<string>
required

EVM chain ID (1=Ethereum, 43114=Avalanche)

Available options:
1,
43114
Example:

"1"

Response

Challenge message for signing

success
boolean
required

Whether the request was successful

Example:

true

error
string

Error message, present only on failure

Example:

""

error_code
string

Semantic error code. See each endpoint's error responses for the specific codes it can return.

deprecated
string

Deprecation notice, if applicable

Example:

""

result
object