This repository contains a Go SDK to consume cTrader OpenAPI.
- Go 1.22 or higher.
- Earthly (optional).
Check the _test.go files.
# Set the following environment variables:
# - CTRADER_CLIENT_ID
# - CTRADER_SECRET
# - CTRADER_ACCOUNT_ID
# - CTRADER_TOKEN,
# Execute the tests directly with Go:
go test -tags integration -race ./...
# Or you can execute using Earthly:
earthly --secret CTRADER_CLIENT_ID="$CTRADER_CLIENT_ID" \
--secret CTRADER_SECRET="$CTRADER_SECRET" \
--secret CTRADER_ACCOUNT_ID="$CTRADER_ACCOUNT_ID" \
--secret CTRADER_TOKEN="$CTRADER_TOKEN" \
+go-testFollow this instructions.
The easiest way is to use the playground.
- Open the Earthfile and edit the
+compile-prototarget. - Execute the target
earthly +compile-proto. - Sync the dependencies
go mod tidy. - Ensure the package still compiles
go build ./.... - Open a pull request.