A "Plug and Play" postman collection created from the official swagger doc. The signature is created automatically.
- Import the postman_collection.json file into your Postman
- Create an API key-secret pair in your 3commas account. Some endpoints need write permissions. Which exactly can be found on the official repo.
- Add your API key and secret into the Postman collection variables THREE_COMMAS_API_KEY and THREE_COMMAS_API_SECRET.
The collection is generated from the official swagger doc. Some request have some weird parameters inside, like "market_code=tempor esse". Those are autogenerated from the official swagger doc (and only god knows why they are doing those weird defaults...) Sometimes the default value will have a space inside. This could break the request with a counterintuitive message "api key invalid" or "signature invalid". Just disable those parameters or change to your needs.
If you already have your own postman collection, you can use the pre-request-script.js. Just copy that code to your collection pre-request script. You will still need the THREE_COMMAS_API_KEY and THREE_COMMAS_API_SECRET variables in you environment.
The script also allows you to enable the forced-mode header. You can add a forced mode parameter to your request. forced_mode=paper or forced_mode=real will add the needed header to your request.