Skip to main content

System, Status, and License Management

The System, Status, and License Management API endpoints provide tools to control Gunbot's system operations and manage license configurations. These endpoints allow you to start or stop the system, retrieve server time, and update license keys.

The following sections outline the available endpoints, including parameter details, request examples in multiple programming languages, and example responses to help users effectively interact with Gunbot's system and licensing features.

/api/v1/system/start​

  • Method: POST
  • Description: Starts the system and returns the current configuration without private keys.

Headers:

NameTypeDescription
AuthorizationstringBearer token for authentication.
Content-Typestringapplication/json

Parameters​

This endpoint does not require any request parameters.

Examples​

cURL​

curl -X POST "https://your-gunbot-instance.com:3000/api/v1/system/start" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

JavaScript (fetch API)​

fetch('https://your-gunbot-instance.com:3000/api/v1/system/start', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Python (requests library)​

import requests

url = 'https://your-gunbot-instance.com:3000/api/v1/system/start'
headers = {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())

Response​

{
// returns the current configuration without private keys
}

/api/v1/system/stop​

  • Method: POST
  • Description: Stops the system and returns the current configuration without private keys.

Headers:

NameTypeDescription
AuthorizationstringBearer token for authentication.
Content-Typestringapplication/json

Parameters​

This endpoint does not require any request parameters.

Examples​

cURL​

curl -X POST "https://your-gunbot-instance.com:3000/api/v1/system/stop" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

JavaScript (fetch API)​

fetch('https://your-gunbot-instance.com:3000/api/v1/system/stop', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Python (requests library)​

import requests

url = 'https://your-gunbot-instance.com:3000/api/v1/system/stop'
headers = {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers)
print(response.json())

Response​

{
// returns the current configuration without private keys
}

/api/v1/time​

  • Method: GET
  • Description: Retrieves the current server time in milliseconds since Unix epoch.

Headers:

NameTypeDescription
AuthorizationstringBearer token for authentication.

Parameters​

This endpoint does not require any request parameters.

Examples​

cURL​

curl -X GET "https://your-gunbot-instance.com:3000/api/v1/time" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN"

JavaScript (fetch API)​

fetch('https://your-gunbot-instance.com:3000/api/v1/time', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_BEARER_TOKEN'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Python (requests library)​

import requests

url = 'https://your-gunbot-instance.com:3000/api/v1/time'
headers = {
'Authorization': 'Bearer YOUR_BEARER_TOKEN'
}

response = requests.get(url, headers=headers)
print(response.json())

Response​

{
"serverTime": 1733307452501
}

/api/v1/license/keys/edit​

  • Method: POST
  • Description: Edits license keys associated with a wallet and optionally verifies an exchange.

Parameters​

NameTypeDescription
walletstringWallet address (e.g., 0xYourWalletAddress).
newLicensesobjectObject containing new license data. Use the entire config.exchanges object to place in config, with key changes. For new keys, set the isEncrypted value to false. Multiple key changes at once are possible
verifyExchangestringExchange used to verify (e.g., binance). Provide the name of an exchange that currently has valid, registered credentials in your configuration. This name will be used to authenticate the request.

Examples​

cURL​

curl -X POST "https://your-gunbot-instance.com:3000/api/v1/license/keys/edit" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_BEARER_TOKEN" \
-d '{
"wallet": "0xYourWalletAddress",
"newLicenses": {},
"verifyExchange": "binance"
}'

JavaScript (fetch API)​

const data = {
wallet: '0xYourWalletAddress',
newLicenses: {

},
verifyExchange: 'binance'
};

fetch('https://your-gunbot-instance.com:3000/api/v1/license/keys/edit', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));

Python (requests library)​

import requests

url = 'https://your-gunbot-instance.com:3000/api/v1/license/keys/edit'
headers = {
'Authorization': 'Bearer YOUR_BEARER_TOKEN',
'Content-Type': 'application/json'
}
data = {
"wallet": "0xYourWalletAddress",
"newLicenses": {
},
"verifyExchange": "binance"
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

Response​

{
"status": "success"
}