Withdraw
curl --request POST \
--url https://api.lamarge.trade/v1/escrow/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"order_id": "<string>",
"amount": "<string>",
"to_margin": true,
"dex": 2147483647,
"nonce": "<string>",
"deadline": 123,
"signature": "<string>",
"owner": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
order_id: '<string>',
amount: '<string>',
to_margin: true,
dex: 2147483647,
nonce: '<string>',
deadline: 123,
signature: '<string>',
owner: '<string>'
})
};
fetch('https://api.lamarge.trade/v1/escrow/withdraw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/escrow/withdraw"
payload = {
"venue": "<string>",
"order_id": "<string>",
"amount": "<string>",
"to_margin": True,
"dex": 2147483647,
"nonce": "<string>",
"deadline": 123,
"signature": "<string>",
"owner": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"venue": "<string>",
"order_id": "<string>",
"owner": "<string>",
"available": "<string>",
"operator": "<string>",
"managed": true,
"in_balances": true,
"closing": true
}{
"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"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Escrow
Withdraw
Relays the prepared terms, signed by the linked address, as withdrawBySig; LaMarge pays gas. The terms are rechecked as at preparation (a stale dex is VALIDATION_ERROR). A refused venue deposit stays in your available escrow balance. After a revert, or once the finalized chain is past its deadline, sign again. STATE_CONFLICT during a financial operation on the venue, while a release of the order is pending, at 10 pending releases per owner and chain, or for a nonce reused with other terms; the same terms return the same withdrawal.
POST
/
v1
/
escrow
/
withdraw
Withdraw
curl --request POST \
--url https://api.lamarge.trade/v1/escrow/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"order_id": "<string>",
"amount": "<string>",
"to_margin": true,
"dex": 2147483647,
"nonce": "<string>",
"deadline": 123,
"signature": "<string>",
"owner": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
order_id: '<string>',
amount: '<string>',
to_margin: true,
dex: 2147483647,
nonce: '<string>',
deadline: 123,
signature: '<string>',
owner: '<string>'
})
};
fetch('https://api.lamarge.trade/v1/escrow/withdraw', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/escrow/withdraw"
payload = {
"venue": "<string>",
"order_id": "<string>",
"amount": "<string>",
"to_margin": True,
"dex": 2147483647,
"nonce": "<string>",
"deadline": 123,
"signature": "<string>",
"owner": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"venue": "<string>",
"order_id": "<string>",
"owner": "<string>",
"available": "<string>",
"operator": "<string>",
"managed": true,
"in_balances": true,
"closing": true
}{
"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"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true,
"reason": "<string>",
"venue": "<string>",
"step": "permit"
}
}Authorizations
Body
application/json
Response
The order as GET /v1/escrow shows it.
An order of a linked address in an escrow, with its unlocked funds.