Patch Price Trigger
curl --request PATCH \
--url https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "<string>",
"price": "<string>",
"enabled": true,
"notify_sms": true,
"notify_email": true,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"mark_seen": false,
"events": [
{
"seen": true
}
]
}
'import requests
url = "https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/"
payload = {
"asset": "<string>",
"price": "<string>",
"enabled": True,
"notify_sms": True,
"notify_email": True,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"mark_seen": False,
"events": [{ "seen": True }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: '<string>',
price: '<string>',
enabled: true,
notify_sms: true,
notify_email: true,
order_quantity: '<string>',
order_get_quantity: '<string>',
mark_seen: false,
events: [{seen: true}]
})
};
fetch('https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"asset": "<string>",
"asset_name": "<string>",
"in_discovery_zone": true,
"created": "2023-11-07T05:31:56Z",
"price": "<string>",
"match": 1,
"paused": true,
"last_trigger": "2023-11-07T05:31:56Z",
"order_side": "<string>",
"enabled": true,
"notify_sms": true,
"notify_email": true,
"order_direction": 10,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"events": [
{
"fired": "2023-11-07T05:31:56Z",
"price": "<string>",
"matched": 1,
"trade": "<string>",
"failure_reason": "<string>",
"seen": true
}
]
}Private
Patch Price Trigger
Price alerts that watch an asset and optionally place a trade when the price is hit.
Create an alert to be notified by email or SMS when an asset crosses a target price, and optionally have it place a market order automatically.
PATCH
/
api
/
private
/
broker
/
price-triggers
/
{id}
/
Patch Price Trigger
curl --request PATCH \
--url https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"asset": "<string>",
"price": "<string>",
"enabled": true,
"notify_sms": true,
"notify_email": true,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"mark_seen": false,
"events": [
{
"seen": true
}
]
}
'import requests
url = "https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/"
payload = {
"asset": "<string>",
"price": "<string>",
"enabled": True,
"notify_sms": True,
"notify_email": True,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"mark_seen": False,
"events": [{ "seen": True }]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
asset: '<string>',
price: '<string>',
enabled: true,
notify_sms: true,
notify_email: true,
order_quantity: '<string>',
order_get_quantity: '<string>',
mark_seen: false,
events: [{seen: true}]
})
};
fetch('https://app.digitalsurge.com.au/api/private/broker/price-triggers/{id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": 123,
"asset": "<string>",
"asset_name": "<string>",
"in_discovery_zone": true,
"created": "2023-11-07T05:31:56Z",
"price": "<string>",
"match": 1,
"paused": true,
"last_trigger": "2023-11-07T05:31:56Z",
"order_side": "<string>",
"enabled": true,
"notify_sms": true,
"notify_email": true,
"order_direction": 10,
"order_quantity": "<string>",
"order_get_quantity": "<string>",
"events": [
{
"fired": "2023-11-07T05:31:56Z",
"price": "<string>",
"matched": 1,
"trade": "<string>",
"failure_reason": "<string>",
"seen": true
}
]
}Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
A price trigger: fires an alert — and optionally a buy or sell — when an asset crosses a target price.
Response
200 - application/json
A price trigger: fires an alert — and optionally a buy or sell — when an asset crosses a target price.