curl --request GET \
--url https://api.lamarge.trade/v1/transfers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/transfers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/transfers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"destination": "venue",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_transfer_id": "<string>",
"client_take_id": "<string>",
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"min_out": "<string>",
"max_parts": 4,
"payer": "<string>",
"recipient": "<string>",
"from_chain_id": 123,
"to_chain_id": 123,
"withdrawal_preparation": {
"amount": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"created_at": "2023-11-07T05:31:56Z"
},
"withdrawal": {
"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"
},
"funding_plan": {
"observed_at": "2023-11-07T05:31:56Z",
"venue": "<string>",
"owner": "<string>",
"amount": "<string>",
"deposit": "<string>",
"withdrawal_amount": "<string>",
"withdrawal_to": "signer",
"payment_setup": "done",
"signed_at_once": true,
"requests": [
{
"kind": "permit",
"signer": "<string>",
"chain_id": 123
}
]
},
"funding_plan_error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"venue": "<string>",
"step": "permit",
"retry_after": 2
},
"take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"take_final": true,
"previous_transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"continuable": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"grouped": {
"state": "prepared",
"second_transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"second_take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commit_by": "2023-11-07T05:31:56Z"
},
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversion": {
"amount_in": "<string>",
"min_out": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain_id": 123,
"escrow": "<string>",
"payer": "<string>",
"converter": "<string>",
"token": "<string>",
"nonce": "<string>",
"deadline": "<string>",
"prepared_block": 123,
"state": "prepared",
"attempts": [
"<string>"
],
"tx_hash": "<string>",
"received": "<string>",
"block_number": 123
},
"funding": "venue",
"max_fee_bps": 50,
"from_dex": "xyz",
"then": {
"to": "<string>",
"recipient": "<string>",
"amount_in": "<string>",
"min_out": "<string>",
"destination": "venue",
"max_fee_bps": 50,
"chain_id": 123
}
}{
"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"
}
}Recover a transfer
The intent and its linked operations; read before preparing more funding.
curl --request GET \
--url https://api.lamarge.trade/v1/transfers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/transfers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/transfers/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"destination": "venue",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_transfer_id": "<string>",
"client_take_id": "<string>",
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"min_out": "<string>",
"max_parts": 4,
"payer": "<string>",
"recipient": "<string>",
"from_chain_id": 123,
"to_chain_id": 123,
"withdrawal_preparation": {
"amount": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"created_at": "2023-11-07T05:31:56Z"
},
"withdrawal": {
"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"
},
"funding_plan": {
"observed_at": "2023-11-07T05:31:56Z",
"venue": "<string>",
"owner": "<string>",
"amount": "<string>",
"deposit": "<string>",
"withdrawal_amount": "<string>",
"withdrawal_to": "signer",
"payment_setup": "done",
"signed_at_once": true,
"requests": [
{
"kind": "permit",
"signer": "<string>",
"chain_id": 123
}
]
},
"funding_plan_error": {
"code": "<string>",
"message": "<string>",
"status": 123,
"reason": "<string>",
"venue": "<string>",
"step": "permit",
"retry_after": 2
},
"take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"take_final": true,
"previous_transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"continuable": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"grouped": {
"state": "prepared",
"second_transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"first_take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"second_take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"commit_by": "2023-11-07T05:31:56Z"
},
"move_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"conversion": {
"amount_in": "<string>",
"min_out": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"chain_id": 123,
"escrow": "<string>",
"payer": "<string>",
"converter": "<string>",
"token": "<string>",
"nonce": "<string>",
"deadline": "<string>",
"prepared_block": 123,
"state": "prepared",
"attempts": [
"<string>"
],
"tx_hash": "<string>",
"received": "<string>",
"block_number": 123
},
"funding": "venue",
"max_fee_bps": 50,
"from_dex": "xyz",
"then": {
"to": "<string>",
"recipient": "<string>",
"amount_in": "<string>",
"min_out": "<string>",
"destination": "venue",
"max_fee_bps": 50,
"chain_id": 123
}
}{
"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
Query Parameters
Response
The intent.
Where a take delivers on to: venue, into the taker's account linked there; wallet, by plain transfer to recipient's address on to's escrow chain, in that chain's wallet token (chain.wallet in GET /v1/venues; on Polygon native USDC converted from pUSD), to any address a wallet delivery accepts.
venue, wallet Returned on creation and with funding_plan=true while the transfer has no take and is not cancelled: before a withdrawal, or once a relayed withdrawal's funds at the wallet plus the available balance cover amount_in. Null otherwise, when paying from Lighter or Aster, or when it cannot be computed.
Show child attributes
Show child attributes
Why funding_plan could not be computed when it was asked for, as the refusal would carry it: such as VALIDATION_ERROR for a withdrawable balance short of the amount, VENUE_UNAVAILABLE while a chain does not answer, or STATE_CONFLICT with retry_after while an earlier withdrawal of the account is being sent. Null otherwise.
Show child attributes
Show child attributes
With then, once no part of its take can deliver more and unless cancelled: what a continuation may still pay, in to base units: what the take delivered, less what continuations may pay or paid (fees included) and the next payment's fee, in whole millionths. Null otherwise, or while Lighter's fee is unknown.
^[0-9]{1,78}$