Merge branch 'develop' of https://github.com/Superalgos/Superalgos into develop
This commit is contained in:
commit
ad6bbf4291
40 files changed
+909
-190
No files matched your search
@@ -1 +1 @@
|
||||
{"type":"Workspace","name":"Tested Exchanges","rootNodes":[{"type":"Network","name":"My Network","project":"Superalgos","networkNodes":[{"type":"Network Node","name":"My Computer","config":"{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}","project":"Superalgos","dataTasks":{"type":"Data Tasks","name":"New Data Tasks","project":"Superalgos","projectDataTasks":[],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":25089.356993272086,"y":30767.11115747996},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":25389.356993272086,"y":30767.11115747996},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"testingTradingTasks":{"type":"Testing Trading Tasks","name":"New Testing Trading Tasks","project":"Superalgos","projectTradingTasks":[],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":25539.356993272086,"y":31026.918778615294},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"productionTradingTasks":{"type":"Production Trading Tasks","name":"New Production Trading Tasks","project":"Superalgos","projectTradingTasks":[],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":25389.356993272086,"y":31286.726399750627},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataStorage":{"type":"Data Storage","name":"New Data Storage","project":"Superalgos","dataMinesData":{"type":"Data Mines Data","name":"New Data Mines Data","project":"Superalgos","projectDataProducts":[],"id":"32e7c122-fa5a-4d00-9d71-d54e890e32de","savedPayload":{"position":{"x":25070.19913560607,"y":31588.15985816277},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingMinesData":{"type":"Trading Mines Data","name":"New Trading Mines Data","project":"Superalgos","projectTradingProducts":[],"id":"e4e268f3-a677-4f90-90a1-d87244e647e5","savedPayload":{"position":{"x":24959.356993272086,"y":31550.53402088596},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningMinesData":{"type":"Learning Mines Data","name":"New Learning Mines Data","project":"Superalgos","projectLearningProducts":[],"id":"2845a687-becc-4c3b-bc79-b2293ba876ba","savedPayload":{"position":{"x":24871.350991184714,"y":31473.354828453244},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e2697759-6038-4943-b90c-5a68651ff9a8","savedPayload":{"position":{"x":25089.356993272086,"y":31286.726399750627},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"d"}}},"id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4","savedPayload":{"position":{"x":25239.356993272086,"y":31026.918778615294},"targetPosition":{"x":24939.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}}],"id":"3c165071-7558-4708-9999-8ffe71d346b1","savedPayload":{"position":{"x":24939.356993272086,"y":31026.918778615294},"targetPosition":{"x":24939.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"s"}}},{"type":"Crypto Ecosystem","name":"My Crypto Ecosystem","project":"Superalgos","cryptoExchanges":[{"type":"Crypto Exchanges","name":"Tested","project":"Superalgos","exchanges":[Line truncated
|
||||
{"type":"Workspace","name":"Tested Exchanges","rootNodes":[{"type":"Network","name":"My Network","project":"Superalgos","networkNodes":[{"type":"Network Node","name":"My Computer","config":"{ \n\"host\": \"localhost\", \n\"webPort\": \"34248\", \n\"webSocketsPort\": \"18041\"\n}","project":"Superalgos","dataTasks":{"type":"Data Tasks","name":"New Data Tasks","project":"Superalgos","projectDataTasks":[],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":25089.356993272086,"y":30767.11115747996},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":25389.356993272086,"y":30767.11115747996},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"testingTradingTasks":{"type":"Testing Trading Tasks","name":"New Testing Trading Tasks","project":"Superalgos","projectTradingTasks":[],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":25539.356993272086,"y":31026.918778615294},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"productionTradingTasks":{"type":"Production Trading Tasks","name":"New Production Trading Tasks","project":"Superalgos","projectTradingTasks":[],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":25389.356993272086,"y":31286.726399750627},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataStorage":{"type":"Data Storage","name":"New Data Storage","project":"Superalgos","dataMinesData":{"type":"Data Mines Data","name":"New Data Mines Data","project":"Superalgos","projectDataProducts":[],"id":"32e7c122-fa5a-4d00-9d71-d54e890e32de","savedPayload":{"position":{"x":25070.19913560607,"y":31588.15985816277},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingMinesData":{"type":"Trading Mines Data","name":"New Trading Mines Data","project":"Superalgos","projectTradingProducts":[],"id":"e4e268f3-a677-4f90-90a1-d87244e647e5","savedPayload":{"position":{"x":24959.356993272086,"y":31550.53402088596},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningMinesData":{"type":"Learning Mines Data","name":"New Learning Mines Data","project":"Superalgos","projectLearningProducts":[],"id":"2845a687-becc-4c3b-bc79-b2293ba876ba","savedPayload":{"position":{"x":24871.350991184714,"y":31473.354828453244},"targetPosition":{"x":25109.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e2697759-6038-4943-b90c-5a68651ff9a8","savedPayload":{"position":{"x":25089.356993272086,"y":31286.726399750627},"targetPosition":{"x":25239.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"d"}}},"id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4","savedPayload":{"position":{"x":25239.356993272086,"y":31026.918778615294},"targetPosition":{"x":24939.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}}],"id":"3c165071-7558-4708-9999-8ffe71d346b1","savedPayload":{"position":{"x":24939.356993272086,"y":31026.918778615294},"targetPosition":{"x":24939.356993272086,"y":31026.918778615294},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"s"}}},{"type":"Crypto Ecosystem","name":"My Crypto Ecosystem","project":"Superalgos","cryptoExchanges":[{"type":"Crypto Exchanges","name":"Tested","project":"Superalgos","exchanges":[Line truncated
|
||||
@@ -15936,7 +15936,7 @@
|
||||
"config": true
|
||||
},
|
||||
"initialValues": {
|
||||
"config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false}"
|
||||
"config": "{\"node\":{\"distancePercentage\":60,\"radiusPercentage\":85,\"massPercentage\":100,\"animationSteps\":2,\"menuItem\":{\"widthPercentage\":100,\"heightPercentage\":60,\"radiusPercentage\":90}},\"physics\":false,\"detachUsingMouse\":false }"
|
||||
},
|
||||
"menuItems": [
|
||||
{
|
||||
|
||||
@@ -31,6 +31,14 @@
|
||||
"style": "List",
|
||||
"text": "Bitfinex Test Status"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Bittrex Test Status"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "CoinbasePro Test Status"
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "FTX Test Status",
|
||||
@@ -38,7 +46,8 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Kraken Tested Status"
|
||||
"text": "Kraken Test Status",
|
||||
"updated": 1615453046113
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
|
||||
@@ -55,6 +55,10 @@
|
||||
{
|
||||
"style": "List",
|
||||
"text": "physics determines wether the environment is static (false) or dynamic (true). When physics is set to true, nodes in the design space are affected by th gravitational pull and repulsion of other nodes."
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "detachUsingMouse defines if you can detach nodes from it's parent or reference parents only using the mouse (when true) or if you can not use the mouse for that and can only do it using the detach buttons on the icon's menu (when false)."
|
||||
}
|
||||
]
|
||||
}
|
||||
+4
-4
@@ -35,8 +35,8 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "docs.contribute Message",
|
||||
"updated": 1609943744230
|
||||
"text": "app.contribute [Message]",
|
||||
"updated": 1615461375106
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
@@ -54,8 +54,8 @@
|
||||
},
|
||||
{
|
||||
"style": "Javascript",
|
||||
"text": "docs.contribute Fixed typo.",
|
||||
"updated": 1610742512175
|
||||
"text": "app.contribute Fixed typo.",
|
||||
"updated": 1615461382913
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
|
||||
+11
-7
@@ -9,33 +9,37 @@
|
||||
{
|
||||
"language": "ID",
|
||||
"text": "Proses pembaruan berhasil dilaksanakan. Versi terbaru Superalgos telah selesai diunduh dan mengganti versi yang sekarang. Agar perubahan diterapkan dengan baik, anda harus memulai ulang Client ini dan merefresh halaman UI ini.",
|
||||
"updated": 1613891855110
|
||||
"updated": 1613891855110,
|
||||
"style": "Definition"
|
||||
}
|
||||
]
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Success",
|
||||
"text": "You now have the latest version of Superalgos. Just remeber to restart the Client and the UI. If you have Tasks running, you should first stop the tasks, and then restart the Client, so that you can run those task again using the updated codebase.",
|
||||
"updated": 1611160648343,
|
||||
"text": "You now have the latest version of Superalgos. Just remember to restart the Client and the UI. If you have Tasks running, you should first stop the tasks, and then restart the Client, so that you can run those task again using the updated codebase.",
|
||||
"updated": 1615458633005,
|
||||
"translations": [
|
||||
{
|
||||
"language": "ID",
|
||||
"text": "Sekarang anda memiliki Superalgos versi terbaru. Perlu diingat untuk selalu memulai ulang Client dan UI. Jika memiliki Task yang berjalan, maka anda harus menghentikan Task tersebut terlebih dahulu, lalu memulai ulang Client, sehingga anda dapat menjalankan Task tersebut lagi menggunakan codebase yang terupdate.",
|
||||
"updated": 1613892095568
|
||||
"updated": 1613892095568,
|
||||
"style": "Success"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"style": "Note",
|
||||
"text": "The update you made, only afffects the Client which you are connected to via http using your browser. If you have more Clients running as part of a Network, you will need to update them too, etither manually using Git or by navigating with your browser to their URL and doing running the App Update Command there.",
|
||||
"text": "The update you made, only affects the Client which you are connected to via http using your browser. If you have more Clients running as part of a Network, you will need to update them too, etither manually using Git or by navigating with your browser to their URL and doing running the App Update Command there.",
|
||||
"translations": [
|
||||
{
|
||||
"language": "ID",
|
||||
"text": "Pembaruan yang Anda buat, hanya mempengaruhi Client yang terhubung melalui http menggunakan browser ini. Jika Anda memiliki lebih banyak Client yang berjalan sebagai bagian dari Network, anda juga perlu memperbaruinya, baik secara manual menggunakan Git atau dengan menavigasikan browser anda ke URL tujuan dan menjalankan App Update Command di sana.",
|
||||
"updated": 1613892300538
|
||||
"updated": 1613892300538,
|
||||
"style": "Note"
|
||||
}
|
||||
]
|
||||
],
|
||||
"updated": 1615458652244
|
||||
}
|
||||
]
|
||||
}
|
||||
+6
-4
@@ -3,13 +3,14 @@
|
||||
"pageNumber": "5",
|
||||
"type": "App Message - Update Done - Already Up-To-Date",
|
||||
"definition": {
|
||||
"text": "The update process run successfully but no changes where made since your installation is up-to-date with the current branch. No further action required.",
|
||||
"updated": 1611128829429,
|
||||
"text": "The update process run successfully but no changes were made since your installation is up-to-date with the current branch. No further action required.",
|
||||
"updated": 1615458687718,
|
||||
"translations": [
|
||||
{
|
||||
"language": "ID",
|
||||
"text": "Proses pembaruan berjalan dengan lancar namun tidak ada perubahan yang terjadi karena versi Superalgos anda sudah diversi paling baru dengan cabang saat ini. Tidak perlu tindakan lebih lanjut.",
|
||||
"updated": 1613892507215
|
||||
"updated": 1613892507215,
|
||||
"style": "Definition"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -22,7 +23,8 @@
|
||||
{
|
||||
"language": "ID",
|
||||
"text": "Anda sudah diversi paling up-to-date. Tidak perlu me-reboot Client atau merefresh halaman UI ini.",
|
||||
"updated": 1613892633200
|
||||
"updated": 1613892633200,
|
||||
"style": "Success"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+10
-10
@@ -3,8 +3,8 @@
|
||||
"pageNumber": "6",
|
||||
"type": "Luno Test Status",
|
||||
"definition": {
|
||||
"text": "Luno is tested for data mining but not for live trading",
|
||||
"updated": 1615204721150
|
||||
"text": "Luno is tested for data mining and for live trading",
|
||||
"updated": 1615550142553
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
@@ -24,23 +24,23 @@
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Trading Capability [**]: Unknown",
|
||||
"updated": 1615204866750
|
||||
"text": "Trading Capability [**]: Yes",
|
||||
"updated": 1615550165906
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Comments: Raw Data mining is extremely slow due to exchange restrictions on their API that limit the number of data it can be requested via Rest API. One day of Raw Data takes about 5 minutes to download. Keep this in mind when setting a start date",
|
||||
"updated": 1615205045729
|
||||
"text": "Comments: Raw Data mining is extremely slow due to exchange restrictions on their API that limit the number of data it can be requested via Rest API. One day of Raw Data takes about 5 minutes to download. Keep this in mind when setting a start date. The reason for this is because they do not support fetching of OHCLV data - this data has to be compiled by fetching individual trades. The fetching of trades is limited to 100 trades per request, and the rate limit is 1 second.",
|
||||
"updated": 1615456853257
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[*] The ability to fetch historic data for backtesting purposes has been verified",
|
||||
"updated": 1615211359233
|
||||
"text": "[*] The ability to fetch historic data for backtesting purposes has been verified.",
|
||||
"updated": 1615456911815
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[**] The ability to run strategies in live-trading mode has not been verified",
|
||||
"updated": 1615211364516
|
||||
"text": "[**] The ability to run strategies in live-trading mode is now possible. Ensure that the version of the CCXT library being used by Superalgos is 1.42.77 or better - earlier versions of this library did not correctly apply the precision settings of the exchange in the amounts specified for creating orders.",
|
||||
"updated": 1615550355806
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"topic": "Tested Exchanges",
|
||||
"pageNumber": "8",
|
||||
"type": "Bittrex Test Status",
|
||||
"definition": {
|
||||
"text": "Bittrex is not fully tested for data mining nor for live trading",
|
||||
"updated": 1615450372178
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Properties",
|
||||
"updated": 1615143100216
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "1-min OHLCVs Capability [*]: Yes",
|
||||
"updated": 1615204617519
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Market History: Unknown",
|
||||
"updated": 1615450231832
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Trading Capability [**]: Unknown",
|
||||
"updated": 1615204866750
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Comments: Raw Data mining it's extremely slow due to API restriction",
|
||||
"updated": 1615450349464
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[*] The ability to fetch historic data for backtesting purposes has not been verified",
|
||||
"updated": 1615211296452
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[**] The ability to run strategies in live-trading mode has not been verified",
|
||||
"updated": 1615211304255
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Configuration"
|
||||
},
|
||||
{
|
||||
"style": "Json",
|
||||
"text": "{\n \"codeName\": \"bittrex\",\n \"API\": [\n {\n \"method\": \"fetch_ohlcv\",\n \"limit\": 2\n }\n ]\n}",
|
||||
"updated": 1615450253869
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"topic": "Tested Exchanges",
|
||||
"pageNumber": "9",
|
||||
"type": "CoinbasePro Test Status",
|
||||
"definition": {
|
||||
"text": "Coinbase Pro is not fully tested for data mining nor for live trading",
|
||||
"updated": 1615453123690
|
||||
},
|
||||
"paragraphs": [
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Properties",
|
||||
"updated": 1615143100216
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "1-min OHLCVs Capability [*]: Yes",
|
||||
"updated": 1615204617519
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Market History: Unknown",
|
||||
"updated": 1615453086807
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Trading Capability [**]: Unknown",
|
||||
"updated": 1615204866750
|
||||
},
|
||||
{
|
||||
"style": "List",
|
||||
"text": "Comments: Raw Data fetching extremely slow due to API restrictions, see config",
|
||||
"updated": 1615453110186
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[*] The ability to fetch historic data for backtesting purposes has not been fully verified",
|
||||
"updated": 1615453130798
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": "[**] The ability to run strategies in live-trading mode has not been verified",
|
||||
"updated": 1615211304255
|
||||
},
|
||||
{
|
||||
"style": "Title",
|
||||
"text": "Configuration"
|
||||
},
|
||||
{
|
||||
"style": "Json",
|
||||
"text": "{\n \"codeName\": \"coinbasepro\",\n \"API\": [\n {\n \"method\": \"fetch_ohlcv\",\n \"limit\": 300\n }\n ]\n}",
|
||||
"updated": 1615453067170
|
||||
},
|
||||
{
|
||||
"style": "Text",
|
||||
"text": ""
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
Vendored
+3
-3
@@ -229,13 +229,13 @@ console.log (ccxt.exchanges) // print all available exchanges
|
||||
|
||||
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
||||
|
||||
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.42.67/dist/ccxt.browser.js
|
||||
* unpkg: https://unpkg.com/ccxt@1.42.67/dist/ccxt.browser.js
|
||||
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.42.77/dist/ccxt.browser.js
|
||||
* unpkg: https://unpkg.com/ccxt@1.42.77/dist/ccxt.browser.js
|
||||
|
||||
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
||||
|
||||
```HTML
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.42.67/dist/ccxt.browser.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.42.77/dist/ccxt.browser.js"></script>
|
||||
```
|
||||
|
||||
Creates a global `ccxt` object:
|
||||
|
||||
Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/transpile.js
Generated
Vendored
+21
-3
@@ -1080,19 +1080,37 @@ class Transpiler {
|
||||
|
||||
// ========================================================================
|
||||
|
||||
exportTypeScriptDeclarations (file, classes) {
|
||||
exportTypeScriptClassNames (file, classes) {
|
||||
|
||||
log.bright.cyan ('Exporting TypeScript declarations →', file.yellow)
|
||||
log.bright.cyan ('Exporting TypeScript class names →', file.yellow)
|
||||
|
||||
const regex = /\/[\n]{2}(?: export class [^\s]+ extends [^\s]+ \{\}[\r]?[\n])+/
|
||||
const replacement = "/\n\n" + Object.keys (classes).map (className => {
|
||||
const baseClass = classes[className]
|
||||
const baseClass = classes[className].replace (/ccxt\.[a-z_]+/, 'Exchange')
|
||||
return ' export class ' + className + ' extends ' + baseClass + " {}"
|
||||
}).join ("\n") + "\n"
|
||||
|
||||
replaceInFile (file, regex, replacement)
|
||||
}
|
||||
|
||||
exportTypeScriptExchangeIds (file, classes) {
|
||||
|
||||
log.bright.cyan ('Exporting TypeScript exchange ids →', file.yellow)
|
||||
|
||||
const regex = /\/[\n]{2} export type ExchangeId =\n(?: \| \'[a-z0-9_]+\'[\r]?[\n])+/
|
||||
const replacement = "/\n\n export type ExchangeId =\n" + Object.keys (classes).map (className => {
|
||||
return " | '" + className + "'"
|
||||
}).join ("\n") + "\n"
|
||||
|
||||
replaceInFile (file, regex, replacement)
|
||||
}
|
||||
|
||||
exportTypeScriptDeclarations (file, classes) {
|
||||
|
||||
this.exportTypeScriptClassNames (file, classes)
|
||||
this.exportTypeScriptExchangeIds (file, classes)
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
|
||||
transpileErrorHierarchy () {
|
||||
|
||||
Generated
Vendored
+128
@@ -551,4 +551,132 @@ declare module 'ccxt' {
|
||||
|
||||
/* tslint:enable */
|
||||
|
||||
export type ExchangeId =
|
||||
| 'aax'
|
||||
| 'acx'
|
||||
| 'aofex'
|
||||
| 'bequant'
|
||||
| 'bibox'
|
||||
| 'bigone'
|
||||
| 'binance'
|
||||
| 'binanceus'
|
||||
| 'bit2c'
|
||||
| 'bitbank'
|
||||
| 'bitbay'
|
||||
| 'bitcoincom'
|
||||
| 'bitfinex'
|
||||
| 'bitfinex2'
|
||||
| 'bitflyer'
|
||||
| 'bitforex'
|
||||
| 'bitget'
|
||||
| 'bithumb'
|
||||
| 'bitkk'
|
||||
| 'bitmart'
|
||||
| 'bitmax'
|
||||
| 'bitmex'
|
||||
| 'bitpanda'
|
||||
| 'bitso'
|
||||
| 'bitstamp'
|
||||
| 'bitstamp1'
|
||||
| 'bittrex'
|
||||
| 'bitvavo'
|
||||
| 'bitz'
|
||||
| 'bl3p'
|
||||
| 'bleutrade'
|
||||
| 'braziliex'
|
||||
| 'btcalpha'
|
||||
| 'btcbox'
|
||||
| 'btcmarkets'
|
||||
| 'btctradeua'
|
||||
| 'btcturk'
|
||||
| 'buda'
|
||||
| 'bw'
|
||||
| 'bybit'
|
||||
| 'bytetrade'
|
||||
| 'cdax'
|
||||
| 'cex'
|
||||
| 'chilebit'
|
||||
| 'coinbase'
|
||||
| 'coinbaseprime'
|
||||
| 'coinbasepro'
|
||||
| 'coincheck'
|
||||
| 'coinegg'
|
||||
| 'coinex'
|
||||
| 'coinfalcon'
|
||||
| 'coinfloor'
|
||||
| 'coingi'
|
||||
| 'coinmarketcap'
|
||||
| 'coinmate'
|
||||
| 'coinone'
|
||||
| 'coinspot'
|
||||
| 'crex24'
|
||||
| 'currencycom'
|
||||
| 'delta'
|
||||
| 'deribit'
|
||||
| 'digifinex'
|
||||
| 'dsx'
|
||||
| 'equos'
|
||||
| 'eterbase'
|
||||
| 'exmo'
|
||||
| 'exx'
|
||||
| 'fcoin'
|
||||
| 'fcoinjp'
|
||||
| 'flowbtc'
|
||||
| 'foxbit'
|
||||
| 'ftx'
|
||||
| 'gateio'
|
||||
| 'gemini'
|
||||
| 'gopax'
|
||||
| 'hbtc'
|
||||
| 'hitbtc'
|
||||
| 'hollaex'
|
||||
| 'huobijp'
|
||||
| 'huobipro'
|
||||
| 'ice3x'
|
||||
| 'idex'
|
||||
| 'independentreserve'
|
||||
| 'indodax'
|
||||
| 'itbit'
|
||||
| 'kraken'
|
||||
| 'kucoin'
|
||||
| 'kuna'
|
||||
| 'lakebtc'
|
||||
| 'latoken'
|
||||
| 'lbank'
|
||||
| 'liquid'
|
||||
| 'luno'
|
||||
| 'lykke'
|
||||
| 'mercado'
|
||||
| 'mixcoins'
|
||||
| 'ndax'
|
||||
| 'novadax'
|
||||
| 'oceanex'
|
||||
| 'okcoin'
|
||||
| 'okex'
|
||||
| 'paymium'
|
||||
| 'phemex'
|
||||
| 'poloniex'
|
||||
| 'probit'
|
||||
| 'qtrade'
|
||||
| 'rightbtc'
|
||||
| 'ripio'
|
||||
| 'southxchange'
|
||||
| 'stex'
|
||||
| 'surbitcoin'
|
||||
| 'therock'
|
||||
| 'tidebit'
|
||||
| 'tidex'
|
||||
| 'timex'
|
||||
| 'upbit'
|
||||
| 'vaultoro'
|
||||
| 'vbtc'
|
||||
| 'vcc'
|
||||
| 'wavesexchange'
|
||||
| 'whitebit'
|
||||
| 'xbtce'
|
||||
| 'xena'
|
||||
| 'yobit'
|
||||
| 'zaif'
|
||||
| 'zb'
|
||||
|
||||
}
|
||||
Generated
Vendored
+1
-1
@@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange')
|
||||
//-----------------------------------------------------------------------------
|
||||
// this is updated by vss.js when building
|
||||
|
||||
const version = '1.42.67'
|
||||
const version = '1.42.77'
|
||||
|
||||
Exchange.ccxtVersion = version
|
||||
|
||||
|
||||
Generated
Vendored
+102
-31
@@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange')
|
||||
//-----------------------------------------------------------------------------
|
||||
// this is updated by vss.js when building
|
||||
|
||||
const version = '1.42.67'
|
||||
const version = '1.42.77'
|
||||
|
||||
Exchange.ccxtVersion = version
|
||||
|
||||
@@ -4956,8 +4956,77 @@ module.exports = class Exchange {
|
||||
integerPow (a, b) {
|
||||
return new BN (a).pow (new BN (b))
|
||||
}
|
||||
}
|
||||
|
||||
safeOrder (order) {
|
||||
// Cost
|
||||
// Remaining
|
||||
// Average
|
||||
// Price
|
||||
// Amount
|
||||
// Filled
|
||||
//
|
||||
// First we try to calculate filled from the trades
|
||||
const parseFilled = order['filled'] === undefined;
|
||||
const parseCost = order['cost'] === undefined;
|
||||
if (parseFilled) {
|
||||
order['filled'] = 0
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = 0
|
||||
}
|
||||
if (parseFilled || parseCost) {
|
||||
if (Array.isArray (order['trades'])) {
|
||||
for (let i = 0; i < order['trades'].length; i++) {
|
||||
const trade = order['trades'][i]
|
||||
if (parseFilled) {
|
||||
order['filled'] = this.sum (order['filled'], trade['amount'])
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = this.sum (order['cost'], trade['cost'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// We ensure amount = filled + remaining
|
||||
if (order['amount'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['amount'] = this.sum (order['filled'], order['remaining'])
|
||||
}
|
||||
}
|
||||
if (order['filled'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0)
|
||||
}
|
||||
}
|
||||
if (order['remaining'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['filled'] !== undefined) {
|
||||
order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0)
|
||||
}
|
||||
}
|
||||
// We ensure that the average field is calculated correctly
|
||||
if (order['average'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['cost'] !== undefined && order['cost'] > 0) {
|
||||
order['average'] = order['filled'] / order['cost']
|
||||
}
|
||||
}
|
||||
// We also ensure the cost field is calculated correctly
|
||||
const costPriceExists = (order['average'] !== undefined) || (order['price'] !== undefined)
|
||||
if ((order['filled'] !== undefined) && costPriceExists) {
|
||||
let costPrice = undefined;
|
||||
if (order['average'] === undefined) {
|
||||
costPrice = order['price']
|
||||
} else {
|
||||
costPrice = order['average']
|
||||
}
|
||||
order['cost'] = costPrice * order['filled']
|
||||
}
|
||||
// We add support for market orders
|
||||
if (order['price'] === undefined && order['type'] === 'market') {
|
||||
order['price'] = order['average']
|
||||
}
|
||||
return order
|
||||
}
|
||||
}
|
||||
|
||||
},{"../static_dependencies/BN/bn":126,"./errors":8,"./functions":9}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
@@ -50697,10 +50766,11 @@ module.exports = class coincheck extends Exchange {
|
||||
'markets': {
|
||||
'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, // the only real pair
|
||||
// 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' },
|
||||
// 'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
// 'DAO/JPY': { 'id': 'dao_jpy', 'symbol': 'DAO/JPY', 'base': 'DAO', 'quote': 'JPY', 'baseId': 'dao', 'quoteId': 'jpy' },
|
||||
// 'LSK/JPY': { 'id': 'lsk_jpy', 'symbol': 'LSK/JPY', 'base': 'LSK', 'quote': 'JPY', 'baseId': 'lsk', 'quoteId': 'jpy' },
|
||||
// 'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' },
|
||||
// 'XMR/JPY': { 'id': 'xmr_jpy', 'symbol': 'XMR/JPY', 'base': 'XMR', 'quote': 'JPY', 'baseId': 'xmr', 'quoteId': 'jpy' },
|
||||
// 'REP/JPY': { 'id': 'rep_jpy', 'symbol': 'REP/JPY', 'base': 'REP', 'quote': 'JPY', 'baseId': 'rep', 'quoteId': 'jpy' },
|
||||
// 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' },
|
||||
@@ -50709,7 +50779,7 @@ module.exports = class coincheck extends Exchange {
|
||||
// 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' },
|
||||
// 'DASH/JPY': { 'id': 'dash_jpy', 'symbol': 'DASH/JPY', 'base': 'DASH', 'quote': 'JPY', 'baseId': 'dash', 'quoteId': 'jpy' },
|
||||
// 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' },
|
||||
// 'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
// 'LSK/BTC': { 'id': 'lsk_btc', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC', 'baseId': 'lsk', 'quoteId': 'btc' },
|
||||
// 'FCT/BTC': { 'id': 'fct_btc', 'symbol': 'FCT/BTC', 'base': 'FCT', 'quote': 'BTC', 'baseId': 'fct', 'quoteId': 'btc' },
|
||||
// 'XMR/BTC': { 'id': 'xmr_btc', 'symbol': 'XMR/BTC', 'base': 'XMR', 'quote': 'BTC', 'baseId': 'xmr', 'quoteId': 'btc' },
|
||||
@@ -50827,11 +50897,12 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchOrderBook (symbol, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchOrderBook () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const response = await this.publicGetOrderBooks (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const response = await this.publicGetOrderBooks (this.extend (request, params));
|
||||
return this.parseOrderBook (response);
|
||||
}
|
||||
|
||||
@@ -50840,7 +50911,11 @@ module.exports = class coincheck extends Exchange {
|
||||
throw new BadSymbol (this.id + ' fetchTicker () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const ticker = await this.publicGetTicker (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const ticker = await this.publicGetTicker (this.extend (request, params));
|
||||
const timestamp = this.safeTimestamp (ticker, 'timestamp');
|
||||
const last = this.safeFloat (ticker, 'last');
|
||||
return {
|
||||
@@ -50954,9 +51029,6 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchTrades () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
@@ -70802,6 +70874,8 @@ module.exports = class ftx extends Exchange {
|
||||
'Missing parameter price': InvalidOrder, // {"error":"Missing parameter price","success":false}
|
||||
'Order not found': OrderNotFound, // {"error":"Order not found","success":false}
|
||||
'Order already closed': InvalidOrder, // {"error":"Order already closed","success":false}
|
||||
'Trigger price too high': InvalidOrder, // {"error":"Trigger price too high","success":false}
|
||||
'Trigger price too low': InvalidOrder, // {"error":"Trigger price too low","success":false}
|
||||
'Order already queued for cancellation': CancelPending, // {"error":"Order already queued for cancellation","success":false}
|
||||
},
|
||||
'broad': {
|
||||
@@ -77728,6 +77802,10 @@ module.exports = class hitbtc extends Exchange {
|
||||
},
|
||||
'urls': {
|
||||
'logo': 'https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg',
|
||||
'test': {
|
||||
'public': 'https://api.demo.hitbtc.com',
|
||||
'private': 'https://api.demo.hitbtc.com',
|
||||
},
|
||||
'api': {
|
||||
'public': 'https://api.hitbtc.com',
|
||||
'private': 'https://api.hitbtc.com',
|
||||
@@ -82899,16 +82977,8 @@ module.exports = class idex extends Exchange {
|
||||
const type = this.safeString (order, 'type');
|
||||
const amount = this.safeFloat (order, 'originalQuantity');
|
||||
const filled = this.safeFloat (order, 'executedQuantity');
|
||||
let remaining = undefined;
|
||||
if ((amount !== undefined) && (filled !== undefined)) {
|
||||
remaining = amount - filled;
|
||||
}
|
||||
const average = this.safeFloat (order, 'avgExecutionPrice');
|
||||
const price = this.safeFloat (order, 'price', average); // for market orders
|
||||
let cost = undefined;
|
||||
if ((amount !== undefined) && (price !== undefined)) {
|
||||
cost = amount * price;
|
||||
}
|
||||
const price = this.safeFloat (order, 'price');
|
||||
const rawStatus = this.safeString (order, 'status');
|
||||
const status = this.parseOrderStatus (rawStatus);
|
||||
const fee = {
|
||||
@@ -82922,7 +82992,7 @@ module.exports = class idex extends Exchange {
|
||||
fee['cost'] = this.sum (fee['cost'], lastTrade['fee']['cost']);
|
||||
}
|
||||
const lastTradeTimestamp = this.safeInteger (lastTrade, 'timestamp');
|
||||
return {
|
||||
return this.safeOrder ({
|
||||
'info': order,
|
||||
'id': id,
|
||||
'clientOrderId': clientOrderId,
|
||||
@@ -82937,14 +83007,14 @@ module.exports = class idex extends Exchange {
|
||||
'price': price,
|
||||
'stopPrice': undefined,
|
||||
'amount': amount,
|
||||
'cost': cost,
|
||||
'cost': undefined,
|
||||
'average': average,
|
||||
'filled': filled,
|
||||
'remaining': remaining,
|
||||
'remaining': undefined,
|
||||
'status': status,
|
||||
'fee': fee,
|
||||
'trades': trades,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async associateWallet (walletAddress, params = {}) {
|
||||
@@ -92726,15 +92796,16 @@ module.exports = class luno extends Exchange {
|
||||
if (type === 'market') {
|
||||
method += 'Marketorder';
|
||||
request['type'] = side.toUpperCase ();
|
||||
// todo add createMarketBuyOrderRequires price logic as it is implemented in the other exchanges
|
||||
if (side === 'buy') {
|
||||
request['counter_volume'] = amount;
|
||||
request['counter_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
} else {
|
||||
request['base_volume'] = amount;
|
||||
request['base_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
}
|
||||
} else {
|
||||
method += 'Postorder';
|
||||
request['volume'] = amount;
|
||||
request['price'] = price;
|
||||
request['volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
request['price'] = parseFloat (this.priceToPrecision (symbol, price));
|
||||
request['type'] = (side === 'buy') ? 'BID' : 'ASK';
|
||||
}
|
||||
const response = await this[method] (this.extend (request, params));
|
||||
@@ -135007,7 +135078,7 @@ module.exports = class timex extends Exchange {
|
||||
'symbol': market['id'],
|
||||
'quantity': this.amountToPrecision (symbol, amount),
|
||||
'side': uppercaseSide,
|
||||
'type': uppercaseType,
|
||||
'orderTypes': uppercaseType,
|
||||
// 'clientOrderId': '123',
|
||||
// 'expireIn': 1575523308, // in seconds
|
||||
// 'expireTime': 1575523308, // unix timestamp
|
||||
|
||||
Generated
Vendored
+70
-1
@@ -1392,5 +1392,74 @@ module.exports = class Exchange {
|
||||
integerPow (a, b) {
|
||||
return new BN (a).pow (new BN (b))
|
||||
}
|
||||
}
|
||||
|
||||
safeOrder (order) {
|
||||
// Cost
|
||||
// Remaining
|
||||
// Average
|
||||
// Price
|
||||
// Amount
|
||||
// Filled
|
||||
//
|
||||
// First we try to calculate filled from the trades
|
||||
const parseFilled = order['filled'] === undefined;
|
||||
const parseCost = order['cost'] === undefined;
|
||||
if (parseFilled) {
|
||||
order['filled'] = 0
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = 0
|
||||
}
|
||||
if (parseFilled || parseCost) {
|
||||
if (Array.isArray (order['trades'])) {
|
||||
for (let i = 0; i < order['trades'].length; i++) {
|
||||
const trade = order['trades'][i]
|
||||
if (parseFilled) {
|
||||
order['filled'] = this.sum (order['filled'], trade['amount'])
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = this.sum (order['cost'], trade['cost'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// We ensure amount = filled + remaining
|
||||
if (order['amount'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['amount'] = this.sum (order['filled'], order['remaining'])
|
||||
}
|
||||
}
|
||||
if (order['filled'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0)
|
||||
}
|
||||
}
|
||||
if (order['remaining'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['filled'] !== undefined) {
|
||||
order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0)
|
||||
}
|
||||
}
|
||||
// We ensure that the average field is calculated correctly
|
||||
if (order['average'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['cost'] !== undefined && order['cost'] > 0) {
|
||||
order['average'] = order['filled'] / order['cost']
|
||||
}
|
||||
}
|
||||
// We also ensure the cost field is calculated correctly
|
||||
const costPriceExists = (order['average'] !== undefined) || (order['price'] !== undefined)
|
||||
if ((order['filled'] !== undefined) && costPriceExists) {
|
||||
let costPrice = undefined;
|
||||
if (order['average'] === undefined) {
|
||||
costPrice = order['price']
|
||||
} else {
|
||||
costPrice = order['average']
|
||||
}
|
||||
order['cost'] = costPrice * order['filled']
|
||||
}
|
||||
// We add support for market orders
|
||||
if (order['price'] === undefined && order['type'] === 'market') {
|
||||
order['price'] = order['average']
|
||||
}
|
||||
return order
|
||||
}
|
||||
}
|
||||
Generated
Vendored
+14
-11
@@ -81,10 +81,11 @@ module.exports = class coincheck extends Exchange {
|
||||
'markets': {
|
||||
'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, // the only real pair
|
||||
// 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' },
|
||||
// 'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
// 'DAO/JPY': { 'id': 'dao_jpy', 'symbol': 'DAO/JPY', 'base': 'DAO', 'quote': 'JPY', 'baseId': 'dao', 'quoteId': 'jpy' },
|
||||
// 'LSK/JPY': { 'id': 'lsk_jpy', 'symbol': 'LSK/JPY', 'base': 'LSK', 'quote': 'JPY', 'baseId': 'lsk', 'quoteId': 'jpy' },
|
||||
// 'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' },
|
||||
// 'XMR/JPY': { 'id': 'xmr_jpy', 'symbol': 'XMR/JPY', 'base': 'XMR', 'quote': 'JPY', 'baseId': 'xmr', 'quoteId': 'jpy' },
|
||||
// 'REP/JPY': { 'id': 'rep_jpy', 'symbol': 'REP/JPY', 'base': 'REP', 'quote': 'JPY', 'baseId': 'rep', 'quoteId': 'jpy' },
|
||||
// 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' },
|
||||
@@ -93,7 +94,7 @@ module.exports = class coincheck extends Exchange {
|
||||
// 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' },
|
||||
// 'DASH/JPY': { 'id': 'dash_jpy', 'symbol': 'DASH/JPY', 'base': 'DASH', 'quote': 'JPY', 'baseId': 'dash', 'quoteId': 'jpy' },
|
||||
// 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' },
|
||||
// 'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
// 'LSK/BTC': { 'id': 'lsk_btc', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC', 'baseId': 'lsk', 'quoteId': 'btc' },
|
||||
// 'FCT/BTC': { 'id': 'fct_btc', 'symbol': 'FCT/BTC', 'base': 'FCT', 'quote': 'BTC', 'baseId': 'fct', 'quoteId': 'btc' },
|
||||
// 'XMR/BTC': { 'id': 'xmr_btc', 'symbol': 'XMR/BTC', 'base': 'XMR', 'quote': 'BTC', 'baseId': 'xmr', 'quoteId': 'btc' },
|
||||
@@ -211,11 +212,12 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchOrderBook (symbol, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchOrderBook () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const response = await this.publicGetOrderBooks (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const response = await this.publicGetOrderBooks (this.extend (request, params));
|
||||
return this.parseOrderBook (response);
|
||||
}
|
||||
|
||||
@@ -224,7 +226,11 @@ module.exports = class coincheck extends Exchange {
|
||||
throw new BadSymbol (this.id + ' fetchTicker () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const ticker = await this.publicGetTicker (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const ticker = await this.publicGetTicker (this.extend (request, params));
|
||||
const timestamp = this.safeTimestamp (ticker, 'timestamp');
|
||||
const last = this.safeFloat (ticker, 'last');
|
||||
return {
|
||||
@@ -338,9 +344,6 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchTrades () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
|
||||
Generated
Vendored
+2
@@ -229,6 +229,8 @@ module.exports = class ftx extends Exchange {
|
||||
'Missing parameter price': InvalidOrder, // {"error":"Missing parameter price","success":false}
|
||||
'Order not found': OrderNotFound, // {"error":"Order not found","success":false}
|
||||
'Order already closed': InvalidOrder, // {"error":"Order already closed","success":false}
|
||||
'Trigger price too high': InvalidOrder, // {"error":"Trigger price too high","success":false}
|
||||
'Trigger price too low': InvalidOrder, // {"error":"Trigger price too low","success":false}
|
||||
'Order already queued for cancellation': CancelPending, // {"error":"Order already queued for cancellation","success":false}
|
||||
},
|
||||
'broad': {
|
||||
|
||||
Generated
Vendored
+4
@@ -59,6 +59,10 @@ module.exports = class hitbtc extends Exchange {
|
||||
},
|
||||
'urls': {
|
||||
'logo': 'https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg',
|
||||
'test': {
|
||||
'public': 'https://api.demo.hitbtc.com',
|
||||
'private': 'https://api.demo.hitbtc.com',
|
||||
},
|
||||
'api': {
|
||||
'public': 'https://api.hitbtc.com',
|
||||
'private': 'https://api.hitbtc.com',
|
||||
|
||||
Generated
Vendored
+5
-13
@@ -823,16 +823,8 @@ module.exports = class idex extends Exchange {
|
||||
const type = this.safeString (order, 'type');
|
||||
const amount = this.safeFloat (order, 'originalQuantity');
|
||||
const filled = this.safeFloat (order, 'executedQuantity');
|
||||
let remaining = undefined;
|
||||
if ((amount !== undefined) && (filled !== undefined)) {
|
||||
remaining = amount - filled;
|
||||
}
|
||||
const average = this.safeFloat (order, 'avgExecutionPrice');
|
||||
const price = this.safeFloat (order, 'price', average); // for market orders
|
||||
let cost = undefined;
|
||||
if ((amount !== undefined) && (price !== undefined)) {
|
||||
cost = amount * price;
|
||||
}
|
||||
const price = this.safeFloat (order, 'price');
|
||||
const rawStatus = this.safeString (order, 'status');
|
||||
const status = this.parseOrderStatus (rawStatus);
|
||||
const fee = {
|
||||
@@ -846,7 +838,7 @@ module.exports = class idex extends Exchange {
|
||||
fee['cost'] = this.sum (fee['cost'], lastTrade['fee']['cost']);
|
||||
}
|
||||
const lastTradeTimestamp = this.safeInteger (lastTrade, 'timestamp');
|
||||
return {
|
||||
return this.safeOrder ({
|
||||
'info': order,
|
||||
'id': id,
|
||||
'clientOrderId': clientOrderId,
|
||||
@@ -861,14 +853,14 @@ module.exports = class idex extends Exchange {
|
||||
'price': price,
|
||||
'stopPrice': undefined,
|
||||
'amount': amount,
|
||||
'cost': cost,
|
||||
'cost': undefined,
|
||||
'average': average,
|
||||
'filled': filled,
|
||||
'remaining': remaining,
|
||||
'remaining': undefined,
|
||||
'status': status,
|
||||
'fee': fee,
|
||||
'trades': trades,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async associateWallet (walletAddress, params = {}) {
|
||||
|
||||
Generated
Vendored
+5
-4
@@ -526,15 +526,16 @@ module.exports = class luno extends Exchange {
|
||||
if (type === 'market') {
|
||||
method += 'Marketorder';
|
||||
request['type'] = side.toUpperCase ();
|
||||
// todo add createMarketBuyOrderRequires price logic as it is implemented in the other exchanges
|
||||
if (side === 'buy') {
|
||||
request['counter_volume'] = amount;
|
||||
request['counter_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
} else {
|
||||
request['base_volume'] = amount;
|
||||
request['base_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
}
|
||||
} else {
|
||||
method += 'Postorder';
|
||||
request['volume'] = amount;
|
||||
request['price'] = price;
|
||||
request['volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
request['price'] = parseFloat (this.priceToPrecision (symbol, price));
|
||||
request['type'] = (side === 'buy') ? 'BID' : 'ASK';
|
||||
}
|
||||
const response = await this[method] (this.extend (request, params));
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -466,7 +466,7 @@ module.exports = class timex extends Exchange {
|
||||
'symbol': market['id'],
|
||||
'quantity': this.amountToPrecision (symbol, amount),
|
||||
'side': uppercaseSide,
|
||||
'type': uppercaseType,
|
||||
'orderTypes': uppercaseType,
|
||||
// 'clientOrderId': '123',
|
||||
// 'expireIn': 1575523308, // in seconds
|
||||
// 'expireTime': 1575523308, // unix timestamp
|
||||
|
||||
Generated
Vendored
+10
-10
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "ccxt@1.42.67",
|
||||
"_id": "ccxt@1.42.67",
|
||||
"_from": "ccxt@1.42.77",
|
||||
"_id": "ccxt@1.42.77",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-AOq5kwJpPVHHQC+V1Nh/Ab7/sP0UGfjZ49pF2kP/lW68gtP6XTFA4J/O76UYFHbfzBgwQJHzH3IkMIC1PG96Cw==",
|
||||
"_integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==",
|
||||
"_location": "/ccxt",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ccxt@1.42.67",
|
||||
"raw": "ccxt@1.42.77",
|
||||
"name": "ccxt",
|
||||
"escapedName": "ccxt",
|
||||
"rawSpec": "1.42.67",
|
||||
"rawSpec": "1.42.77",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.42.67"
|
||||
"fetchSpec": "1.42.77"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.67.tgz",
|
||||
"_shasum": "3032fa256d75891af2834f0c5777012ab155cf6f",
|
||||
"_spec": "ccxt@1.42.67",
|
||||
"_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz",
|
||||
"_shasum": "8ab5f8e7190854e163da6d4fcf44530794d0a21c",
|
||||
"_spec": "ccxt@1.42.77",
|
||||
"_where": "C:\\Superalgos\\Projects\\Superalgos\\TS\\Bot-Modules\\Sensor-Bot\\Exchange-Raw-Data",
|
||||
"author": {
|
||||
"name": "Igor Kroitor",
|
||||
@@ -587,5 +587,5 @@
|
||||
},
|
||||
"types": "./ccxt.d.ts",
|
||||
"unpkg": "dist/ccxt.browser.js",
|
||||
"version": "1.42.67"
|
||||
"version": "1.42.77"
|
||||
}
|
||||
+3
-3
@@ -3,9 +3,9 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"ccxt": {
|
||||
"version": "1.42.67",
|
||||
"resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.67.tgz",
|
||||
"integrity": "sha512-AOq5kwJpPVHHQC+V1Nh/Ab7/sP0UGfjZ49pF2kP/lW68gtP6XTFA4J/O76UYFHbfzBgwQJHzH3IkMIC1PG96Cw=="
|
||||
"version": "1.42.77",
|
||||
"resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz",
|
||||
"integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
Vendored
+3
-3
@@ -229,13 +229,13 @@ console.log (ccxt.exchanges) // print all available exchanges
|
||||
|
||||
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
||||
|
||||
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.42.67/dist/ccxt.browser.js
|
||||
* unpkg: https://unpkg.com/ccxt@1.42.67/dist/ccxt.browser.js
|
||||
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.42.77/dist/ccxt.browser.js
|
||||
* unpkg: https://unpkg.com/ccxt@1.42.77/dist/ccxt.browser.js
|
||||
|
||||
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
||||
|
||||
```HTML
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.42.67/dist/ccxt.browser.js"></script>
|
||||
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@1.42.77/dist/ccxt.browser.js"></script>
|
||||
```
|
||||
|
||||
Creates a global `ccxt` object:
|
||||
|
||||
Generated
Vendored
+21
-3
@@ -1080,19 +1080,37 @@ class Transpiler {
|
||||
|
||||
// ========================================================================
|
||||
|
||||
exportTypeScriptDeclarations (file, classes) {
|
||||
exportTypeScriptClassNames (file, classes) {
|
||||
|
||||
log.bright.cyan ('Exporting TypeScript declarations →', file.yellow)
|
||||
log.bright.cyan ('Exporting TypeScript class names →', file.yellow)
|
||||
|
||||
const regex = /\/[\n]{2}(?: export class [^\s]+ extends [^\s]+ \{\}[\r]?[\n])+/
|
||||
const replacement = "/\n\n" + Object.keys (classes).map (className => {
|
||||
const baseClass = classes[className]
|
||||
const baseClass = classes[className].replace (/ccxt\.[a-z_]+/, 'Exchange')
|
||||
return ' export class ' + className + ' extends ' + baseClass + " {}"
|
||||
}).join ("\n") + "\n"
|
||||
|
||||
replaceInFile (file, regex, replacement)
|
||||
}
|
||||
|
||||
exportTypeScriptExchangeIds (file, classes) {
|
||||
|
||||
log.bright.cyan ('Exporting TypeScript exchange ids →', file.yellow)
|
||||
|
||||
const regex = /\/[\n]{2} export type ExchangeId =\n(?: \| \'[a-z0-9_]+\'[\r]?[\n])+/
|
||||
const replacement = "/\n\n export type ExchangeId =\n" + Object.keys (classes).map (className => {
|
||||
return " | '" + className + "'"
|
||||
}).join ("\n") + "\n"
|
||||
|
||||
replaceInFile (file, regex, replacement)
|
||||
}
|
||||
|
||||
exportTypeScriptDeclarations (file, classes) {
|
||||
|
||||
this.exportTypeScriptClassNames (file, classes)
|
||||
this.exportTypeScriptExchangeIds (file, classes)
|
||||
}
|
||||
|
||||
// ========================================================================
|
||||
|
||||
transpileErrorHierarchy () {
|
||||
|
||||
Generated
Vendored
+128
@@ -551,4 +551,132 @@ declare module 'ccxt' {
|
||||
|
||||
/* tslint:enable */
|
||||
|
||||
export type ExchangeId =
|
||||
| 'aax'
|
||||
| 'acx'
|
||||
| 'aofex'
|
||||
| 'bequant'
|
||||
| 'bibox'
|
||||
| 'bigone'
|
||||
| 'binance'
|
||||
| 'binanceus'
|
||||
| 'bit2c'
|
||||
| 'bitbank'
|
||||
| 'bitbay'
|
||||
| 'bitcoincom'
|
||||
| 'bitfinex'
|
||||
| 'bitfinex2'
|
||||
| 'bitflyer'
|
||||
| 'bitforex'
|
||||
| 'bitget'
|
||||
| 'bithumb'
|
||||
| 'bitkk'
|
||||
| 'bitmart'
|
||||
| 'bitmax'
|
||||
| 'bitmex'
|
||||
| 'bitpanda'
|
||||
| 'bitso'
|
||||
| 'bitstamp'
|
||||
| 'bitstamp1'
|
||||
| 'bittrex'
|
||||
| 'bitvavo'
|
||||
| 'bitz'
|
||||
| 'bl3p'
|
||||
| 'bleutrade'
|
||||
| 'braziliex'
|
||||
| 'btcalpha'
|
||||
| 'btcbox'
|
||||
| 'btcmarkets'
|
||||
| 'btctradeua'
|
||||
| 'btcturk'
|
||||
| 'buda'
|
||||
| 'bw'
|
||||
| 'bybit'
|
||||
| 'bytetrade'
|
||||
| 'cdax'
|
||||
| 'cex'
|
||||
| 'chilebit'
|
||||
| 'coinbase'
|
||||
| 'coinbaseprime'
|
||||
| 'coinbasepro'
|
||||
| 'coincheck'
|
||||
| 'coinegg'
|
||||
| 'coinex'
|
||||
| 'coinfalcon'
|
||||
| 'coinfloor'
|
||||
| 'coingi'
|
||||
| 'coinmarketcap'
|
||||
| 'coinmate'
|
||||
| 'coinone'
|
||||
| 'coinspot'
|
||||
| 'crex24'
|
||||
| 'currencycom'
|
||||
| 'delta'
|
||||
| 'deribit'
|
||||
| 'digifinex'
|
||||
| 'dsx'
|
||||
| 'equos'
|
||||
| 'eterbase'
|
||||
| 'exmo'
|
||||
| 'exx'
|
||||
| 'fcoin'
|
||||
| 'fcoinjp'
|
||||
| 'flowbtc'
|
||||
| 'foxbit'
|
||||
| 'ftx'
|
||||
| 'gateio'
|
||||
| 'gemini'
|
||||
| 'gopax'
|
||||
| 'hbtc'
|
||||
| 'hitbtc'
|
||||
| 'hollaex'
|
||||
| 'huobijp'
|
||||
| 'huobipro'
|
||||
| 'ice3x'
|
||||
| 'idex'
|
||||
| 'independentreserve'
|
||||
| 'indodax'
|
||||
| 'itbit'
|
||||
| 'kraken'
|
||||
| 'kucoin'
|
||||
| 'kuna'
|
||||
| 'lakebtc'
|
||||
| 'latoken'
|
||||
| 'lbank'
|
||||
| 'liquid'
|
||||
| 'luno'
|
||||
| 'lykke'
|
||||
| 'mercado'
|
||||
| 'mixcoins'
|
||||
| 'ndax'
|
||||
| 'novadax'
|
||||
| 'oceanex'
|
||||
| 'okcoin'
|
||||
| 'okex'
|
||||
| 'paymium'
|
||||
| 'phemex'
|
||||
| 'poloniex'
|
||||
| 'probit'
|
||||
| 'qtrade'
|
||||
| 'rightbtc'
|
||||
| 'ripio'
|
||||
| 'southxchange'
|
||||
| 'stex'
|
||||
| 'surbitcoin'
|
||||
| 'therock'
|
||||
| 'tidebit'
|
||||
| 'tidex'
|
||||
| 'timex'
|
||||
| 'upbit'
|
||||
| 'vaultoro'
|
||||
| 'vbtc'
|
||||
| 'vcc'
|
||||
| 'wavesexchange'
|
||||
| 'whitebit'
|
||||
| 'xbtce'
|
||||
| 'xena'
|
||||
| 'yobit'
|
||||
| 'zaif'
|
||||
| 'zb'
|
||||
|
||||
}
|
||||
Generated
Vendored
+1
-1
@@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange')
|
||||
//-----------------------------------------------------------------------------
|
||||
// this is updated by vss.js when building
|
||||
|
||||
const version = '1.42.67'
|
||||
const version = '1.42.77'
|
||||
|
||||
Exchange.ccxtVersion = version
|
||||
|
||||
|
||||
Generated
Vendored
+102
-31
@@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange')
|
||||
//-----------------------------------------------------------------------------
|
||||
// this is updated by vss.js when building
|
||||
|
||||
const version = '1.42.67'
|
||||
const version = '1.42.77'
|
||||
|
||||
Exchange.ccxtVersion = version
|
||||
|
||||
@@ -4956,8 +4956,77 @@ module.exports = class Exchange {
|
||||
integerPow (a, b) {
|
||||
return new BN (a).pow (new BN (b))
|
||||
}
|
||||
}
|
||||
|
||||
safeOrder (order) {
|
||||
// Cost
|
||||
// Remaining
|
||||
// Average
|
||||
// Price
|
||||
// Amount
|
||||
// Filled
|
||||
//
|
||||
// First we try to calculate filled from the trades
|
||||
const parseFilled = order['filled'] === undefined;
|
||||
const parseCost = order['cost'] === undefined;
|
||||
if (parseFilled) {
|
||||
order['filled'] = 0
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = 0
|
||||
}
|
||||
if (parseFilled || parseCost) {
|
||||
if (Array.isArray (order['trades'])) {
|
||||
for (let i = 0; i < order['trades'].length; i++) {
|
||||
const trade = order['trades'][i]
|
||||
if (parseFilled) {
|
||||
order['filled'] = this.sum (order['filled'], trade['amount'])
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = this.sum (order['cost'], trade['cost'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// We ensure amount = filled + remaining
|
||||
if (order['amount'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['amount'] = this.sum (order['filled'], order['remaining'])
|
||||
}
|
||||
}
|
||||
if (order['filled'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0)
|
||||
}
|
||||
}
|
||||
if (order['remaining'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['filled'] !== undefined) {
|
||||
order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0)
|
||||
}
|
||||
}
|
||||
// We ensure that the average field is calculated correctly
|
||||
if (order['average'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['cost'] !== undefined && order['cost'] > 0) {
|
||||
order['average'] = order['filled'] / order['cost']
|
||||
}
|
||||
}
|
||||
// We also ensure the cost field is calculated correctly
|
||||
const costPriceExists = (order['average'] !== undefined) || (order['price'] !== undefined)
|
||||
if ((order['filled'] !== undefined) && costPriceExists) {
|
||||
let costPrice = undefined;
|
||||
if (order['average'] === undefined) {
|
||||
costPrice = order['price']
|
||||
} else {
|
||||
costPrice = order['average']
|
||||
}
|
||||
order['cost'] = costPrice * order['filled']
|
||||
}
|
||||
// We add support for market orders
|
||||
if (order['price'] === undefined && order['type'] === 'market') {
|
||||
order['price'] = order['average']
|
||||
}
|
||||
return order
|
||||
}
|
||||
}
|
||||
|
||||
},{"../static_dependencies/BN/bn":126,"./errors":8,"./functions":9}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
@@ -50697,10 +50766,11 @@ module.exports = class coincheck extends Exchange {
|
||||
'markets': {
|
||||
'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, // the only real pair
|
||||
// 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' },
|
||||
// 'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
// 'DAO/JPY': { 'id': 'dao_jpy', 'symbol': 'DAO/JPY', 'base': 'DAO', 'quote': 'JPY', 'baseId': 'dao', 'quoteId': 'jpy' },
|
||||
// 'LSK/JPY': { 'id': 'lsk_jpy', 'symbol': 'LSK/JPY', 'base': 'LSK', 'quote': 'JPY', 'baseId': 'lsk', 'quoteId': 'jpy' },
|
||||
// 'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' },
|
||||
// 'XMR/JPY': { 'id': 'xmr_jpy', 'symbol': 'XMR/JPY', 'base': 'XMR', 'quote': 'JPY', 'baseId': 'xmr', 'quoteId': 'jpy' },
|
||||
// 'REP/JPY': { 'id': 'rep_jpy', 'symbol': 'REP/JPY', 'base': 'REP', 'quote': 'JPY', 'baseId': 'rep', 'quoteId': 'jpy' },
|
||||
// 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' },
|
||||
@@ -50709,7 +50779,7 @@ module.exports = class coincheck extends Exchange {
|
||||
// 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' },
|
||||
// 'DASH/JPY': { 'id': 'dash_jpy', 'symbol': 'DASH/JPY', 'base': 'DASH', 'quote': 'JPY', 'baseId': 'dash', 'quoteId': 'jpy' },
|
||||
// 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' },
|
||||
// 'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
// 'LSK/BTC': { 'id': 'lsk_btc', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC', 'baseId': 'lsk', 'quoteId': 'btc' },
|
||||
// 'FCT/BTC': { 'id': 'fct_btc', 'symbol': 'FCT/BTC', 'base': 'FCT', 'quote': 'BTC', 'baseId': 'fct', 'quoteId': 'btc' },
|
||||
// 'XMR/BTC': { 'id': 'xmr_btc', 'symbol': 'XMR/BTC', 'base': 'XMR', 'quote': 'BTC', 'baseId': 'xmr', 'quoteId': 'btc' },
|
||||
@@ -50827,11 +50897,12 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchOrderBook (symbol, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchOrderBook () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const response = await this.publicGetOrderBooks (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const response = await this.publicGetOrderBooks (this.extend (request, params));
|
||||
return this.parseOrderBook (response);
|
||||
}
|
||||
|
||||
@@ -50840,7 +50911,11 @@ module.exports = class coincheck extends Exchange {
|
||||
throw new BadSymbol (this.id + ' fetchTicker () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const ticker = await this.publicGetTicker (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const ticker = await this.publicGetTicker (this.extend (request, params));
|
||||
const timestamp = this.safeTimestamp (ticker, 'timestamp');
|
||||
const last = this.safeFloat (ticker, 'last');
|
||||
return {
|
||||
@@ -50954,9 +51029,6 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchTrades () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
@@ -70802,6 +70874,8 @@ module.exports = class ftx extends Exchange {
|
||||
'Missing parameter price': InvalidOrder, // {"error":"Missing parameter price","success":false}
|
||||
'Order not found': OrderNotFound, // {"error":"Order not found","success":false}
|
||||
'Order already closed': InvalidOrder, // {"error":"Order already closed","success":false}
|
||||
'Trigger price too high': InvalidOrder, // {"error":"Trigger price too high","success":false}
|
||||
'Trigger price too low': InvalidOrder, // {"error":"Trigger price too low","success":false}
|
||||
'Order already queued for cancellation': CancelPending, // {"error":"Order already queued for cancellation","success":false}
|
||||
},
|
||||
'broad': {
|
||||
@@ -77728,6 +77802,10 @@ module.exports = class hitbtc extends Exchange {
|
||||
},
|
||||
'urls': {
|
||||
'logo': 'https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg',
|
||||
'test': {
|
||||
'public': 'https://api.demo.hitbtc.com',
|
||||
'private': 'https://api.demo.hitbtc.com',
|
||||
},
|
||||
'api': {
|
||||
'public': 'https://api.hitbtc.com',
|
||||
'private': 'https://api.hitbtc.com',
|
||||
@@ -82899,16 +82977,8 @@ module.exports = class idex extends Exchange {
|
||||
const type = this.safeString (order, 'type');
|
||||
const amount = this.safeFloat (order, 'originalQuantity');
|
||||
const filled = this.safeFloat (order, 'executedQuantity');
|
||||
let remaining = undefined;
|
||||
if ((amount !== undefined) && (filled !== undefined)) {
|
||||
remaining = amount - filled;
|
||||
}
|
||||
const average = this.safeFloat (order, 'avgExecutionPrice');
|
||||
const price = this.safeFloat (order, 'price', average); // for market orders
|
||||
let cost = undefined;
|
||||
if ((amount !== undefined) && (price !== undefined)) {
|
||||
cost = amount * price;
|
||||
}
|
||||
const price = this.safeFloat (order, 'price');
|
||||
const rawStatus = this.safeString (order, 'status');
|
||||
const status = this.parseOrderStatus (rawStatus);
|
||||
const fee = {
|
||||
@@ -82922,7 +82992,7 @@ module.exports = class idex extends Exchange {
|
||||
fee['cost'] = this.sum (fee['cost'], lastTrade['fee']['cost']);
|
||||
}
|
||||
const lastTradeTimestamp = this.safeInteger (lastTrade, 'timestamp');
|
||||
return {
|
||||
return this.safeOrder ({
|
||||
'info': order,
|
||||
'id': id,
|
||||
'clientOrderId': clientOrderId,
|
||||
@@ -82937,14 +83007,14 @@ module.exports = class idex extends Exchange {
|
||||
'price': price,
|
||||
'stopPrice': undefined,
|
||||
'amount': amount,
|
||||
'cost': cost,
|
||||
'cost': undefined,
|
||||
'average': average,
|
||||
'filled': filled,
|
||||
'remaining': remaining,
|
||||
'remaining': undefined,
|
||||
'status': status,
|
||||
'fee': fee,
|
||||
'trades': trades,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async associateWallet (walletAddress, params = {}) {
|
||||
@@ -92726,15 +92796,16 @@ module.exports = class luno extends Exchange {
|
||||
if (type === 'market') {
|
||||
method += 'Marketorder';
|
||||
request['type'] = side.toUpperCase ();
|
||||
// todo add createMarketBuyOrderRequires price logic as it is implemented in the other exchanges
|
||||
if (side === 'buy') {
|
||||
request['counter_volume'] = amount;
|
||||
request['counter_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
} else {
|
||||
request['base_volume'] = amount;
|
||||
request['base_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
}
|
||||
} else {
|
||||
method += 'Postorder';
|
||||
request['volume'] = amount;
|
||||
request['price'] = price;
|
||||
request['volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
request['price'] = parseFloat (this.priceToPrecision (symbol, price));
|
||||
request['type'] = (side === 'buy') ? 'BID' : 'ASK';
|
||||
}
|
||||
const response = await this[method] (this.extend (request, params));
|
||||
@@ -135007,7 +135078,7 @@ module.exports = class timex extends Exchange {
|
||||
'symbol': market['id'],
|
||||
'quantity': this.amountToPrecision (symbol, amount),
|
||||
'side': uppercaseSide,
|
||||
'type': uppercaseType,
|
||||
'orderTypes': uppercaseType,
|
||||
// 'clientOrderId': '123',
|
||||
// 'expireIn': 1575523308, // in seconds
|
||||
// 'expireTime': 1575523308, // unix timestamp
|
||||
|
||||
Generated
Vendored
+70
-1
@@ -1392,5 +1392,74 @@ module.exports = class Exchange {
|
||||
integerPow (a, b) {
|
||||
return new BN (a).pow (new BN (b))
|
||||
}
|
||||
}
|
||||
|
||||
safeOrder (order) {
|
||||
// Cost
|
||||
// Remaining
|
||||
// Average
|
||||
// Price
|
||||
// Amount
|
||||
// Filled
|
||||
//
|
||||
// First we try to calculate filled from the trades
|
||||
const parseFilled = order['filled'] === undefined;
|
||||
const parseCost = order['cost'] === undefined;
|
||||
if (parseFilled) {
|
||||
order['filled'] = 0
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = 0
|
||||
}
|
||||
if (parseFilled || parseCost) {
|
||||
if (Array.isArray (order['trades'])) {
|
||||
for (let i = 0; i < order['trades'].length; i++) {
|
||||
const trade = order['trades'][i]
|
||||
if (parseFilled) {
|
||||
order['filled'] = this.sum (order['filled'], trade['amount'])
|
||||
}
|
||||
if (parseCost) {
|
||||
order['cost'] = this.sum (order['cost'], trade['cost'])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// We ensure amount = filled + remaining
|
||||
if (order['amount'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['amount'] = this.sum (order['filled'], order['remaining'])
|
||||
}
|
||||
}
|
||||
if (order['filled'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['remaining'] !== undefined) {
|
||||
order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0)
|
||||
}
|
||||
}
|
||||
if (order['remaining'] === undefined) {
|
||||
if (order['amount'] !== undefined && order['filled'] !== undefined) {
|
||||
order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0)
|
||||
}
|
||||
}
|
||||
// We ensure that the average field is calculated correctly
|
||||
if (order['average'] === undefined) {
|
||||
if (order['filled'] !== undefined && order['cost'] !== undefined && order['cost'] > 0) {
|
||||
order['average'] = order['filled'] / order['cost']
|
||||
}
|
||||
}
|
||||
// We also ensure the cost field is calculated correctly
|
||||
const costPriceExists = (order['average'] !== undefined) || (order['price'] !== undefined)
|
||||
if ((order['filled'] !== undefined) && costPriceExists) {
|
||||
let costPrice = undefined;
|
||||
if (order['average'] === undefined) {
|
||||
costPrice = order['price']
|
||||
} else {
|
||||
costPrice = order['average']
|
||||
}
|
||||
order['cost'] = costPrice * order['filled']
|
||||
}
|
||||
// We add support for market orders
|
||||
if (order['price'] === undefined && order['type'] === 'market') {
|
||||
order['price'] = order['average']
|
||||
}
|
||||
return order
|
||||
}
|
||||
}
|
||||
Generated
Vendored
+14
-11
@@ -81,10 +81,11 @@ module.exports = class coincheck extends Exchange {
|
||||
'markets': {
|
||||
'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, // the only real pair
|
||||
// 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' },
|
||||
// 'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
'ETC/JPY': { 'id': 'etc_jpy', 'symbol': 'ETC/JPY', 'base': 'ETC', 'quote': 'JPY', 'baseId': 'etc', 'quoteId': 'jpy' },
|
||||
// 'DAO/JPY': { 'id': 'dao_jpy', 'symbol': 'DAO/JPY', 'base': 'DAO', 'quote': 'JPY', 'baseId': 'dao', 'quoteId': 'jpy' },
|
||||
// 'LSK/JPY': { 'id': 'lsk_jpy', 'symbol': 'LSK/JPY', 'base': 'LSK', 'quote': 'JPY', 'baseId': 'lsk', 'quoteId': 'jpy' },
|
||||
// 'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'FCT/JPY': { 'id': 'fct_jpy', 'symbol': 'FCT/JPY', 'base': 'FCT', 'quote': 'JPY', 'baseId': 'fct', 'quoteId': 'jpy' },
|
||||
'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' },
|
||||
// 'XMR/JPY': { 'id': 'xmr_jpy', 'symbol': 'XMR/JPY', 'base': 'XMR', 'quote': 'JPY', 'baseId': 'xmr', 'quoteId': 'jpy' },
|
||||
// 'REP/JPY': { 'id': 'rep_jpy', 'symbol': 'REP/JPY', 'base': 'REP', 'quote': 'JPY', 'baseId': 'rep', 'quoteId': 'jpy' },
|
||||
// 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' },
|
||||
@@ -93,7 +94,7 @@ module.exports = class coincheck extends Exchange {
|
||||
// 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' },
|
||||
// 'DASH/JPY': { 'id': 'dash_jpy', 'symbol': 'DASH/JPY', 'base': 'DASH', 'quote': 'JPY', 'baseId': 'dash', 'quoteId': 'jpy' },
|
||||
// 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' },
|
||||
// 'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
'ETC/BTC': { 'id': 'etc_btc', 'symbol': 'ETC/BTC', 'base': 'ETC', 'quote': 'BTC', 'baseId': 'etc', 'quoteId': 'btc' },
|
||||
// 'LSK/BTC': { 'id': 'lsk_btc', 'symbol': 'LSK/BTC', 'base': 'LSK', 'quote': 'BTC', 'baseId': 'lsk', 'quoteId': 'btc' },
|
||||
// 'FCT/BTC': { 'id': 'fct_btc', 'symbol': 'FCT/BTC', 'base': 'FCT', 'quote': 'BTC', 'baseId': 'fct', 'quoteId': 'btc' },
|
||||
// 'XMR/BTC': { 'id': 'xmr_btc', 'symbol': 'XMR/BTC', 'base': 'XMR', 'quote': 'BTC', 'baseId': 'xmr', 'quoteId': 'btc' },
|
||||
@@ -211,11 +212,12 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchOrderBook (symbol, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchOrderBook () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const response = await this.publicGetOrderBooks (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const response = await this.publicGetOrderBooks (this.extend (request, params));
|
||||
return this.parseOrderBook (response);
|
||||
}
|
||||
|
||||
@@ -224,7 +226,11 @@ module.exports = class coincheck extends Exchange {
|
||||
throw new BadSymbol (this.id + ' fetchTicker () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const ticker = await this.publicGetTicker (params);
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
'pair': market['id'],
|
||||
};
|
||||
const ticker = await this.publicGetTicker (this.extend (request, params));
|
||||
const timestamp = this.safeTimestamp (ticker, 'timestamp');
|
||||
const last = this.safeFloat (ticker, 'last');
|
||||
return {
|
||||
@@ -338,9 +344,6 @@ module.exports = class coincheck extends Exchange {
|
||||
}
|
||||
|
||||
async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) {
|
||||
if (symbol !== 'BTC/JPY') {
|
||||
throw new BadSymbol (this.id + ' fetchTrades () supports BTC/JPY only');
|
||||
}
|
||||
await this.loadMarkets ();
|
||||
const market = this.market (symbol);
|
||||
const request = {
|
||||
|
||||
Generated
Vendored
+2
@@ -229,6 +229,8 @@ module.exports = class ftx extends Exchange {
|
||||
'Missing parameter price': InvalidOrder, // {"error":"Missing parameter price","success":false}
|
||||
'Order not found': OrderNotFound, // {"error":"Order not found","success":false}
|
||||
'Order already closed': InvalidOrder, // {"error":"Order already closed","success":false}
|
||||
'Trigger price too high': InvalidOrder, // {"error":"Trigger price too high","success":false}
|
||||
'Trigger price too low': InvalidOrder, // {"error":"Trigger price too low","success":false}
|
||||
'Order already queued for cancellation': CancelPending, // {"error":"Order already queued for cancellation","success":false}
|
||||
},
|
||||
'broad': {
|
||||
|
||||
Generated
Vendored
+4
@@ -59,6 +59,10 @@ module.exports = class hitbtc extends Exchange {
|
||||
},
|
||||
'urls': {
|
||||
'logo': 'https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg',
|
||||
'test': {
|
||||
'public': 'https://api.demo.hitbtc.com',
|
||||
'private': 'https://api.demo.hitbtc.com',
|
||||
},
|
||||
'api': {
|
||||
'public': 'https://api.hitbtc.com',
|
||||
'private': 'https://api.hitbtc.com',
|
||||
|
||||
Generated
Vendored
+5
-13
@@ -823,16 +823,8 @@ module.exports = class idex extends Exchange {
|
||||
const type = this.safeString (order, 'type');
|
||||
const amount = this.safeFloat (order, 'originalQuantity');
|
||||
const filled = this.safeFloat (order, 'executedQuantity');
|
||||
let remaining = undefined;
|
||||
if ((amount !== undefined) && (filled !== undefined)) {
|
||||
remaining = amount - filled;
|
||||
}
|
||||
const average = this.safeFloat (order, 'avgExecutionPrice');
|
||||
const price = this.safeFloat (order, 'price', average); // for market orders
|
||||
let cost = undefined;
|
||||
if ((amount !== undefined) && (price !== undefined)) {
|
||||
cost = amount * price;
|
||||
}
|
||||
const price = this.safeFloat (order, 'price');
|
||||
const rawStatus = this.safeString (order, 'status');
|
||||
const status = this.parseOrderStatus (rawStatus);
|
||||
const fee = {
|
||||
@@ -846,7 +838,7 @@ module.exports = class idex extends Exchange {
|
||||
fee['cost'] = this.sum (fee['cost'], lastTrade['fee']['cost']);
|
||||
}
|
||||
const lastTradeTimestamp = this.safeInteger (lastTrade, 'timestamp');
|
||||
return {
|
||||
return this.safeOrder ({
|
||||
'info': order,
|
||||
'id': id,
|
||||
'clientOrderId': clientOrderId,
|
||||
@@ -861,14 +853,14 @@ module.exports = class idex extends Exchange {
|
||||
'price': price,
|
||||
'stopPrice': undefined,
|
||||
'amount': amount,
|
||||
'cost': cost,
|
||||
'cost': undefined,
|
||||
'average': average,
|
||||
'filled': filled,
|
||||
'remaining': remaining,
|
||||
'remaining': undefined,
|
||||
'status': status,
|
||||
'fee': fee,
|
||||
'trades': trades,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
async associateWallet (walletAddress, params = {}) {
|
||||
|
||||
Generated
Vendored
+5
-4
@@ -526,15 +526,16 @@ module.exports = class luno extends Exchange {
|
||||
if (type === 'market') {
|
||||
method += 'Marketorder';
|
||||
request['type'] = side.toUpperCase ();
|
||||
// todo add createMarketBuyOrderRequires price logic as it is implemented in the other exchanges
|
||||
if (side === 'buy') {
|
||||
request['counter_volume'] = amount;
|
||||
request['counter_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
} else {
|
||||
request['base_volume'] = amount;
|
||||
request['base_volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
}
|
||||
} else {
|
||||
method += 'Postorder';
|
||||
request['volume'] = amount;
|
||||
request['price'] = price;
|
||||
request['volume'] = parseFloat (this.amountToPrecision (symbol, amount));
|
||||
request['price'] = parseFloat (this.priceToPrecision (symbol, price));
|
||||
request['type'] = (side === 'buy') ? 'BID' : 'ASK';
|
||||
}
|
||||
const response = await this[method] (this.extend (request, params));
|
||||
|
||||
Generated
Vendored
+1
-1
@@ -466,7 +466,7 @@ module.exports = class timex extends Exchange {
|
||||
'symbol': market['id'],
|
||||
'quantity': this.amountToPrecision (symbol, amount),
|
||||
'side': uppercaseSide,
|
||||
'type': uppercaseType,
|
||||
'orderTypes': uppercaseType,
|
||||
// 'clientOrderId': '123',
|
||||
// 'expireIn': 1575523308, // in seconds
|
||||
// 'expireTime': 1575523308, // unix timestamp
|
||||
|
||||
Generated
Vendored
+10
-10
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"_from": "ccxt@1.42.67",
|
||||
"_id": "ccxt@1.42.67",
|
||||
"_from": "ccxt@1.42.77",
|
||||
"_id": "ccxt@1.42.77",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-AOq5kwJpPVHHQC+V1Nh/Ab7/sP0UGfjZ49pF2kP/lW68gtP6XTFA4J/O76UYFHbfzBgwQJHzH3IkMIC1PG96Cw==",
|
||||
"_integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==",
|
||||
"_location": "/ccxt",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "ccxt@1.42.67",
|
||||
"raw": "ccxt@1.42.77",
|
||||
"name": "ccxt",
|
||||
"escapedName": "ccxt",
|
||||
"rawSpec": "1.42.67",
|
||||
"rawSpec": "1.42.77",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.42.67"
|
||||
"fetchSpec": "1.42.77"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"#USER",
|
||||
"/"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.67.tgz",
|
||||
"_shasum": "3032fa256d75891af2834f0c5777012ab155cf6f",
|
||||
"_spec": "ccxt@1.42.67",
|
||||
"_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz",
|
||||
"_shasum": "8ab5f8e7190854e163da6d4fcf44530794d0a21c",
|
||||
"_spec": "ccxt@1.42.77",
|
||||
"_where": "C:\\Superalgos\\Projects\\Superalgos\\TS\\Bot-Modules\\Trading-Bot\\Low-Frequency-Trading\\APIs",
|
||||
"author": {
|
||||
"name": "Igor Kroitor",
|
||||
@@ -587,5 +587,5 @@
|
||||
},
|
||||
"types": "./ccxt.d.ts",
|
||||
"unpkg": "dist/ccxt.browser.js",
|
||||
"version": "1.42.67"
|
||||
"version": "1.42.77"
|
||||
}
|
||||
Generated
+3
-3
@@ -3,9 +3,9 @@
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"ccxt": {
|
||||
"version": "1.42.67",
|
||||
"resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.67.tgz",
|
||||
"integrity": "sha512-AOq5kwJpPVHHQC+V1Nh/Ab7/sP0UGfjZ49pF2kP/lW68gtP6XTFA4J/O76UYFHbfzBgwQJHzH3IkMIC1PG96Cw=="
|
||||
"version": "1.42.77",
|
||||
"resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz",
|
||||
"integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,6 +100,7 @@ function newSuperalgosFloatingSpace() {
|
||||
}
|
||||
},
|
||||
physics: true,
|
||||
detachUsingMouse: false
|
||||
}
|
||||
|
||||
return thisObject
|
||||
@@ -536,6 +537,9 @@ function newSuperalgosFloatingSpace() {
|
||||
if (configSettings.physics !== undefined) {
|
||||
thisObject.settings.physics = configSettings.physics
|
||||
}
|
||||
if (configSettings.detachUsingMouse !== undefined) {
|
||||
thisObject.settings.detachUsingMouse = configSettings.detachUsingMouse
|
||||
}
|
||||
}
|
||||
|
||||
function positionContraintsPhysics() {
|
||||
|
||||
@@ -560,6 +560,7 @@ function newUiObject() {
|
||||
function chainDetachingPhysics() {
|
||||
if (isDragging !== true) { return }
|
||||
if (rightDragging === false) { return }
|
||||
if (UI.projects.superalgos.spaces.floatingSpace.settings.detachUsingMouse !== true) {return}
|
||||
|
||||
let distanceToChainParent = Math.sqrt(Math.pow(thisObject.payload.position.x - thisObject.payload.targetPosition.x, 2) + Math.pow(thisObject.payload.position.y - thisObject.payload.targetPosition.y, 2))
|
||||
let ratio = distanceToChainParent / previousDistanceToChainParent
|
||||
@@ -665,6 +666,7 @@ function newUiObject() {
|
||||
if (thisObject.payload === undefined) { return }
|
||||
if (thisObject.payload.floatingObject.isFrozen === true) { return }
|
||||
if (rightDragging === false) { return }
|
||||
if (UI.projects.superalgos.spaces.floatingSpace.settings.detachUsingMouse !== true) {return}
|
||||
|
||||
if (thisObject.payload.referenceParent === undefined) { return }
|
||||
|
||||
|
||||
Reference in new issue
Block a user