Submit close signature
curl --request POST \
--url https://api.lamarge.trade/v1/closes/{id}/signatures \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"signatures": [
{
"kind": "<string>",
"signature": "<string>",
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signatures: [
{
kind: '<string>',
signature: '<string>',
fill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.lamarge.trade/v1/closes/{id}/signatures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/closes/{id}/signatures"
payload = { "signatures": [
{
"kind": "<string>",
"signature": "<string>",
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orders": [
{
"id": "<string>",
"venue": "<string>",
"receive_venue": "<string>",
"owner_address": "<string>",
"state": "preparing",
"error": "<string>",
"amount": "<string>",
"escrow_available": "<string>",
"quotable": "<string>",
"filled": "<string>",
"received": "<string>",
"last_sequence": 123,
"quote_set": {
"sequence": 123,
"expires_at": "2023-11-07T05:31:56Z",
"quotes": [
{
"venue": "<string>",
"chain_id": 123,
"token": "<string>",
"recipient": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
],
"signature": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z",
"quote_size": "<string>",
"identity_generation": "<string>",
"active": true
},
"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"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_order_id": "<string>",
"quote_identity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_signer": "<string>"
}
]
}{
"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
}
}Closes
Submit close signature
The master’s CloseOrders signature, before its deadline. The orders become closing and leave the books. Reserved fills continue; LaMarge then releases the unlocked funds into the owner’s margin, or into the owner’s available escrow balance when the venue refuses the deposit. An order is closed once its unlocked balance is zero. A retry returns the same orders.
POST
/
v1
/
closes
/
{id}
/
signatures
Submit close signature
curl --request POST \
--url https://api.lamarge.trade/v1/closes/{id}/signatures \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"signatures": [
{
"kind": "<string>",
"signature": "<string>",
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
signatures: [
{
kind: '<string>',
signature: '<string>',
fill_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
]
})
};
fetch('https://api.lamarge.trade/v1/closes/{id}/signatures', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/closes/{id}/signatures"
payload = { "signatures": [
{
"kind": "<string>",
"signature": "<string>",
"fill_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"orders": [
{
"id": "<string>",
"venue": "<string>",
"receive_venue": "<string>",
"owner_address": "<string>",
"state": "preparing",
"error": "<string>",
"amount": "<string>",
"escrow_available": "<string>",
"quotable": "<string>",
"filled": "<string>",
"received": "<string>",
"last_sequence": 123,
"quote_set": {
"sequence": 123,
"expires_at": "2023-11-07T05:31:56Z",
"quotes": [
{
"venue": "<string>",
"chain_id": 123,
"token": "<string>",
"recipient": "<string>",
"supply": "<string>",
"receive": "<string>",
"min_fill": "<string>"
}
],
"signature": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"valid_until": "2023-11-07T05:31:56Z",
"quote_size": "<string>",
"identity_generation": "<string>",
"active": true
},
"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"
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"client_order_id": "<string>",
"quote_identity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quote_signer": "<string>"
}
]
}{
"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
Body
application/json
Exactly one per requested (kind, fill_id); extra or duplicate items are refused.
Show child attributes
Show child attributes
Response
The orders of the close.
Show child attributes
Show child attributes