Files
gocryptotrader/gctrpc/rpc.swagger.json
Andrew f6fd94ea69 Engine: Scripting support (#383)
* WIP

* updated appveyor and increased deadline 5 seconds due to increased linters being added

* revert files to upstream/engine

* WIP

* WIP

* mod file changes

* added script manager

* Added manager/and cli interfaces to scripting

* Added script task handler

* WIP - Added timer/repeat support and fleshed out wrapper further

* autoload support added + WIP

* WIP commit

* added account balance info

* btc markets temp work around

* WIP - merged with upstream for new order package BTC Markets responses broken

* Cancel order wrapper WIP

*  order wrapper update

* Added test coverage for VM

* moved to map for VM List shutdown of all VM now handled added gctcli commands for list and stop of running scripts

* added override to load/execute for path

* fixed incorrect channel shutdown added further test coverage and restructured gctcli commands into sub commands

* increased test coverage for packages

* Added docs cleaned up tests and example scripts

* Test coverage increased for module/gct/exchange package

* windows fixes

* merged upstream/engine

* WIP

* logger fixes - removed pointer to bool check removed duplicate test check for logger

* remove unused mutex

* added inital upload support

* fix linter issues for go-fmt

* added zip support for uploading and added base for fund withdrawing

* changed error return types and also log errors, fix zip path issue

* improved error outputs and code flow

* pairs response fix added protobuf defs for stop all and list all

* added stop all running scripts general clean up and moved across to OrderManager

* linter fixes (gofmt)

* added list all command

* rewrote zip handler to be cleaner also fixed file overwrite on upload

* added query command reworked tests

* added further error checking to compileandrun corrected use of pointers for accountinfo

* bumped tengo version

* Removed named returns reworded log messages removed unused falseptr

* WIP

* Added virutal machine limit improved config options

* added model for script event added upload validation

* script_event table has been completed, tests for wrapper functions implemented

* README updates

* reverted changes opened new PR to move withdraw struct outs

* intial work on adding withdraw support after merger of withdraw package

* started work on examples

* Added crypto withdraw support

* fix switch case assignment and gofmt project

* Reworking Fiat withdraw request pending #402

* removed double pointer call

* added withdraw support for fiat  currencies

* added tests for withdraw methods increased readme

* removed local tengo require and also fix linter issues

* Added default log size const added basic test for invalid script execution

* First pass at moving wrapper to validator package to allow proper validation of uploaded scripts

* Added script details to README added config test added test for no file extension

* moved tests to const and fixed incorrect pathing

* added test coverage to withdraw package

* corrected file close handling

* point to included configtest.json

* extended validator support when a script is uploaded

* Bug fix on bool logic

* Added mutex

* Don't create autit events on test execution

* reverted common to master

* moved file rename to unix timestamp format

* converted logger enabled back to pointer as i need nilness check also moved scriptid to text over blob

* started work on autoload add/remove support

* First round of PR fixes (mostly commented exports)

* Moved GCTScript load to last, removed unneeded error from cleanup()

* Comment clairty for AuitEventID

* added autoload add/remove command to cli

* added tests for autoload

* Test updates for Exchanges

* linter fixes (gofmt)

* Removed double check of engine pointer

* remove possible nil pointer on GetSpecificTicker

* Fixed not closing file handler on write that causes archive removal to fail

* file handler Close clean ups

* corrected spelling on error return and return invalid name n autoload

* moved strings to cosnt moved bool pointer creation to convert package

* new zip extractor added

* Validation has been added to archive uploads

* removed shadow var on err

* added ok check to conversion

* converted condition check

* basic test for zip extract added

* new zip handler

* reverted back to old atomic loading system

* removed shadow err

* lets add a new line

* added space to error return

* command line toggle for script now works properly

* readme updated

* set configLoaded to true

* check for configLoaded condition

* added mutex to allow for multiple access on virtual machine increased test coverage disable script manager if scripting is disabled

* linked up to enable/disablesubsystem commands

* added start/stop example to readme

* reworked logic on test as check should be done on Load()

* updated to tengo v2

* linters

* lower time on ntp client to stop slippage

* remove all fails if any fail validtion from an archive

* remove vm from list if timer is invalid

* removed shadow on err

* remove config creation from NTPCheck test

* WIP testing DB changes

* add unique constraint

* WIP: created has many model

* linters run

* basic sqlite3 support added for new database format

* linters run

* Added test coverage for script repo

* removed unused print

* updated env vars for CI instances

* updated env vars for CI instances

* Updated test packages

* Test updates for postgresql

* removed invalid tests from postgres

* remove duplication of struct and improved code flow

* general cleanup

* wording changes on log output

* use databasemgr logger and add support for autoload without file extension

* corrected test naming

* return correct error

* return correct error again version 82

* store scriptdata on creation

* Hello

* Errorln -> Errorf

* Removed unused vars

* Read me updates

* testing without parallel

* comment on exported type

* added nil check against VM for test

* add debugging information

* gofmt

* remove verbose and data sent to channel

* Added debug information

* linter fixes (gofmt)

* remove unused CompileAndRun() call

* test sleep to see if issue is timing related

* semi-concurrent map fixes

* one day i will run gofmt or setup precommit hooks

* new line :D

* increased test coverage

* added correct sleep time

* Moved over to sync map

* linter fixes (gofmt)

* goimports

* moved VM related methods to vm.go

* new line at end of file

* trying increased timeout on golangci-lint for appveyor

* add debugging information

* removed timeout

* reworked timeout logic

* linter fixes (gofmt)

* increased test coverage

* increased test coverage

* one day i will run gofmt or setup precommit hooks

* removed unused exchange test

* increased golangci-lint timeout

* Added nil check on shutdown and test coverage for it lowered timeout back to 1:30

* reworked ID system

* removed script hash as it was unused

* added comments on exported methods and read me update

* reorder code

* removed to atomic.value for test execution flag

* increased test coverage

* move add further up execution

* point to correct script file
2020-01-23 13:54:04 +11:00

2779 lines
62 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "rpc.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/v1/addevent": {
"post": {
"operationId": "AddEvent",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcAddEventResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcAddEventRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/addportfolioaddress": {
"post": {
"operationId": "AddPortfolioAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcAddPortfolioAddressResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcAddPortfolioAddressRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/cancelallorders": {
"post": {
"operationId": "CancelAllOrders",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcCancelAllOrdersResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcCancelAllOrdersRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/cancelorder": {
"post": {
"operationId": "CancelOrder",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcCancelOrderResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcCancelOrderRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/disableexchange": {
"post": {
"operationId": "DisableExchange",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/disableexchangepair": {
"post": {
"operationId": "DisableExchangePair",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcExchangePairRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/disablesubsystem": {
"get": {
"operationId": "DisableSubsystem",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericSubsystemResponse"
}
}
},
"parameters": [
{
"name": "subsystem",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/enableexchange": {
"post": {
"operationId": "EnableExchange",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/enableexchangepair": {
"post": {
"operationId": "EnableExchangePair",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericExchangeNameResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcExchangePairRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/enablesubsystem": {
"get": {
"operationId": "EnableSubsystem",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGenericSubsystemResponse"
}
}
},
"parameters": [
{
"name": "subsystem",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/autoload": {
"post": {
"operationId": "GCTScriptAutoLoadToggle",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptGenericResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptAutoLoadRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/execute": {
"get": {
"operationId": "GCTScriptExecute",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptGenericResponse"
}
}
},
"parameters": [
{
"name": "script.UUID",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.path",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.next_run",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/query": {
"get": {
"operationId": "GCTScriptQuery",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptQueryResponse"
}
}
},
"parameters": [
{
"name": "script.UUID",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.path",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "script.next_run",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/read": {
"post": {
"operationId": "GCTScriptReadScript",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptQueryResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptReadScriptRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/status": {
"get": {
"operationId": "GCTScriptStatus",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptStatusResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/stop": {
"post": {
"operationId": "GCTScriptListAll",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptStatusResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptListAllRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gctscript/upload": {
"post": {
"operationId": "GCTScriptUpload",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptGenericResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGCTScriptUploadRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getaccountinfo": {
"get": {
"operationId": "GetAccountInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetAccountInfoResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getauditevent": {
"get": {
"operationId": "GetAuditEvent",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetAuditEventResponse"
}
}
},
"parameters": [
{
"name": "start_date",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "end_date",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "order_by",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "limit",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "offset",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getcommunicationrelayers": {
"get": {
"operationId": "GetCommunicationRelayers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetCommunicationRelayersResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getconfig": {
"get": {
"operationId": "GetConfig",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetConfigResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getcryptodepositaddress": {
"post": {
"operationId": "GetCryptocurrencyDepositAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetCryptocurrencyDepositAddressResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetCryptocurrencyDepositAddressRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getcryptodepositaddresses": {
"post": {
"operationId": "GetCryptocurrencyDepositAddresses",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetCryptocurrencyDepositAddressesResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetCryptocurrencyDepositAddressesRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getevents": {
"get": {
"operationId": "GetEvents",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetEventsResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangeinfo": {
"get": {
"operationId": "GetExchangeInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetExchangeInfoResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangeorderbookstream": {
"get": {
"operationId": "GetExchangeOrderbookStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/gctrpcOrderbookResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangeotp": {
"get": {
"operationId": "GetExchangeOTPCode",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetExchangeOTPReponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangeotps": {
"get": {
"operationId": "GetExchangeOTPCodes",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetExchangeOTPsResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangepairs": {
"post": {
"operationId": "GetExchangePairs",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetExchangePairsResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetExchangePairsRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchanges": {
"get": {
"operationId": "GetExchanges",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetExchangesResponse"
}
}
},
"parameters": [
{
"name": "enabled",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getexchangetickerstream": {
"get": {
"operationId": "GetExchangeTickerStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/gctrpcTickerResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getforexproviders": {
"get": {
"operationId": "GetForexProviders",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetForexProvidersResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getforexrates": {
"get": {
"operationId": "GetForexRates",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetForexRatesResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getinfo": {
"get": {
"operationId": "GetInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetInfoResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getloggerdetails": {
"get": {
"operationId": "GetLoggerDetails",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetLoggerDetailsResponse"
}
}
},
"parameters": [
{
"name": "logger",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorder": {
"post": {
"operationId": "GetOrder",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcOrderDetails"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetOrderRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorderbook": {
"post": {
"operationId": "GetOrderbook",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcOrderbookResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetOrderbookRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorderbooks": {
"get": {
"operationId": "GetOrderbooks",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetOrderbooksResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorderbookstream": {
"get": {
"operationId": "GetOrderbookStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/gctrpcOrderbookResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.delimiter",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.base",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.quote",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "asset_type",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getorders": {
"post": {
"operationId": "GetOrders",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetOrdersResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetOrdersRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getportfolio": {
"get": {
"operationId": "GetPortfolio",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetPortfolioResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getportfoliosummary": {
"get": {
"operationId": "GetPortfolioSummary",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetPortfolioSummaryResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getrpcendpoints": {
"get": {
"operationId": "GetRPCEndpoints",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetRPCEndpointsResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getsubsystems": {
"get": {
"operationId": "GetSubsystems",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetSusbsytemsResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/getticker": {
"post": {
"operationId": "GetTicker",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcTickerResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcGetTickerRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gettickers": {
"get": {
"operationId": "GetTickers",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetTickersResponse"
}
}
},
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/gettickerstream": {
"get": {
"operationId": "GetTickerStream",
"responses": {
"200": {
"description": "A successful response.(streaming responses)",
"schema": {
"$ref": "#/x-stream-definitions/gctrpcTickerResponse"
}
}
},
"parameters": [
{
"name": "exchange",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.delimiter",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.base",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "pair.quote",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "asset_type",
"in": "query",
"required": false,
"type": "string"
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/removeevent": {
"post": {
"operationId": "RemoveEvent",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcRemoveEventResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcRemoveEventRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/removeportfolioaddress": {
"post": {
"operationId": "RemovePortfolioAddress",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcRemovePortfolioAddressResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcRemovePortfolioAddressRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/setloggerdetails": {
"post": {
"operationId": "SetLoggerDetails",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcGetLoggerDetailsResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcSetLoggerDetailsRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/simulateorder": {
"post": {
"operationId": "SimulateOrder",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcSimulateOrderResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcSimulateOrderRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/submitorder": {
"post": {
"operationId": "SubmitOrder",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcSubmitOrderResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcSubmitOrderRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/whalebomb": {
"post": {
"operationId": "WhaleBomb",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcSimulateOrderResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcWhaleBombRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/withdrawcryptofunds": {
"post": {
"operationId": "WithdrawCryptocurrencyFunds",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcWithdrawResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcWithdrawCurrencyRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
},
"/v1/withdrawfiatfunds": {
"post": {
"operationId": "WithdrawFiatFunds",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/gctrpcWithdrawResponse"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/gctrpcWithdrawCurrencyRequest"
}
}
],
"tags": [
"GoCryptoTrader"
]
}
}
},
"definitions": {
"CancelAllOrdersResponseOrders": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"order_status": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"gctrpcAccount": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"currencies": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcAccountCurrencyInfo"
}
}
}
},
"gctrpcAccountCurrencyInfo": {
"type": "object",
"properties": {
"currency": {
"type": "string"
},
"total_value": {
"type": "number",
"format": "double"
},
"hold": {
"type": "number",
"format": "double"
}
}
},
"gctrpcAddEventRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"item": {
"type": "string"
},
"condition_params": {
"$ref": "#/definitions/gctrpcConditionParams"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"asset_type": {
"type": "string"
},
"action": {
"type": "string"
}
}
},
"gctrpcAddEventResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
}
}
},
"gctrpcAddPortfolioAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"coin_type": {
"type": "string"
},
"description": {
"type": "string"
},
"balance": {
"type": "number",
"format": "double"
}
}
},
"gctrpcAddPortfolioAddressResponse": {
"type": "object"
},
"gctrpcAuditEvent": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"identifier": {
"type": "string"
},
"message": {
"type": "string"
},
"timestamp": {
"type": "string"
}
}
},
"gctrpcCancelAllOrdersRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
}
}
},
"gctrpcCancelAllOrdersResponse": {
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/definitions/CancelAllOrdersResponseOrders"
}
}
}
},
"gctrpcCancelOrderRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"account_id": {
"type": "string"
},
"order_id": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"asset_type": {
"type": "string"
},
"wallet_address": {
"type": "string"
},
"side": {
"type": "string"
}
}
},
"gctrpcCancelOrderResponse": {
"type": "object"
},
"gctrpcCoin": {
"type": "object",
"properties": {
"coin": {
"type": "string"
},
"balance": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"percentage": {
"type": "number",
"format": "double"
}
}
},
"gctrpcCommunicationRelayer": {
"type": "object",
"properties": {
"enabled": {
"type": "boolean",
"format": "boolean"
},
"connected": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcConditionParams": {
"type": "object",
"properties": {
"condition": {
"type": "string"
},
"price": {
"type": "number",
"format": "double"
},
"check_bids": {
"type": "boolean",
"format": "boolean"
},
"check_bids_and_asks": {
"type": "boolean",
"format": "boolean"
},
"orderbook_amount": {
"type": "number",
"format": "double"
}
}
},
"gctrpcCurrencyPair": {
"type": "object",
"properties": {
"delimiter": {
"type": "string"
},
"base": {
"type": "string"
},
"quote": {
"type": "string"
}
}
},
"gctrpcExchangePairRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"asset_type": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
}
}
},
"gctrpcForexProvider": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean",
"format": "boolean"
},
"verbose": {
"type": "boolean",
"format": "boolean"
},
"rest_polling_delay": {
"type": "string"
},
"api_key": {
"type": "string"
},
"api_key_level": {
"type": "string",
"format": "int64"
},
"primary_provider": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcForexRatesConversion": {
"type": "object",
"properties": {
"from": {
"type": "string"
},
"to": {
"type": "string"
},
"rate": {
"type": "number",
"format": "double"
},
"inverse_rate": {
"type": "number",
"format": "double"
}
}
},
"gctrpcGCTScript": {
"type": "object",
"properties": {
"UUID": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"next_run": {
"type": "string"
}
}
},
"gctrpcGCTScriptAutoLoadRequest": {
"type": "object",
"properties": {
"script": {
"type": "string"
},
"status": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcGCTScriptGenericResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"data": {
"type": "string"
}
}
},
"gctrpcGCTScriptListAllRequest": {
"type": "object"
},
"gctrpcGCTScriptQueryResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"script": {
"$ref": "#/definitions/gctrpcGCTScript"
},
"data": {
"type": "string"
}
}
},
"gctrpcGCTScriptReadScriptRequest": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/gctrpcGCTScript"
}
}
},
"gctrpcGCTScriptStatusResponse": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"scripts": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcGCTScript"
}
}
}
},
"gctrpcGCTScriptStopAllRequest": {
"type": "object"
},
"gctrpcGCTScriptStopRequest": {
"type": "object",
"properties": {
"script": {
"$ref": "#/definitions/gctrpcGCTScript"
}
}
},
"gctrpcGCTScriptUploadRequest": {
"type": "object",
"properties": {
"script_name": {
"type": "string"
},
"script_data": {
"type": "string"
},
"data": {
"type": "string",
"format": "byte"
},
"archived": {
"type": "boolean",
"format": "boolean"
},
"overwrite": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcGenericExchangeNameRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
}
}
},
"gctrpcGenericExchangeNameResponse": {
"type": "object"
},
"gctrpcGenericSubsystemResponse": {
"type": "object"
},
"gctrpcGetAccountInfoResponse": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"accounts": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcAccount"
}
}
}
},
"gctrpcGetAuditEventResponse": {
"type": "object",
"properties": {
"events": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcAuditEvent"
}
}
}
},
"gctrpcGetCommunicationRelayersResponse": {
"type": "object",
"properties": {
"communication_relayers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcCommunicationRelayer"
}
}
}
},
"gctrpcGetConfigResponse": {
"type": "object",
"properties": {
"data": {
"type": "string",
"format": "byte"
}
}
},
"gctrpcGetCryptocurrencyDepositAddressRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"cryptocurrency": {
"type": "string"
}
}
},
"gctrpcGetCryptocurrencyDepositAddressResponse": {
"type": "object",
"properties": {
"address": {
"type": "string"
}
}
},
"gctrpcGetCryptocurrencyDepositAddressesRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
}
}
},
"gctrpcGetCryptocurrencyDepositAddressesResponse": {
"type": "object",
"properties": {
"addresses": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"gctrpcGetEventsResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
},
"exchange": {
"type": "string"
},
"item": {
"type": "string"
},
"condition_params": {
"$ref": "#/definitions/gctrpcConditionParams"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"action": {
"type": "string"
},
"executed": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcGetExchangeInfoResponse": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean",
"format": "boolean"
},
"verbose": {
"type": "boolean",
"format": "boolean"
},
"using_sandbox": {
"type": "boolean",
"format": "boolean"
},
"http_timeout": {
"type": "string"
},
"http_useragent": {
"type": "string"
},
"http_proxy": {
"type": "string"
},
"base_currencies": {
"type": "string"
},
"supported_assets": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcPairsSupported"
}
},
"authenticated_api": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcGetExchangeOTPReponse": {
"type": "object",
"properties": {
"otp_code": {
"type": "string"
}
}
},
"gctrpcGetExchangeOTPsResponse": {
"type": "object",
"properties": {
"otp_codes": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"gctrpcGetExchangePairsRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"asset": {
"type": "string"
}
}
},
"gctrpcGetExchangePairsResponse": {
"type": "object",
"properties": {
"supported_assets": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcPairsSupported"
}
}
}
},
"gctrpcGetExchangesResponse": {
"type": "object",
"properties": {
"exchanges": {
"type": "string"
}
}
},
"gctrpcGetForexProvidersResponse": {
"type": "object",
"properties": {
"forex_providers": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcForexProvider"
}
}
}
},
"gctrpcGetForexRatesResponse": {
"type": "object",
"properties": {
"forex_rates": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcForexRatesConversion"
}
}
}
},
"gctrpcGetInfoResponse": {
"type": "object",
"properties": {
"uptime": {
"type": "string"
},
"available_exchanges": {
"type": "string",
"format": "int64"
},
"enabled_exchanges": {
"type": "string",
"format": "int64"
},
"default_forex_provider": {
"type": "string"
},
"default_fiat_currency": {
"type": "string"
},
"subsystem_status": {
"type": "object",
"additionalProperties": {
"type": "boolean",
"format": "boolean"
}
},
"rpc_endpoints": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcRPCEndpoint"
}
}
}
},
"gctrpcGetLoggerDetailsResponse": {
"type": "object",
"properties": {
"info": {
"type": "boolean",
"format": "boolean"
},
"debug": {
"type": "boolean",
"format": "boolean"
},
"warn": {
"type": "boolean",
"format": "boolean"
},
"error": {
"type": "boolean",
"format": "boolean"
}
}
},
"gctrpcGetOrderRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"order_id": {
"type": "string"
}
}
},
"gctrpcGetOrderbookRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"asset_type": {
"type": "string"
}
}
},
"gctrpcGetOrderbooksResponse": {
"type": "object",
"properties": {
"orderbooks": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderbooks"
}
}
}
},
"gctrpcGetOrdersRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"asset_type": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
}
}
},
"gctrpcGetOrdersResponse": {
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderDetails"
}
}
}
},
"gctrpcGetPortfolioResponse": {
"type": "object",
"properties": {
"portfolio": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcPortfolioAddress"
}
}
}
},
"gctrpcGetPortfolioSummaryResponse": {
"type": "object",
"properties": {
"coin_totals": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcCoin"
}
},
"coins_offline": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcCoin"
}
},
"coins_offline_summary": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcOfflineCoins"
}
},
"coins_online": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcCoin"
}
},
"coins_online_summary": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcOnlineCoins"
}
}
}
},
"gctrpcGetRPCEndpointsResponse": {
"type": "object",
"properties": {
"endpoints": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcRPCEndpoint"
}
}
}
},
"gctrpcGetSusbsytemsResponse": {
"type": "object",
"properties": {
"subsystems_status": {
"type": "object",
"additionalProperties": {
"type": "boolean",
"format": "boolean"
}
}
}
},
"gctrpcGetTickerRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"asset_type": {
"type": "string"
}
}
},
"gctrpcGetTickersResponse": {
"type": "object",
"properties": {
"tickers": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcTickers"
}
}
}
},
"gctrpcOfflineCoinSummary": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"balance": {
"type": "number",
"format": "double"
},
"percentage": {
"type": "number",
"format": "double"
}
}
},
"gctrpcOfflineCoins": {
"type": "object",
"properties": {
"addresses": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOfflineCoinSummary"
}
}
}
},
"gctrpcOnlineCoinSummary": {
"type": "object",
"properties": {
"balance": {
"type": "number",
"format": "double"
},
"percentage": {
"type": "number",
"format": "double"
}
}
},
"gctrpcOnlineCoins": {
"type": "object",
"properties": {
"coins": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/gctrpcOnlineCoinSummary"
}
}
}
},
"gctrpcOrderDetails": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"id": {
"type": "string"
},
"base_currency": {
"type": "string"
},
"quote_currency": {
"type": "string"
},
"asset_type": {
"type": "string"
},
"order_side": {
"type": "string"
},
"order_type": {
"type": "string"
},
"creation_time": {
"type": "string",
"format": "int64"
},
"status": {
"type": "string"
},
"price": {
"type": "number",
"format": "double"
},
"amount": {
"type": "number",
"format": "double"
},
"open_volume": {
"type": "number",
"format": "double"
}
}
},
"gctrpcOrderbookItem": {
"type": "object",
"properties": {
"amount": {
"type": "number",
"format": "double"
},
"price": {
"type": "number",
"format": "double"
},
"id": {
"type": "string",
"format": "int64"
}
}
},
"gctrpcOrderbookResponse": {
"type": "object",
"properties": {
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"currency_pair": {
"type": "string"
},
"bids": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderbookItem"
}
},
"asks": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderbookItem"
}
},
"last_updated": {
"type": "string",
"format": "int64"
},
"asset_type": {
"type": "string"
}
}
},
"gctrpcOrderbooks": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"orderbooks": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderbookResponse"
}
}
}
},
"gctrpcPairsSupported": {
"type": "object",
"properties": {
"available_pairs": {
"type": "string"
},
"enabled_pairs": {
"type": "string"
}
}
},
"gctrpcPortfolioAddress": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"coin_type": {
"type": "string"
},
"description": {
"type": "string"
},
"balance": {
"type": "number",
"format": "double"
}
}
},
"gctrpcRPCEndpoint": {
"type": "object",
"properties": {
"started": {
"type": "boolean",
"format": "boolean"
},
"listen_address": {
"type": "string"
}
}
},
"gctrpcRemoveEventRequest": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "int64"
}
}
},
"gctrpcRemoveEventResponse": {
"type": "object"
},
"gctrpcRemovePortfolioAddressRequest": {
"type": "object",
"properties": {
"address": {
"type": "string"
},
"coin_type": {
"type": "string"
},
"description": {
"type": "string"
}
}
},
"gctrpcRemovePortfolioAddressResponse": {
"type": "object"
},
"gctrpcSetLoggerDetailsRequest": {
"type": "object",
"properties": {
"logger": {
"type": "string"
},
"level": {
"type": "string"
}
}
},
"gctrpcSimulateOrderRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"amount": {
"type": "number",
"format": "double"
},
"side": {
"type": "string"
}
}
},
"gctrpcSimulateOrderResponse": {
"type": "object",
"properties": {
"orders": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcOrderbookItem"
}
},
"amount": {
"type": "number",
"format": "double"
},
"minimum_price": {
"type": "number",
"format": "double"
},
"maximum_price": {
"type": "number",
"format": "double"
},
"percentage_gain_loss": {
"type": "number",
"format": "double"
},
"status": {
"type": "string"
}
}
},
"gctrpcSubmitOrderRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"side": {
"type": "string"
},
"order_type": {
"type": "string"
},
"amount": {
"type": "number",
"format": "double"
},
"price": {
"type": "number",
"format": "double"
},
"client_id": {
"type": "string"
}
}
},
"gctrpcSubmitOrderResponse": {
"type": "object",
"properties": {
"order_placed": {
"type": "boolean",
"format": "boolean"
},
"order_id": {
"type": "string"
}
}
},
"gctrpcTickerResponse": {
"type": "object",
"properties": {
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"last_updated": {
"type": "string",
"format": "int64"
},
"currency_pair": {
"type": "string"
},
"last": {
"type": "number",
"format": "double"
},
"high": {
"type": "number",
"format": "double"
},
"low": {
"type": "number",
"format": "double"
},
"bid": {
"type": "number",
"format": "double"
},
"ask": {
"type": "number",
"format": "double"
},
"volume": {
"type": "number",
"format": "double"
},
"price_ath": {
"type": "number",
"format": "double"
}
}
},
"gctrpcTickers": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"tickers": {
"type": "array",
"items": {
"$ref": "#/definitions/gctrpcTickerResponse"
}
}
}
},
"gctrpcWhaleBombRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"pair": {
"$ref": "#/definitions/gctrpcCurrencyPair"
},
"price_target": {
"type": "number",
"format": "double"
},
"side": {
"type": "string"
}
}
},
"gctrpcWithdrawCurrencyRequest": {
"type": "object",
"properties": {
"exchange": {
"type": "string"
},
"description": {
"type": "string"
},
"one_time_password": {
"type": "string"
},
"account_id": {
"type": "string"
},
"pin": {
"type": "string",
"format": "int64"
},
"trade_password": {
"type": "string"
},
"currency": {
"type": "string"
},
"address": {
"type": "string"
},
"address_tag": {
"type": "string"
},
"amount": {
"type": "number",
"format": "double"
},
"fee_amount": {
"type": "number",
"format": "double"
},
"bank_name": {
"type": "string"
},
"bank_address": {
"type": "string"
},
"bank_city": {
"type": "string"
},
"bank_country": {
"type": "string"
},
"swife_code": {
"type": "string"
},
"wire_currency": {
"type": "string"
}
}
},
"gctrpcWithdrawResponse": {
"type": "object",
"properties": {
"result": {
"type": "string"
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeStreamError": {
"type": "object",
"properties": {
"grpc_code": {
"type": "integer",
"format": "int32"
},
"http_code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"http_status": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
},
"x-stream-definitions": {
"gctrpcOrderbookResponse": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/gctrpcOrderbookResponse"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of gctrpcOrderbookResponse"
},
"gctrpcTickerResponse": {
"type": "object",
"properties": {
"result": {
"$ref": "#/definitions/gctrpcTickerResponse"
},
"error": {
"$ref": "#/definitions/runtimeStreamError"
}
},
"title": "Stream result of gctrpcTickerResponse"
}
}
}