Sample document

Sample trading bot code review report

This is a sample of the format, written for a fictional bot. Client A, Bot A and Exchange A do not exist, so this is not a real client and not a real result. Fincode wrote Bot A with defects placed on purpose, and every finding below comes from a real run of a script that reproduces it against a mock exchange on one computer. A review covers the software, never whether rules will make money.

Reading the sample

How to use this if you have a bot today

These five questions can be asked of any bot, without a formal review.

  • Where is the API key?

    Search the code and its history. Check the key's permissions on your exchange account: withdrawal should be off.

  • What happens after a timeout?

    If the code sends the order again without first checking whether it exists, a slow answer can become a duplicate order.

  • What happens if a limit check fails?

    Limits should block the order when they cannot be evaluated, not let it through.

  • What does it know after a restart?

    Kill it on a test environment with an order open. It should read its state from the exchange before doing anything else.

  • Can you explain an order from the logs?

    Pick any order. If the logs cannot say why it went out, the next incident will be hard to understand.

FAQ

Questions about this sample

Is Bot A a real bot?

No. Fincode wrote Bot A for this sample, with the defects placed on purpose, and Client A and Exchange A do not exist. The findings are real in one sense only: each one is reproduced by a script you can run.

Can I run the script myself?

Yes. Download the order gateway zip, open the flawed_demo folder and run python reproduce.py with Python 3.11 or newer. Nothing needs installing, and everything stays on 127.0.0.1.

Will a review tell me whether my strategy is any good?

No. A review covers the software, never whether rules will make money. Fincode does not recommend strategies, and strategy and investment decisions are yours.

Do you need my API keys or exchange login?

No. A code review works from the code. Remove keys and secrets before you share anything.

Will every finding in my review come with a script like this?

Not necessarily. Some findings are clear from reading the code. Whether a failure is reproduced against a mock, and how, is agreed in the written proposal for the review.

Can you fix what the report finds?

Yes, on request. The report comes first, and repairs are quoted separately. You can also take the report to another developer.

Is the report a security certificate?

No. It states findings. Fincode does not claim any third-party security certification.

Have code you want checked?

Send a short brief with the platform, what the bot should do and your timeline. Do not send API keys. Fincode is a software company and does not provide investment advice, portfolio management or crypto asset services. Trades can lose money.