Skip to content

FAQ & Troubleshooting

Igor Sazonov edited this page Jul 21, 2026 · 1 revision

This section covers common questions and issues you might encounter while using the CoinQuant PHP SDK [1].

Frequently Asked Questions

Do I need a token for everything?

No. The health check (/health) and community endpoints (leaderboards, public backtests) work anonymously without a token. All other endpoints require a valid service-account token.

Why did my "simple" prompt come back as a report?

This is expected behavior. The CoinQuant AI decides the most appropriate response shape based on your prompt. Always branch your application logic on $result->type rather than assuming a specific response format.

How long do tokens last?

Service account tokens last for 30 days. When a token expires, the API will return a 401 Unauthorized status. You must generate a new key in the CoinQuant web app under Settings → Service Accounts.

Does the SDK work outside Laravel?

Yes. The CoinQuantClient is a plain PHP class with no framework dependencies. The Laravel service provider and facade are completely optional and only load if you are using the framework.

Can I customize timeouts or add retries?

Yes. You can pass your own pre-configured Guzzle client to the CoinQuantClient constructor. This allows you to set custom timeouts, configure proxies, or attach middleware for automatic retries.

Troubleshooting

A backtest keeps returning 409 Conflict on results

This means the backtest is still running and has not reached a terminal state.

  • Solution: Use the createBacktestAndWait() helper method, which polls the status automatically. Alternatively, keep calling getBacktest() until the status changes to completed, failed, or error before requesting the results.

I'm getting a 402 Payment Required error

This indicates you have run out of API credits.

  • Solution: Top up your credits on the CoinQuant platform. You can programmatically check your balance using $client->getCredits().

"Class CoinQuant\CoinQuantClient not found"

This usually happens if Composer's autoloader isn't included.

  • Solution: Ensure you have require __DIR__ . '/vendor/autoload.php'; at the top of your script. If you are using Laravel, ensure you ran composer require tigusigalpa/coinquant-php.

Getting Support

If you encounter an issue not listed here, or suspect an API bug:

  1. Catch the CoinQuantException.
  2. Extract the Request ID using $e->getRequestId().
  3. Provide this Request ID when contacting CoinQuant support, as it allows them to trace the exact execution of your call.

References

[1] CoinQuant PHP SDK README

Clone this wiki locally