Mint an API key for the session user.
curl --request POST \
--url https://api.symbiosis.markets/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"scopes": [
"<string>"
],
"expires_in_secs": 1
}
'import requests
url = "https://api.symbiosis.markets/auth/api-keys"
payload = {
"label": "<string>",
"scopes": ["<string>"],
"expires_in_secs": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', scopes: ['<string>'], expires_in_secs: 1})
};
fetch('https://api.symbiosis.markets/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key_id": "<string>",
"label": "<string>",
"scopes": [
"<string>"
],
"secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Auth
Mint an API key for the session user.
The possible scopes are read, trade, withdraw
POST
/
auth
/
api-keys
Mint an API key for the session user.
curl --request POST \
--url https://api.symbiosis.markets/auth/api-keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"scopes": [
"<string>"
],
"expires_in_secs": 1
}
'import requests
url = "https://api.symbiosis.markets/auth/api-keys"
payload = {
"label": "<string>",
"scopes": ["<string>"],
"expires_in_secs": 1
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({label: '<string>', scopes: ['<string>'], expires_in_secs: 1})
};
fetch('https://api.symbiosis.markets/auth/api-keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"api_key_id": "<string>",
"label": "<string>",
"scopes": [
"<string>"
],
"secret": "<string>",
"expires_at": "2023-11-07T05:31:56Z"
}Authorizations
Session token from POST /auth/login.
Body
application/json
The label of the api key.
The scopes of the api key.
Seconds until the api key expires, from 1 second up to 365 days (31,536,000). Any value in that range is accepted; omit for a key that never expires.
Required range:
x >= 0Response
The only response that ever carries the raw secret.
The only response that ever carries the raw secret.