Skip to main content

Create a trade

POST 

/agent/:agent_id/sell/:holding_id/:quantity/

Create a sell instruction for Agent. The agent's ID (agent_id) should be provided in the path parameter. Along with the holding_id and the quantity to be sold.

Quantity can be either all or a number > 0. Quantity is the amount of tokens to sell (in lamports or wei). If all is provided, all tokens will be sold.

This call simply schedules the sell. The actual sell will be executed asynchronously. The response will contain the task ID which can be used to check the status of the task.

To check status of the task, use the /task/status/{task_id}/ endpoint.

Request

Responses

Successful Response