From 00e6367aed6c253d53cd8b1e321d13886974a7d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Cinbat?= Date: Mon, 24 Feb 2020 09:57:33 +0300 Subject: [PATCH 1/3] GraphApi eklendi. --- README-pro.md | 97 +++++++++++++++++++++++++++------------------------ 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/README-pro.md b/README-pro.md index 54feb88..c17c7a9 100644 --- a/README-pro.md +++ b/README-pro.md @@ -261,65 +261,72 @@ OR * **price**: Price of the trade * **amount**: Amount of the trade -## OHCL Data (Daily) +## OHCL Data (uses GraphApi) -GET .../api/v2/ohlc?pairSymbol=BTC_TRY +This endpoint is served under another public domain. graph-api.btcturk.com -OR - -GET .../api/v2/ohlc?pairSymbol=BTC_TRY&last=COUNT +GET https://graph-api.btcturk.com/v1/ohlcs **Parameters:** - * **pairSymbol**: (string) Mandatory ex. BTC_TRY - * **last**: (int) Optional ex. 10 + * **from**: (long) Optional - Unix timestamp in seconds - ex. 1582526983 + * **to**: (long) Optional - Unix timestamp in seconds - ex. 1582526983 + * **pair**: (string) Optional - Pair symbol - ex. BTCTRY **Result:** ``` json -{ - "data": [ - { - "pairSymbol": "BTCTRY", - "pairSymbolNormalized": "BTC_TRY", - "time": 15334272, - "open": "35999", - "high": "35999", - "low": "35999", - "close": "35999", - "volume": "0.00921193", - "average": "35999", - "dailyChangeAmount": "0", - "dailyChangePercentage": "0" - }, - { - "pairSymbol": "BTCTRY", - "pairSymbolNormalized": "BTC_TRY", - "time": 15333408, - "open": "35999", - "high": "35999", - "low": "35999", - "close": "35999", - "volume": "0.01659802", - "average": "35999", - "dailyChangeAmount": "0", - "dailyChangePercentage": "0" - } - ], - "success": true, - "message": null, - "code": 0 -} +[ + { + "pair": "BTCTRY", + "time": 1582070400, + "open": 61940, + "high": 62698, + "low": 58500, + "close": 58801, + "volume": 549.1858885452384, + "total": 33566080.63598728, + "average": 61119.71, + "dailyChangeAmount": -3139, + "dailyChangePercentage": -5.07 + }, + { + "pair": "BTCTRY", + "time": 1582156800, + "open": 59150, + "high": 61000, + "low": 58477, + "close": 59100, + "volume": 663.4533811472954, + "total": 39211283.23027989, + "average": 59101.79, + "dailyChangeAmount": -50, + "dailyChangePercentage": -0.08 + }, + { + "pair": "BTCTRY", + "time": 1582243200, + "open": 59104, + "high": 60399, + "low": 58801, + "close": 59704, + "volume": 387.62553661495724, + "total": 23127026.682461508, + "average": 59663.32, + "dailyChangeAmount": 600, + "dailyChangePercentage": 1.02 + } +] ``` -* **pairSymbol**: Requested pair symbol -* **pairSymbolNormalized**: Requested pair symbol with "_" in between. -* **timestamp**: Current Unix time in milliseconds +* **pair**: Requested pair symbol +* **timestamp**: Unix time in seconds * **open**: Price of the opening trade on the time * **high**: Highest trade price on the time * **low**: Lowest trade price on the time * **close**: Price of the closing trade on the time * **volume**: Total volume on the time * **average**: Average price on the time -* **DailyChangeAmount**: Amount of difference between Close and Open on the Date -* **DailyChangePercentage**: Percentage of difference between Close and Open on the Date +* **total**: Total order amount on the time +* **dailyChangeAmount**: Amount of difference between Close and Open on the Date +* **dailyChangePercentage**: Percentage of difference between Close and Open on the Date # Authentication Required Endpoints ## API Authentication V1 From 8fefc7385936ed59eb607d775d0d46f9f4c13af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Cinbat?= Date: Mon, 24 Feb 2020 10:20:09 +0300 Subject: [PATCH 2/3] =?UTF-8?q?Ohlc=20a=C3=A7=C4=B1klamas=C4=B1na=20g?= =?UTF-8?q?=C3=BCnl=C3=BCk=20eklendi.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README-pro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-pro.md b/README-pro.md index c17c7a9..099ce16 100644 --- a/README-pro.md +++ b/README-pro.md @@ -261,7 +261,7 @@ OR * **price**: Price of the trade * **amount**: Amount of the trade -## OHCL Data (uses GraphApi) +## OHCL Data (Returns daily cumulative data) This endpoint is served under another public domain. graph-api.btcturk.com From 78cfca080f562793e2ca4dc5bc1f0df7d65f2d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Cinbat?= Date: Mon, 24 Feb 2020 11:06:22 +0300 Subject: [PATCH 3/3] Updates on required parameter on ohlc endpoint. --- README-pro.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-pro.md b/README-pro.md index 099ce16..b82a5fb 100644 --- a/README-pro.md +++ b/README-pro.md @@ -270,7 +270,7 @@ This endpoint is served under another public domain. graph-api.btcturk.com **Parameters:** * **from**: (long) Optional - Unix timestamp in seconds - ex. 1582526983 * **to**: (long) Optional - Unix timestamp in seconds - ex. 1582526983 - * **pair**: (string) Optional - Pair symbol - ex. BTCTRY + * **pair**: (string) Mandatory - Pair symbol - ex. BTCTRY or BTC_TRY **Result:** ``` json