SALEUp to 77% off

Bot setup & testing · Digital guide

Portfolio Exposure Limits for a Crypto Bot

Test total exposure across open positions and pending orders. The Grok guide includes risk prompts for portfolio limits in a simulated Solana desk.

View the guide →

One-time payment · Instant download

Level
Intermediate
First pass
About 3 hours
Mode
Research and simulation only
Format
Digital guide, self-paced

What you’ll work on

Position sizing limits one request. An exposure limit covers multiple requests or balances, including orders that are still waiting for a result. Without a shared view, two valid test signals can both commit the same simulated funds.

What you need before you start

How to approach the project

  1. Define the budget the checks share

    Write down what counts toward total simulated exposure, including existing positions and reserved amounts for pending test orders. Pick a consistent valuation basis and record what happens when a price is missing. Use hypothetical numbers to test the behavior without making a recommendation about anyone’s real portfolio.

  2. Simulate two candidates arriving together

    Create a fixture where either candidate fits the remaining amount and both together would exceed it. Run them in the same batch and record which request reserved funds first. Check that a rejected, timed-out or failed request is handled explicitly, so its reservation cannot quietly disappear or stay forever.

  3. Exercise reductions as well as entries

    Send a simulated partial fill and then a reduction or cancellation. Compare requested, reserved and completed amounts in the journal. Ask the code assistant to explain when each counter changes and add a check that only a confirmed state transition frees the amount assigned to a test request.

Worked example: Two valid candidates, one budget

StepAmountResult
Total exposure limit (hypothetical)1,000-
Existing positions600Remaining 400
Candidate A requests300Reserves 300, remaining 100
Candidate B requests300Rejected: exceeds remaining 100
A fails to fill, reservation released300Remaining 400 again

Invented budget. A failed request must release its reservation, and only after the state change is confirmed.

Common mistakes to avoid

You’re done when…

Frequently asked questions

How is exposure different from order size?

Order size describes a single request. Exposure can include all open positions and pending commitments, even when each individual request meets its own size rule.

Does the guide tell me which exposure limit I should choose?

It teaches how to implement and test configurable limits. The examples do not determine a suitable risk level for your circumstances.

What limit should I choose?

The guide cannot decide that for you. It shows how to implement and test configurable limits.

Is exposure the same as position size?

No. Position size is per order. Exposure is the total across positions and pending commitments.

Grok Trading Bot Prompt Guide

Build a six-agent Solana trading desk with prompts for screening, simulated trades, alerts and testing.

Explore the guide · $37

Educational material only, not financial advice. Example figures on this page are invented to illustrate the method. Crypto assets are volatile and you can lose money. Test in simulation and check current provider terms before using any service.