Skip to main content
The Custom Data Endpoint lets you inject any external data into your agent’s decision context. Your endpoint returns JSON; Shekel injects it into the prompt as a labeled custom_data block that the agent reads before deciding. There are two separate integration modes with different API contracts — one for live agents, one for the backtest engine.

Live Trading Agent

How It Works

Before every run cycle, your agent sends a GET request to your URL with no parameters. Whatever JSON your endpoint returns is injected into the agent’s prompt verbatim. The agent reads it and can factor it into its decision.

Your Endpoint Requirements

Example Request

Example Response

The agent receives this as a labeled block:

Tell Your Agent What the Data Means

Add a description to your strategy prompt so the agent knows how to interpret the custom data:
The clearer your strategy prompt describes the custom data, the better the agent will use it. Don’t assume the AI will infer what your fields mean.

Backtest Engine

The backtest engine simulates decisions step-by-step through historical time. At each step it queries your endpoint for the data that would have existed at that exact moment in the past — your endpoint must return time-series historical data covering the full backtest window.

How It Works

Before the simulation loop begins, the engine pre-fetches all custom data for each coin and the full date range in a single request per coin. This data is cached locally and looked up during the simulation using nearest-prior matching.

API Contract

Query Parameters

Required Response Format

Data Rules

  • "time" is required in every row — millisecond UTC timestamp
  • All other field names are up to you — use descriptive names
  • Numeric values are preferred; strings are accepted and passed through
  • Data should cover the full requested date range
  • Rows without a "time" field are silently dropped
  • Extra fields (like "symbol" or "interval") inside the data array are ignored

Timestamp Alignment

At each 4h decision step, the engine looks up the most recent data point at or before that timestamp. It does not interpolate — your data must already be aligned to 4h candle boundaries. 4h candle boundaries in UTC: 00:00, 04:00, 08:00, 12:00, 16:00, 20:00
Convert datetime to milliseconds:
Convert milliseconds back to datetime:
Align a raw timestamp to the nearest 4h boundary:

Full Example — Liquidation Data

This shows a correctly formatted response for liquidation heatmap data (CoinGlass-style):
And the corresponding strategy prompt note:

Caching

The engine caches endpoint responses per coin and date range as CSV files in .cache/custom/. If you update your historical data source, clear the cache to force a fresh fetch:
Or on Windows:

SSRF Security

For security, the backtest engine blocks requests to private IP ranges, loopback addresses, and cloud metadata endpoints. Your endpoint must:
  • Use https:// (not http://)
  • Resolve to a public IP address
  • Not include credentials in the URL

Registering Your Endpoint

Go to Modify Agent → Data Sources → Custom Data Endpoint.Paste your HTTPS URL and save. The agent will call it on the next run.