This project is currently in alpha. The API should be considered unstable and likely to change.
The Tulip Exchange API is a gRPC API for interacting with the Tulip Exchange backend. Use it to place and cancel orders, monitor the orderbook, stream trades and any other interactions. The API is defined in a set of protobuf files that are used to generate language specific stubs. In addition to these stubs, the Tulip Exchange Client Library also contains some helper functions to aid authentication.
- Getting started
- Public API Reference documentation
- Private API Reference documentation
- Tulip Exchange API Authentication
- FAQ
To install Bazel itself:
- Install Bazel's dependencies
- Install Bazelisk (optional, but recommended)
For Java examples, either:
- Install JDK 8 or higher locally; or
- Let Bazel download a JDK for you by passing the following command line arguments when invoking Bazel(isk).
Please see the Getting started section for more details steps.
For the Python examples: Install Python 2 and 3. If you're using your operating system's package manager, also install the development packages. Python 2 is still required unfortunately, due to an issue with the gRPC-Bazel rules (#21963).
To run Go (Golang) or Node (Javascript) examples, all other dependencies are managed by Bazel.
Run an example with bazelisk run //examples/<lang>/<example>
, e.g.:
bazelisk run //examples/go/hello_exchange
Your language not supported? Submit a feature request or compile the bindings for your language by yourself.
Include this project as an external dependency in your WORKSPACE
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
git_repository(
name = "nl_tulipsolutions_tecl",
commit = "<commit ID>",
remote = "https://github.com/tulipsolutions/tecl.git",
)
Depend on the API parts that you need in your build files, for example:
java_library(
name = "lib",
srcs = glob(["*.java"]),
deps = ["@nl_tulipsolutions_tecl//tulipsolutions/api/priv:order_jvm_grpc"],
)
An alternative to using Bazel is to compile stubs in your language direct from the protobuf definitions. gRPC.io contains a list of officially supported languages. Visit our getting started from source page, select your preferred language and follow the tutorial.
For the purpose of verifying your client side code, we provide a number of options:
- Online demo; create an account and use your private JWT obtained there (see API access).
- Online mocked gRPC; returning bogus stateless data with a shared dummy JWT that works out of the box from a clone (this is the default).
- Offline mocked gRPC; run a gRPC server locally with just one command. See
mockgrpc/README.md
.