Skip to main content
PATCH
Patch Price Trigger

Authorizations

Authorization
string
header
required

Personal API key, created in the Digital Surge app under Account Settings → API Keys. Send it with every request as Authorization: Bearer <your-api-key>.

Path Parameters

id
integer
required

A unique integer value identifying this Price Trigger Rule.

Body

A price trigger: fires an alert — and optionally a buy or sell — when an asset crosses a target price.

asset
string
Minimum string length: 1
price
string<decimal>

Price level to watch for

enabled
boolean
default:true
notify_sms
boolean
notify_email
boolean
order_direction

Direction of the auto-trade against AUD. BUY_ASSET = spend AUD to receive this rule's asset; SELL_ASSET = spend this rule's asset to receive AUD; null = alert only (no trade).

  • 10 - buy asset
  • 20 - sell asset
  • None - alert only
Available options:
10,
20
order_quantity
string<decimal> | null

Quantity of the spend-side asset (in its native units) to trade when the trigger fires. Mutually exclusive with order_get_quantity.

order_get_quantity
string<decimal> | null

Quantity of the receive-side asset (in its native units) to receive when the trigger fires. Mutually exclusive with order_quantity.

mark_seen
boolean
default:false
write-only

Set to mark all events as seen

events
object[]

Response

200 - application/json

A price trigger: fires an alert — and optionally a buy or sell — when an asset crosses a target price.

id
integer
required
read-only
asset
string
required
asset_name
string
required
read-only
in_discovery_zone
boolean
required
read-only
created
string<date-time>
required
read-only
price
string<decimal>
required

Price level to watch for

match
required
  • 1 - above
  • 2 - below
  • None - auto-set
Available options:
1,
2
paused
boolean
required
read-only
last_trigger
string<date-time> | null
required
read-only
order_side
string
required
read-only
enabled
boolean
default:true
notify_sms
boolean
notify_email
boolean
order_direction

Direction of the auto-trade against AUD. BUY_ASSET = spend AUD to receive this rule's asset; SELL_ASSET = spend this rule's asset to receive AUD; null = alert only (no trade).

  • 10 - buy asset
  • 20 - sell asset
  • None - alert only
Available options:
10,
20
order_quantity
string<decimal> | null

Quantity of the spend-side asset (in its native units) to trade when the trigger fires. Mutually exclusive with order_get_quantity.

order_get_quantity
string<decimal> | null

Quantity of the receive-side asset (in its native units) to receive when the trigger fires. Mutually exclusive with order_quantity.

events
object[]