Signals
Signals are an essential part of 24Robot — signals tell your strategy when to buy and sell. On this page, we’ll dive into the different signals endpoints you can use to manage signals programmatically. We'll look at how to query, create, update, and delete signals.
The signal model
Properties
- Name
id
- Type
- int
- Description
Unique identifier for the signal.
- Name
name
- Type
- string
- Description
Name of signal (max 35 characters)
- Name
description
- Type
- string
- Description
Short description of the signal (max 120 characters)
- Name
active
- Type
- bool
- Description
State of signal.
- Name
public
- Type
- bool
- Description
When public, other users will be able to use your signal.
- Name
created_at
- Type
- timestamp
- Description
Measured in seconds since the Unix epoch.
- Name
updated_at
- Type
- timestamp
- Description
Measured in seconds since the Unix epoch.
List all signals
This endpoint allows you to retrieve a list of all your signals. Max 2 requests per second.
Request
curl -G https://api.24robot.com/v1/signals \
-H "Authorization: Bearer {token}"
Response
{
"data": [
{
"id": 1,
"name": "Signal name",
"description": "Signal description",
"active": true,
"public": false,
"created_at": 1686089970,
"updated_at": 1686089971,
},
{
"id": 2
// ...
}
]
}
Create a signal
This endpoint allows you to create a new signal. A signal is required to create a strategy. Max 2 requests per second.
Required attributes
- Name
name
- Type
- string
- Description
Name of signal (max 35 characters)
- Name
description
- Type
- string
- Description
Short description of the signal (max 120 characters)
- Name
active
- Type
- bool
- Description
State of signal.
- Name
public
- Type
- bool
- Description
When public, other users will be able to use your signal.
Request
curl https://api.24robot.com/v1/signals \
-H "Authorization: Bearer {token}" \
-d 'name'="Name of signal" \
-d 'description'="Description of signal" \
-d 'active'=1 \
-d 'public'=0
Response
{
"id": 1,
"name": "Signal name",
"description": "Signal description",
"active": true,
"public": false,
"created_at": 1686089970,
"updated_at": 1686089971,
}
Retrieve a signal
This endpoint allows you to retrieve a signal by providing the signal id. Refer to the list at the top of this page to see which properties are included with signals objects. Max 2 requests per second.
Request
curl https://api.24robot.com/v1/signals/1 \
-H "Authorization: Bearer {token}"
Response
{
"id": 1,
"name": "Signal name",
"description": "Signal description",
"active": true,
"public": false,
"created_at": 1686089970,
"updated_at": 1686089971
}
Update a signal
This endpoint allows you to perform an update on a signal. Max 2 requests per second.
Optional attributes
- Name
name
- Type
- string
- Description
Name of signal (max 35 characters)
- Name
description
- Type
- string
- Description
Short description of the signal (max 120 characters)
- Name
active
- Type
- bool
- Description
State of signal.
- Name
public
- Type
- bool
- Description
When public, other users will be able to use your signal.
Request
curl -X PUT https://api.24robot.com/v1/signals/1 \
-H "Authorization: Bearer {token}"
Response
{
"id": 1,
"name": "Signal name",
"description": "Signal description",
"active": true,
"public": false,
"created_at": 1686089970,
"updated_at": 1686089971
}
Delete a signal
This endpoint allows you to delete your signal in 24Robot. Note: This will permanently delete the signal. Max 2 requests per second.
Request
curl -X DELETE https://api.24robot.com/v1/signals/1 \
-H "Authorization: Bearer {token}"
TradingView Alert
This endpoint captures alerts from your TradingView. Set https://api.24robot.com/v1/signals/tradingview?key={token}
as your Webhook URL. Make sure to change {token}
to your own token. Max 30 requests per second.
Required attributes
- Name
signal_id
- Type
- int
- Description
Id of your signal
- Name
coin
- Type
- string
- Description
Example: BTC
- Name
quote_currency
- Type
- string
- Description
Example: USDT
- Name
type
- Type
- string
- Description
Accepted values: Buy / Sell
Request
curl https://api.24robot.com/v1/signals/tradingview?key={token}
TradingView message example
signal_id: {signal_id}
coin: BTC
quote_currency: USDT
type: BUY
Buy / Sell Alert
This endpoint allows you to post an alert to a signal. Max 30 requests per second.
Required attributes
- Name
signal_id
- Type
- int
- Description
Id of signal
- Name
coin
- Type
- string
- Description
Example: BTC
- Name
quote_currency
- Type
- string
- Description
Example: USDT
- Name
type
- Type
- string
- Description
Allowed values: "Buy" or "Sell".
Request
curl https://api.24robot.com/v1/signals/alert \
-H "Authorization: Bearer {token}" \
-d 'signal_id'="1" \
-d 'coin'="BTC" \
-d 'quote_currency'="USDT" \
-d 'type'="Buy"
Response
{
"type": "success",
"message": "Alert successfully received."
}