Guavy Logo GUAVY
Trades Get Backtest History
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.

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).
limit
integer
Specifies the maximum number of trades to return (default is 50).

API Request

Example Request with cURL

curl \
--request GET \
--url     'https://data.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": 4,
      "entry_date": "2023-06-22",
      "entry_price": 29990.63147231238,
      "exit_date": "2023-06-26",
      "exit_price": 30241.723957367343,
      "exit_reason": "TrendChange",
      "highest_price": 30598.79733083426,
      "lowest_price": 29990.63147231238,
      "profit": 251.09248505496362,
      "profit_percent": 0.8372364059315471
    },
    {
      "days_in_trade": 8,
      "entry_date": "2023-06-30",
      "entry_price": 30504.229421470103,
      "exit_date": "2023-07-08",
      "exit_price": 30257.85094366456,
      "exit_reason": "TrendChange",
      "highest_price": 31117.694811635494,
      "lowest_price": 30504.229421470103,
      "profit": -246.37847780554148,
      "profit_percent": -0.80768628638798
    }
  ]
}

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.

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 5
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 2,000,000 for Commercial. You can top up at any time with a one-time token pack — unused tokens roll over every month. If you exceed your budget, the API returns a 403 until the next reset or until you purchase more tokens.

Connection Limits

The Guavy API has a limit of 10 simultaneous connections and a 120-second timeout per request. 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.