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-02-19",
      "entry_price": 24687.75337642169,
      "exit_date": "2023-02-23",
      "exit_price": 24070.559542011146,
      "exit_reason": "StopLoss",
      "highest_price": 24866.516693190617,
      "lowest_price": 24687.75337642169,
      "profit": -617.1938344105438,
      "profit_percent": -2.5
    },
    {
      "days_in_trade": 38,
      "entry_date": "2023-03-15",
      "entry_price": 24882.618202822898,
      "exit_date": "2023-04-22",
      "exit_price": 27680.041637921277,
      "exit_reason": "TrailingStop",
      "highest_price": 30755.60181991253,
      "lowest_price": 24882.618202822898,
      "profit": 2797.423435098379,
      "profit_percent": 11.24
    }
  ]
}

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.

API Limits

The Guavy API has a limit of 10 simultaneous connections. You'll receive a 429 error if you reach the limit. At exceptionally high volumes, you may receive an HTTP 429 or 403 without a JSON body.

We recommend that you cache frequently accessed values that do not change often in your application's data store. This will prevent your application from bumping up against the throttling limitations and will likely provide faster access to that data.

Account Limits

Your Guavy account will typically have a licensed limit of at least 100,000 API calls per month. In addition, there is a limit of 10,000 API calls per day. If you reach these limits, you will receive a 429 error.

Connection Timeouts

The Guavy API has a 120-second timeout on API calls. You may see this type of timeout after you've made a network socket connection and are already sending and receiving data. Response times are dependent on the complexity of your request and the general load across Guavy. Some endpoints in the Guavy API return values that are large and slow to calculate.

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

© 2025 Guavy Inc. All rights reserved.