Skip to content

diegobernardes/ctrader

Repository files navigation

cTrader Go SDK

This repository contains a Go SDK to consume cTrader OpenAPI.

Requirements

  • Go 1.22 or higher.
  • Earthly (optional).

Usage

Check the _test.go files.

Testing

# 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-test

FAQ

How to register an application?

Follow this instructions.

How to get an access ID and secret?

The easiest way is to use the playground.

How can I upgrade cTrader OpenAPI protobuf files?

  • Open the Earthfile and edit the +compile-proto target.
  • Execute the target earthly +compile-proto.
  • Sync the dependencies go mod tidy.
  • Ensure the package still compiles go build ./....
  • Open a pull request.

Documentation

Acknowledgments

About

Go SDK for cTrader Open API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published