Create a maker credential
curl --request POST \
--url https://api.lamarge.trade/v1/credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"quote_signer": "<string>",
"scopes": [],
"expires_at": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', quote_signer: '<string>', scopes: [], expires_at: 1})
};
fetch('https://api.lamarge.trade/v1/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/credentials"
payload = {
"name": "<string>",
"quote_signer": "<string>",
"scopes": [],
"expires_at": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quote_signer": "<string>",
"scopes": [
"read"
],
"expires_at": "2023-11-07T05:31:56Z",
"token": "<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
}
}Credentials
Create a maker credential
Creates a maker credential and its quote identity (the credential id), bound to an immutable quote_signer. At most 32 active. Scopes: read, quote, cancel; no credential authorizes financial routes. The bearer is returned once: if the response is lost, revoke the credential and create another.
POST
/
v1
/
credentials
Create a maker credential
curl --request POST \
--url https://api.lamarge.trade/v1/credentials \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"quote_signer": "<string>",
"scopes": [],
"expires_at": 1
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', quote_signer: '<string>', scopes: [], expires_at: 1})
};
fetch('https://api.lamarge.trade/v1/credentials', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lamarge.trade/v1/credentials"
payload = {
"name": "<string>",
"quote_signer": "<string>",
"scopes": [],
"expires_at": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"quote_signer": "<string>",
"scopes": [
"read"
],
"expires_at": "2023-11-07T05:31:56Z",
"token": "<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
}
}Authorizations
Master session from POST /v1/auth/verify. Revocable; expires after seven days by default. Required for financial operations.
Body
application/json
Required string length:
1 - 80Responses are lowercase.
Pattern:
^0x[0-9a-fA-F]{40}$Required array length:
1 - 3 elementsAvailable options:
read, quote, cancel Strictly in the future, at most 90 days away.
Required range:
x >= 0Response
OK.
Responses are lowercase.
Pattern:
^0x[0-9a-fA-F]{40}$Available options:
read, quote, cancel RFC 3339 UTC; snapshots and history may keep fractional seconds.
Returned once; the server keeps only its hash.
Pattern:
^mk_[0-9a-f]{64}$