Atomically replace and cancel quotes
curl --request POST \
--url https://api.lamarge.trade/v1/quotes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"order_id": "<string>",
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signature": "<string>"
}
],
"cancels": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updates: [
{
order_id: '<string>',
draft_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
signature: '<string>'
}
],
cancels: ['<string>']
})
};
fetch('https://api.lamarge.trade/v1/quotes/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/quotes/batch"
payload = {
"updates": [
{
"order_id": "<string>",
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signature": "<string>"
}
],
"cancels": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"order_id": "<string>",
"cancel_epoch": "<string>",
"sequence": 2
}
]
}{
"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
}
}Quote control
Atomically replace and cancel quotes
Commits every update and cancel, or none. Each update needs a prepared, signed draft. Results are sorted by order id. Exact retries never reactivate superseded or cancelled drafts. Credential scope: quote when updates is nonempty, cancel when cancels is nonempty.
POST
/
v1
/
quotes
/
batch
Atomically replace and cancel quotes
curl --request POST \
--url https://api.lamarge.trade/v1/quotes/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"updates": [
{
"order_id": "<string>",
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signature": "<string>"
}
],
"cancels": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updates: [
{
order_id: '<string>',
draft_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
signature: '<string>'
}
],
cancels: ['<string>']
})
};
fetch('https://api.lamarge.trade/v1/quotes/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/quotes/batch"
payload = {
"updates": [
{
"order_id": "<string>",
"draft_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"signature": "<string>"
}
],
"cancels": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"results": [
{
"order_id": "<string>",
"cancel_epoch": "<string>",
"sequence": 2
}
]
}{
"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
sessionmakerCredential
Master session from POST /v1/auth/verify. Revocable; expires after seven days by default. Required for financial operations.
Body
application/json
Response
OK.
Maximum array length:
50Show child attributes
Show child attributes