Recover a take and its signing intents
curl --request GET \
--url https://api.lamarge.trade/v1/takes/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/takes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/takes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"take": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_take_id": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"fills": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "taker",
"order_id": "<string>",
"sequence": 123,
"swap_id": "<string>",
"hashlock": "<string>",
"from_venue": "<string>",
"to_venue": "<string>",
"amount_out": "<string>",
"amount_in": "<string>",
"payer": "<string>",
"maker_owner": "<string>",
"maker_recipient": "<string>",
"taker_recipient": "<string>",
"payment_leg": "NONE",
"maker_leg": "NONE",
"state": "RESERVED",
"reason": "<string>",
"pay_by": "2023-11-07T05:31:56Z",
"reveal_by": "2023-11-07T05:31:56Z",
"t1": "2023-11-07T05:31:56Z",
"t2": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"settled_at": "2023-11-07T05:31:56Z",
"margin_move": {
"venue": "<string>",
"amount": "<string>",
"venue_ref": "<string>",
"state": "queued",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"transactions": [
{
"kind": "permit",
"chain_id": 123,
"hash": "<string>",
"status": "pending",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"payment_destination": "venue",
"maker_destination": "venue"
}
]
},
"to_sign": [
{
"kind": "margin_move",
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "<string>"
},
"message": {}
},
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}Takes and fills
Recover a take and its signing intents
The take and its original typed data, also after expiry. Never sign an expired payment.
GET
/
v1
/
takes
/
{id}
Recover a take and its signing intents
curl --request GET \
--url https://api.lamarge.trade/v1/takes/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.lamarge.trade/v1/takes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/takes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"take": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"client_take_id": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"fills": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"take_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"role": "taker",
"order_id": "<string>",
"sequence": 123,
"swap_id": "<string>",
"hashlock": "<string>",
"from_venue": "<string>",
"to_venue": "<string>",
"amount_out": "<string>",
"amount_in": "<string>",
"payer": "<string>",
"maker_owner": "<string>",
"maker_recipient": "<string>",
"taker_recipient": "<string>",
"payment_leg": "NONE",
"maker_leg": "NONE",
"state": "RESERVED",
"reason": "<string>",
"pay_by": "2023-11-07T05:31:56Z",
"reveal_by": "2023-11-07T05:31:56Z",
"t1": "2023-11-07T05:31:56Z",
"t2": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"settled_at": "2023-11-07T05:31:56Z",
"margin_move": {
"venue": "<string>",
"amount": "<string>",
"venue_ref": "<string>",
"state": "queued",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
},
"transactions": [
{
"kind": "permit",
"chain_id": 123,
"hash": "<string>",
"status": "pending",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"payment_destination": "venue",
"maker_destination": "venue"
}
]
},
"to_sign": [
{
"kind": "margin_move",
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"version": "<string>",
"chainId": 123,
"verifyingContract": "<string>"
},
"message": {}
},
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"retryable": true
}
}Authorizations
Master session from POST /v1/auth/verify. Revocable; expires after seven days by default. Required for financial operations.