hooks

Set Hooks

Set stop-loss and/or take-profit hooks on a token.

post/v1/hooks

Request

  • Base URL
    https://api.fereai.xyz
  • URL
    https://api.fereai.xyz/v1/hooks
  • Auth
    none declared

Request body

chain_idinteger required

Chain ID where the token is held.

token_addressstring required

Token address to set hooks on.

Example request

{
  "chain_id": 8453,
  "stop_loss": {
    "price_percentage": 0.3,
    "sell_percentage": 1
  },
  "take_profit": {
    "price_percentage": 1,
    "sell_percentage": 0.5
  },
  "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}

Response

Successful Response

task_idstring required

Task ID for tracking the hook setup.

agent_idstring required

Agent that owns the hooks.

token_addressstring required

Token address the hooks are set on.

hooks_registeredinteger required

Number of hooks registered.

Example response

{
  "agent_id": "agent_abc123",
  "hooks_registered": 2,
  "task_id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "token_address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}

Changes

No recorded changes to this operation across all 1 revision of this API.