curl --request POST \
--url https://api.lamarge.trade/v1/orders/{id}/quotes/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"valid_until": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
valid_until: 1,
quote_size: '<string>',
quotes: [
{
venue: '<string>',
supply: '<string>',
receive: '<string>',
min_fill: '<string>'
}
]
})
};
fetch('https://api.lamarge.trade/v1/orders/{id}/quotes/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/orders/{id}/quotes/prepare"
payload = {
"valid_until": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 4503599627370496,
"valid_until": 1,
"expires_at": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"chain_id": 123,
"token": "<string>",
"recipient": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
],
"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
}
}{
"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
}
}Prepare a quote set
Allocates a unique sequence and stores an immutable draft for a live order with a current lease. Sign the single quote_set item with the order’s quote signer and submit it within five minutes, Never quotes included. The recipient comes from the linked account; only the order’s receive_venue is accepted. Signed expiry is valid_until + maker_timeout_seconds + 1. At most 100 unexpired unsigned drafts per identity, else 429. Credential scope: quote.
curl --request POST \
--url https://api.lamarge.trade/v1/orders/{id}/quotes/prepare \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"valid_until": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
valid_until: 1,
quote_size: '<string>',
quotes: [
{
venue: '<string>',
supply: '<string>',
receive: '<string>',
min_fill: '<string>'
}
]
})
};
fetch('https://api.lamarge.trade/v1/orders/{id}/quotes/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/orders/{id}/quotes/prepare"
payload = {
"valid_until": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sequence": 4503599627370496,
"valid_until": 1,
"expires_at": 1,
"quote_size": "<string>",
"quotes": [
{
"venue": "<string>",
"chain_id": 123,
"token": "<string>",
"recipient": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
],
"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
}
}{
"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.
Path Parameters
^0x[0-9a-fA-F]{64}$Body
Last admission time: in the future and at most 300 s away, or 253402214400 (Never) for a browser order.
x >= 0Cumulative admission budget of this sequence, shared by its quotes, at least each min_fill. Not signed on chain; renewing the lease does not reset it.
^[0-9]{1,78}$1Show child attributes
Show child attributes
Response
The draft to sign.
1 <= x <= 9007199254740991Unix seconds.
x >= 0Unix seconds.
x >= 0Admission budget of this sequence; not signed on chain.
^[0-9]{1,78}$Show child attributes
Show child attributes
1 elementShow child attributes
Show child attributes