Awesome Open Source
Awesome Open Source

Tulip Exchange Client Library

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.

Documentation

Usage with Bazel

To install Bazel itself:

Java specifics

For Java examples, either:

Please see the Getting started section for more details steps.

Python specifics

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).

Go and Node

To run Go (Golang) or Node (Javascript) examples, all other dependencies are managed by Bazel.

Running the examples

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 in another Bazel project

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"],
)

Usage with other build tools

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.

Testing against the Exchange

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.
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Language (29,985
Grpc (5,177
Protocol Buffers (4,261
Stub (2,861
Bazel (1,472
Starlark (557
Grpc Go (245
Bazel Rules (223
Exchange Api (152
Sphinx Doc (120
Protobuf3 (117
Grpc Java (109
Grpc Python (43
Grpc Node (39