Files
gocryptotrader/gctrpc/rpc.proto
Ryan O'Hara-Reid 14c72c9c6b Currency System Update (#448)
* initial update of currency system

* WIP progress

* Finish initial currency string error returns

* fix whoopsie testing for non https insecureinos

* Current WIP for getEnabledPairs check and error return

* WIP continued

* When getting enabled pairs throw error when item is not contained in available pairs list

* More updates -WIP

* Wip continued including potential interface

* Current WIP

* pairs manager pass

* drop asset string and just use the map key, plus return some errors and create more work for myself.

* clean and fixed a bug in currency.json, will not populate correctly without coinmarketcap api keys set.

* purge logger references after merge

* go mod tidy after merge

* Pointer change WIP

* fix some issues and added error returns to a few items (WIP)

* WIP

* Clean

* Fix some linter issues

* Fix more linter issues

* even more linters

* xtda nits

* revert pointer change and rm field

* Addr madcozbadd nits

* fix linter issues: shadow declarations

* Fix linter issues: gocritic huge things

* linter issue fix

* Addr nits

* flush go mod files

* after merge woops

* fix shadow dec

* Addr thrasher nits

* addr nits

* fix some issues

* more fixes

* RM println

* Addr glorious nits

* Add helper method for setting assets

* add missing format directive

* Addr nits

* Actually process new futures contracts -_- derp

* WIP for GRPC upgrade for pair management

* update config pairs

* finished disabling and enabling asset

* linked update of tradable pairs to cli

* fix oopsies

* defer writing to file on program termination for currency storage system

* update template

* don't add disabled asset items to initial sync

* Fix enable disabling a list of pairs and added in a slice error type so we can add whats allowable without throwing an error and return a report, also addressed some other nits

* WIP on getting a channel to unsub

* Wip track down unsubscribe bug and start creating streaming interface

* purge websocket orderbook object and centralised updating routine for orderbook

* general clean before interface implementation

* stage one connection interface WIP

* WIP

* repackage wshandler WIP

* find difference of subs and change signature of subscriber functions so we can batch subscriptions and unsubscription in exchanges that support it

* design change on mange subscription routine WIP

* integrated ZB with the new webosocket updates

* WIP - okex conversion

* integrate websocket upgrades for lakebtc, kraken, huobi, hitbtc, gateio, and WIP for coinbene

* integrate another range of exchanges for websocket update

* Added subscriber and unsubscriber methods to websocket functionality

* fixed tests WIP

* amalgamate cache setup with main websocket setup

* reinstate exported fields traffic alert and shutdownC to accommodate gemini and lakebtc implementations

* added in colon

* Updated websocket auth handling as they werent getting passed through. Added a setter method for websocket URL due to the Binance generated auth key/listenKey. Fixed bug which stopped reconnection.

* Fix subscribe candle bug
Fix time conversion in candle
Fix inititial candle history to datahandler
Include funding to orderbook handling
Include funding to trades
Reduce code duplication in sub and unsub functions
Added the ability to include funding currency websocket subscriptions
validated all channels and added more items todo list (Auth items)

* RM line

* bitstamp pass

* btcmarkets pass - still needs to implement unsubscriber functionality and pairs change test.

* Batch outgoing subscriptions and fix unsubscribe bug

* BTSE - bumped time to minute to reduce pinger calling by 75 calls per day. Fix authentication bug and add authentication pass into to-do. Batch outgoing subscription calls

* fix type field and batch outgoing subs and unsubs for coinbasepro

* Batch outgoing subs and unsubs

* Fixes bug when matching return from authentication

* Fix bug where params where being sent out of order due to map ,where depth items werent being subscribed too, where trying to subscribe to too many kline items caused error, where trying to get a nano secocond ID conflicted due to speed of generation.

* Add websocket capability for currency pair change by utilizing full channel subscription list in subscribe function.

* Add error handling

* Fix public: time conversions, subscription list, stopped pushing heartbeat to data handler, aggregated list of connections.

* hitBTC pass

* returned nil instead of error due to period null bids and asks updates coming through.

* Fix auth ping capture and reply. Added in interval handling for kline data. Added correct full trade data handling. Fix subscribe and unsubscribe.

* Fix when websocket auth conn and token generation fail we don't try and auth sub. Fix bug between auth and normal connection id generation and matching. Batch outgoing payloads to increase efficiency. Updated matching functions to utilise channels instead of waitgroups and go routines.

* RM debug output

* rm func to get shutdown channel

* Add unsubscriber functionality, added wsTicker type, removed return as this will impede data flow and cause reconnection when handling and processing data

* okgroup WIP

* *Added missing fields for websocket trades
*Fix bug processing kline interval
*Added fields for websocket ticker struct
*Fix auth bug
	-Updated request and response matching param to interface so we can custom signature match. Stops auth subscribing before a reply is issued.
	-Updated channel inclusion of pair fo auth subs as this was missing.
*Assortment of perfomance improvements

* poloniex pass

* send all trades to data handler, validated enabled and disable pairs

* initial clean

* centralised request matching mechanism

* websocket main improvements WIP

* WIP

* Websocket management via gctcli WIP

* GRPC expansion

* Updated GCTCLI with websocket url and proxy setting functionality which flushes connection

* Fix continuous spawning of routines bug on error with reconnection

* Addr linter issues

* fix subscription bug that I caused when I changed to a switch case

* fix linter issue

* fix woopsie

* End of day WIP

* Fix order submission REST, time conversion, order type conversion, orderID bugs

* fix gateio test and unsubscribe bug

* revert comment out code

* websocketAPI changed to to true in configtest.json

* fix race in gateio test

* End of day WIP for websocket tests.

* BugFix for binance when book isn't seeded. Updated websocket tests. Deprecated subscription manager. RM wrapper funcs.

* Added string title to exchange name as they are saved as lower case in type, reinstated verbose check in websocket.go

* Added verbosity check for setting websocket URL

* fix bug where the asset had a mind of its own

* purge dodgy coding

* Fix tests, drop blocking chan in websocket Dial function

* few more changes

* race condition fix for websocket tests.

* fix intermittent test failure due to underlying hash table storage

* Address madcuzbad nit

* RM superfluous printlines

* Add quick top example with paramater fields

* First pass Glorious nits

* As per madcozbad suggestion return error when enabled pair not found in full return map. Add test.

* addr madcozbadd nits

* as per glorious suggestion rm'd loadedJSON field

* adjusted ticker, added test and RM'd code that can never be executed

* Addr nits and add in crypto rand genration for ID's

* remove global channel declaration and rescoped as this was causing a lock

* as per glorious suggestion restructured return error for websocket

* addr glorious suggestions

* fix linter issues

* purge non-existent pair from testdata

* add side field to struct and parse

* addr glorious nits

* Add verbosity to error returns and logs and fix string parsing in GCTRPC

* fix speeling mistwake

* Adds websocket functionality check before flushing websocket connection

* Addr kraken panic and setting/flush websocket url stage one.

* added websocket url check before setting with tests

* Added in edge case test if by the time we call contains on available pairs it has been changed

* remove error return for func

* Continuation of tests

* continuation of tests

* Stop potential panic within pair creation function

* Implement changes to upstream

* rm sup comment

* fix bug when subscribing and unsubscribing. Also add in boolean to determine there are currencies that need to be flushed via set pairs via gctcli

* fix test

* Fix linter issues

* Fix tests

* turn websocket off in config example

* Fix issue where you cannot enable websocket when config is set to false, also added config websocket enable state saving

* Introduced err var for same error returns

* Add err var exchange base not found

* restructure function

* drop gctscript from generic response name

* drop managesub delay const as its not being used

* correctly implement websocket rate limiting for coinut

* remove quotations

* drop pair management check

* fix spelling

* return error in function to not update currency with unset role

* amalagamted enable/disable into set function and added in pairstore fetch function

* update error description

* rm function

* moved test function to sharedtestvals and move type to types.go

* append delimiter onto currency delimiter strings

* add test coverage

* rm functions as they are set as methods in base

* remove superfluous methods

* Fix issue that would occur when a subscription errored and not appending successful subs

* fix after rebase woopsie

* fix linter issues

* fix bug streamline code

* fix linter issues

* fix linter issues

* fix case where it should not change ID if set but append new

* fix whoopsie

* fix websocket tests

* fix readme, fix wrapper issues reporting template, go mod tidy

* add test coverage

* add test coverage and verified futures pariing

* add in futures bypass as its not currently supported on BTSE until API update and implementation

* removed downside/upside profit contract type as its no longer supported. Added in check in set config pairs to warn user of potential conflict and to manually remove or update.

* If asset enabled add pair and increase code coverage

* remove strings.title, set and fetch with strings.Lower but keep struct field exchangename unchanged. Streamline ticker and orderbook code.

* Add code coverage

* log error if setting default currency fails, add code coverage

* address glorious nits

* Addr xtda nits

* fix linter issues

* addr glorious nits

* xtda nits

* Addr glorious nits

* add subscription protection and removed a superfluous wait call

* fix test

* fix whoopsie

* addr xtda nits

* addr glorious nits

* Added asset types to subscriptions structs, also added in error handling for resubscription errors

* consolidated rpc returned type and added in sucessful strings

* dropped stream timing down to 100ms

* DOC changes

* proxy and url usage string additions

* WIP

* go mod tidy rides again

* Addr nits

* Addr nits, fix tests

* fix wording

* add in test case for currency matching

* Add byte length check on outbound websocket payload subscriptions

* addr thrasher nits

* Addr madcozbadd nits

* addr linter issues

* Addr glorious nits by amalgamating function into one mega amazing function.

* fix futures account subscription bug

* addr glorious nits and reinstated wg.Wait() checks

* changed string to currency delimiter string and setconnected by function
2020-07-24 13:18:09 +10:00

1202 lines
27 KiB
Protocol Buffer

syntax = "proto3";
import "google/api/annotations.proto";
import "google/protobuf/timestamp.proto";
package gctrpc;
message GetInfoRequest {}
message GetInfoResponse {
string uptime = 1;
int64 available_exchanges = 2;
int64 enabled_exchanges = 3;
string default_forex_provider = 4;
string default_fiat_currency = 5;
map<string, bool> subsystem_status = 6;
map<string, RPCEndpoint> rpc_endpoints = 7;
}
message GetCommunicationRelayersRequest {}
message CommunicationRelayer {
bool enabled = 1;
bool connected = 2;
}
message GetCommunicationRelayersResponse {
map<string, CommunicationRelayer> communication_relayers = 1;
}
message GenericSubsystemRequest {
string subsystem = 1;
}
message GetSubsystemsRequest {}
message GetSusbsytemsResponse {
map<string, bool> subsystems_status = 1;
}
message GetRPCEndpointsRequest{}
message RPCEndpoint {
bool started = 1;
string listen_address = 2;
}
message GetRPCEndpointsResponse {
map<string, RPCEndpoint> endpoints = 1;
}
message GenericExchangeNameRequest {
string exchange = 1;
}
message GetExchangesRequest {
bool enabled = 1;
}
message GetExchangesResponse {
string exchanges = 1;
}
message GetExchangeOTPReponse {
string otp_code = 1;
}
message GetExchangeOTPsRequest {}
message GetExchangeOTPsResponse {
map<string, string> otp_codes = 1;
}
message DisableExchangeRequest {
string exchange = 1;
}
message PairsSupported {
string available_pairs = 1;
string enabled_pairs = 2;
}
message GetExchangeInfoResponse {
string name = 1;
bool enabled = 2;
bool verbose = 3;
bool using_sandbox = 4;
string http_timeout = 5;
string http_useragent = 6;
string http_proxy = 7;
string base_currencies = 8;
map<string, PairsSupported> supported_assets = 9;
bool authenticated_api = 10;
}
message GetTickerRequest {
string exchange = 1;
CurrencyPair pair = 2;
string asset_type = 3;
}
message CurrencyPair {
string delimiter = 1;
string base = 2;
string quote = 3;
}
message TickerResponse {
CurrencyPair pair = 1;
int64 last_updated = 2;
string currency_pair = 3;
double last = 4;
double high = 5;
double low = 6;
double bid = 7;
double ask = 8;
double volume = 9;
double price_ath = 10;
}
message GetTickersRequest {}
message Tickers {
string exchange = 1;
repeated TickerResponse tickers = 2;
}
message GetTickersResponse {
repeated Tickers tickers = 1;
}
message GetOrderbookRequest {
string exchange = 1;
CurrencyPair pair = 2;
string asset_type = 3;
}
message OrderbookItem {
double amount = 1;
double price = 2;
int64 id = 3;
}
message OrderbookResponse {
CurrencyPair pair = 1;
string currency_pair = 2;
repeated OrderbookItem bids = 3;
repeated OrderbookItem asks = 4;
int64 last_updated = 5;
string asset_type = 6;
}
message GetOrderbooksRequest {}
message Orderbooks {
string exchange = 1;
repeated OrderbookResponse orderbooks = 2;
}
message GetOrderbooksResponse {
repeated Orderbooks orderbooks = 1;
}
message GetAccountInfoRequest {
string exchange = 1;
}
message Account {
string id = 1;
repeated AccountCurrencyInfo currencies = 2;
}
message AccountCurrencyInfo {
string currency = 1;
double total_value = 2;
double hold = 3;
}
message GetAccountInfoResponse {
string exchange = 1;
repeated Account accounts = 2;
}
message GetConfigRequest {}
message GetConfigResponse {
bytes data = 1;
}
message PortfolioAddress {
string address = 1;
string coin_type = 2;
string description = 3;
double balance = 4;
}
message GetPortfolioRequest {}
message GetPortfolioResponse {
repeated PortfolioAddress portfolio = 1;
}
message GetPortfolioSummaryRequest {}
message Coin {
string coin = 1;
double balance = 2;
string address = 3;
double percentage = 4;
}
message OfflineCoinSummary {
string address = 1;
double balance = 2;
double percentage = 3;
}
message OnlineCoinSummary {
double balance = 1;
double percentage = 2;
}
message OfflineCoins {
repeated OfflineCoinSummary addresses = 1;
}
message OnlineCoins {
map<string, OnlineCoinSummary> coins = 1;
}
message GetPortfolioSummaryResponse {
repeated Coin coin_totals = 1;
repeated Coin coins_offline = 2;
map<string, OfflineCoins> coins_offline_summary = 3;
repeated Coin coins_online = 4;
map<string, OnlineCoins> coins_online_summary = 5;
}
message AddPortfolioAddressRequest {
string address = 1;
string coin_type = 2;
string description = 3;
double balance = 4;
string supported_exchanges = 5;
bool cold_storage = 6;
}
message RemovePortfolioAddressRequest {
string address = 1;
string coin_type = 2;
string description = 3;
}
message GetForexProvidersRequest {}
message ForexProvider {
string name = 1;
bool enabled = 2;
bool verbose = 3;
string rest_polling_delay = 4;
string api_key = 5;
int64 api_key_level =6;
bool primary_provider = 7;
}
message GetForexProvidersResponse {
repeated ForexProvider forex_providers = 1;
}
message GetForexRatesRequest {}
message ForexRatesConversion {
string from = 1;
string to = 2;
double rate = 3;
double inverse_rate = 4;
}
message GetForexRatesResponse {
repeated ForexRatesConversion forex_rates = 1;
}
message OrderDetails {
string exchange = 1;
string id = 2;
string base_currency = 3;
string quote_currency = 4;
string asset_type = 5;
string order_side = 6;
string order_type = 7;
int64 creation_time = 8;
string status = 9;
double price = 10;
double amount = 11;
double open_volume = 12;
double fee = 13;
repeated TradeHistory trades = 14;
}
message TradeHistory {
int64 creation_time = 1;
string id = 2;
double price = 3;
double amount = 4;
string exchange = 5;
string asset_type = 6;
string order_side = 7;
double fee = 8;
}
message GetOrdersRequest {
string exchange = 1;
string asset_type = 2;
CurrencyPair pair = 3;
}
message GetOrdersResponse {
repeated OrderDetails orders = 1;
}
message GetOrderRequest {
string exchange = 1;
string order_id = 2;
}
message SubmitOrderRequest {
string exchange = 1;
CurrencyPair pair = 2;
string side = 3;
string order_type = 4;
double amount = 5;
double price = 6;
string client_id = 7;
}
message SubmitOrderResponse {
bool order_placed = 1;
string order_id = 2;
}
message SimulateOrderRequest {
string exchange = 1;
CurrencyPair pair = 2;
double amount = 3;
string side = 4;
}
message SimulateOrderResponse {
repeated OrderbookItem orders = 1;
double amount = 2;
double minimum_price = 3;
double maximum_price = 4;
double percentage_gain_loss = 5;
string status = 6;
}
message WhaleBombRequest {
string exchange = 1;
CurrencyPair pair = 2;
double price_target = 3;
string side = 4;
}
message CancelOrderRequest {
string exchange = 1;
string account_id = 2;
string order_id = 3;
CurrencyPair pair = 4;
string asset_type = 5;
string wallet_address = 6;
string side = 7;
}
message CancelAllOrdersRequest {
string exchange = 1;
}
message CancelAllOrdersResponse {
message Orders {
string exchange = 1;
map<string, string> order_status = 2;
}
repeated Orders orders = 1;
}
message GetEventsRequest {}
message ConditionParams {
string condition = 1;
double price = 2;
bool check_bids = 3;
bool check_bids_and_asks = 4;
double orderbook_amount = 5;
}
message GetEventsResponse {
int64 id = 1;
string exchange = 2;
string item = 3;
ConditionParams condition_params = 4;
CurrencyPair pair = 5;
string action = 6;
bool executed = 7;
}
message AddEventRequest {
string exchange = 1;
string item = 2;
ConditionParams condition_params = 3;
CurrencyPair pair = 4;
string asset_type = 5;
string action = 6;
}
message AddEventResponse {
int64 id = 1;
}
message RemoveEventRequest {
int64 id = 1;
}
message GetCryptocurrencyDepositAddressesRequest {
string exchange = 1;
}
message GetCryptocurrencyDepositAddressesResponse {
map<string, string> addresses = 1;
}
message GetCryptocurrencyDepositAddressRequest {
string exchange = 1;
string cryptocurrency = 2;
}
message GetCryptocurrencyDepositAddressResponse {
string address = 1;
}
message WithdrawFiatRequest {
string exchange = 1;
string currency = 2;
double amount = 3;
string description = 4;
string bank_account_id = 5;
}
message WithdrawCryptoRequest {
string exchange = 1;
string address = 2;
string address_tag = 3;
string currency = 4;
double amount = 5;
double fee = 6;
string description = 7;
}
message WithdrawResponse {
string id = 1;
string status = 2;
}
message WithdrawalEventByIDRequest {
string id = 1;
}
message WithdrawalEventByIDResponse {
WithdrawalEventResponse event = 2;
}
message WithdrawalEventsByExchangeRequest {
string exchange = 1;
string id = 2;
int32 limit = 3;
}
message WithdrawalEventsByDateRequest {
string exchange = 1;
string start = 2;
string end = 3;
int32 limit = 4;
}
message WithdrawalEventsByExchangeResponse {
repeated WithdrawalEventResponse event = 2;
}
message WithdrawalEventResponse {
string id = 2;
WithdrawlExchangeEvent exchange = 3;
WithdrawalRequestEvent request = 4;
google.protobuf.Timestamp created_at = 5;
google.protobuf.Timestamp updated_at = 6;
}
message WithdrawlExchangeEvent {
string name = 1;
string id = 2;
string status = 3;
}
message WithdrawalRequestEvent {
string currency = 2;
string description = 3;
double amount = 4;
int32 type = 5;
FiatWithdrawalEvent fiat = 6;
CryptoWithdrawalEvent crypto = 7;
}
message FiatWithdrawalEvent {
string bank_name = 1;
string account_name = 2;
string account_number = 3;
string bsb = 4;
string swift = 5;
string iban = 6;
}
message CryptoWithdrawalEvent {
string address = 1;
string address_tag = 2;
double fee = 3;
}
message GetLoggerDetailsRequest {
string logger = 1;
}
message GetLoggerDetailsResponse{
bool info = 1;
bool debug = 2;
bool warn = 3;
bool error = 4;
}
message SetLoggerDetailsRequest {
string logger = 1;
string level = 2;
}
message GetExchangePairsRequest {
string exchange = 1;
string asset = 2;
}
message GetExchangePairsResponse {
map<string, PairsSupported> supported_assets = 1;
}
message SetExchangePairRequest {
string exchange = 1;
string asset_type = 2;
repeated CurrencyPair pairs = 3;
bool enable = 4;
}
message GetOrderbookStreamRequest {
string exchange = 1;
CurrencyPair pair = 2;
string asset_type = 3;
}
message GetExchangeOrderbookStreamRequest {
string exchange = 1;
}
message GetTickerStreamRequest {
string exchange = 1;
CurrencyPair pair = 2;
string asset_type = 3;
}
message GetExchangeTickerStreamRequest {
string exchange = 1;
}
message GetAuditEventRequest {
string start_date = 1;
string end_date = 2;
string order_by = 3;
int32 limit = 4;
int32 offset = 5;
}
message GetAuditEventResponse {
repeated AuditEvent events = 1;
}
message GetHistoricCandlesRequest {
string exchange = 1;
CurrencyPair pair = 2;
string asset_type = 3;
int64 start = 4;
int64 end = 5;
int64 time_interval = 6;
bool ex_request = 7;
}
message GetHistoricCandlesResponse {
string exchange = 1;
CurrencyPair pair = 2;
int64 start = 3;
int64 end = 4;
string interval = 6;
repeated Candle candle = 5;
}
message Candle {
int64 time = 1;
double low = 2;
double high = 3;
double open = 4;
double close = 5;
double volume = 6;
}
message AuditEvent {
string type = 1;
string identifier = 2;
string message = 3;
string timestamp = 4;
}
message GCTScript {
string UUID = 1;
string name = 2;
string path = 3;
string next_run = 4;
}
message GCTScriptExecuteRequest {
GCTScript script = 1;
}
message GCTScriptStopRequest {
GCTScript script = 1;
}
message GCTScriptStopAllRequest{}
message GCTScriptStatusRequest {}
message GCTScriptListAllRequest{}
message GCTScriptUploadRequest {
string script_name = 1;
string script_data = 2;
bytes data = 3;
bool archived = 4;
bool overwrite = 5;
}
message GCTScriptReadScriptRequest{
GCTScript script = 1;
}
message GCTScriptQueryRequest{
GCTScript script = 1;
}
message GCTScriptAutoLoadRequest{
string script = 1;
bool status = 2;
}
message GCTScriptStatusResponse{
string status = 1;
repeated GCTScript scripts = 2;
}
message GCTScriptQueryResponse{
string status = 1;
GCTScript script = 2;
string data = 3;
}
message GenericResponse {
string status = 1;
string data = 2;
}
message SetExchangeAssetRequest {
string exchange = 1;
string asset = 2;
bool enable = 3;
}
message SetExchangeAllPairsRequest {
string exchange = 1;
bool enable = 2;
}
message UpdateExchangeSupportedPairsRequest {
string exchange = 1;
}
message GetExchangeAssetsRequest {
string exchange = 1;
}
message GetExchangeAssetsResponse {
string assets = 1;
}
message WebsocketGetInfoRequest {
string exchange = 1;
}
message WebsocketGetInfoResponse {
string exchange = 1;
bool supported = 2;
bool enabled = 3;
bool authenticated_supported = 4;
bool authenticated = 5;
string running_url = 6;
string proxy_address = 7;
}
message WebsocketSetEnabledRequest {
string exchange = 1;
bool enable = 2;
}
message WebsocketGetSubscriptionsRequest {
string exchange = 1;
}
message WebsocketSubscription {
string channel = 1;
string currency = 2;
string asset = 3;
string params = 4;
}
message WebsocketGetSubscriptionsResponse {
string exchange = 1;
repeated WebsocketSubscription subscriptions = 2;
}
message WebsocketSetProxyRequest {
string exchange = 1;
string proxy = 2;
}
message WebsocketSetURLRequest {
string exchange = 1;
string url = 2;
}
service GoCryptoTrader {
rpc GetInfo (GetInfoRequest) returns (GetInfoResponse) {
option (google.api.http) = {
get :"/v1/getinfo"
};
}
rpc GetSubsystems (GetSubsystemsRequest) returns (GetSusbsytemsResponse) {
option (google.api.http) = {
get: "/v1/getsubsystems"
};
}
rpc EnableSubsystem (GenericSubsystemRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/enablesubsystem"
};
}
rpc DisableSubsystem (GenericSubsystemRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/disablesubsystem"
};
}
rpc GetRPCEndpoints (GetRPCEndpointsRequest) returns (GetRPCEndpointsResponse) {
option (google.api.http) = {
get: "/v1/getrpcendpoints"
};
}
rpc GetCommunicationRelayers (GetCommunicationRelayersRequest) returns (GetCommunicationRelayersResponse) {
option (google.api.http) = {
get: "/v1/getcommunicationrelayers"
};
}
rpc GetExchanges (GetExchangesRequest) returns (GetExchangesResponse) {
option (google.api.http) = {
get: "/v1/getexchanges"
};
}
rpc DisableExchange (GenericExchangeNameRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/disableexchange"
body: "*"
};
}
rpc GetExchangeInfo (GenericExchangeNameRequest) returns (GetExchangeInfoResponse) {
option (google.api.http) = {
get: "/v1/getexchangeinfo"
};
}
rpc GetExchangeOTPCode (GenericExchangeNameRequest) returns (GetExchangeOTPReponse) {
option (google.api.http) = {
get: "/v1/getexchangeotp"
};
}
rpc GetExchangeOTPCodes (GetExchangeOTPsRequest) returns (GetExchangeOTPsResponse) {
option (google.api.http) = {
get: "/v1/getexchangeotps"
};
}
rpc EnableExchange (GenericExchangeNameRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/enableexchange"
body: "*"
};
}
rpc GetTicker (GetTickerRequest) returns (TickerResponse) {
option (google.api.http) = {
post: "/v1/getticker"
body: "*"
};
}
rpc GetTickers (GetTickersRequest) returns (GetTickersResponse) {
option (google.api.http) = {
get: "/v1/gettickers"
};
}
rpc GetOrderbook (GetOrderbookRequest) returns (OrderbookResponse) {
option (google.api.http) = {
post: "/v1/getorderbook"
body: "*"
};
}
rpc GetOrderbooks (GetOrderbooksRequest) returns (GetOrderbooksResponse) {
option (google.api.http) = {
get: "/v1/getorderbooks"
};
}
rpc GetAccountInfo (GetAccountInfoRequest) returns (GetAccountInfoResponse) {
option (google.api.http) = {
get: "/v1/getaccountinfo"
};
}
rpc GetAccountInfoStream (GetAccountInfoRequest) returns (stream GetAccountInfoResponse) {
option (google.api.http) = {
get: "/v1/getaccountinfostream"
};
}
rpc GetConfig (GetConfigRequest) returns (GetConfigResponse) {
option (google.api.http) = {
get: "/v1/getconfig"
};
}
rpc GetPortfolio (GetPortfolioRequest) returns (GetPortfolioResponse) {
option (google.api.http) = {
get: "/v1/getportfolio"
};
}
rpc GetPortfolioSummary (GetPortfolioSummaryRequest) returns (GetPortfolioSummaryResponse) {
option (google.api.http) = {
get: "/v1/getportfoliosummary"
};
}
rpc AddPortfolioAddress (AddPortfolioAddressRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/addportfolioaddress"
body: "*"
};
}
rpc RemovePortfolioAddress (RemovePortfolioAddressRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/removeportfolioaddress"
body: "*"
};
}
rpc GetForexProviders (GetForexProvidersRequest) returns (GetForexProvidersResponse) {
option (google.api.http) = {
get: "/v1/getforexproviders"
};
}
rpc GetForexRates (GetForexRatesRequest) returns (GetForexRatesResponse) {
option (google.api.http) = {
get: "/v1/getforexrates"
};
}
rpc GetOrders (GetOrdersRequest) returns (GetOrdersResponse) {
option (google.api.http) = {
post: "/v1/getorders"
body: "*"
};
}
rpc GetOrder (GetOrderRequest) returns (OrderDetails) {
option (google.api.http) = {
post: "/v1/getorder"
body: "*"
};
}
rpc SubmitOrder (SubmitOrderRequest) returns (SubmitOrderResponse) {
option (google.api.http) = {
post: "/v1/submitorder"
body: "*"
};
}
rpc SimulateOrder (SimulateOrderRequest) returns (SimulateOrderResponse) {
option (google.api.http) = {
post: "/v1/simulateorder"
body: "*"
};
}
rpc WhaleBomb (WhaleBombRequest) returns (SimulateOrderResponse) {
option (google.api.http) = {
post: "/v1/whalebomb"
body: "*"
};
}
rpc CancelOrder (CancelOrderRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/cancelorder"
body: "*"
};
}
rpc CancelAllOrders (CancelAllOrdersRequest) returns (CancelAllOrdersResponse) {
option (google.api.http) = {
post: "/v1/cancelallorders"
body: "*"
};
}
rpc GetEvents(GetEventsRequest) returns (GetEventsResponse) {
option (google.api.http) = {
get: "/v1/getevents"
};
}
rpc AddEvent(AddEventRequest) returns (AddEventResponse) {
option (google.api.http) = {
post: "/v1/addevent"
body: "*"
};
}
rpc RemoveEvent(RemoveEventRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/removeevent"
body: "*"
};
}
rpc GetCryptocurrencyDepositAddresses(GetCryptocurrencyDepositAddressesRequest) returns (GetCryptocurrencyDepositAddressesResponse) {
option (google.api.http) = {
post: "/v1/getcryptodepositaddresses"
body: "*"
};
}
rpc GetCryptocurrencyDepositAddress(GetCryptocurrencyDepositAddressRequest) returns (GetCryptocurrencyDepositAddressResponse) {
option (google.api.http) = {
post: "/v1/getcryptodepositaddress"
body: "*"
};
}
rpc WithdrawFiatFunds(WithdrawFiatRequest) returns (WithdrawResponse) {
option (google.api.http) = {
post: "/v1/withdrawfiatfunds"
body: "*"
};
}
rpc WithdrawCryptocurrencyFunds(WithdrawCryptoRequest) returns (WithdrawResponse) {
option (google.api.http) = {
post: "/v1/withdrawithdrawcryptofundswfiatfunds"
body: "*"
};
}
rpc WithdrawalEventByID(WithdrawalEventByIDRequest) returns (WithdrawalEventByIDResponse) {
option (google.api.http) = {
post: "/v1/withdrawaleventbyid"
body: "*"
};
}
rpc WithdrawalEventsByExchange(WithdrawalEventsByExchangeRequest) returns (WithdrawalEventsByExchangeResponse) {
option (google.api.http) = {
post: "/v1/withdrawaleventbyid"
body: "*"
};
}
rpc WithdrawalEventsByDate(WithdrawalEventsByDateRequest) returns (WithdrawalEventsByExchangeResponse) {
option (google.api.http) = {
post: "/v1/withdrawaleventbydate"
body: "*"
};
}
rpc GetLoggerDetails(GetLoggerDetailsRequest) returns (GetLoggerDetailsResponse) {
option (google.api.http) = {
get: "/v1/getloggerdetails"
};
}
rpc SetLoggerDetails(SetLoggerDetailsRequest) returns (GetLoggerDetailsResponse) {
option (google.api.http) = {
post: "/v1/setloggerdetails",
body: "*"
};
}
rpc GetExchangePairs(GetExchangePairsRequest) returns (GetExchangePairsResponse) {
option (google.api.http) = {
post: "/v1/getexchangepairs",
body: "*"
};
}
rpc SetExchangePair(SetExchangePairRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/setexchangepair",
body: "*"
};
}
rpc GetOrderbookStream(GetOrderbookStreamRequest) returns (stream OrderbookResponse) {
option (google.api.http) = {
get: "/v1/getorderbookstream"
};
}
rpc GetExchangeOrderbookStream(GetExchangeOrderbookStreamRequest) returns (stream OrderbookResponse) {
option (google.api.http) = {
get: "/v1/getexchangeorderbookstream"
};
}
rpc GetTickerStream(GetTickerStreamRequest) returns (stream TickerResponse) {
option (google.api.http) = {
get: "/v1/gettickerstream"
};
}
rpc GetExchangeTickerStream(GetExchangeTickerStreamRequest) returns (stream TickerResponse) {
option (google.api.http) = {
get: "/v1/getexchangetickerstream",
};
}
rpc GetAuditEvent(GetAuditEventRequest) returns (GetAuditEventResponse) {
option (google.api.http) = {
get: "/v1/getauditevent",
};
}
rpc GCTScriptExecute(GCTScriptExecuteRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/gctscript/execute",
};
}
rpc GCTScriptUpload(GCTScriptUploadRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/gctscript/upload",
body: "*"
};
}
rpc GCTScriptReadScript(GCTScriptReadScriptRequest) returns (GCTScriptQueryResponse) {
option (google.api.http) = {
post: "/v1/gctscript/read",
body: "*"
};
}
rpc GCTScriptStatus(GCTScriptStatusRequest) returns (GCTScriptStatusResponse) {
option (google.api.http) = {
get: "/v1/gctscript/status",
};
}
rpc GCTScriptQuery(GCTScriptQueryRequest) returns (GCTScriptQueryResponse) {
option (google.api.http) = {
get: "/v1/gctscript/query",
};
}
rpc GCTScriptStop(GCTScriptStopRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/gctscript/stop",
body: "*"
};
}
rpc GCTScriptStopAll(GCTScriptStopAllRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/gctscript/stop",
body: "*"
};
}
rpc GCTScriptListAll(GCTScriptListAllRequest) returns (GCTScriptStatusResponse) {
option (google.api.http) = {
post: "/v1/gctscript/stop",
body: "*"
};
}
rpc GCTScriptAutoLoadToggle(GCTScriptAutoLoadRequest) returns (GenericResponse) {
option (google.api.http) = {
post: "/v1/gctscript/autoload",
body: "*"
};
}
rpc GetHistoricCandles(GetHistoricCandlesRequest) returns (GetHistoricCandlesResponse) {
option (google.api.http) = {
get: "/v1/gethistoriccandles"
};
}
rpc SetExchangeAsset(SetExchangeAssetRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/setexchangeasset"
};
}
rpc SetAllExchangePairs(SetExchangeAllPairsRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/setallexchangepairs"
};
}
rpc UpdateExchangeSupportedPairs(UpdateExchangeSupportedPairsRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/updateexchangesupportedpairs"
};
}
rpc GetExchangeAssets(GetExchangeAssetsRequest) returns (GetExchangeAssetsResponse) {
option (google.api.http) = {
get: "/v1/getexchangeassets"
};
}
rpc WebsocketGetInfo(WebsocketGetInfoRequest) returns (WebsocketGetInfoResponse) {
option (google.api.http) = {
get: "/v1/websocketgetinfo"
};
}
rpc WebsocketSetEnabled(WebsocketSetEnabledRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/websocketsetenabled"
};
}
rpc WebsocketGetSubscriptions(WebsocketGetSubscriptionsRequest) returns (WebsocketGetSubscriptionsResponse) {
option (google.api.http) = {
get: "/v1/websocketgetsubscriptions"
};
}
rpc WebsocketSetProxy(WebsocketSetProxyRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/websocketsetproxy"
};
}
rpc WebsocketSetURL(WebsocketSetURLRequest) returns (GenericResponse) {
option (google.api.http) = {
get: "/v1/websocketseturl"
};
}
}