curl --request POST \
--url https://api.lamarge.trade/v1/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
typed_data: {
types: {},
primaryType: '<string>',
domain: {
name: '<string>',
chainId: 123,
verifyingContract: '<string>',
version: '<string>'
},
message: {}
},
signature: '<string>',
move_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lamarge.trade/v1/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/withdrawals"
payload = {
"venue": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venue": "<string>",
"from_dex": "xyz",
"kind": "withdrawal",
"amount": "<string>",
"destination": "<string>",
"state": "queued",
"venue_ref": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"relayed_at": "2023-11-07T05:31:56Z",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"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"
}
}{
"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"
}
}{
"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"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Relay a withdrawal
Records the exact signed operation, then sends it; retries return the record and never resend (margin transfers). A refused withdrawal answers 502 VENUE_REJECTED, also on retry.
curl --request POST \
--url https://api.lamarge.trade/v1/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
typed_data: {
types: {},
primaryType: '<string>',
domain: {
name: '<string>',
chainId: 123,
verifyingContract: '<string>',
version: '<string>'
},
message: {}
},
signature: '<string>',
move_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.lamarge.trade/v1/withdrawals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/withdrawals"
payload = {
"venue": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venue": "<string>",
"from_dex": "xyz",
"kind": "withdrawal",
"amount": "<string>",
"destination": "<string>",
"state": "queued",
"venue_ref": "<string>",
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"relayed_at": "2023-11-07T05:31:56Z",
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"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"
}
}{
"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"
}
}{
"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"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authorizations
Body
Response
The withdrawal.
relayed: acknowledged by the venue; arrival unconfirmed. refused: rejected by the venue, or queued and unstarted after two minutes (Aster: 50 s after the nonce of its envelope, or of a send's request; a take signed at once's withdrawal: pay_by less 30 s, or once the take expired). A Polymarket withdrawal or Hyperliquid transfer the venue did not answer stays queued, sent again unchanged, and ends relayed or unknown. submitting becomes unknown after a minute. unknown: maybe submitted; never resend. An unknown Polymarket withdrawal (not a send) resolves from its exchange: relayed once executed, refused an hour after signing if not.
queued, submitting, unknown, relayed, refused