mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 07:26:53 +00:00
Add OHLC retrieval func (GetHistoricCandles) to all exchanges and expose it as a wrapper func (#414)
* initial wiring to providegethistoricalcandles * initial wiring to providegethistoricalcandles * initial wiring to providegethistoricalcandles * gethistriccandles work from cli using hard coded inputs * gethistoriccandles RPC service and CLI working fine for coinbasepro * fixed unit test * input check on grpc for gethistoriccandles * updated deps * fixed the return value when a method is not yet implemented * code review: fixed CLI input check and int32->int64 * code review: handling wrong exchange name * added check on granularity and allowing start and end being empty * code review: removed currency2 * code review: dependency reverted * improved func comment * typo in func comment * get historic values tests * unit tests for get historical rates on coinbasepro * using time format time.RFC3339 * names to camel case and improved comments * test cleanup * changed to camel case * added InArray tests * dropped not needed string time * enforced use of int64 * fixed make check * cleaned up code organisation to be consistent * fixed Travis remarks * more Travis remarks * added comments * regenerated proto files after merge * linter fix
This commit is contained in:
committed by
Adrian Gallagher
parent
e5b64a5580
commit
5ac5ec8fc1
@@ -840,6 +840,62 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/gethistoriccandles": {
|
||||
"get": {
|
||||
"operationId": "GetHistoricCandles",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gctrpcGetHistoricCandlesResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "rangesize",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
{
|
||||
"name": "granularity",
|
||||
"in": "query",
|
||||
"required": false,
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"GoCryptoTrader"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/getinfo": {
|
||||
"get": {
|
||||
"operationId": "GetInfo",
|
||||
@@ -1548,6 +1604,35 @@
|
||||
"gctrpcCancelOrderResponse": {
|
||||
"type": "object"
|
||||
},
|
||||
"gctrpcCandle": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"time": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
},
|
||||
"low": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"high": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"open": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"close": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
},
|
||||
"volume": {
|
||||
"type": "number",
|
||||
"format": "double"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcCoin": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2032,6 +2117,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcGetHistoricCandlesResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"candle": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gctrpcCandle"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcGetInfoResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user