Skip to content
Guavy Logo GUAVY
GET
·
/api/v1/trades/get-backtest-history

Get Backtest History

This endpoint returns an array of historical backtest trades made by the Guavy simulator for a given instrument and trade strategy.
The trade simulator's strategies don't use Guavy's sentiment scores. Its signals and backtests are separate from the scored news, so you can read the two side by side.
See the results for every coin the simulator covers, both strategies side by side, on the crypto backtest results page. Each row is a backtest summary, rebuilt daily.

Attributes

symbol
string
Required
The symbol of the instrument to perform a backtest analysis on.
strategy
string
Required
The risk profile to use for the backtest. Can be 'aggressive' or 'conservative'.
years
integer
Specifies the maximum number of years of historical data to include in the backtest (default is 2, maximum is 10; larger values are treated as 10).
limit
integer
Specifies the maximum number of trades to return (default is 50, maximum is 5000; larger values are treated as 5000). This endpoint is not paginated, so raise the limit to get the full history in one request.

API Request

Example Request with cURL

curl \
--request GET \
--url     'https://guavy.com/api/v1/trades/get-backtest-history/<symbol>/<strategy>?years=<integer>&limit=<integer>' \
--header 'Authorization: Bearer YOUR-GUAVY-ACCESS-TOKEN' \
--header 'Content-Type: application/json'

This request format works across all modern HTTP clients, including Python requests, JavaScript fetch, and other programming language libraries.

Example Response for /api/v1/trades/get-backtest-history/BTC/conservative?years=3&limit=2

{
  "trades": [
    {
      "days_in_trade": 1,
      "entry_date": "2024-01-02",
      "entry_price": 44840.52125922301,
      "exit_date": "2024-01-03",
      "exit_price": 43719.50822774243,
      "exit_reason": "StopLoss",
      "highest_price": 44840.52125922301,
      "lowest_price": 44840.52125922301,
      "profit": -1121.0130314805792,
      "profit_percent": -2.5
    },
    {
      "days_in_trade": 14,
      "entry_date": "2024-02-07",
      "entry_price": 44332.47339556866,
      "exit_date": "2024-02-21",
      "exit_price": 51295.51819421408,
      "exit_reason": "TrendChange",
      "highest_price": 52157.98604698098,
      "lowest_price": 44332.47339556866,
      "profit": 6963.044798645416,
      "profit_percent": 15.71
    }
  ]
}

Response Object

trades
array[object]
Array of backtest history objects (trades made), with the following keys:
days_in_trade
integer
The number of days the instrument was in trade.
entry_date
string
The date the instrument was bought, and the trade was entered.
entry_price
float
The price of the instrument when the trade was entered.
exit_date
string
The date the instrument was sold, and the trade was exited.
exit_price
float
The price of the instrument when the trade was exited.
exit_reason
string
The reason for exiting the trade.
highest_price
float
The highest price of the instrument during the trade.
lowest_price
float
The lowest price of the instrument during the trade.
profit
float
The profit or loss value of the trade.
profit_percent
float
The profit or loss value of the trade as a percentage.

Token Costs

Each API call consumes tokens from your monthly budget. Endpoints that return richer or deeper data cost more tokens. Historical endpoints scale with the amount of data requested.

You never have to guess how much is left: every metered response carries your balance in x-tokens-* headers: x-tokens-cost (what this call cost), x-tokens-limit / x-tokens-remaining (monthly), and x-tokens-limit-today / x-tokens-remaining-today (daily). The remaining values are net of any credit applied to the same request. A 401 refused at your limit carries them too, with x-tokens-cost at 0 because nothing was charged.

Endpoint Token Cost
GET /api/v1/ping 1
GET /api/v1/instruments/list-symbols 1
GET /api/v1/instruments/search-instruments/:query 2
GET /api/v1/instruments/get-detail/:symbol 5
GET /api/v1/instruments/scorecard/:symbol 10
GET /api/v1/newsroom/get-market-summary 3
GET /api/v1/newsroom/get-article/:id 3
GET /api/v1/newsroom/get-recent-briefs/:symbol 3 – 8 (scales with limit)
GET /api/v1/newsroom/search-briefs/:symbol 3 – 8 (scales with limit)
GET /api/v1/newsroom/get-instrument-analysis/:symbol 10
GET /api/v1/trades/get-recent-buys 3
GET /api/v1/trades/get-recent-sells 3
GET /api/v1/trades/get-recommendations 5
GET /api/v1/trades/get-current-action/:symbol/:strategy 5
GET /api/v1/trades/get-trend-history/:symbol/:limit 5 – 15 (scales with limit)
GET /api/v1/trades/get-backtest-history/:symbol/:strategy 8 – 20 (scales with years)
GET /api/v1/trades/get-backtest-summary/:symbol/:strategy 8 – 20 (scales with years)
GET /api/v1/sentiment/get-sentiment-history/:symbol 3 – 12 (scales with limit)
GET /api/v1/technical-analysis/get-price-history/:symbol 2 – 5 (5 for the full series, less with limit, from or to)
GET /api/v1/technical-analysis/get-indicators/:symbol 8

Account Limits

Each plan includes a monthly token budget: 3,000 for Sandbox, 250,000 for Quant, and 1,000,000 for Pro. Each market has its own budget, and a daily cap as well (500 tokens a day on Sandbox). The monthly budget resets to the full amount on the 1st of the month for an account with no active monthly subscription, or on your subscription's renewal date once its payment clears. Unused base tokens don't carry over. You can top up at any time with a one-time token pack; pack tokens never expire and any unused pack balance rolls forward. If you exceed your budget, the API returns a 401 until the next reset or until you purchase more tokens.

Connection Limits

The Guavy API allows 300 requests per minute per API key, returning 429 above that. We recommend caching responses that don't change frequently to reduce token consumption and improve performance.

Was this helpful?
Feedback option #{picture.id}
Feedback option #{picture.id}
Feedback option #{picture.id}
Feedback option #{picture.id}

© 2026 Guavy Inc. All rights reserved.