Skip to main content

GET /api/tasks

List all tasks for the authenticated user.

Response

[
  {
    "id": 1,
    "slug": "bitcoin-puppets",
    "type": "ordinals",
    "isRunning": true,
    "config": { ... },
    "lastCycle": { "time": 1700000000, "action": "placed 3 bids" },
    "lastError": null,
    "createdAt": "2026-03-26T00:00:00.000Z"
  }
]

POST /api/tasks

Create a new bidding task. Returns 409 if a task already exists for this collection.

Request body

{
  "slug": "bitcoin-puppets",
  "type": "ordinals",
  "bidMode": "percent",
  "bidPercentLow": 0.75,
  "bidPercentHigh": 0.85,
  "bidCount": 5,
  "hardcapSats": 100000
}
See all fields in the Task Config reference below.

Response

Returns the created task object.

Errors

CodeError
400Validation error — see details array
403Plan task limit reached
409Task already exists for this slug

GET /api/tasks/:id

Get a single task by ID. Returns 404 if task doesn’t belong to the user.

PUT /api/tasks/:id

Update a task’s config. If the task is running, it is restarted automatically with the new config.

Request body

Any subset of task config fields. Only provided fields are updated.

DELETE /api/tasks/:id

Delete a task. If running, the worker is stopped first.

POST /api/tasks/:id/start

Start the task worker.

POST /api/tasks/:id/stop

Stop the task worker. The task’s DB state is persisted as is_running: false.

GET /api/tasks/:id/bids

Get the currently active bids for this task (fetched from Satflow, not local DB).

GET /api/tasks/floor

Fetch the current floor price for a collection (used for task config preview). Query params: slug (required), type (default: ordinals)

Response

{
  "floorPrice": 100000,
  "listedCount": 142
}

GET /api/tasks/rune-market

Fetch floor price + VWAP data for a Rune ticker. Query params: ticker (required), depth (sats of order book depth, default: 1000000)

Response

{
  "ticker": "DOGGOTOTHEMOON",
  "floor": 1.08,
  "vwap": 1.12,
  "depthSats": 1000000
}

Task Config Fields

All fields and their defaults:
FieldTypeDefaultDescription
slugstringrequiredCollection slug or Rune ticker
typestringordinalsordinals or rune
bidModestringpercentpercent or fixed
bidPercentLownumber0.15Low end of bid range (fraction of floor)
bidPercentHighnumber0.75High end of bid range (fraction of floor)
bidFixedLownumber10000Low end in sats (fixed mode)
bidFixedHighnumber50000High end in sats (fixed mode)
bidCountnumber5Number of concurrent bids
hardcapSatsnumber0Max price per bid in sats (required in percent mode)
maxBidTotalnumber0Max total sats for this task (0 = unlimited)
bidExpiryMinutesnumbernullOverride bid expiry (null = server default 16 min)
loopSecondsnumbernullOverride cycle interval (null = server default 30s)
outbidEnabledbooleanfalseEnable outbid strategy
outbidModestringfixedfixed or percent
outbidAmountnumber1000Sats to add above competitor (fixed mode)
outbidPercentnumber0.01% to add above competitor (percent mode)
updateBidEnabledbooleantrueReplace bids when market moves
onlyBidIfHighestbooleanfalseCancel bids if not highest bidder
bidTypestringcollectioncollection or trait
traitTypestring""Trait category (trait bids only)
traitValuestring""Trait value (trait bids only)
quantitynumber1Tokens per bid (Runes, quantity mode)
quantityModestringquantityquantity or sats (Runes only)
satsPerOrdernumber0Target sats per order (Runes, sats mode)
useVwapbooleanfalseUse UniSat VWAP instead of floor (Runes)
depthSatsnumber1000000Order book depth for VWAP (Runes)
feeRatestring/numberhalfHourFeeFee rate for PSBTs