Git Product home page Git Product logo

ctraderopenapi's Introduction

ctraderOpenAPI

Ctrader Open API C++ client template

Ctrader Open API 2.0 is an API created by Spotware for algorithmic trading and it can be used in any broker supporting Ctrader. Visit https://www.spotware.com/ctrader/trading/ctrader-open-api-trading.

This is a C++ Open API 2.0 client template for those dont want to use C# or Java examples. It was compiled in Debian 9 with g++ compiler. It should work fine in any Linux system.

Define your credentials in src/credentials.h

Build protobuf compiler

This example will not compile if you dont have protobuf compiler and the headers in your system. So follow the instructions here: https://github.com/protocolbuffers/protobuf/blob/master/src/README.md

The Makefile inside src folder set libraries and headers to /usr/local folder. If you have installed protobuf in another folder, change src/Makefile:

Define protobuf header folder: OPT += -I /usr/local/include/google/protobuf

Define protobuf libraries folder: LIBS += -L /usr/local/lib

Generating C++ files from protobuf

Download the last files here: https://github.com/spotware/openapi-proto-messages Run these commands inside the project folder and --proto_path indicate the folder where is .proto files protoc --cpp_out=./src/ --proto_path=./protobuf OpenApiMessages.proto

protoc --cpp_out=./src/ --proto_path=./protobuf OpenApiModelMessages.proto

protoc --cpp_out=./src/ --proto_path=./protobuf OpenApiCommonMessages.proto

protoc --cpp_out=./src/ --proto_path=./protobuf OpenApiCommonModelMessages.prot

mv src/*.h include/

Donations

  1. Bitcoin address: 1MSKScjAL5WAZTpYKGAkXBmqhqaNymTbhn

  2. Ethereum address: 0x776814358c6475bbf531ff9760298fdf90607ea1

  3. Tron address: TKLVUCkcfrqCyqRP3vR5UCNkMqCwWZwmmU

  4. XRP address: rnW8je5SsuFjkMSWkgfXvqZH3gLTpXxfFH

    XRP tag: 100558856

ctraderopenapi's People

Contributors

vinifr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.