curl --request POST \
--url https://api.lamarge.trade/v1/accounts/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"address": "<string>",
"nonce": "<string>",
"signature": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
address: '<string>',
nonce: '<string>',
signature: '<string>'
})
};
fetch('https://api.lamarge.trade/v1/accounts/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/accounts/link"
payload = {
"venue": "<string>",
"address": "<string>",
"nonce": "<string>",
"signature": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"linked_at": "2023-11-07T05:31:56Z"
}{
"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
}
}Link a venue account
One account per venue. The master address links without nonce and signature, except on Aster, where the signature is the account’s agent approval and Aster’s refusal of it is VENUE_REJECTED. On a venue with a wallet next to the signer, the link records it as venue_wallet; a signer without an accepted wallet gets WALLET_NOT_FOUND. Per venue: Venues. Replacing an account returns ACCOUNT_IN_USE while an order not closed or a nonfinal fill uses it.
curl --request POST \
--url https://api.lamarge.trade/v1/accounts/link \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"venue": "<string>",
"address": "<string>",
"nonce": "<string>",
"signature": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
venue: '<string>',
address: '<string>',
nonce: '<string>',
signature: '<string>'
})
};
fetch('https://api.lamarge.trade/v1/accounts/link', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/accounts/link"
payload = {
"venue": "<string>",
"address": "<string>",
"nonce": "<string>",
"signature": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"venue": "<string>",
"address": "<string>",
"venue_wallet": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"linked_at": "2023-11-07T05:31:56Z"
}{
"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.
Body
A venue id from GET /v1/venues.
Responses are lowercase.
^0x[0-9a-fA-F]{40}$From the link challenge; omitted for the master address.
The link message signed by address; omitted for the master address.
^0x[0-9a-fA-F]{130}$Response
The linked account.
A venue id from GET /v1/venues.
Owner of the venue account; signs its transfers.
^0x[0-9a-fA-F]{40}$The venue's wallet next to the signer; null on venues without one.
^0x[0-9a-fA-F]{40}$When the venue's authorization behind the link lapses and the account must link again: Aster's agent approval; null elsewhere.
RFC 3339 UTC; snapshots and history may keep fractional seconds.