Get signed trade proof
curl --request GET \
--url https://api.lamarge.trade/v1/trades/{id}/proofconst options = {method: 'GET'};
fetch('https://api.lamarge.trade/v1/trades/{id}/proof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/trades/{id}/proof"
response = requests.get(url)
print(response.text){
"destination": "venue",
"received": {
"token": "<string>",
"amount": "<string>",
"sender": "<string>"
},
"version": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"swap_id": "<string>",
"order_id": "<string>",
"sequence": 123,
"quote_index": 1,
"maker_owner": "<string>",
"payer": "<string>",
"maker_recipient": "<string>",
"taker_recipient": "<string>",
"settled_at": "2023-11-07T05:31:56Z",
"maker": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"maker_authorization": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"delivery": {
"venue": "<string>",
"tx_hash": "<string>",
"account": "<string>",
"executed_at": "2023-11-07T05:31:56Z"
},
"taker": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"payment": {
"venue": "<string>",
"tx_hash": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"tx_info": {}
},
"transactions": [
{
"kind": "fund",
"chain_id": 123,
"hash": "<string>",
"status": "pending",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"funding": "venue",
"taker_fee": "<string>",
"taker_fee_venue": "<string>"
}{
"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"
}
}Market data
Get signed trade proof
The settled trade’s signed maker QuoteSet, funding authorization (FundOffer, or the delivery for a Lighter or Aster pool) and taker PayTake (or the executed payment when paid from Lighter or Aster), with digests and relayed transactions. Public once all three are recorded.
GET
/
v1
/
trades
/
{id}
/
proof
Get signed trade proof
curl --request GET \
--url https://api.lamarge.trade/v1/trades/{id}/proofconst options = {method: 'GET'};
fetch('https://api.lamarge.trade/v1/trades/{id}/proof', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/trades/{id}/proof"
response = requests.get(url)
print(response.text){
"destination": "venue",
"received": {
"token": "<string>",
"amount": "<string>",
"sender": "<string>"
},
"version": 1,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"from": "<string>",
"to": "<string>",
"amount_in": "<string>",
"amount_out": "<string>",
"swap_id": "<string>",
"order_id": "<string>",
"sequence": 123,
"quote_index": 1,
"maker_owner": "<string>",
"payer": "<string>",
"maker_recipient": "<string>",
"taker_recipient": "<string>",
"settled_at": "2023-11-07T05:31:56Z",
"maker": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"maker_authorization": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"delivery": {
"venue": "<string>",
"tx_hash": "<string>",
"account": "<string>",
"executed_at": "2023-11-07T05:31:56Z"
},
"taker": {
"signer": "<string>",
"typed_data": {
"types": {},
"primaryType": "<string>",
"domain": {
"name": "<string>",
"chainId": 123,
"verifyingContract": "<string>",
"version": "<string>"
},
"message": {}
},
"signature": "<string>",
"digest": "<string>"
},
"payment": {
"venue": "<string>",
"tx_hash": "<string>",
"executed_at": "2023-11-07T05:31:56Z",
"tx_info": {}
},
"transactions": [
{
"kind": "fund",
"chain_id": 123,
"hash": "<string>",
"status": "pending",
"error": "<string>",
"at": "2023-11-07T05:31:56Z"
}
],
"funding": "venue",
"taker_fee": "<string>",
"taker_fee_venue": "<string>"
}{
"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"
}
}The
It checks the signatures, the quote signer’s delegation, the route, the amounts and the binding between agreements, against the reviewed escrow deployments,
FundOffer names the quote signer; the PayTake’s LockPayment for this fill carries both amounts. Each agreement comes with its EIP-712 typed data, digest, signer and signature. The maker rate is receive / supply; the taker paid ceil(amount_out × receive / supply). A pool held on Lighter or Aster has no FundOffer (maker_authorization null): LaMarge attests its quote signer. A take paid from Lighter or Aster has no PayTake: payment carries the signed transfer. A delivery is named, not proven: read it on the venue.
LaMarge’s verifier script checks a downloaded proof without the API; it needs the LaMarge repository, available on request:
cd web
bun run scripts/verify-trade-proof.ts trade.json
ESCROW_PROOF_DEPLOYMENTS from @lamarge/sdk/protocol. A quote signed by an ERC-1271 contract, on a fill settled before deliveries, needs the maker chain’s RPC URL as a second argument: the verifier then checks the maker lock transaction’s calldata and receipt in a canonical block. Check the other settlement transactions separately.Response
Signed maker and taker agreements.
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.
Available options:
venue, wallet Version 2: the fee the swap_id carries (fees).
Pattern:
^[0-9]{1,78}$