Skip to main content
Creates a server-side order strategy. Pacifica runs it on your account until it completes, is cancelled, or expires.

Operation Type (for Signing)

Request Body

FieldTypeNeedDescriptionExample
”account”stringrequiredUser’s wallet address42trU9A5…
“signature”stringrequiredCryptographic signature5j1Vy9Uq…
“timestamp”integerrequiredCurrent timestamp in milliseconds1716200000000
”strategy_type”stringrequiredStrategy type. See Strategy parametersconditional
”params”objectrequiredParameters for the strategy type. See Strategy parametersSee below
”scheduled_start_at”integeroptionalStart time in milliseconds. Until then, the strategy is pending1716203600000
”scheduled_end_at”integeroptionalEnd time in milliseconds. Must be after scheduled_start_at. At this time the strategy expires1716207200000
”expires_at”integeroptionalExpiry time in milliseconds. At this time the strategy expires1716207200000
”agent_wallet”stringoptionalAgent wallet address69trU9A5…
“expiry_window”integeroptionalSignature expiry in milliseconds30000
When a strategy expires, Pacifica cancels the orders it still has open.

Signing

Sign strategy_type, params, and any schedule fields as the data object, like any other request. See Signing. Keys inside params are sorted too. For the request above, the message to sign is:

Response

  • Status 200: Strategy created
  • Status 400: Invalid parameters, or the account cannot run the strategy. The error field says why, for example invalid strategy definition: clip count must be between 2 and 100 or STRATEGIST_INSUFFICIENT_BALANCE
  • Status 429: The account already has 100 strategies that have not finished (STRATEGIST_ORDER_STRATEGY_LIMIT_REACHED), or the rate limit is exceeded
  • Status 500: Internal server error
  • Status 503: The strategy service is not ready. Retry later
Other error values with status 400:

Code Example (Python)