APIs

AWTS is fully API-based, and all APIs are exposed for you to use to drive the system. SDKs and client libraries are provided for Python, Go, C++, Typescript and other languages.

The AWTS APIs are gRPC-based. gRPC is a high performance, strongly typed, cross-platform API standard. gRPC APIs work with (and therefore AWTS can be interacted with) the following languages: Python, Go, C#, C++, Java, Javascript/Typescript, Rust, Kotlin, PHP, Scala, Swift, Objective-C, Dart and Ruby. Client/server stubs can be generated in any supported language with strong types and streaming support. We provide pre-built SDKs for popular languages - listed below.

Read more about gRPC

You host AWTS modules in your own infrastructure, so the host/port to connect to is up to you; when connecting to AWTS APIs make sure your are connecting to the host/port you have configured the modules to listen on.

TLS (SSL/https) is also supported throughout - including H2C support for HTTP/2 + gRPC over plaintext connections, TLS with provided or self-signed certs, and LetsEncrypt. See Operations documentation for more details.

gRPC/Protobuf

The .proto definition files, associated docs, and generated client/server stubs for Go can be found in our API Github repository: https://github.com/alphaweighted/api

Online API documentation is hosted at buf.build here: https://buf.build/awts/awts

All AWTS modules implement the gRPC Server Reflection Protocol so the API contracts can be discovered from running services automatically:

> grpcurl -plaintext localhost:35001 describe
awts.data.v1.DataService is a service:
service DataService {
  rpc Candles ( .awts.data.v1.CandlesRequest ) returns ( .awts.data.v1.CandlesResponse );
  rpc Instrument ( .awts.data.v1.InstrumentRequest ) returns ( .awts.data.v1.InstrumentResponse );

Note grpc-web support is enabled for all modules, so you can access APIs directly from web apps.

Languages

Python

Python packages for accessing AWTS APIs are generated automatically by Buf and can be installed using pip. In addition, we provide a rich SDK for easier access to data and integration with your workflows.

Python SDK and APIs...

Go

Generated client/server stubs are published here: https://github.com/alphaweighted/api

Typescript/Node

NPM packages for AWTS APIs are generated automatically by Buf and are easy to add to any npm/pnpm/yan-based project.

Read more about the Typescript SDK...

C#

Please use the published API contracts (https://buf.build/alphaweighted/awts/docs) and Buf's code generation to create a native C# API client: https://buf.build/docs/generate/tutorial

C++

Please use the published API contracts (https://buf.build/alphaweighted/awts/docs) and Buf's code generation to create a native C++ API client: https://buf.build/docs/generate/tutorial

Other languages

The underlying gRPC protocol is cross-platform and supports many languages. For any languages not listed here, you can use the .proto definitions to generate stubs yourself. See Google's gRPC documentation for more details.