Request a sign-in message
curl --request POST \
--url https://api.lamarge.trade/v1/auth/challenge \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>'})
};
fetch('https://api.lamarge.trade/v1/auth/challenge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/auth/challenge"
payload = { "address": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "<string>",
"nonce": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authentication
Request a sign-in message
A one-use EIP-4361 message for the master address, valid ten minutes, on the request’s Origin if allowed, else the main app origin. Check domain, URI, address and expiry before personal_sign.
POST
/
v1
/
auth
/
challenge
Request a sign-in message
curl --request POST \
--url https://api.lamarge.trade/v1/auth/challenge \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>"
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>'})
};
fetch('https://api.lamarge.trade/v1/auth/challenge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/auth/challenge"
payload = { "address": "<string>" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"message": "<string>",
"nonce": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Response
The message to sign.