AI agents and API integration
Secura agents can read market and account data through the REST API. Connect a user account with a signed API key; public market endpoints work without authentication. The API base URL is https://api.secura.finance and routes use /v1.
Get connected
- Create an API key in your Secura account settings and save both the public key and secret. Keep the secret in a server-side environment variable, never in a prompt or browser bundle.
- Follow API Keys to sign each authenticated request with HMAC-SHA256. The page includes a complete Node.js example for
GET /v1/user/information/my. - Start with public
GET /v1/assetsandGET /v1/perpetual/assets, then test the signed account request. Use the API reference for parameters and response types.
Agent workflow
- Read available markets before constructing a trade. For account data, use
GET /v1/user/information/my,GET /v1/orders/for-user, orGET /v1/perpetual/positions/for-user. - Trading, staking, withdrawals, and key management change account state. Only call these endpoints for a specific user-authorized action; verify inputs and show the intended action before submission.
- Never expose the secret key, wallet private key, signature, or personal account response in the agent's output. Handle HTTP errors and do not retry a write request without checking its outcome.
For machine-readable integration instructions, fetch /llms.txt. The file includes signing details and a runnable request example.
Read the complete machine-readable API reference for all current routes and parameters.