diff --git a/Projects/Superalgos/Icons/Thumbs.db b/Projects/Superalgos/Icons/Thumbs.db index 88827d9e0..2fc679ef3 100644 Binary files a/Projects/Superalgos/Icons/Thumbs.db and b/Projects/Superalgos/Icons/Thumbs.db differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/arps-code-node.png b/Projects/Superalgos/PNGs/Docs/indicators/arps-code-node.png new file mode 100644 index 000000000..650dfcab1 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/arps-code-node.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/arps-slow-arps-fast.png b/Projects/Superalgos/PNGs/Docs/indicators/arps-slow-arps-fast.png new file mode 100644 index 000000000..7a6f0726c Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/arps-slow-arps-fast.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/arps-user-defined.png b/Projects/Superalgos/PNGs/Docs/indicators/arps-user-defined.png new file mode 100644 index 000000000..c3470a0b6 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/arps-user-defined.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-code-node.png b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-code-node.png new file mode 100644 index 000000000..5bbc092ff Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-code-node.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-user-defined.png b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-user-defined.png new file mode 100644 index 000000000..6847cca39 Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average-user-defined.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average.png b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average.png new file mode 100644 index 000000000..598b9febe Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/average-vs-average.png differ diff --git a/Projects/Superalgos/PNGs/Docs/indicators/chaikin-oscillator.png b/Projects/Superalgos/PNGs/Docs/indicators/chaikin-oscillator.png new file mode 100644 index 000000000..b0698665e Binary files /dev/null and b/Projects/Superalgos/PNGs/Docs/indicators/chaikin-oscillator.png differ diff --git a/Projects/Superalgos/Plugins/Data-Mines/Omega-One.json b/Projects/Superalgos/Plugins/Data-Mines/Omega-One.json new file mode 100644 index 000000000..c9f447b78 --- /dev/null +++ b/Projects/Superalgos/Plugins/Data-Mines/Omega-One.json @@ -0,0 +1 @@ +{"type":"Data Mine","name":"Omega One","config":"{\n \"codeName\": \"Omega-One\"\n}","project":"Superalgos","sensorBots":[],"indicatorBots":[{"type":"Indicator Bot","name":"Chaikin Oscillator","config":"{\n \"codeName\": \"Chaikin-Oscillator\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market Chaikin Oscillator","project":"Superalgos","id":"130f1639-b299-4ca8-96eb-25c8345e09e4","savedPayload":{"position":{"x":13957.729481237811,"y":17901.141979655422},"targetPosition":{"x":14015.96376638588,"y":18118.475290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"5b0389ae-3da9-4628-bc20-1041faef76be"}}}],"outputDatasetFolders":[],"id":"e54488da-6999-437b-8a2d-85709728bb02","savedPayload":{"position":{"x":14015.96376638588,"y":18118.475290570463},"targetPosition":{"x":14074.198051533947,"y":18335.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Chaikin Oscillator Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"1ff01e67-048e-4d80-a944-b1b86f21f42b","savedPayload":{"position":{"x":14143.886491396086,"y":17681.058769490315},"targetPosition":{"x":14190.666621830082,"y":17901.141979655422},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"3364b7b3-93c0-49e5-8ea2-c18fce0cec74"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"c4fcc40a-427d-4c69-90a9-76abdc87b857","savedPayload":{"position":{"x":14214.185526065303,"y":17677.374553197562},"targetPosition":{"x":14190.666621830082,"y":17901.141979655422},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"2cb0d0f1-a9dc-4791-9952-0878eeaa96bd","savedPayload":{"position":{"x":14282.182366522136,"y":17695.594251685838},"targetPosition":{"x":14190.666621830082,"y":17901.141979655422},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Market","project":"Superalgos","id":"6e898c07-cb2e-4589-bd33-9b3c6b585bae","savedPayload":{"position":{"x":14341.221008260825,"y":17733.93439392301},"targetPosition":{"x":14190.666621830082,"y":17901.141979655422},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"9bf0483c-4825-4a46-9cf4-1b5262579fc1"}}}],"dataMineDataDependencies":[],"id":"2ea98444-5707-42c3-a6d0-0c4d7cceec15","savedPayload":{"position":{"x":14190.666621830082,"y":17901.141979655422},"targetPosition":{"x":14074.198051533947,"y":18335.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"3364b7b3-93c0-49e5-8ea2-c18fce0cec74","savedPayload":{"position":{"x":14392.396103067893,"y":18017.610549951558},"targetPosition":{"x":14074.198051533947,"y":18335.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"4a247a06-dfc4-400b-a3b8-fa9d57847f6a","savedPayload":{"position":{"x":14291.531362448988,"y":18277.574316337435},"targetPosition":{"x":14074.198051533947,"y":18335.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"9d6d825e-c8cf-4d42-828c-62a1ba12bd32","savedPayload":{"position":{"x":14291.531362448988,"y":18394.04288663357},"targetPosition":{"x":14074.198051533947,"y":18335.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e51bc1f1-1063-4d69-9699-3952ad33a056","savedPayload":{"position":{"x":14074.198051533947,"y":18335.808601485503},"targetPosition":{"x":13756.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily Chaikin Oscillator","project":"Superalgos","id":"3d8886e0-c7a2-43aa-91c4-7698757a50e8","savedPayload":{"position":{"x":14656.000000000002,"y":17874.58378961345},"targetPosition":{"x":14431.000000000002,"y":18264.29522131645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"5ad27a57-7fbf-43fd-9945-6b42a0660108"}}}],"outputDatasetFolders":[],"id":"7ed09a77-8e5a-4f61-a182-ed93aa9e8037","savedPayload":{"position":{"x":14431.000000000002,"y":18264.29522131645},"targetPosition":{"x":14206.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Chaikin Oscillator Multi-Period-Daily","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"61339b0d-ee5d-4848-a59c-b3f6d5ecfc07","savedPayload":{"position":{"x":14820.711431703,"y":18039.29522131645},"targetPosition":{"x":14595.711431703,"y":18429.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"21243e1a-a52f-40f7-9087-483a49a574a8"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"b0e714a3-f496-407a-b1e5-b722df1b8e96","savedPayload":{"position":{"x":14913.909483236945,"y":18110.808601485503},"targetPosition":{"x":14595.711431703,"y":18429.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{\n \"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"7ddfb356-e8b3-4e49-9642-670f81d29b29","savedPayload":{"position":{"x":14985.422863405996,"y":18204.00665301945},"targetPosition":{"x":14595.711431703,"y":18429.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"3ed165f6-6c65-445f-b70a-70275435ffca","savedPayload":{"position":{"x":15030.37805353308,"y":18312.538082723313},"targetPosition":{"x":14595.711431703,"y":18429.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Daily","project":"Superalgos","id":"d9dc3be3-7565-4801-9d18-2b25380dcf87","savedPayload":{"position":{"x":15045.711431703,"y":18429.00665301945},"targetPosition":{"x":14595.711431703,"y":18429.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"2e683057-f911-4105-bc77-16f2706d1915"}}}],"dataMineDataDependencies":[],"id":"50b4b77b-7aae-4fb8-b147-4e77438e3278","savedPayload":{"position":{"x":14595.711431703,"y":18429.00665301945},"targetPosition":{"x":14206.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"21243e1a-a52f-40f7-9087-483a49a574a8","savedPayload":{"position":{"x":14656.000000000002,"y":18654.00665301945},"targetPosition":{"x":14206.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"124bcc91-61a1-40a1-a0b8-08179b8c16f6","savedPayload":{"position":{"x":14400.855715851501,"y":18766.50665301945},"targetPosition":{"x":14206.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"ffa4c8b2-81bc-4f09-a54b-7fc71543b8f5","savedPayload":{"position":{"x":14318.500000000002,"y":18848.86236887095},"targetPosition":{"x":14206.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"9c9a84d7-7bcf-4ffa-96db-a4a0b51d8e93","savedPayload":{"position":{"x":14206.000000000002,"y":18654.00665301945},"targetPosition":{"x":13756.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"Chaikin Oscillator","config":"{\n \"codeName\": \"chaikinOscillator\",\n \"singularVariableName\": \"chaikinOscillator\",\n \"pluralVariableName\": \"chaikinOscillators\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"5b0389ae-3da9-4628-bc20-1041faef76be","savedPayload":{"position":{"x":14264.438536534506,"y":18819.208347863343},"targetPosition":{"x":13968.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"5ad27a57-7fbf-43fd-9945-6b42a0660108","savedPayload":{"position":{"x":14235.433991612475,"y":19002.335837297276},"targetPosition":{"x":13968.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"3b204f99-f7d6-4d97-96f5-9e0f6cbc0558","savedPayload":{"position":{"x":14833.139338556775,"y":19494.60328091257},"targetPosition":{"x":14536.832836378235,"y":19447.672941400502},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cc3721e3-1409-4d80-8b1d-2d76ee03aefa","savedPayload":{"position":{"x":14536.832836378235,"y":19447.672941400502},"targetPosition":{"x":14240.526334199694,"y":19400.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"a7081fb9-9143-463f-8e64-270dda8190dc","savedPayload":{"position":{"x":14664.790402911622,"y":19825.00667060036},"targetPosition":{"x":14452.658368555658,"y":19612.874636244396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"128aca84-d3ff-45ec-a8d2-b1fd4e942274","savedPayload":{"position":{"x":14452.658368555658,"y":19612.874636244396},"targetPosition":{"x":14240.526334199694,"y":19400.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Chaikin Oscillator","config":"{\n \"codeName\": \"chaikinOscillator\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if ( isNaN(variable.chaikinOscillator ) )\n{ variable.chaikinOscillator = 0 }\nelse\n{ variable.chaikinOscillator }","project":"Superalgos","id":"eefbdfb1-b1b7-46c9-b283-f6de0dd556d1","savedPayload":{"position":{"x":14310.921843467799,"y":19845.202355156245},"targetPosition":{"x":14287.456673711764,"y":19697.049104066973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7f4e57b6-1d97-4902-8c5b-04d0ddaac1e6","savedPayload":{"position":{"x":14287.456673711764,"y":19697.049104066973},"targetPosition":{"x":14240.526334199694,"y":19400.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Zero Line","config":"{\n \"codeName\": \"zeroLine\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"0","project":"Superalgos","id":"45c55257-fc58-4b76-9310-6471ff58182a","savedPayload":{"position":{"x":14036.230609316899,"y":19801.695537773197},"targetPosition":{"x":14104.32918427783,"y":19668.044559144942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"3a6a9b74-37a9-48c4-956c-a6d6a5ae0080","savedPayload":{"position":{"x":14104.32918427783,"y":19668.044559144942},"targetPosition":{"x":14240.526334199694,"y":19400.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"28f4f675-6764-4e30-b797-0ea44a6dfa53","savedPayload":{"position":{"x":14240.526334199694,"y":19400.742601888433},"targetPosition":{"x":13968.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Loop Code */\n\n/* Chaikin Oscillator\n\nKEY TAKEAWAYS\n- The Chaikin Indicator applies MACD to the accumulation-distribution line rather than closing price.\n- A cross above the accumulation-distribution line indicates that market players are accumulating shares, securities or contracts, which is typically bullish.\n\n1. Money Flow Multiplier = [(Close - Low) - (High - Close)] / (High - Low) \n2. Money Flow Volume = Money Flow Multiplier x Volume for the Period\n3. ADL = Previous ADL + Current Period's Money Flow Volume\n4. Chaikin Oscillator = ('fast'-period EMA of ADL) - ('slow'-period EMA of ADL) */\n\n\nlet fastPeriod = 5 // Change value to set 'fast' period (must be less than or equal to 'fast')\nlet slowPeriod = 17 // Change value to set 'slow' period (must be greater than or equal to 'slow')\n\nlet candle = record.current\nlet volume = getElement('volumes', candle)\n\n\n// Set varibles\nvariable.totalVolume = volume.buy + volume.sell\t\nvariable.moneyFlowMultiplier = ((candle.close - candle.min) - (candle.max - candle.close)) / (candle.max - candle.min) \nvariable.moneyFlowVolume = variable.moneyFlowMultiplier * variable.totalVolume \nvariable.currentADL = variable.totalVolume + variable.moneyFlowVolume\nvariable.savedADL.push(variable.currentADL) // Push the currentADL into an array to be able to use \"previous ADL\"\n\nif (variable.savedADL.length > 2) { // Make sure we only save the current and previous\n variable.savedADL.splice(0, 1)\n}\n\n// Calculating the 'accDistLine' using previous ADL value if it is defined, else current\nif (variable.savedADL[0] === 'undefined')\n{variable.accDistLine = variable.savedADL[1] + variable.moneyFlowVolume} // Calculating with Current ADL\nelse\n{variable.accDistLine = variable.savedADL[0] + variable.moneyFlowVolume} // Calculating with Previous ADL\n\n\n// Calculate fastEMA and slowEMA of ADL\nif(isNaN(variable.previousEmaFast))\n{variable.previousEmaFast = variable.accDistLine}\nelse\n{variable.previousEmaFast}\n\nvariable.fastEMA = calculateEMAs(fastPeriod, variable.accDistLine, variable.previousEmaFast)\nvariable.previousEmaFast = variable.fastEMA\n\nif(isNaN(variable.previousEmaSlow))\n{variable.previousEmaSlow = variable.accDistLine}\nelse\n{variable.previousEmaSlow}\nvariable.slowEMA = calculateEMAs(slowPeriod, variable.accDistLine, variable.previousEmaSlow)\nvariable.previousEmaSlow = variable.slowEMA\n\n\n// Create EMA function for 'fast' and 'slow' ADL\nfunction calculateEMAs(periods, adl, previousEMA) {\n let k = 2 / (periods + 1)\n return adl * k + previousEMA * (1-k)\n}\n\n// Calculate Chaikin Oscillator value\nvariable.chaikinOscillator = variable.fastEMA - variable.slowEMA\n\n// Happy trading! CJ.","project":"Superalgos","id":"43f087d9-6da9-4387-a3ee-7e7e4ca247b3","savedPayload":{"position":{"x":13947.33381066081,"y":19411.075663396023},"targetPosition":{"x":13936.880964334045,"y":19311.623473859196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"2c6eff8c-0beb-4068-a9c6-26a06cbd242d","savedPayload":{"position":{"x":13936.880964334045,"y":19311.623473859196},"targetPosition":{"x":13921.201694843896,"y":19162.445189553953},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build arrays \n\nvariable.savedADL = []\n\n","project":"Superalgos","id":"67b6e8ff-b104-47c1-b8ec-a8847bce6b7a","savedPayload":{"position":{"x":13819.517534074947,"y":19390.831553964606},"targetPosition":{"x":13860.191198382527,"y":19299.477008200345},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c6684774-9a86-4b1b-a1ef-5ddd2027ae00","savedPayload":{"position":{"x":13860.191198382527,"y":19299.477008200345},"targetPosition":{"x":13921.201694843896,"y":19162.445189553953},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ba9d9a5f-61eb-49d8-a73d-15ca3e00ecd7","savedPayload":{"position":{"x":13921.201694843896,"y":19162.445189553953},"targetPosition":{"x":13968.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"31fee6c0-b932-4604-8a47-aa31fd679291","savedPayload":{"position":{"x":13968.132034355966,"y":18866.138687375413},"targetPosition":{"x":13756.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"Chaikin Oscillator","id":"b4b61f3f-b65e-43b2-b8ee-6f87944fb7ae"}}}],"id":"f7bdd106-bdc2-4a99-8bce-173e94322727","savedPayload":{"position":{"x":13756.000000000002,"y":18654.00665301945},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"ARPS Slow","config":"{\n \"codeName\": \"ARPS-Slow\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market ARPS Slow","project":"Superalgos","id":"4a233d99-e570-4936-a3f4-613c75213bc8","savedPayload":{"position":{"x":15567.729481237811,"y":17623.641979655422},"targetPosition":{"x":15625.963766385876,"y":17840.975290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"c32e024e-83fc-422d-9dec-7b7a4179f17c"}}}],"outputDatasetFolders":[],"id":"03c83aa5-5473-499d-8990-b99aa25cd543","savedPayload":{"position":{"x":15625.963766385876,"y":17840.975290570463},"targetPosition":{"x":15684.198051533947,"y":18058.308601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Slow Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"af2be1a5-6589-49d4-8f89-8ae1cb3162f8","savedPayload":{"position":{"x":15686.182336682012,"y":17743.54743264471},"targetPosition":{"x":15742.432336682012,"y":17840.975290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"ce465417-0658-430a-9888-2ffefee15357"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"24d1f7a4-66af-4169-a118-93618334f6ae","savedPayload":{"position":{"x":15771.549479256044,"y":17732.308635112942},"targetPosition":{"x":15742.432336682012,"y":17840.975290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"c541371a-27a9-436c-9342-081d67231318","savedPayload":{"position":{"x":15839.860194607763,"y":17784.725290570463},"targetPosition":{"x":15742.432336682012,"y":17840.975290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}}],"dataMineDataDependencies":[],"id":"6f23340b-8d1f-4652-876f-4a70c3e21aec","savedPayload":{"position":{"x":15742.432336682012,"y":17840.975290570463},"targetPosition":{"x":15684.198051533947,"y":18058.308601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"ce465417-0658-430a-9888-2ffefee15357","savedPayload":{"position":{"x":16002.396103067893,"y":17740.110549951558},"targetPosition":{"x":15684.198051533947,"y":18058.308601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"2597670e-3304-4839-ad6d-826290e3eabc","savedPayload":{"position":{"x":15901.531362448988,"y":18000.07431633744},"targetPosition":{"x":15684.198051533947,"y":18058.308601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"96c24e28-6cd5-4d1f-9a35-35997b7e160a","savedPayload":{"position":{"x":15901.531362448988,"y":18116.542886633568},"targetPosition":{"x":15684.198051533947,"y":18058.308601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e0f2f6a8-0241-4aba-8751-a632e066d047","savedPayload":{"position":{"x":14118.132034355966,"y":18866.138687375413},"targetPosition":{"x":13668.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily ARPS Slow","project":"Superalgos","id":"1aedf3a0-5890-424e-a1f2-e54fc52659e1","savedPayload":{"position":{"x":16266.000000000002,"y":17597.08378961345},"targetPosition":{"x":16041.000000000002,"y":17986.79522131645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"00c464d1-0a2a-48ce-a9c0-c2819a9f3424"}}}],"outputDatasetFolders":[],"id":"d0cc5e79-a820-47d7-ad12-406b09b6f4dd","savedPayload":{"position":{"x":16041.000000000002,"y":17986.79522131645},"targetPosition":{"x":15816.000000000002,"y":18376.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Slow Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"fd87cb30-87eb-4ba7-9763-da651e48813c","savedPayload":{"position":{"x":16450.79899745976,"y":17774.10489744401},"targetPosition":{"x":16205.711431703001,"y":18151.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"379710cb-b876-45b0-a4f1-7a76cb6cae08"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"3d36499e-ce24-4f0d-9875-48f7b63d05c8","savedPayload":{"position":{"x":16555.42711435863,"y":17868.31247704702},"targetPosition":{"x":16205.711431703001,"y":18151.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"77a7753f-af11-40ac-a65d-ca75123b04ea","savedPayload":{"position":{"x":16625.822623626736,"y":17990.24107572407},"targetPosition":{"x":16205.711431703001,"y":18151.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"6efb002f-6126-42ca-93fe-21c67f833c60","savedPayload":{"position":{"x":16655.094722342554,"y":18127.955472710124},"targetPosition":{"x":16205.711431703001,"y":18151.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}}],"dataMineDataDependencies":[],"id":"b0367e88-7e82-42cd-944d-c4e9ca80d945","savedPayload":{"position":{"x":16205.711431703001,"y":18151.50665301945},"targetPosition":{"x":15816.000000000002,"y":18376.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"379710cb-b876-45b0-a4f1-7a76cb6cae08","savedPayload":{"position":{"x":16266.000000000002,"y":18376.50665301945},"targetPosition":{"x":15816.000000000002,"y":18376.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"0b78bc25-8a2b-4a22-bcda-635f3b9b1187","savedPayload":{"position":{"x":16010.855715851498,"y":18489.00665301945},"targetPosition":{"x":15816.000000000002,"y":18376.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"4eec532d-30b6-4356-b69d-2460739799ce","savedPayload":{"position":{"x":15928.500000000002,"y":18571.362368870945},"targetPosition":{"x":15816.000000000002,"y":18376.50665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"160e01a5-da62-4b67-9042-68751949ee96","savedPayload":{"position":{"x":13986.330085889911,"y":19184.33673890936},"targetPosition":{"x":13668.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"ARPS Slow","config":"{\n \"codeName\": \"slowARPS\",\n \"singularVariableName\": \"slowARPS\",\n \"pluralVariableName\": \"slowARPSs\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"c32e024e-83fc-422d-9dec-7b7a4179f17c","savedPayload":{"position":{"x":13910.83713266845,"y":19342.474263063155},"targetPosition":{"x":13668.132034355966,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"00c464d1-0a2a-48ce-a9c0-c2819a9f3424","savedPayload":{"position":{"x":13760.83713266845,"y":19451.455642263958},"targetPosition":{"x":13668.132034355966,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"9b3ec784-f875-4a31-9f2d-fdba3a4dd237","savedPayload":{"position":{"x":13968.132034355966,"y":20089.44374852799},"targetPosition":{"x":13725.426936043481,"y":19913.108172840246},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"04be52be-03fa-4548-8ac1-11a688786301","savedPayload":{"position":{"x":13725.426936043481,"y":19913.108172840246},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"be9d5502-b6ea-4109-931c-263e4ef39166","savedPayload":{"position":{"x":13835.392989106482,"y":20222.18279377747},"targetPosition":{"x":13659.057413418739,"y":19979.477695464986},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"d7f463c1-7208-4b96-8d46-893ee111e6f7","savedPayload":{"position":{"x":13659.057413418739,"y":19979.477695464986},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate ARPS","config":"{\n \"codeName\": \"ARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.ARPS))\n{variable.ARPS = 0}\nelse {variable.ARPS}","project":"Superalgos","id":"74a4a7e5-b4d5-46bd-9a3e-92c2705646cf","savedPayload":{"position":{"x":13621.779485199722,"y":20164.748029485323},"targetPosition":{"x":13575.426936043481,"y":20022.08955204105},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"3fe424b8-a927-4a4b-b82a-9fe013546966","savedPayload":{"position":{"x":13575.426936043481,"y":20022.08955204105},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bull","config":"{\n \"codeName\": \"apsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBull))\n{variable.apsBull = 0}\nelse {variable.apsBull}","project":"Superalgos","id":"735b28dc-532e-471f-bcdd-84ea80114a0e","savedPayload":{"position":{"x":13482.721837730996,"y":20186.772597152503},"targetPosition":{"x":13482.721837730996,"y":20036.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"86568b58-7899-4b50-80cd-4223c5b2a528","savedPayload":{"position":{"x":13482.721837730996,"y":20036.772597152503},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bear","config":"{\n \"codeName\": \"apsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBear))\n{variable.apsBear = 0}\nelse {variable.apsBear}","project":"Superalgos","id":"bf2645de-583b-4051-9f17-38935cb7d421","savedPayload":{"position":{"x":13343.66419026227,"y":20164.748029485323},"targetPosition":{"x":13390.016739418512,"y":20022.08955204105},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e799bf00-cf17-4adb-92e9-d5c66bce7261","savedPayload":{"position":{"x":13390.016739418512,"y":20022.08955204105},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate SMA","config":"{\n \"codeName\": \"SMA\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.SMA))\n{variable.SMA = 0}\nelse {variable.SMA}","project":"Superalgos","id":"7c4af3a5-a3d3-4569-9074-6e5605f53cc2","savedPayload":{"position":{"x":13218.218474199382,"y":20100.83024462123},"targetPosition":{"x":13306.386262043254,"y":19979.477695464986},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"5d00b15c-7803-4044-8b44-166ea605e241","savedPayload":{"position":{"x":13306.386262043254,"y":19979.477695464986},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage ARPS","config":"{\n \"codeName\": \"percentageARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageARPS))\n{variable.percentageARPS = 0}\nelse {variable.percentageARPS}","project":"Superalgos","id":"cde2b51c-7d16-4ee6-8b35-1dad3e18227f","savedPayload":{"position":{"x":13118.66419026227,"y":20001.275960684117},"targetPosition":{"x":13240.016739418512,"y":19913.108172840246},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"af19875c-861c-407e-9275-8fb2111277dc","savedPayload":{"position":{"x":13240.016739418512,"y":19913.108172840246},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bull","config":"{\n \"codeName\": \"percentageApsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBull))\n{variable.percentageApsBull = 0}\nelse {variable.percentageApsBull}","project":"Superalgos","id":"da247784-c47c-41ae-b764-519d47700a50","savedPayload":{"position":{"x":13054.746405398178,"y":19875.83024462123},"targetPosition":{"x":13197.404882842451,"y":19829.477695464986},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"56774359-2338-4b22-bf66-26835a7f1266","savedPayload":{"position":{"x":13197.404882842451,"y":19829.477695464986},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bear","config":"{\n \"codeName\": \"percentageApsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBear))\n{variable.percentageApsBear = 0}\nelse {variable.percentageApsBear}","project":"Superalgos","id":"79052dd4-e79c-4139-b034-a2b59a7cad5f","savedPayload":{"position":{"x":13032.721837730996,"y":19736.772597152503},"targetPosition":{"x":13182.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"30c88625-0df0-4647-9ebf-51a5ef868f58","savedPayload":{"position":{"x":13182.721837730996,"y":19736.772597152503},"targetPosition":{"x":13482.721837730996,"y":19736.772597152503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8b9a90a7-170a-4f59-8132-bd890aab9a26","savedPayload":{"position":{"x":13482.721837730996,"y":19736.772597152503},"targetPosition":{"x":13668.132034355966,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* USER DEFINED VALUES SECTION */\n\nlet nCandles = 17 // Change number periods\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \n\n// Build arrays\n\nvariable.lastNCandlesARPS.push(candle.max - candle.min)\nvariable.lastNCandlesSMA.push(candle.close)\nvariable.lastNCandlesApsBull.push(candle.max - candle.open)\nvariable.lastNCandlesApsBear.push (candle.open - candle.min)\n\n// console.log(variable.lastNCandlesARPS)\n\n// Keep arrays the correct size of nCandles\n\nif (variable.lastNCandlesARPS.length > nCandles) {\n variable.lastNCandlesARPS.splice(0, 1)\n}\n\nif (variable.lastNCandlesSMA.length > nCandles) {\n variable.lastNCandlesSMA.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBull.length > nCandles) {\n variable.lastNCandlesApsBull.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBear.length > nCandles) {\n variable.lastNCandlesApsBear.splice(0, 1)\n}\n\n\n// Call the functions\nvariable.smaARPS = calculateSMA(variable.lastNCandlesARPS, nCandles)\nvariable.smaSMA = calculateSMA(variable.lastNCandlesSMA, nCandles)\nvariable.smaApsBull = calculateSMA(variable.lastNCandlesApsBull, nCandles)\nvariable.smaApsBear = calculateSMA(variable.lastNCandlesApsBear, nCandles)\n\n// Build SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calc\n if (src.length < periods) { return 0 }\n \n let sum = 0 // Initialize sum variable\n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// Calc final ARPS ApsBull ApsBear SMA as Rate\n\nvariable.ARPS = variable.smaARPS\n\n\nif (variable.smaApsBull > variable.smaApsBear) \n{\n\tvariable.apsBull = variable.smaSMA + ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\nelse \n{\n\tvariable.apsBull = variable.smaSMA - ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\n\nif (variable.smaApsBear > variable.smaApsBull) \n{\n\tvariable.apsBear = variable.smaSMA + ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\nelse \n{\n\tvariable.apsBear = variable.smaSMA - ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\n\nvariable.SMA = variable.smaSMA\n\n\n// Calc final ARPS ApsBull ApsBear as %\n\nvariable.percentageARPS = (variable.smaARPS/candle.close) *100\nvariable.percentageApsBull = (variable.smaApsBull/variable.smaARPS) *100\nvariable.percentageApsBear = (variable.smaApsBear/variable.smaARPS) *100\n\n\n// Happy trading! CJ. :-)","project":"Superalgos","id":"adea7d76-a792-4556-b017-093de9fe2b0f","savedPayload":{"position":{"x":13268.09683828102,"y":19536.760753427396},"targetPosition":{"x":13331.028877386005,"y":19459.0461572817},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"a6150e04-c314-489d-824f-23afa0072a7e","savedPayload":{"position":{"x":13331.028877386005,"y":19459.0461572817},"targetPosition":{"x":13425.426936043481,"y":19342.474263063155},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 4 arrays \n\nvariable.lastNCandlesARPS = []\nvariable.lastNCandlesSMA = []\nvariable.lastNCandlesApsBull = [] \nvariable.lastNCandlesApsBear = [] \n","project":"Superalgos","id":"cc836ccb-c2dc-4ba5-9fcd-080a69c50b8a","savedPayload":{"position":{"x":13192.03182941918,"y":19432.066250449483},"targetPosition":{"x":13285.389872068901,"y":19396.22945549495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"679b4d08-204b-4564-9324-19f7ed005c08","savedPayload":{"position":{"x":13285.389872068901,"y":19396.22945549495},"targetPosition":{"x":13425.426936043481,"y":19342.474263063155},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ab30d1a8-1659-46d7-9620-b2783b58feef","savedPayload":{"position":{"x":13425.426936043481,"y":19342.474263063155},"targetPosition":{"x":13668.132034355966,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e34788bb-3c57-4a14-abb5-451f35533e49","savedPayload":{"position":{"x":13668.132034355966,"y":19166.138687375413},"targetPosition":{"x":13668.132034355966,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"ARPS Slow","id":"e12e90bd-bc37-42da-9f83-7b1506391bd9"}}}],"id":"81becef8-2376-47a7-8cdf-a559c45ed950","savedPayload":{"position":{"x":13668.132034355966,"y":18866.138687375413},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"ARPS Fast","config":"{\n \"codeName\": \"ARPS-Fast\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market ARPS Fast","project":"Superalgos","id":"a4be096d-4fa4-44ba-983d-af202af96d7d","savedPayload":{"position":{"x":16144.729481237811,"y":17296.141979655422},"targetPosition":{"x":16202.96376638588,"y":17513.475290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"08336286-f6f1-4fa5-ba1e-912897063979"}}}],"outputDatasetFolders":[],"id":"0727df65-0f8c-4415-a85f-d9e322240273","savedPayload":{"position":{"x":16202.96376638588,"y":17513.475290570463},"targetPosition":{"x":16261.198051533947,"y":17730.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Fast Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"5790535f-17f2-4ee0-bded-368ebd9489dc","savedPayload":{"position":{"x":16263.182336682012,"y":17416.04743264471},"targetPosition":{"x":16319.432336682012,"y":17513.475290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"1bfb1c32-5495-452d-81c3-5b575bfc09c1"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"ee739a5f-2a9e-40d4-a557-8cb53521d7e3","savedPayload":{"position":{"x":16348.549479256048,"y":17404.808635112942},"targetPosition":{"x":16319.432336682012,"y":17513.475290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"c926b53f-07cb-4d2c-8260-9dadc6bb2f1b","savedPayload":{"position":{"x":16416.86019460776,"y":17457.225290570463},"targetPosition":{"x":16319.432336682012,"y":17513.475290570463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}}],"dataMineDataDependencies":[],"id":"73f3249b-2f51-4399-950d-186d6d68c78e","savedPayload":{"position":{"x":16319.432336682012,"y":17513.475290570463},"targetPosition":{"x":16261.198051533947,"y":17730.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"1bfb1c32-5495-452d-81c3-5b575bfc09c1","savedPayload":{"position":{"x":16579.39610306789,"y":17412.610549951558},"targetPosition":{"x":16261.198051533947,"y":17730.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"9261d5a5-4da2-4119-a78a-7d231491c2ee","savedPayload":{"position":{"x":16478.531362448986,"y":17672.57431633744},"targetPosition":{"x":16261.198051533947,"y":17730.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"68b54ef4-857f-4a75-88ea-319ba92f5fd9","savedPayload":{"position":{"x":16478.531362448986,"y":17789.042886633568},"targetPosition":{"x":16261.198051533947,"y":17730.808601485503},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"b138ab56-8d61-44f0-b0e9-27f171bbbfbe","savedPayload":{"position":{"x":13774.198051533947,"y":19272.204704553395},"targetPosition":{"x":13456.000000000002,"y":18954.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily ARPS Fast","project":"Superalgos","id":"f679b2a9-f5ce-46fb-852e-be58c502a0da","savedPayload":{"position":{"x":16843,"y":17269.58378961345},"targetPosition":{"x":16618,"y":17659.29522131645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"0c30b8d6-f6a4-4f55-b496-d2438a9953f9"}}}],"outputDatasetFolders":[],"id":"d4701ed1-5658-45b5-8835-14f1414491f3","savedPayload":{"position":{"x":16618,"y":17659.29522131645},"targetPosition":{"x":16393,"y":18049.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Fast Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"258d211e-d162-4064-ab04-a6f36ae306e6","savedPayload":{"position":{"x":17027.79899745976,"y":17446.60489744401},"targetPosition":{"x":16782.711431703,"y":17824.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2c12b3a2-5072-4152-9ce5-382ce627a4cf"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"82262685-1d6f-4c35-8584-3f13ad1b0921","savedPayload":{"position":{"x":17132.427114358637,"y":17540.81247704702},"targetPosition":{"x":16782.711431703,"y":17824.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"c7c3c7a8-4fb5-45f2-bb11-51d6cfdfda3e","savedPayload":{"position":{"x":17202.822623626736,"y":17662.74107572407},"targetPosition":{"x":16782.711431703,"y":17824.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"0f0a43f4-60d2-42fa-93fa-be2e21f8c302","savedPayload":{"position":{"x":17232.094722342554,"y":17800.455472710124},"targetPosition":{"x":16782.711431703,"y":17824.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}}],"dataMineDataDependencies":[],"id":"d29fbaa9-5eb9-4cb0-94e3-3ea6d18f20c2","savedPayload":{"position":{"x":16782.711431703,"y":17824.00665301945},"targetPosition":{"x":16393,"y":18049.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"2c12b3a2-5072-4152-9ce5-382ce627a4cf","savedPayload":{"position":{"x":16843,"y":18049.00665301945},"targetPosition":{"x":16393,"y":18049.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"0394d6ce-4648-4295-aa21-431adf475fe3","savedPayload":{"position":{"x":16587.855715851503,"y":18161.50665301945},"targetPosition":{"x":16393,"y":18049.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"c90561ab-2b37-4df4-8f06-10e06ed4edee","savedPayload":{"position":{"x":16505.5,"y":18243.862368870945},"targetPosition":{"x":16393,"y":18049.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"8634ce99-462c-4cf4-b55a-e939bd458a6b","savedPayload":{"position":{"x":13456.000000000002,"y":19404.00665301945},"targetPosition":{"x":13456.000000000002,"y":18954.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"ARPS Fast","config":"{\n \"codeName\": \"fastARPS\",\n \"singularVariableName\": \"fastARPS\",\n \"pluralVariableName\": \"fastARPSs\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"08336286-f6f1-4fa5-ba1e-912897063979","savedPayload":{"position":{"x":13290.798305156108,"y":19462.445189553953},"targetPosition":{"x":13243.867965644038,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"0c30b8d6-f6a4-4f55-b496-d2438a9953f9","savedPayload":{"position":{"x":13107.670815722175,"y":19433.440644631923},"targetPosition":{"x":13243.867965644038,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"aa7ec15b-6515-41b2-bcf8-caf282254a2f","savedPayload":{"position":{"x":17020.13933855677,"y":18701.881922864293},"targetPosition":{"x":16723.832836378235,"y":18748.81226237636},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0bdacd74-1544-46ef-80b8-c36764f748f1","savedPayload":{"position":{"x":16723.832836378235,"y":18748.81226237636},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"6ba23d0d-4820-44d9-882e-12b53e3340c5","savedPayload":{"position":{"x":17020.13933855677,"y":18889.60328091257},"targetPosition":{"x":16723.832836378235,"y":18842.672941400506},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0fd74c82-d165-42ba-a60e-2557ef8f7469","savedPayload":{"position":{"x":16723.832836378235,"y":18842.672941400506},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate ARPS","config":"{\n \"codeName\": \"ARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.ARPS))\n{variable.ARPS = 0}\nelse {variable.ARPS}","project":"Superalgos","id":"3548eb27-ca3d-4b56-851d-815322a07af3","savedPayload":{"position":{"x":16828.479270084455,"y":19000.038326771228},"targetPosition":{"x":16694.8282914562,"y":18931.939751810296},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"70fe36c1-0c68-49e7-a2fa-8f60232ff4ef","savedPayload":{"position":{"x":16694.8282914562,"y":18931.939751810296},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bull","config":"{\n \"codeName\": \"apsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBull))\n{variable.apsBull = 0}\nelse {variable.apsBull}","project":"Superalgos","id":"1473d657-276b-406b-90e6-a66131604ff6","savedPayload":{"position":{"x":16745.724385733636,"y":19113.940653422378},"targetPosition":{"x":16639.658368555654,"y":19007.874636244396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"571474ac-c4ed-4ee7-af2c-e4a56098cfad","savedPayload":{"position":{"x":16639.658368555654,"y":19007.874636244396},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bear","config":"{\n \"codeName\": \"apsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBear))\n{variable.apsBear = 0}\nelse {variable.apsBear}","project":"Superalgos","id":"0b9787b0-9547-4688-be4a-48a727f42e04","savedPayload":{"position":{"x":16631.822059082486,"y":19196.695537773197},"targetPosition":{"x":16563.723484121554,"y":19063.044559144942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e255bc82-518f-41e0-b9c5-dc573217cfb9","savedPayload":{"position":{"x":16563.723484121554,"y":19063.044559144942},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate SMA","config":"{\n \"codeName\": \"SMA\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.SMA))\n{variable.SMA = 0}\nelse {variable.SMA}","project":"Superalgos","id":"8e31b59b-6550-469d-a818-edb4b9eda503","savedPayload":{"position":{"x":16497.921843467797,"y":19240.20235515624},"targetPosition":{"x":16474.456673711764,"y":19092.04910406697},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"4c52fc87-fac3-4a74-928c-beff9640f538","savedPayload":{"position":{"x":16474.456673711764,"y":19092.04910406697},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage ARPS","config":"{\n \"codeName\": \"percentageARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageARPS))\n{variable.percentageARPS = 0}\nelse {variable.percentageARPS}","project":"Superalgos","id":"47dd70e8-0226-4bda-835d-8b426fc2e23d","savedPayload":{"position":{"x":16357.13082493159,"y":19240.20235515624},"targetPosition":{"x":16380.595994687626,"y":19092.04910406697},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"ce61113d-7b92-454d-9d22-557fb0532385","savedPayload":{"position":{"x":16380.595994687626,"y":19092.04910406697},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bull","config":"{\n \"codeName\": \"percentageApsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBull))\n{variable.percentageApsBull = 0}\nelse {variable.percentageApsBull}","project":"Superalgos","id":"c456e845-561a-4761-b7d8-0424bdd76729","savedPayload":{"position":{"x":16223.230609316897,"y":19196.695537773197},"targetPosition":{"x":16291.329184277829,"y":19063.044559144942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"b2f7070c-8430-4a3b-9477-b71fa1215cdb","savedPayload":{"position":{"x":16291.329184277829,"y":19063.044559144942},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bear","config":"{\n \"codeName\": \"percentageApsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBear))\n{variable.percentageApsBear = 0}\nelse {variable.percentageApsBear}","project":"Superalgos","id":"231fd372-de75-42b8-827b-7a315ac96a7f","savedPayload":{"position":{"x":16109.328282665747,"y":19113.940653422378},"targetPosition":{"x":16215.394299843729,"y":19007.874636244396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"ba0880ca-226d-4e4c-a2d6-620d6dc5cfe0","savedPayload":{"position":{"x":16215.394299843729,"y":19007.874636244396},"targetPosition":{"x":16427.52633419969,"y":18795.742601888433},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"867c1562-64d7-47d1-ab5b-6de88bc115dd","savedPayload":{"position":{"x":12709.264051131018,"y":19438.53298721914},"targetPosition":{"x":13243.867965644038,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* USER DEFINED VALUES SECTION */\n\nlet nCandles = 3 // Change number periods\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \n\n// Build arrays\n\nvariable.lastNCandlesARPS.push(candle.max - candle.min)\nvariable.lastNCandlesSMA.push(candle.close)\nvariable.lastNCandlesApsBull.push(candle.max - candle.open)\nvariable.lastNCandlesApsBear.push (candle.open - candle.min)\n\n// console.log(variable.lastNCandlesARPS)\n\n// Keep arrays the correct size of nCandles\n\nif (variable.lastNCandlesARPS.length > nCandles) {\n variable.lastNCandlesARPS.splice(0, 1)\n}\n\nif (variable.lastNCandlesSMA.length > nCandles) {\n variable.lastNCandlesSMA.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBull.length > nCandles) {\n variable.lastNCandlesApsBull.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBear.length > nCandles) {\n variable.lastNCandlesApsBear.splice(0, 1)\n}\n\n\n// Call the functions\nvariable.smaARPS = calculateSMA(variable.lastNCandlesARPS, nCandles)\nvariable.smaSMA = calculateSMA(variable.lastNCandlesSMA, nCandles)\nvariable.smaApsBull = calculateSMA(variable.lastNCandlesApsBull, nCandles)\nvariable.smaApsBear = calculateSMA(variable.lastNCandlesApsBear, nCandles)\n\n// Build SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calc\n if (src.length < periods) { return 0 }\n \n let sum = 0 // Initialize sum variable\n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// Calc final ARPS ApsBull ApsBear SMA as Rate\n\nvariable.ARPS = variable.smaARPS\n\n\nif (variable.smaApsBull > variable.smaApsBear) \n{\n\tvariable.apsBull = variable.smaSMA + ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\nelse \n{\n\tvariable.apsBull = variable.smaSMA - ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\n\nif (variable.smaApsBear > variable.smaApsBull) \n{\n\tvariable.apsBear = variable.smaSMA + ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\nelse \n{\n\tvariable.apsBear = variable.smaSMA - ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\n\nvariable.SMA = variable.smaSMA\n\n\n// Calc final ARPS ApsBull ApsBear as %\n\nvariable.percentageARPS = (variable.smaARPS/candle.close) *100\nvariable.percentageApsBull = (variable.smaApsBull/variable.smaARPS) *100\nvariable.percentageApsBear = (variable.smaApsBear/variable.smaARPS) *100\n\n\n// Happy trading! CJ! :-)","project":"Superalgos","id":"35a38ab1-ff66-4072-b82f-6cc2f56ff6f4","savedPayload":{"position":{"x":12698.93098962343,"y":19145.34046368026},"targetPosition":{"x":12798.383179160257,"y":19134.88761735349},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"77b480da-70d7-43ab-bd51-98044b9350be","savedPayload":{"position":{"x":12798.383179160257,"y":19134.88761735349},"targetPosition":{"x":12947.561463465498,"y":19119.208347863343},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 4 arrays \n\nvariable.lastNCandlesARPS = []\nvariable.lastNCandlesSMA = []\nvariable.lastNCandlesApsBull = [] \nvariable.lastNCandlesApsBear = [] \n","project":"Superalgos","id":"8b82130d-b51f-410c-82b3-34abb02bc3a4","savedPayload":{"position":{"x":12719.175099054848,"y":19017.524187094394},"targetPosition":{"x":12810.529644819107,"y":19058.197851401972},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e1fcfd73-c477-4574-986f-85583fa489af","savedPayload":{"position":{"x":12810.529644819107,"y":19058.197851401972},"targetPosition":{"x":12947.561463465498,"y":19119.208347863343},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"19eacb84-6904-4b79-aa5c-7f6c69c89b04","savedPayload":{"position":{"x":12947.561463465498,"y":19119.208347863343},"targetPosition":{"x":13243.867965644038,"y":19166.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b099e79b-ee47-4937-bf88-43f1a4f55a8c","savedPayload":{"position":{"x":13243.867965644038,"y":19166.138687375413},"targetPosition":{"x":13456.000000000002,"y":18954.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"ARPS Fast","id":"fdffbdff-a42f-47db-b068-4a711070bef3"}}}],"id":"b1eaf829-987d-4ddc-92c7-10edb3e0d194","savedPayload":{"position":{"x":13456.000000000002,"y":18954.00665301945},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"Average VS Average","config":"{\n \"codeName\": \"averageVsAverage\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market Average VS Average","project":"Superalgos","id":"2edf9e6c-e713-45fc-9764-73f1465f1352","savedPayload":{"position":{"x":13298.615075075051,"y":18964.99615794743},"targetPosition":{"x":13123.757233747232,"y":18823.399069961215},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"400f9db6-00b8-48a4-b1ca-2fce23447a15"}}}],"outputDatasetFolders":[],"id":"322cf5e8-7f9d-4bdd-abed-5f78672b93a9","savedPayload":{"position":{"x":13123.757233747232,"y":18823.399069961215},"targetPosition":{"x":12948.899392419413,"y":18681.801981975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Average VS Average Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"87830a28-1634-48f8-a226-506c89ade476","savedPayload":{"position":{"x":13138.198836524625,"y":18920.974720510905},"targetPosition":{"x":13029.532181067105,"y":18891.857577936873},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a8737ab1-e419-4e69-b49a-86dd29187dd8"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"3ab9def4-53a1-458f-83d7-b3be09887d4e","savedPayload":{"position":{"x":13100.330725060212,"y":18979.28649860078},"targetPosition":{"x":13029.532181067105,"y":18891.857577936873},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"78ca9971-aa46-458f-b8d9-354426317bd4","savedPayload":{"position":{"x":13035.419976144436,"y":19004.20340059676},"targetPosition":{"x":13029.532181067105,"y":18891.857577936873},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Market","project":"Superalgos","id":"f51ac085-64ae-45c2-9467-e98eb801379d","savedPayload":{"position":{"x":12968.260289627915,"y":18986.208016830733},"targetPosition":{"x":13029.532181067105,"y":18891.857577936873},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"9bf0483c-4825-4a46-9cf4-1b5262579fc1"}}}],"dataMineDataDependencies":[],"id":"85b582f1-7cc2-4535-ac54-7df234e3db4f","savedPayload":{"position":{"x":13029.532181067105,"y":18891.857577936873},"targetPosition":{"x":12948.899392419413,"y":18681.801981975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"a8737ab1-e419-4e69-b49a-86dd29187dd8","savedPayload":{"position":{"x":12878.503883151308,"y":19126.26173524281},"targetPosition":{"x":12948.899392419413,"y":18681.801981975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"885a6862-324a-4528-b842-8c40f0aafc97","savedPayload":{"position":{"x":12807.3023044332,"y":18856.659823302816},"targetPosition":{"x":12948.899392419413,"y":18681.801981975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"bf186655-c6bd-487d-ab02-65b7535b80b1","savedPayload":{"position":{"x":12738.843796457542,"y":18762.434770622694},"targetPosition":{"x":12948.899392419413,"y":18681.801981975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"f8c12a67-d98f-4a20-9f95-5e590321403f","savedPayload":{"position":{"x":13243.867965644038,"y":19316.138687375413},"targetPosition":{"x":13243.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily Average VS Average","project":"Superalgos","id":"3d362705-7d3b-4205-af78-6aeeccd326b9","savedPayload":{"position":{"x":12749.31287115968,"y":19396.915298070246},"targetPosition":{"x":12702.275062689236,"y":18949.380445154526},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"ff8973cc-ff0d-432b-bb02-2ce87da7f59c"}}}],"outputDatasetFolders":[],"id":"41ea773f-0b13-4691-8393-f562352f89ee","savedPayload":{"position":{"x":12702.275062689236,"y":18949.380445154526},"targetPosition":{"x":12655.237254218791,"y":18501.845592238806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Average VS Average Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"627ead20-a71e-47c1-8d5d-42506ab2433d","savedPayload":{"position":{"x":12519.243573305126,"y":19360.475901093694},"targetPosition":{"x":12472.205764834682,"y":18912.941048177974},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"b37ab847-04bd-4c0d-9599-3d308e6be0ec"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"de6cab83-afd5-4f5a-ad2e-1cf0fc07b7e8","savedPayload":{"position":{"x":12401.810255566577,"y":19357.400801445783},"targetPosition":{"x":12472.205764834682,"y":18912.941048177974},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"f0dea610-c1c0-4f2f-9d79-8e2cfc90b582","savedPayload":{"position":{"x":12289.174275450572,"y":19324.036504117143},"targetPosition":{"x":12472.205764834682,"y":18912.941048177974},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"f54e9145-daed-48a1-a2bb-ce82ceec4b78","savedPayload":{"position":{"x":12189.011588862255,"y":19262.656730833613},"targetPosition":{"x":12472.205764834682,"y":18912.941048177974},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Daily","project":"Superalgos","id":"947c751a-393b-4499-88d0-54d112a2d923","savedPayload":{"position":{"x":12108.148117365956,"y":19177.444411709588},"targetPosition":{"x":12472.205764834682,"y":18912.941048177974},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"2e683057-f911-4105-bc77-16f2706d1915"}}}],"dataMineDataDependencies":[],"id":"03d0b6f4-795f-43f9-aed7-398ff9be2c31","savedPayload":{"position":{"x":12472.205764834682,"y":18912.941048177974},"targetPosition":{"x":12655.237254218791,"y":18501.845592238806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"b37ab847-04bd-4c0d-9599-3d308e6be0ec","savedPayload":{"position":{"x":12291.179606750065,"y":18766.34895577042},"targetPosition":{"x":12655.237254218791,"y":18501.845592238806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"b7661232-5ecd-42e5-b4e2-0387253c51cc","savedPayload":{"position":{"x":12431.46982776093,"y":18525.364496474027},"targetPosition":{"x":12655.237254218791,"y":18501.845592238806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"25b50fcf-ad3c-436c-90b4-9b83dfafd4fb","savedPayload":{"position":{"x":12449.689526249205,"y":18410.32984754675},"targetPosition":{"x":12655.237254218791,"y":18501.845592238806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"90fe53a1-9c47-4b05-af43-8876c468d379","savedPayload":{"position":{"x":12925.669914110093,"y":19184.33673890936},"targetPosition":{"x":13243.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"Average VS Average","config":"{\n \"codeName\": \"averageVsAverage\",\n \"singularVariableName\": \"averageVsAverage\",\n \"pluralVariableName\": \"averageVsAverages\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"400f9db6-00b8-48a4-b1ca-2fce23447a15","savedPayload":{"position":{"x":12767.532389956295,"y":19108.843785687895},"targetPosition":{"x":12943.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"ff8973cc-ff0d-432b-bb02-2ce87da7f59c","savedPayload":{"position":{"x":12658.551010755493,"y":18958.843785687895},"targetPosition":{"x":12943.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"abf7c3f9-418d-44be-9d5f-68117e6e26cf","savedPayload":{"position":{"x":11465.997291705151,"y":19436.727492435068},"targetPosition":{"x":11890.26136041708,"y":19012.46342372314},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"fc0364a2-a5b0-4f77-81cb-448f3a532efb","savedPayload":{"position":{"x":11958.596466474826,"y":19114.405409046878},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"615b00d5-f0e5-48e4-883f-8985b00b7470","savedPayload":{"position":{"x":11245.31760010297,"y":19132.987954698667},"targetPosition":{"x":11779.92151461599,"y":18860.59365485494},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"20fcfc66-d336-4c0d-872f-50a5d8cd50b6","savedPayload":{"position":{"x":11811.493133483104,"y":18891.553385199248},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"bullPriceDeviation","config":"{\n \"codeName\": \"bullPriceDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.bullPriceDeviation)) {\nvariable.bullPriceDeviation\n}\nelse {\nvariable.bullPriceDeviation = 1\n}","project":"Superalgos","id":"fa9aa35e-98af-416d-b3b9-395327e5cd9d","savedPayload":{"position":{"x":11925.045623569087,"y":18640.3908017439},"targetPosition":{"x":12074.441767668373,"y":18653.836698079413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7bd05b9a-a315-4e3d-93b0-3943a7f3ba50","savedPayload":{"position":{"x":12074.441767668373,"y":18653.836698079413},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"smaPrice","config":"{\n \"codeName\": \"smaPrice\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.smaPrice)) {\nvariable.smaPrice\n}\nelse {\nvariable.smaPrice = 1\n}","project":"Superalgos","id":"63142088-1b62-4a15-985f-c53cd6adb314","savedPayload":{"position":{"x":11986.932098746105,"y":18449.923815917784},"targetPosition":{"x":12115.699417786385,"y":18526.85870752867},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"67b38c00-0e3d-47bc-942c-0fdda9625e9a","savedPayload":{"position":{"x":12115.699417786385,"y":18526.85870752867},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"volumeDeviation","config":"{\n \"codeName\": \"volumeDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.volumeDeviation)) {\nvariable.volumeDeviation\n}\nelse {\nvariable.volumeDeviation = 1\n}","project":"Superalgos","id":"6ec8c68a-20f5-4d3d-8ef5-1c0e87f0c5a3","savedPayload":{"position":{"x":12125.3304142135,"y":18305.170526575857},"targetPosition":{"x":12207.964961431315,"y":18430.35651463405},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"aa0f2fc4-d1de-49d8-87cb-d2d68b4bbb09","savedPayload":{"position":{"x":12207.964961431315,"y":18430.35651463405},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"openInterestDeviation","config":"{\n \"codeName\": \"openInterestDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.openInterestDeviation)) {\nvariable.openInterestDeviation\n}\nelse {\nvariable.openInterestDeviation = 1\n}","project":"Superalgos","id":"3fde42f1-88e4-4a07-9f0d-ad1ceef8ae89","savedPayload":{"position":{"x":12312.829086249,"y":18234.80109795487},"targetPosition":{"x":12332.964076121649,"y":18383.44356222006},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"264be2f7-a27c-414b-8aee-7473c120b89f","savedPayload":{"position":{"x":12332.964076121649,"y":18383.44356222006},"targetPosition":{"x":12373.234055866946,"y":18680.728490750444},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"536bed44-cdea-4518-974c-4fbd6787c969","savedPayload":{"position":{"x":12373.234055866946,"y":18680.728490750444},"targetPosition":{"x":12943.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"EDIT TOP LINES HERE TO CHANGE PERIODS","code":"// The Average VS Average Oscillator\n\n/* The Average VS Average Oscillator can be used to recognize changes between a fast average ('fastPeriod') and a slow average ('slowPeriod'). It measures 'Price Action', 'Volume', and a so called 'Open Interest'.\n'Bull Price Action' and 'Bear Price Action' is defined by the amount between the candle close and max and min.\n'Bull Volume' and 'Bear Volume' is divided using the price action.\n'Open Interest' is based upon the statement where:\nBull Candle and Volume Increase = Bull Interest\nBull Candle and Volume Decrease = Bear Interest\nBear Candle and Volume Increase = Bear Interest\nBear Candle and Volume Decrease = Bull Interest */\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n/* USER DEFINED VALUES SECTION */\n\nlet fastPeriod = 5 // Change this number to the period of your choice (must be less than 'slowPeriod')\nlet slowPeriod = 21 // Change this number to the period of your choice (must be greater than 'fastPeriod')\nlet periodMultiplier = 3 // The 'slowPeriod' is muliplied by the 'periodMultiplier to create the \"long term\" trend\nlet fastBoost = 1.00 // '1.00' equals 'no extra boost' to your 'fastPeriod' where as '1.23' would boost the value by 23%\nlet gravity = 0 // '0' equals 'no gravity' (pullback towards midline ('slowPeriod'))\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring variables used\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \nlet volCandle = record.current\nlet volume = getElement('volumes', volCandle)\nlet totalVolume = volume.buy + volume.sell\nlet totalRange = candle.max - candle.min\nlet multipliedFast = fastPeriod * periodMultiplier\nlet multipliedSlow = slowPeriod * periodMultiplier\n\nif ( candle.close > candle.open ) { \n variable.bullPriceRange = ( candle.close - candle.min ),\n variable.bearPriceRange = ( candle.max - candle.close )\n}\nelse { \n variable.bullPriceRange = ( candle.close - candle.min ),\n variable.bearPriceRange = ( candle.max - candle.close )\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring 'Volume Difference'\n\nvariable.previousCurrentVolume.push(totalVolume)\nif (variable.previousCurrentVolume.length > 2) {\n variable.previousCurrentVolume.splice(0, 1)\n}\n\nif (variable.previousCurrentVolume[1] === 'undefined') {\n variable.positiveVolumeDifference = 0.01\n}\nelse {\n if (variable.previousCurrentVolume[variable.previousCurrentVolume.max] > variable.previousCurrentVolume[0]) {\n variable.positiveTotalVolumeDifference = (variable.previousCurrentVolume[1] - variable.previousCurrentVolume[0]) \n }\n else {\n variable.positiveTotalVolumeDifference = (variable.previousCurrentVolume[0] - variable.previousCurrentVolume[1])\n }\n}\n\nvariable.bullVolumeDifference = variable.positiveTotalVolumeDifference * (variable.bullPriceRange / totalRange)\nvariable.bearVolumeDifference = variable.positiveTotalVolumeDifference * (variable.bearPriceRange / totalRange)\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring 'Open Interest'\n// Converting values to percentages due to the differences of range and volume (range might be in decimals while volume often is in thousands)\n\nif ( candle.close > candle.open && variable.previousCurrentVolume[1] > variable.previousCurrentVolume[0] ) { // Candle UP & Volume UP, Bullish Interest\n variable.openInterest = 1 + ((variable.bullPriceRange / totalRange) * (variable.bullVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse if ( candle.close < candle.open && variable.previousCurrentVolume[1] < variable.previousCurrentVolume[0] ) { // Candle DOWN & Volume DOWN, Bullish Interest\n variable.openInterest = 1 + ((variable.bearPriceRange / totalRange) * (variable.bearVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse if ( candle.close > candle.open && variable.previousCurrentVolume[1] < variable.previousCurrentVolume[0] ) { // Candle UP & Volume DOWN, Bearish Interest\n variable.openInterest = 1 - ((variable.bullPriceRange / totalRange) * (variable.bullVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse { // Candle DOWN & Volume UP, Bearish Interest\n variable.openInterest = 1 - ((variable.bearPriceRange / totalRange) * (variable.bearVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Saving to arrays\n\nvariable.savedCandleClose.push(candle.close)\nif (variable.savedCandleClose.length > multipliedSlow) {\n variable.savedCandleClose.splice(0, 1)\n}\n\nvariable.savedTotalRange.push(totalRange)\nif (variable.savedTotalRange.length > multipliedSlow) {\n variable.savedTotalRange.splice(0, 1)\n}\n\nvariable.savedBullPriceRange.push(variable.bullPriceRange)\nif (variable.savedBullPriceRange.length > multipliedSlow) {\n variable.savedBullPriceRange.splice(0, 1)\n}\n\nvariable.savedTotalVolume.push(totalVolume)\nif (variable.savedTotalVolume.length > multipliedSlow) {\n variable.savedTotalVolume.splice(0, 1)\n}\n\nvariable.savedOpenInterest.push(variable.openInterest)\nif (variable.savedOpenInterest.length > multipliedSlow) {\n variable.savedOpenInterest.splice(0, 1)\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Calling SMA functions\n\nvariable.smaMultipliedFastCandleClose = calculateSMA(variable.savedCandleClose, multipliedFast)\nvariable.smaSlowCandleClose = calculateSMA(variable.savedCandleClose, slowPeriod)\nvariable.smaLongTermCandleClose = calculateSMA(variable.savedCandleClose, multipliedSlow)\n\nvariable.smaFastTotalRange = calculateSMA(variable.savedTotalRange, fastPeriod)\nvariable.smaSlowTotalRange = calculateSMA(variable.savedTotalRange, slowPeriod)\nvariable.smaLongTermRange = calculateSMA(variable.savedTotalRange, multipliedSlow)\n\nvariable.smaFastBullPriceRange = calculateSMA(variable.savedBullPriceRange, fastPeriod)\nvariable.smaSlowBullPriceRange = calculateSMA(variable.savedBullPriceRange, slowPeriod)\n\nvariable.smaFastTotalVolume = calculateSMA(variable.savedTotalVolume, fastPeriod)\nvariable.smaLongTermTotalVolume = calculateSMA(variable.savedTotalVolume, multipliedSlow)\n\nvariable.smaFastOpenInterest = calculateSMA(variable.savedOpenInterest, fastPeriod)\nvariable.smaSlowOpenInterest = calculateSMA(variable.savedOpenInterest, slowPeriod)\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Creating the SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calculation\n if (src.length < periods) { return 0 }\n \n // Initialize sum variable\n let sum = 0 \n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring record variables by comparing 'fastPeriod' values with 'slowPeriod' values, also applying 'fastBoost' and 'gravity'\n\nvariable.fastPriceRange = variable.smaFastTotalRange\nvariable.slowPriceRange = variable.smaSlowTotalRange\nvariable.longTermPriceRange = variable.smaLongTermRange\n\nvariable.bullPriceDeviation = ((((variable.smaFastBullPriceRange * fastBoost) + (variable.smaSlowBullPriceRange * gravity)) / (gravity + 1)) / variable.slowPriceRange) * 2\n\nvariable.volumeDeviation = variable.smaFastTotalVolume / variable.smaLongTermTotalVolume\n\nvariable.openInterestDeviation = ((((variable.smaFastOpenInterest * fastBoost) + (variable.smaSlowOpenInterest * gravity)) / (gravity + 1)) / variable.smaSlowOpenInterest)\n\nvariable.smaPrice = variable.smaMultipliedFastCandleClose / variable.smaLongTermCandleClose\n\n// Happy trading! CJ.","project":"Superalgos","id":"8c60ba71-a9d3-4f8e-afe0-896444288364","savedPayload":{"position":{"x":12573.245899592053,"y":18466.10349130047},"targetPosition":{"x":12650.96049573775,"y":18529.035530405454},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"a063882c-12d0-4d12-9b5a-ca5b1db72b7f","savedPayload":{"position":{"x":12650.96049573775,"y":18529.035530405454},"targetPosition":{"x":12767.532389956295,"y":18623.43358906293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 6 arrays \n\nvariable.previousCurrentVolume = []\nvariable.savedTotalRange = []\nvariable.savedBullPriceRange = [] \nvariable.savedTotalVolume = [] \nvariable.savedOpenInterest = [] \nvariable.savedCandleClose = [] ","project":"Superalgos","id":"34d8c2bd-b8fc-4584-9d03-262c2ed57243","savedPayload":{"position":{"x":12677.94040256997,"y":18390.038482438627},"targetPosition":{"x":12713.7771975245,"y":18483.39652508835},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7aab7dde-e3ed-45b0-907e-f7e7ca67c900","savedPayload":{"position":{"x":12713.7771975245,"y":18483.39652508835},"targetPosition":{"x":12767.532389956295,"y":18623.43358906293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"59f62f92-018d-4f53-9c86-efa887cad1ce","savedPayload":{"position":{"x":12767.532389956295,"y":18623.43358906293},"targetPosition":{"x":12943.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"331e099d-5ffe-4d60-8186-effe0aef5d17","savedPayload":{"position":{"x":12943.867965644038,"y":18866.138687375413},"targetPosition":{"x":13243.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"Average VS Average","id":"13acaaae-6a8e-4e48-a326-9d209079629f"}}}],"id":"01b8702d-ee62-45f7-ac01-e1f7ce70c843","savedPayload":{"position":{"x":13243.867965644038,"y":18866.138687375413},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"plotters":[{"type":"Plotter","name":"Chaikin Oscillator Plotter","config":"{\n \"codeName\": \"Chaikin-Oscillator\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"Chaikin Oscillator","config":"{\n \"codeName\": \"chaikinOscillator\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"Zero Line Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.zeroLine","project":"Superalgos","id":"80862799-63a8-4ba6-a807-b8425ebf42e6","savedPayload":{"position":{"x":12437.728644668177,"y":19458.751691732494},"targetPosition":{"x":12390.798305156108,"y":19162.445189553953},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"ef40ac92-9977-4887-9c81-b2442254f267","savedPayload":{"position":{"x":12390.798305156108,"y":19162.445189553953},"targetPosition":{"x":12343.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Zero Line End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.zeroLine","project":"Superalgos","id":"926f7d83-fec5-4224-b5a4-8e1a54520950","savedPayload":{"position":{"x":12071.473665800311,"y":19400.742601888433},"targetPosition":{"x":12207.670815722175,"y":19133.440644631923},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1b1be8ea-2fa5-41c4-bba0-6ca2139b3f47","savedPayload":{"position":{"x":12207.670815722175,"y":19133.440644631923},"targetPosition":{"x":12343.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Chaikin Oscillator Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.chaikinOscillator","project":"Superalgos","id":"e741c1f0-43b2-4863-8d93-7fc46b343d93","savedPayload":{"position":{"x":11809.264051131018,"y":19138.53298721914},"targetPosition":{"x":12076.566008387528,"y":19002.335837297276},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"53915588-afe8-48a8-9d68-5726ff873676","savedPayload":{"position":{"x":12076.566008387528,"y":19002.335837297276},"targetPosition":{"x":12343.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Chaikin Oscillator End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.chaikinOscillator","project":"Superalgos","id":"10fc95bd-dc19-407a-809e-6f4f385316f6","savedPayload":{"position":{"x":11751.254961286957,"y":18772.278008351273},"targetPosition":{"x":12047.561463465498,"y":18819.208347863343},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"56c5b893-e76e-4eae-b3d3-e2bb1c985ad8","savedPayload":{"position":{"x":12047.561463465498,"y":18819.208347863343},"targetPosition":{"x":12343.867965644038,"y":18866.138687375413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b2a71e98-e51b-4b89-972e-d5581f4625e0","savedPayload":{"position":{"x":12343.867965644038,"y":18866.138687375413},"targetPosition":{"x":12556.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"Zero Line","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"246dfad4-544c-47fb-8b84-977bdd41cd47","savedPayload":{"position":{"x":14463.44450422656,"y":16854.484741416603},"targetPosition":{"x":14753.22225211328,"y":16932.13045494736},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"8896e73d-ee20-461b-9608-55f4927c4b10","savedPayload":{"position":{"x":14753.22225211328,"y":16932.13045494736},"targetPosition":{"x":15043.000000000002,"y":17009.776168478118},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"163aeab0-ae3e-4467-9da4-9f96dc09ec0f","savedPayload":{"position":{"x":14893.000000000002,"y":16749.968547342785},"targetPosition":{"x":15043.000000000002,"y":17009.776168478118},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"ef40ac92-9977-4887-9c81-b2442254f267"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"e1f60b5e-6727-44d7-8e9c-d913098cd747","savedPayload":{"position":{"x":15120.64571353076,"y":16719.998420591397},"targetPosition":{"x":15043.000000000002,"y":17009.776168478118},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"1b1be8ea-2fa5-41c4-bba0-6ca2139b3f47"}}}],"id":"f79ac980-28be-4eaf-87ee-0ae394c976eb","savedPayload":{"position":{"x":12256.000000000002,"y":18654.00665301945},"targetPosition":{"x":12556.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"Chaikin Oscillator","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"60001259-de7c-4c30-b752-839c3ec0cd10","savedPayload":{"position":{"x":11743.867965644038,"y":18441.874618663485},"targetPosition":{"x":12043.867965644038,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"7dcea241-9bf6-4dcd-99d5-f568e8ebd151","savedPayload":{"position":{"x":12043.867965644038,"y":18441.874618663485},"targetPosition":{"x":12343.867965644038,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Chaikin Oscillator Begin","project":"Superalgos","id":"9efb3b5e-4eeb-4aa8-a18e-bada560c738f","savedPayload":{"position":{"x":12131.735931288074,"y":18229.74258430752},"targetPosition":{"x":12343.867965644038,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Chaikin Oscillator Begin","id":"53915588-afe8-48a8-9d68-5726ff873676"}}},{"type":"Polygon Vertex","name":"Chaikin Oscillator End","project":"Superalgos","id":"08067dd0-d1a3-4b75-bcee-996118cfd9db","savedPayload":{"position":{"x":12343.867965644038,"y":18141.874618663485},"targetPosition":{"x":12343.867965644038,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Chaikin Oscillator End","id":"56c5b893-e76e-4eae-b3d3-e2bb1c985ad8"}}}],"id":"b5dd57fb-a9cc-48f2-bc06-cb3b02544f08","savedPayload":{"position":{"x":12343.867965644038,"y":18441.874618663485},"targetPosition":{"x":12556.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"d4571993-801c-4a30-9fc9-eac333de1451","savedPayload":{"position":{"x":12556.000000000002,"y":18654.00665301945},"targetPosition":{"x":12856.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[],"id":"b4b61f3f-b65e-43b2-b8ee-6f87944fb7ae","savedPayload":{"position":{"x":12856.000000000002,"y":18654.00665301945},"targetPosition":{"x":13156.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"9639a20f-b875-46f6-8cbb-4e71cc941041","savedPayload":{"position":{"x":13156.000000000002,"y":18654.00665301945},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"ARPS Slow Plotter","config":"{\n \"codeName\": \"ARPS-Slow\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"ARPS Slow","config":"{\n \"codeName\": \"slowARPS\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"SMA Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.SMA","project":"Superalgos","id":"a210d685-38e1-43a3-9878-adbd61c761e0","savedPayload":{"position":{"x":15538.752452292845,"y":18825.3271911492},"targetPosition":{"x":15238.886722607795,"y":18816.35255129838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"6c0d2a1f-25f3-4d72-a57d-97f2c956f40e","savedPayload":{"position":{"x":15238.886722607795,"y":18816.35255129838},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"SMA End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.SMA","project":"Superalgos","id":"b884cd0e-265e-4f70-846f-33a37a257ecc","savedPayload":{"position":{"x":15471.572466325475,"y":19083.76338171794},"targetPosition":{"x":15205.296729624106,"y":18945.57064658275},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"ae39d4c5-612d-4ac3-a447-2c3157e028e5","savedPayload":{"position":{"x":15205.296729624106,"y":18945.57064658275},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBull","project":"Superalgos","id":"eb99829a-5d1a-40e4-9ccc-7fc73d6c6948","savedPayload":{"position":{"x":15298.914129735489,"y":19287.45804025429},"targetPosition":{"x":15118.967561329113,"y":19047.417975850924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"2852ef63-8ffe-4516-b5f9-f635ea773efa","savedPayload":{"position":{"x":15118.967561329113,"y":19047.417975850924},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBull","project":"Superalgos","id":"8aedf7aa-675e-467b-b9b5-d60754399725","savedPayload":{"position":{"x":15054.974543600074,"y":19396.066941484063},"targetPosition":{"x":14996.997768261406,"y":19101.72242646581},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"66be2c9a-b271-4410-b305-d6ff7a8f6806","savedPayload":{"position":{"x":14996.997768261406,"y":19101.72242646581},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBear","project":"Superalgos","id":"4db679ee-e6b7-43e0-89b9-df275970ab75","savedPayload":{"position":{"x":14788.068934676035,"y":19388.07876051796},"targetPosition":{"x":14863.544963799388,"y":19097.728335982767},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"8a80a7ec-3ffd-4d5f-b212-b5e052515b31","savedPayload":{"position":{"x":14863.544963799388,"y":19097.728335982767},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBear","project":"Superalgos","id":"f68cafa6-18dd-40b8-b669-265897ffbbc7","savedPayload":{"position":{"x":14551.061232193262,"y":19265.075654564916},"targetPosition":{"x":14745.041112558001,"y":19036.226783006245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"bc3e9257-c56b-42ef-a0cb-82656d0a364e","savedPayload":{"position":{"x":14745.041112558001,"y":19036.226783006245},"targetPosition":{"x":14939.02099292274,"y":18807.37791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"0fbe8beb-9d62-46b2-9d77-9b246aff6bdc","savedPayload":{"position":{"x":12634.447798537763,"y":18587.46242578744},"targetPosition":{"x":12741.958183401353,"y":18307.38829783828},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"SMA","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"95265ad5-3c49-4d1f-9a60-01bcdf2816be","savedPayload":{"position":{"x":15081.40991376369,"y":19329.96089514218},"targetPosition":{"x":14918.01820325918,"y":19078.359724758553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d3facbf8-a2e6-4452-b21b-35352511a827","savedPayload":{"position":{"x":14918.01820325918,"y":19078.359724758553},"targetPosition":{"x":14754.626492754673,"y":18826.758554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"SMA Begin","project":"Superalgos","id":"36c97105-26c3-475e-949d-ce8c3480f651","savedPayload":{"position":{"x":14692.252985509345,"y":19120.202834595064},"targetPosition":{"x":14754.626492754673,"y":18826.758554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA Begin","id":"6c0d2a1f-25f3-4d72-a57d-97f2c956f40e"}}},{"type":"Polygon Vertex","name":"SMA End","project":"Superalgos","id":"6dd790c5-abf3-4fb3-b19f-6afaf91da40a","savedPayload":{"position":{"x":14503.025322371046,"y":18990.15026487943},"targetPosition":{"x":14754.626492754673,"y":18826.758554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA End","id":"ae39d4c5-612d-4ac3-a447-2c3157e028e5"}}}],"id":"c92be7eb-fddc-4bc6-a65d-a0a40bc37ec8","savedPayload":{"position":{"x":12490.357013017727,"y":18470.780008342786},"targetPosition":{"x":12741.958183401353,"y":18307.38829783828},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bull","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"95ed4962-8fe8-4f35-ae47-64204481b727","savedPayload":{"position":{"x":14562.654978611015,"y":19333.231176915182},"targetPosition":{"x":14578.355765483899,"y":19033.642316488807},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"e7445d37-5968-48de-927c-4efdb45b7c59","savedPayload":{"position":{"x":14578.355765483899,"y":19033.642316488807},"targetPosition":{"x":14594.056552356782,"y":18734.05345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bull Begin","project":"Superalgos","id":"0f784377-cb5c-4f2f-96b3-68407b05af78","savedPayload":{"position":{"x":14371.113104713564,"y":18934.7926379701},"targetPosition":{"x":14594.056552356782,"y":18734.05345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull Begin","id":"2852ef63-8ffe-4516-b5f9-f635ea773efa"}}},{"type":"Polygon Vertex","name":"APS Bull End","project":"Superalgos","id":"8c0f843b-249e-4a35-88b9-70f63e1890c3","savedPayload":{"position":{"x":14294.46769193041,"y":18718.352669189557},"targetPosition":{"x":14594.056552356782,"y":18734.05345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull End","id":"66be2c9a-b271-4410-b305-d6ff7a8f6806"}}}],"id":"f019e42a-3005-4a2b-9717-48d6902c03da","savedPayload":{"position":{"x":12442.36932297498,"y":18291.687510965396},"targetPosition":{"x":12741.958183401353,"y":18307.38829783828},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bear","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed RED","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"b3ea885c-fc4e-44b5-93e4-c965b7622d6d","savedPayload":{"position":{"x":14141.051196759618,"y":19030.96039000926},"targetPosition":{"x":14329.847314074568,"y":18797.81660157217},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"a1fa021f-4b0f-41ee-a344-cdb8360b641a","savedPayload":{"position":{"x":14329.847314074568,"y":18797.81660157217},"targetPosition":{"x":14518.643431389519,"y":18564.67281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bear Begin","project":"Superalgos","id":"1c703412-aa66-4f3c-953e-f1798935a713","savedPayload":{"position":{"x":14220.286862779038,"y":18596.031352115377},"targetPosition":{"x":14518.643431389519,"y":18564.67281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear Begin","id":"8a80a7ec-3ffd-4d5f-b212-b5e052515b31"}}},{"type":"Polygon Vertex","name":"APS Bear End","project":"Superalgos","id":"e915dba3-f07e-42df-9705-7da67057decd","savedPayload":{"position":{"x":14285.499642952427,"y":18375.876695820127},"targetPosition":{"x":14518.643431389519,"y":18564.67281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear End","id":"bc3e9257-c56b-42ef-a0cb-82656d0a364e"}}}],"id":"07d9669b-ce23-49fb-b2dd-666c5f32c755","savedPayload":{"position":{"x":12508.814394964262,"y":18118.592180523327},"targetPosition":{"x":12741.958183401353,"y":18307.38829783828},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"59717ffa-8d07-4e2b-98da-e6fb3353ea04","savedPayload":{"position":{"x":12741.958183401353,"y":18307.38829783828},"targetPosition":{"x":13031.735931288074,"y":18229.74258430752},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[{"type":"Plotter Panel","name":"ARPS Slow","config":"{\n \"codeName\": \"ARPS-Slow\"\n}","project":"Superalgos","panelData":[{"type":"Panel Data","name":"Average Range % per Candle","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageARPS","project":"Superalgos","id":"6f7acaa5-1243-4f77-875f-5397475358e9","savedPayload":{"position":{"x":12699.574023683499,"y":17530.157215285468},"targetPosition":{"x":12959.38164481883,"y":17680.157215285468},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.BLACK\"\n}","project":"Superalgos","id":"c1de33b9-fa92-419f-baa8-081dc437c569","savedPayload":{"position":{"x":12959.38164481883,"y":17380.157215285468},"targetPosition":{"x":12959.38164481883,"y":17680.157215285468},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"8fd22998-6471-490b-bd96-9d30d99978b8","savedPayload":{"position":{"x":12959.38164481883,"y":17680.157215285468},"targetPosition":{"x":13109.38164481883,"y":17939.9648364208},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BULL","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBull","project":"Superalgos","id":"20fc3099-2c91-4c55-9336-60553f207253","savedPayload":{"position":{"x":13109.38164481883,"y":17360.40934064736},"targetPosition":{"x":13187.027358349585,"y":17650.18708853408},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n}","project":"Superalgos","id":"6906425e-38ab-4aaa-84da-b4e43eda38cd","savedPayload":{"position":{"x":13399.15939270555,"y":17438.055054178116},"targetPosition":{"x":13187.027358349585,"y":17650.18708853408},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"b9bd72d6-fe20-411e-a481-3593020f9ee2","savedPayload":{"position":{"x":13187.027358349585,"y":17650.18708853408},"targetPosition":{"x":13109.38164481883,"y":17939.9648364208},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BEAR","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBear","project":"Superalgos","id":"457c2cc9-cf06-407d-a12b-e9a24ce43a3b","savedPayload":{"position":{"x":13519.18926595416,"y":17530.157215285468},"targetPosition":{"x":13369.18926595416,"y":17789.9648364208},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n\"paletteColor\": \"UI_COLOR.RED\"\n}","project":"Superalgos","id":"8d54d8bf-89eb-41f8-bfb2-8a471506b3b5","savedPayload":{"position":{"x":13669.18926595416,"y":17789.9648364208},"targetPosition":{"x":13369.18926595416,"y":17789.9648364208},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"2731ea97-36e9-4bad-8339-803c567e8a87","savedPayload":{"position":{"x":13369.18926595416,"y":17789.9648364208},"targetPosition":{"x":13109.38164481883,"y":17939.9648364208},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"75e49a63-45a5-4f16-876e-53a509ddb245","savedPayload":{"position":{"x":13109.38164481883,"y":17939.9648364208},"targetPosition":{"x":13031.735931288074,"y":18229.74258430752},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e12e90bd-bc37-42da-9f83-7b1506391bd9","savedPayload":{"position":{"x":13031.735931288074,"y":18229.74258430752},"targetPosition":{"x":13243.867965644038,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f3a68e45-18b6-4192-bccd-00364c5d72c0","savedPayload":{"position":{"x":13243.867965644038,"y":18441.874618663485},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"ARPS Fast Plotter","config":"{\n \"codeName\": \"ARPS-Fast\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"ARPS Fast","config":"{\n \"codeName\": \"ARPS-Fast\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"SMA Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.SMA","project":"Superalgos","id":"7f32a7cc-bbbb-4b76-918d-fb4b49ae1cbe","savedPayload":{"position":{"x":15614.752452292845,"y":18600.8271911492},"targetPosition":{"x":15314.886722607795,"y":18591.85255129838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"43c595ce-8ba1-4a6a-b126-38898e46c880","savedPayload":{"position":{"x":15314.886722607795,"y":18591.85255129838},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"SMA End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.SMA","project":"Superalgos","id":"17b6dd00-6205-482f-8ed4-1c7b215aa634","savedPayload":{"position":{"x":15547.572466325475,"y":18859.26338171794},"targetPosition":{"x":15281.296729624106,"y":18721.07064658275},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"547e8e7d-b5b6-4fcd-ba52-975447186c6d","savedPayload":{"position":{"x":15281.296729624106,"y":18721.07064658275},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBull","project":"Superalgos","id":"c65449b6-1047-449c-8974-d439b263f767","savedPayload":{"position":{"x":15374.914129735489,"y":19062.95804025429},"targetPosition":{"x":15194.967561329117,"y":18822.917975850924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"ec943efd-adb7-4d6a-8bab-1f77dae8bade","savedPayload":{"position":{"x":15194.967561329117,"y":18822.917975850924},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBull","project":"Superalgos","id":"bf788df7-d7bd-44f5-a1e2-f991b559eb67","savedPayload":{"position":{"x":15130.974543600076,"y":19171.566941484063},"targetPosition":{"x":15072.997768261408,"y":18877.22242646581},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"a8a9bc4f-6b37-4ce7-8e87-0589fcf5fb58","savedPayload":{"position":{"x":15072.997768261408,"y":18877.22242646581},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBear","project":"Superalgos","id":"e4644710-8f0c-462d-b981-a1dce5b8c73a","savedPayload":{"position":{"x":14864.068934676037,"y":19163.57876051796},"targetPosition":{"x":14939.54496379939,"y":18873.228335982767},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"a144fd80-7187-4237-8a1e-efc6927eb58f","savedPayload":{"position":{"x":14939.54496379939,"y":18873.228335982767},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBear","project":"Superalgos","id":"c31177a2-ed80-4eab-9b17-b4a6a17fd77a","savedPayload":{"position":{"x":14627.061232193264,"y":19040.575654564916},"targetPosition":{"x":14821.041112558003,"y":18811.726783006245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"725734c1-1636-4802-a3d7-40caa4b4f655","savedPayload":{"position":{"x":14821.041112558003,"y":18811.726783006245},"targetPosition":{"x":15015.020992922742,"y":18582.87791144756},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ddc7e432-cf87-475e-8af1-ddd2209fde78","savedPayload":{"position":{"x":12922.12874157189,"y":18026.027645942188},"targetPosition":{"x":13196.19237886467,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"SMA","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"25a3b187-cb00-4569-881a-e8599a2ac9bf","savedPayload":{"position":{"x":15157.40991376369,"y":19105.46089514218},"targetPosition":{"x":14994.018203259182,"y":18853.859724758553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"7807b9a3-05ea-421c-8584-d363dff6ca7a","savedPayload":{"position":{"x":14994.018203259182,"y":18853.859724758553},"targetPosition":{"x":14830.626492754674,"y":18602.258554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"SMA Begin","project":"Superalgos","id":"498ac6aa-2b55-4793-b2fe-0fd647ae7512","savedPayload":{"position":{"x":14768.252985509347,"y":18895.702834595064},"targetPosition":{"x":14830.626492754674,"y":18602.258554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA Begin","id":"43c595ce-8ba1-4a6a-b126-38898e46c880"}}},{"type":"Polygon Vertex","name":"SMA End","project":"Superalgos","id":"f65fd57b-fd01-440e-a825-098fff6c4952","savedPayload":{"position":{"x":14579.025322371048,"y":18765.65026487943},"targetPosition":{"x":14830.626492754674,"y":18602.258554374926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA End","id":"547e8e7d-b5b6-4fcd-ba52-975447186c6d"}}}],"id":"d481800e-4a37-4638-a095-e03282974b8d","savedPayload":{"position":{"x":12902.74809864453,"y":17841.63314577412},"targetPosition":{"x":13196.19237886467,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bull","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"8463545a-e7e6-46d1-975c-729f23eaa7d2","savedPayload":{"position":{"x":14638.654978611017,"y":19108.731176915182},"targetPosition":{"x":14654.3557654839,"y":18809.142316488807},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"0fbd4479-d451-4f8a-8452-27171db16d82","savedPayload":{"position":{"x":14654.3557654839,"y":18809.142316488807},"targetPosition":{"x":14670.056552356784,"y":18509.55345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bull Begin","project":"Superalgos","id":"63eacfe5-505a-4634-bb5e-c63214b48ebd","savedPayload":{"position":{"x":14447.113104713566,"y":18710.2926379701},"targetPosition":{"x":14670.056552356784,"y":18509.55345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull Begin","id":"ec943efd-adb7-4d6a-8bab-1f77dae8bade"}}},{"type":"Polygon Vertex","name":"APS Bull End","project":"Superalgos","id":"eed08a75-d991-4dd6-98d1-6e0ee70dd04e","savedPayload":{"position":{"x":14370.467691930411,"y":18493.852669189557},"targetPosition":{"x":14670.056552356784,"y":18509.55345606244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull End","id":"a8a9bc4f-6b37-4ce7-8e87-0589fcf5fb58"}}}],"id":"3bfca508-8cbb-4bad-8473-b0e8d785069e","savedPayload":{"position":{"x":12995.453196957013,"y":17681.06320537623},"targetPosition":{"x":13196.19237886467,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bear","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed RED","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"a280c06f-5e9c-44b4-906c-0bd88866c1e4","savedPayload":{"position":{"x":14217.05119675962,"y":18806.46039000926},"targetPosition":{"x":14405.84731407457,"y":18573.31660157217},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"ff24e3b0-c186-4d2b-8722-e19f72075d41","savedPayload":{"position":{"x":14405.84731407457,"y":18573.31660157217},"targetPosition":{"x":14594.64343138952,"y":18340.17281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bear Begin","project":"Superalgos","id":"cffa95e0-222b-46da-b1db-5ca83d0dc237","savedPayload":{"position":{"x":14296.28686277904,"y":18371.531352115377},"targetPosition":{"x":14594.64343138952,"y":18340.17281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear Begin","id":"a144fd80-7187-4237-8a1e-efc6927eb58f"}}},{"type":"Polygon Vertex","name":"APS Bear End","project":"Superalgos","id":"adc73235-49b3-4e74-a451-0a4ba69e0547","savedPayload":{"position":{"x":14361.499642952429,"y":18151.376695820127},"targetPosition":{"x":14594.64343138952,"y":18340.17281313508},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear End","id":"725734c1-1636-4802-a3d7-40caa4b4f655"}}}],"id":"c6488672-2e9b-43a6-b6de-a398ea651320","savedPayload":{"position":{"x":13164.833839884375,"y":17605.650084408968},"targetPosition":{"x":13196.19237886467,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"4ff7b240-bdd0-4f1d-8e31-5f9084686c69","savedPayload":{"position":{"x":13196.19237886467,"y":17904.00665301945},"targetPosition":{"x":13456.000000000002,"y":18054.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[{"type":"Plotter Panel","name":"ARPS Fast","config":"{\n \"codeName\": \"ARPS-Fast\"\n}","project":"Superalgos","panelData":[{"type":"Panel Data","name":"Average Range % per Candle","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageARPS","project":"Superalgos","id":"4fae804c-e7d9-4f8f-9441-59e26185fff7","savedPayload":{"position":{"x":13715.807621135333,"y":17324.451157246007},"targetPosition":{"x":13793.453334666088,"y":17614.228905132728},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.BLACK\"\n}","project":"Superalgos","id":"c5312c7b-f55e-43b7-943e-902588c25c9b","savedPayload":{"position":{"x":14005.585369022052,"y":17402.096870776764},"targetPosition":{"x":13793.453334666088,"y":17614.228905132728},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cdda2164-3e6b-4817-acbc-891388443917","savedPayload":{"position":{"x":13793.453334666088,"y":17614.228905132728},"targetPosition":{"x":13715.807621135333,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BULL","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBull","project":"Superalgos","id":"b9258e5a-1bef-4144-b489-3a65a5c867af","savedPayload":{"position":{"x":14125.615242270664,"y":17494.199031884116},"targetPosition":{"x":13975.615242270664,"y":17754.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n}","project":"Superalgos","id":"9a9c7c68-f24e-4c5e-9e29-34b8260df057","savedPayload":{"position":{"x":14275.615242270664,"y":17754.00665301945},"targetPosition":{"x":13975.615242270664,"y":17754.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"2ce1a18f-aa45-4b1e-a01b-2125ebf93c8e","savedPayload":{"position":{"x":13975.615242270664,"y":17754.00665301945},"targetPosition":{"x":13715.807621135333,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BEAR","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBear","project":"Superalgos","id":"ea88a867-d92e-4680-a40b-ec580bd80df2","savedPayload":{"position":{"x":14295.363116908775,"y":17904.00665301945},"targetPosition":{"x":14005.585369022054,"y":17981.652366550206},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n\"paletteColor\": \"UI_COLOR.RED\"\n}","project":"Superalgos","id":"6430bee3-15e0-4598-a686-2ebc5f4ec6f5","savedPayload":{"position":{"x":14217.717403378017,"y":18193.78440090617},"targetPosition":{"x":14005.585369022054,"y":17981.652366550206},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"39efdc4e-0784-48c0-a39b-0dc54548cb77","savedPayload":{"position":{"x":14005.585369022054,"y":17981.652366550206},"targetPosition":{"x":13715.807621135333,"y":17904.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"775abeea-a292-46a5-aebb-f8c0bfef7ca0","savedPayload":{"position":{"x":13715.807621135333,"y":17904.00665301945},"targetPosition":{"x":13456.000000000002,"y":18054.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"fdffbdff-a42f-47db-b068-4a711070bef3","savedPayload":{"position":{"x":13456.000000000002,"y":18054.00665301945},"targetPosition":{"x":13456.000000000002,"y":18354.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5a1c468b-1e45-414b-8710-952a78fe831c","savedPayload":{"position":{"x":13456.000000000002,"y":18354.00665301945},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"Average VS Average Plotter","config":"{\n \"codeName\": \"averageVsAverage\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"Average VS Average","config":"{\n \"codeName\": \"averageVsAverage\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"Zero Line Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = 1","project":"Superalgos","id":"80edad17-0f41-4dbb-864e-c2b257b06dde","savedPayload":{"position":{"x":13012.422735946908,"y":17744.918604065882},"targetPosition":{"x":13457.320310615743,"y":17677.345324925474},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"c695315b-a12a-4972-8363-a3812215a54e","savedPayload":{"position":{"x":13457.320310615743,"y":17677.345324925474},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Zero Line End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = 1","project":"Superalgos","id":"bf6adc6e-9aaf-434a-a41d-12a97f076653","savedPayload":{"position":{"x":13010.390506126048,"y":17488.75995637569},"targetPosition":{"x":13456.304195705314,"y":17549.266001080377},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c","savedPayload":{"position":{"x":13456.304195705314,"y":17549.266001080377},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"bullPriceDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.bullPriceDeviation","project":"Superalgos","id":"52a0dcca-d50d-4dfa-adb0-d6a2d2593187","savedPayload":{"position":{"x":13080.608826662963,"y":17242.404988482835},"targetPosition":{"x":13491.413355973771,"y":17426.08851713395},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"6f6d60df-e373-4466-aa66-c50b8fd02fcf","savedPayload":{"position":{"x":13491.413355973771,"y":17426.08851713395},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"bullPriceDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.bullPriceDeviation","project":"Superalgos","id":"18676f64-51d5-4480-8ca7-398a8cf45098","savedPayload":{"position":{"x":13217.389026832188,"y":17025.81191475659},"targetPosition":{"x":13559.803456058384,"y":17317.791980270827},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"6c51371f-dc06-43ae-b87f-6c3966f95f5f","savedPayload":{"position":{"x":13559.803456058384,"y":17317.791980270827},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"volumeDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.volumeDeviation","project":"Superalgos","id":"9cf7a19a-ff50-46ca-86c3-f8412d4e53ee","savedPayload":{"position":{"x":13409.64998827918,"y":16856.527817901653},"targetPosition":{"x":13655.93393678188,"y":17233.14993184336},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"5af1c2a5-1647-4e38-89e5-7aad7b393e19","savedPayload":{"position":{"x":13655.93393678188,"y":17233.14993184336},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"volumeDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.volumeDeviation","project":"Superalgos","id":"c14b45db-6a55-4b02-83d3-f9c758bcdbde","savedPayload":{"position":{"x":13641.815871327472,"y":16748.267088673914},"targetPosition":{"x":13772.016878306025,"y":17179.01956722949},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1f191bf6-5495-4b78-bc8b-d3492eeeac82","savedPayload":{"position":{"x":13772.016878306025,"y":17179.01956722949},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"openInterestDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.openInterestDeviation","project":"Superalgos","id":"afc254ff-402b-4632-952a-3a8504eb2f11","savedPayload":{"position":{"x":13895.07797687616,"y":16709.800367504067},"targetPosition":{"x":13898.64793108037,"y":17159.786206644567},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"803aaa7c-ad01-4bad-9943-f4fac99e4987","savedPayload":{"position":{"x":13898.64793108037,"y":17159.786206644567},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"openInterestDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.openInterestDeviation","project":"Superalgos","id":"2d21a7f4-e6ea-47c2-85ec-4638fd68d0bd","savedPayload":{"position":{"x":14148.91851534143,"y":16744.243999370883},"targetPosition":{"x":14025.568200313004,"y":17177.008022577975},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"f36c3390-5e84-428f-aa54-cf2079ac9bf2","savedPayload":{"position":{"x":14025.568200313004,"y":17177.008022577975},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"smaPrice Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.smaPrice","project":"Superalgos","id":"d2a3c177-7426-4111-9e6e-80bd2ddd2ecc","savedPayload":{"position":{"x":14382.77283594463,"y":16848.80756606468},"targetPosition":{"x":14142.495360614605,"y":17229.289805924873},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"de30fcce-febc-4c65-8908-852b2c91a3d9","savedPayload":{"position":{"x":14142.495360614605,"y":17229.289805924873},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"smaPrice End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.smaPrice","project":"Superalgos","id":"0bfdd80f-4420-4333-a60e-ac5afe17df21","savedPayload":{"position":{"x":14577.695452415694,"y":17015.01994927541},"targetPosition":{"x":14239.956668850136,"y":17312.39599753024},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"34af7c63-1865-42ac-b0f3-1ae31470bcd2","savedPayload":{"position":{"x":14239.956668850136,"y":17312.39599753024},"targetPosition":{"x":13902.21788528458,"y":17609.772045785066},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f20cacf7-c7ce-4a35-a06d-15951850e570","savedPayload":{"position":{"x":13902.21788528458,"y":17609.772045785066},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"Zero Line","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"62cd1b53-a0fd-4f09-a9c0-9bb7ac3ac642","savedPayload":{"position":{"x":13606.622714372208,"y":17333.07957471211},"targetPosition":{"x":13836.436047307901,"y":17525.91585761807},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"8eca09c2-69dc-4768-b3e4-08fa7f68b8e6","savedPayload":{"position":{"x":13836.436047307901,"y":17525.91585761807},"targetPosition":{"x":14066.249380243595,"y":17718.752140524033},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"af6872e7-8d5d-451e-802c-de5f614ea534","savedPayload":{"position":{"x":14040.102657419297,"y":17419.89373109651},"targetPosition":{"x":14066.249380243595,"y":17718.752140524033},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"c695315b-a12a-4972-8363-a3812215a54e"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"9bfa8714-fe8d-4631-b9ca-8236b9f989b7","savedPayload":{"position":{"x":14259.085663149557,"y":17488.93880758834},"targetPosition":{"x":14066.249380243595,"y":17718.752140524033},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c"}}}],"id":"ed0185c6-e131-4acf-983c-8ddfe5f1c523","savedPayload":{"position":{"x":14066.249380243595,"y":17718.752140524033},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"smaPrice ABOVE","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.smaPrice > record.previous.smaPrice","project":"Superalgos","id":"6f7dcb6c-ae19-46b2-a082-916dae93a16b","savedPayload":{"position":{"x":14003.00510583763,"y":16806.807443877766},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.8,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n },\n \"atMousePosition\": {\n \"opacity\": 1,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"5860dc00-e1a5-4c65-bd4e-843091d935ce","savedPayload":{"position":{"x":13702.103077599852,"y":16642.91315569686},"targetPosition":{"x":13998.409579778392,"y":16689.843495208926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"675151a8-9c7d-4c48-860d-00e52056eec5","savedPayload":{"position":{"x":13998.409579778392,"y":16689.843495208926},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"bf8ec324-5a02-4895-80ac-46fd519aa77c","savedPayload":{"position":{"x":13783.131983344476,"y":16423.274695891418},"targetPosition":{"x":14038.924032650704,"y":16580.024265306205},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"f7367289-76e5-48d5-a910-0c6636e8869c","savedPayload":{"position":{"x":14038.924032650704,"y":16580.024265306205},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"smaPrice Begin","project":"Superalgos","id":"a74fa0b1-3291-4e48-a1e2-6fed290b521e","savedPayload":{"position":{"x":14118.38050626919,"y":16494.068736408506},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice Begin","id":"de30fcce-febc-4c65-8908-852b2c91a3d9"}}},{"type":"Polygon Vertex","name":"smaPrice End","project":"Superalgos","id":"33d6f2c5-3db4-42ce-8766-f408840b78e0","savedPayload":{"position":{"x":14224.682472800161,"y":16445.062858601686},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice End","id":"34af7c63-1865-42ac-b0f3-1ae31470bcd2"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"8ca3ff70-71b8-41a7-b184-2d85d95c29f4","savedPayload":{"position":{"x":14341.646421469002,"y":16440.46733254245},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c"}}},{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"b711c638-8290-4d76-a1f4-96a9019c6b3d","savedPayload":{"position":{"x":14451.465651371718,"y":16480.981785414766},"targetPosition":{"x":14294.716081956933,"y":16736.773834720992},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"c695315b-a12a-4972-8363-a3812215a54e"}}}],"id":"a7e542dd-3221-4a1a-ab83-16a44d001416","savedPayload":{"position":{"x":14170.041816598648,"y":17727.832802064837},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"smaPrice BELOW","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.smaPrice < record.previous.smaPrice","project":"Superalgos","id":"da6fa977-095e-439d-90a2-7e226c210bd1","savedPayload":{"position":{"x":14090.2888941966,"y":16657.139460121613},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.8,\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 1,\n \"paletteColor\": \"UI_COLOR.RED\"\n }\n}","project":"Superalgos","id":"9e2a011a-4aa8-463c-a10c-dd18e0534a50","savedPayload":{"position":{"x":13863.588626615938,"y":16400.214652104183},"targetPosition":{"x":14125.974538757757,"y":16545.657538178082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d395d4a9-883b-49e9-90ae-a83f2fe2f59d","savedPayload":{"position":{"x":14125.974538757757,"y":16545.657538178082},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n }\n}","project":"Superalgos","id":"941bac99-ea7f-4f0f-b149-3cf34f766cb0","savedPayload":{"position":{"x":14014.851668917005,"y":16221.535530140533},"targetPosition":{"x":14201.60605990829,"y":16456.317977196257},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"2ce85b80-0291-4b52-a297-72dd5e780d6e","savedPayload":{"position":{"x":14201.60605990829,"y":16456.317977196257},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"smaPrice Begin","project":"Superalgos","id":"775e669a-6800-4190-9cad-dbae717911f5","savedPayload":{"position":{"x":14305.669244154476,"y":16402.721915470484},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice Begin","id":"de30fcce-febc-4c65-8908-852b2c91a3d9"}}},{"type":"Polygon Vertex","name":"smaPrice End","project":"Superalgos","id":"0a680163-5643-4a13-b55b-5fb80edde733","savedPayload":{"position":{"x":14422.321415029948,"y":16393.028867549005},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice End","id":"34af7c63-1865-42ac-b0f3-1ae31470bcd2"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"cb32f3a6-681d-4df5-bdfc-14270081099b","savedPayload":{"position":{"x":14533.803336973477,"y":16428.71451211016},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c"}}},{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"e50f0167-e004-4f8a-b593-1729a14e7c0d","savedPayload":{"position":{"x":14623.1428979553,"y":16504.346033260696},"targetPosition":{"x":14388.360450899576,"y":16691.10042425198},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"c695315b-a12a-4972-8363-a3812215a54e"}}}],"id":"57807fe3-2d38-4767-8cee-b0d9091d358e","savedPayload":{"position":{"x":14264.469033973206,"y":17771.86493666486},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"volumeDeviation ABOVE","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.volumeDeviation > record.previous.volumeDeviation","project":"Superalgos","id":"5579428b-bd6e-44f1-b53a-9b9b9948b091","savedPayload":{"position":{"x":14231.426213757817,"y":16531.507148561304},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.2,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"bbe1b239-e08b-440e-971a-49c3ee92a19a","savedPayload":{"position":{"x":14151.518676912645,"y":16186.158059796802},"targetPosition":{"x":14321.74863834028,"y":16433.183888876167},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"826e811a-3650-45c8-914d-b9cdb25c7624","savedPayload":{"position":{"x":14321.74863834028,"y":16433.183888876167},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"4393fca4-e15d-4170-a127-5862e8c845a2","savedPayload":{"position":{"x":14445.787194516954,"y":16383.787124213184},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"c695315b-a12a-4972-8363-a3812215a54e"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"8c390826-ef92-470f-bd4f-4fb5aa2995a6","savedPayload":{"position":{"x":14578.97452500399,"y":16393.100489625405},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c"}}},{"type":"Polygon Vertex","name":"volumeDeviation End","project":"Superalgos","id":"aa9b0281-5501-4ecf-8747-03df65df1b82","savedPayload":{"position":{"x":14694.931245563015,"y":16459.27935887202},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation End","id":"1f191bf6-5495-4b78-bc8b-d3492eeeac82"}}},{"type":"Polygon Vertex","name":"volumeDeviation Begin","project":"Superalgos","id":"114e6dce-ec3c-4ab1-b7f4-5f72f36eeabb","savedPayload":{"position":{"x":14770.690705571464,"y":16569.216195268167},"targetPosition":{"x":14491.978599767914,"y":16680.20971795553},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation Begin","id":"5af1c2a5-1647-4e38-89e5-7aad7b393e19"}}}],"id":"d42bf0ab-d03e-4a30-a896-d27fdbe4fa98","savedPayload":{"position":{"x":14338.14171635459,"y":17845.537619046245},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"volumeDeviation BELOW","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.volumeDeviation < record.previous.volumeDeviation","project":"Superalgos","id":"ba7ccc38-7438-4fd9-8d17-1f7d1c4bff39","savedPayload":{"position":{"x":14157.277178666109,"y":16579.923368208143},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.2,\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"paletteColor\": \"UI_COLOR.RED\"\n }\n}","project":"Superalgos","id":"43749c18-0468-43de-9198-abb8d04541dc","savedPayload":{"position":{"x":14018.614376933985,"y":16253.69670625219},"targetPosition":{"x":14229.153747799182,"y":16467.409535337592},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"1c2a8a8c-9619-43e6-b564-f478e699a656","savedPayload":{"position":{"x":14229.153747799182,"y":16467.409535337592},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"564d9677-fff2-429f-8dd1-61233ab23d60","savedPayload":{"position":{"x":14342.73022142804,"y":16397.224149283244},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"c695315b-a12a-4972-8363-a3812215a54e"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"7aacc15f-eba7-4455-a74a-23ba60467128","savedPayload":{"position":{"x":14475.511386026454,"y":16383.268286520444},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"d04e0d03-bea6-4066-8fc8-9a2118673f3c"}}},{"type":"Polygon Vertex","name":"volumeDeviation End","project":"Superalgos","id":"9b74661e-c05a-4407-9e2d-f387f2b439e2","savedPayload":{"position":{"x":14601.198303491585,"y":16428.30607682678},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation End","id":"1f191bf6-5495-4b78-bc8b-d3492eeeac82"}}},{"type":"Polygon Vertex","name":"volumeDeviation Begin","project":"Superalgos","id":"478698e3-2c63-421d-b25c-bd6e641d76a2","savedPayload":{"position":{"x":14694.897138370581,"y":16523.417233479846},"targetPosition":{"x":14439.69311866438,"y":16681.122364422994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation Begin","id":"5af1c2a5-1647-4e38-89e5-7aad7b393e19"}}}],"id":"fb723dee-63a8-46c2-afc4-48210897864c","savedPayload":{"position":{"x":14382.173850954614,"y":17939.9648364208},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"openInterestDeviation","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 2,\n 7\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n }\n}","project":"Superalgos","id":"30cdd628-da04-4589-b126-db7da41f9b45","savedPayload":{"position":{"x":14668.977724920003,"y":16163.768375838048},"targetPosition":{"x":14674.213446851189,"y":16463.722684384968},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"5ea53d11-e359-484f-920c-76c642c44018","savedPayload":{"position":{"x":14674.213446851189,"y":16463.722684384968},"targetPosition":{"x":14679.449168782374,"y":16763.676992931887},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"openInterestDeviation Begin","project":"Superalgos","id":"39e8c351-78ce-4df3-abd0-24512243c73a","savedPayload":{"position":{"x":14887.846679920072,"y":16547.875052830295},"targetPosition":{"x":14679.449168782374,"y":16763.676992931887},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"openInterestDeviation Begin","id":"803aaa7c-ad01-4bad-9943-f4fac99e4987"}}},{"type":"Polygon Vertex","name":"openInterestDeviation End","project":"Superalgos","id":"b4b2a034-19f0-4069-bb3b-dedf524bb993","savedPayload":{"position":{"x":14979.403477329291,"y":16758.441271000705},"targetPosition":{"x":14679.449168782374,"y":16763.676992931887},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"openInterestDeviation End","id":"f36c3390-5e84-428f-aa54-cf2079ac9bf2"}}}],"id":"b38a785b-70da-4d5c-bf56-064fcc5d55b8","savedPayload":{"position":{"x":14391.254512495416,"y":18043.757272775856},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"bullPriceDeviation","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 3,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"345cc144-aed2-4aaf-9e5d-8a9e628704a2","savedPayload":{"position":{"x":14936.030764208717,"y":16280.656443637166},"targetPosition":{"x":14838.360317871571,"y":16564.312016316962},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"f0e9511b-24df-4a07-90df-78bed13778e0","savedPayload":{"position":{"x":14838.360317871571,"y":16564.312016316962},"targetPosition":{"x":14740.689871534425,"y":16847.96758899676},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"bullPriceDeviation Begin","project":"Superalgos","id":"6c8f60ee-9ee0-4a0f-bf00-1519a8ba31ec","savedPayload":{"position":{"x":15010.328085424175,"y":16716.456244960038},"targetPosition":{"x":14740.689871534425,"y":16847.96758899676},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"bullPriceDeviation Begin","id":"6f6d60df-e373-4466-aa66-c50b8fd02fcf"}}},{"type":"Polygon Vertex","name":"bullPriceDeviation End","project":"Superalgos","id":"31202df8-551d-48cb-87ee-a782dc2fd278","savedPayload":{"position":{"x":15024.34544421422,"y":16945.63803533391},"targetPosition":{"x":14740.689871534425,"y":16847.96758899676},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"bullPriceDeviation End","id":"6c51371f-dc06-43ae-b87f-6c3966f95f5f"}}}],"id":"137e3254-785f-4469-84f6-b654b34fe6b5","savedPayload":{"position":{"x":14364.288439178888,"y":18144.39602847377},"targetPosition":{"x":14092.396103067893,"y":18017.610549951558},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"33e571bd-9a26-4e88-8427-5b863d0aed70","savedPayload":{"position":{"x":14092.396103067893,"y":18017.610549951558},"targetPosition":{"x":13880.26406871193,"y":18229.74258430752},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[],"id":"13acaaae-6a8e-4e48-a326-9d209079629f","savedPayload":{"position":{"x":13880.26406871193,"y":18229.74258430752},"targetPosition":{"x":13668.132034355966,"y":18441.874618663485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3548ecec-25e1-4bb8-86c5-9743052bd80b","savedPayload":{"position":{"x":13668.132034355966,"y":18441.874618663485},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b4f0c498-27c5-4c28-acef-67ff7f317e38","savedPayload":{"position":{"x":13456.000000000002,"y":18654.00665301945},"targetPosition":{"x":13456.000000000002,"y":18654.00665301945},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}} \ No newline at end of file diff --git a/Projects/Superalgos/Plugins/Data-Mines/Omega.json b/Projects/Superalgos/Plugins/Data-Mines/Omega.json deleted file mode 100644 index 0ce7c2d8e..000000000 --- a/Projects/Superalgos/Plugins/Data-Mines/Omega.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"Data Mine","name":"Omega","config":"{\n \"codeName\": \"Omega\"\n}","project":"Superalgos","sensorBots":[],"indicatorBots":[{"type":"Indicator Bot","name":"ARPS Fast","config":"{\n \"codeName\": \"ARPS-Fast\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market ARPS Fast","project":"Superalgos","id":"d3431f91-842e-459b-b969-e93269ab06ee","savedPayload":{"position":{"x":17451.72948123781,"y":40729.60591487127},"targetPosition":{"x":17509.963766385878,"y":40946.93922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"5132afea-630c-455f-be7c-8d94469a239d"}}}],"outputDatasetFolders":[],"id":"81ac5c2c-7766-44ed-8e84-94b42ffbf7ab","savedPayload":{"position":{"x":17509.963766385878,"y":40946.93922578631},"targetPosition":{"x":17568.198051533946,"y":41164.27253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Fast Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"dc491dd3-55ba-40ac-8f8e-0dd6d8e8e877","savedPayload":{"position":{"x":17570.18233668201,"y":40849.511367860556},"targetPosition":{"x":17626.43233668201,"y":40946.93922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"5a92a4fb-51ab-4ac6-9e6c-834767b542b4"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"95097e44-2b3c-4368-84ad-73f5d6ca1d89","savedPayload":{"position":{"x":17655.549479256046,"y":40838.27257032879},"targetPosition":{"x":17626.43233668201,"y":40946.93922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"0538007e-1eb0-4208-b848-4f7ff62588fa","savedPayload":{"position":{"x":17723.86019460776,"y":40890.68922578631},"targetPosition":{"x":17626.43233668201,"y":40946.93922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}}],"dataMineDataDependencies":[],"id":"84ef19f0-4c0b-4cec-844c-e4b7b1758f64","savedPayload":{"position":{"x":17626.43233668201,"y":40946.93922578631},"targetPosition":{"x":17568.198051533946,"y":41164.27253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"5a92a4fb-51ab-4ac6-9e6c-834767b542b4","savedPayload":{"position":{"x":17886.39610306789,"y":40846.0744851674},"targetPosition":{"x":17568.198051533946,"y":41164.27253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"301b012f-4e33-4549-89c3-90bf2f992458","savedPayload":{"position":{"x":17785.531362448986,"y":41106.038251553284},"targetPosition":{"x":17568.198051533946,"y":41164.27253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"e226b09c-b34e-493e-a9cb-c6562faa8ad2","savedPayload":{"position":{"x":17785.531362448986,"y":41222.50682184941},"targetPosition":{"x":17568.198051533946,"y":41164.27253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e0c56f6f-d2dd-4d09-bd32-98e75221d015","savedPayload":{"position":{"x":15187.198051533946,"y":41176.27253670135},"targetPosition":{"x":14869,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily ARPS Fast","project":"Superalgos","id":"c2993196-c4fb-4804-99b7-bf15c2f9e899","savedPayload":{"position":{"x":18150,"y":40703.047724829295},"targetPosition":{"x":17925,"y":41092.759156532295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"82f018e1-8fbd-4f93-b708-7bced5b23671"}}}],"outputDatasetFolders":[],"id":"d19d52df-3197-47d4-9f1d-c58b6fda2a87","savedPayload":{"position":{"x":17925,"y":41092.759156532295},"targetPosition":{"x":17700,"y":41482.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Fast Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"60ec7290-4564-4609-93f2-046e7adefd51","savedPayload":{"position":{"x":18334.79899745976,"y":40880.068832659854},"targetPosition":{"x":18089.711431703,"y":41257.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"46093d66-daaa-4f01-b9e8-2c8001878a4e"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"0f7886f9-2cb3-403a-a71a-0620123d69e4","savedPayload":{"position":{"x":18439.427114358634,"y":40974.276412262865},"targetPosition":{"x":18089.711431703,"y":41257.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"fca6d255-88bf-43e1-947c-8b52cf9c8410","savedPayload":{"position":{"x":18509.822623626736,"y":41096.20501093991},"targetPosition":{"x":18089.711431703,"y":41257.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"5555532e-03cc-4eb3-a922-b175291abe9c","savedPayload":{"position":{"x":18539.094722342554,"y":41233.91940792597},"targetPosition":{"x":18089.711431703,"y":41257.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}}],"dataMineDataDependencies":[],"id":"2eb87964-42f6-472f-9f82-ae7ce3cc175b","savedPayload":{"position":{"x":18089.711431703,"y":41257.470588235294},"targetPosition":{"x":17700,"y":41482.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"46093d66-daaa-4f01-b9e8-2c8001878a4e","savedPayload":{"position":{"x":18150,"y":41482.470588235294},"targetPosition":{"x":17700,"y":41482.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"df3b3c25-507f-43b2-b620-c1163cdbbf99","savedPayload":{"position":{"x":17894.8557158515,"y":41594.970588235294},"targetPosition":{"x":17700,"y":41482.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"63452d0d-1cf4-4bc8-9f8e-e42ddc4da4c7","savedPayload":{"position":{"x":17812.5,"y":41677.32630408679},"targetPosition":{"x":17700,"y":41482.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e83d3882-522d-47ee-a853-9fd48c52a962","savedPayload":{"position":{"x":15319,"y":41494.470588235294},"targetPosition":{"x":14869,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"ARPS Fast","config":"{\n \"codeName\": \"fastARPS\",\n \"singularVariableName\": \"fastARPS\",\n \"pluralVariableName\": \"fastARPSs\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"5132afea-630c-455f-be7c-8d94469a239d","savedPayload":{"position":{"x":15377.438536534504,"y":41659.67228307919},"targetPosition":{"x":15081.132034355964,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"82f018e1-8fbd-4f93-b708-7bced5b23671","savedPayload":{"position":{"x":15348.433991612474,"y":41842.79977251312},"targetPosition":{"x":15081.132034355964,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"6256f160-7706-4ff2-ae9a-3cd8d266fddf","savedPayload":{"position":{"x":18327.13933855677,"y":42135.34585808014},"targetPosition":{"x":18030.832836378235,"y":42182.276197592204},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"333362de-b155-4287-90ca-f1d19e5de3ca","savedPayload":{"position":{"x":18030.832836378235,"y":42182.276197592204},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"c28a92c4-3eb2-41d2-8e27-61293dad8ed8","savedPayload":{"position":{"x":18327.13933855677,"y":42323.06721612842},"targetPosition":{"x":18030.832836378235,"y":42276.13687661635},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1b695741-ce14-4efb-af70-61fe74d65089","savedPayload":{"position":{"x":18030.832836378235,"y":42276.13687661635},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate ARPS","config":"{\n \"codeName\": \"ARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.ARPS))\n{variable.ARPS = 0}\nelse {variable.ARPS}","project":"Superalgos","id":"fb21f59f-0eec-4b84-940c-c4eb222e75d9","savedPayload":{"position":{"x":18135.479270084455,"y":42433.50226198707},"targetPosition":{"x":18001.8282914562,"y":42365.40368702614},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"8b4fd778-668a-4e84-84f0-c3ef86143c97","savedPayload":{"position":{"x":18001.8282914562,"y":42365.40368702614},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bull","config":"{\n \"codeName\": \"apsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBull))\n{variable.apsBull = 0}\nelse {variable.apsBull}","project":"Superalgos","id":"f044a4b5-54d6-4fec-a35f-a384a6a8b601","savedPayload":{"position":{"x":18052.724385733636,"y":42547.40458863822},"targetPosition":{"x":17946.658368555654,"y":42441.33857146024},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"9f7c4c1a-1062-49e5-a37c-d8cff8b4de15","savedPayload":{"position":{"x":17946.658368555654,"y":42441.33857146024},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bear","config":"{\n \"codeName\": \"apsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBear))\n{variable.apsBear = 0}\nelse {variable.apsBear}","project":"Superalgos","id":"7835dee1-825c-4467-8cf6-180ab71f04f2","savedPayload":{"position":{"x":17938.822059082486,"y":42630.15947298904},"targetPosition":{"x":17870.723484121554,"y":42496.50849436079},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"10554c37-8b71-46a7-a58c-fa70b517a45d","savedPayload":{"position":{"x":17870.723484121554,"y":42496.50849436079},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate SMA","config":"{\n \"codeName\": \"SMA\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.SMA))\n{variable.SMA = 0}\nelse {variable.SMA}","project":"Superalgos","id":"0cbfa484-337e-47eb-98b3-209a5683e3d4","savedPayload":{"position":{"x":17804.921843467797,"y":42673.666290372086},"targetPosition":{"x":17781.456673711764,"y":42525.513039282814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"cd7c2e47-4b7e-4cee-8967-820c040f8a4d","savedPayload":{"position":{"x":17781.456673711764,"y":42525.513039282814},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage ARPS","config":"{\n \"codeName\": \"percentageARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageARPS))\n{variable.percentageARPS = 0}\nelse {variable.percentageARPS}","project":"Superalgos","id":"01c1be70-508f-4533-af13-3654530e3eeb","savedPayload":{"position":{"x":17664.130824931588,"y":42673.666290372086},"targetPosition":{"x":17687.595994687625,"y":42525.513039282814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"3c947876-5900-4552-8e95-aa0f77871389","savedPayload":{"position":{"x":17687.595994687625,"y":42525.513039282814},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bull","config":"{\n \"codeName\": \"percentageApsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBull))\n{variable.percentageApsBull = 0}\nelse {variable.percentageApsBull}","project":"Superalgos","id":"01086358-6fdd-462c-9a3b-89edca234dc1","savedPayload":{"position":{"x":17530.230609316895,"y":42630.15947298904},"targetPosition":{"x":17598.329184277827,"y":42496.50849436079},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c2095ffb-e643-4a6c-91f0-ccf0e4f20982","savedPayload":{"position":{"x":17598.329184277827,"y":42496.50849436079},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bear","config":"{\n \"codeName\": \"percentageApsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBear))\n{variable.percentageApsBear = 0}\nelse {variable.percentageApsBear}","project":"Superalgos","id":"6ce6dd46-1296-4b13-afab-84d1823351b8","savedPayload":{"position":{"x":17416.328282665745,"y":42547.40458863822},"targetPosition":{"x":17522.394299843727,"y":42441.33857146024},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7a6db1af-b519-4674-a850-10f9e64358ab","savedPayload":{"position":{"x":17522.394299843727,"y":42441.33857146024},"targetPosition":{"x":17734.52633419969,"y":42229.20653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"36353357-8bb9-44e2-80ae-19eec60b1516","savedPayload":{"position":{"x":15353.526334199692,"y":42241.20653710428},"targetPosition":{"x":15081.132034355964,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"// Loop Code\n\nlet nCandles = 3 // Change here number of candles to use\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \n\n// Build arrays\n\nvariable.lastNCandlesARPS.push(candle.max - candle.min)\nvariable.lastNCandlesSMA.push(candle.close)\nvariable.lastNCandlesApsBull.push(candle.max - candle.open)\nvariable.lastNCandlesApsBear.push (candle.open - candle.min)\n\n// console.log(variable.lastNCandlesARPS)\n\n// Keep arrays the correct size of nCandles\n\nif (variable.lastNCandlesARPS.length > nCandles) {\n variable.lastNCandlesARPS.splice(0, 1)\n}\n\nif (variable.lastNCandlesSMA.length > nCandles) {\n variable.lastNCandlesSMA.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBull.length > nCandles) {\n variable.lastNCandlesApsBull.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBear.length > nCandles) {\n variable.lastNCandlesApsBear.splice(0, 1)\n}\n\n\n// Call the functions\nvariable.smaARPS = calculateSMA(variable.lastNCandlesARPS, nCandles)\nvariable.smaSMA = calculateSMA(variable.lastNCandlesSMA, nCandles)\nvariable.smaApsBull = calculateSMA(variable.lastNCandlesApsBull, nCandles)\nvariable.smaApsBear = calculateSMA(variable.lastNCandlesApsBear, nCandles)\n\n// Build SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calc\n if (src.length < periods) { return 0 }\n \n let sum = 0 // Initialize sum variable\n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// Calc final ARPS ApsBull ApsBear SMA as Rate\n\nvariable.ARPS = variable.smaARPS\n\n\nif (variable.smaApsBull > variable.smaApsBear) \n{\n\tvariable.apsBull = variable.smaSMA + ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\nelse \n{\n\tvariable.apsBull = variable.smaSMA - ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\n\nif (variable.smaApsBear > variable.smaApsBull) \n{\n\tvariable.apsBear = variable.smaSMA + ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\nelse \n{\n\tvariable.apsBear = variable.smaSMA - ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\n\nvariable.SMA = variable.smaSMA\n\n\n// Calc final ARPS ApsBull ApsBear as %\n\nvariable.percentageARPS = (variable.smaARPS/candle.close) *100\nvariable.percentageApsBull = (variable.smaApsBull/variable.smaARPS) *100\nvariable.percentageApsBear = (variable.smaApsBear/variable.smaARPS) *100\n\n\n// End of Code :-)","project":"Superalgos","id":"ad10cba8-9086-4846-af86-00082eb86754","savedPayload":{"position":{"x":15060.333810660808,"y":42251.539598611875},"targetPosition":{"x":15049.880964334043,"y":42152.087409075044},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"b749a547-69ea-47fb-837f-1190a5ec2ebd","savedPayload":{"position":{"x":15049.880964334043,"y":42152.087409075044},"targetPosition":{"x":15034.201694843894,"y":42002.9091247698},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 4 arrays \n\nvariable.lastNCandlesARPS = []\nvariable.lastNCandlesSMA = []\nvariable.lastNCandlesApsBull = [] \nvariable.lastNCandlesApsBear = [] \n","project":"Superalgos","id":"955d2caa-e4d0-4e19-bf62-1d48f44c5a69","savedPayload":{"position":{"x":14932.517534074945,"y":42231.295489180455},"targetPosition":{"x":14973.191198382525,"y":42139.94094341619},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"b4cb1e91-d42e-4165-8598-73874f217df5","savedPayload":{"position":{"x":14973.191198382525,"y":42139.94094341619},"targetPosition":{"x":15034.201694843894,"y":42002.9091247698},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"32fc144f-fcf7-4e27-a4ce-9964a6240653","savedPayload":{"position":{"x":15034.201694843894,"y":42002.9091247698},"targetPosition":{"x":15081.132034355964,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fe7a8b58-37c4-4e51-a037-6eedcd8e9dfb","savedPayload":{"position":{"x":15081.132034355964,"y":41706.60262259126},"targetPosition":{"x":14869,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"ARPS","id":"2675db9e-a697-4f84-a252-8c27ed423e24"}}}],"id":"892f3bfe-6b06-491b-994a-825c96bf0e72","savedPayload":{"position":{"x":14869,"y":41494.470588235294},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"Chaikin Oscillator","config":"{\n \"codeName\": \"Chaikin-Oscillator\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market Chaikin Oscillator Data Procedure","project":"Superalgos","id":"ba931d51-1350-4df7-a2d5-2eff15cf844a","savedPayload":{"position":{"x":15417.430428875681,"y":41180.299462731185},"targetPosition":{"x":15336.79764022799,"y":41390.35505869306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"ec6522f5-9165-4607-87a6-ea63e2f4d20e"}}}],"outputDatasetFolders":[],"id":"28505aa2-26a8-479c-bba7-782ed4066ca0","savedPayload":{"position":{"x":15336.79764022799,"y":41390.35505869306},"targetPosition":{"x":15256.164851580297,"y":41600.41065465493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Chaikin Oscillator Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"ad424254-a304-41bb-9ba9-b8267455e0d2","savedPayload":{"position":{"x":15697.396278927989,"y":41111.66875071292},"targetPosition":{"x":15605.880534235934,"y":41317.2164786825},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"72244463-734d-4495-9eab-9ed63818963d"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"ee83aebb-ffed-415b-91c1-0f6fa3f79dfd","savedPayload":{"position":{"x":15756.434920666677,"y":41150.008892950085},"targetPosition":{"x":15605.880534235934,"y":41317.2164786825},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"2d08d62e-f0a9-45b4-b148-6fe217fdf5c6","savedPayload":{"position":{"x":15800.736250087433,"y":41204.7164786825},"targetPosition":{"x":15605.880534235934,"y":41317.2164786825},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Market","project":"Superalgos","id":"9b1e61f2-fd52-4ee2-9c57-ede4bbe084de","savedPayload":{"position":{"x":15825.96374440104,"y":41270.436348248506},"targetPosition":{"x":15605.880534235934,"y":41317.2164786825},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"9bf0483c-4825-4a46-9cf4-1b5262579fc1"}}}],"dataMineDataDependencies":[],"id":"775e3d6e-71ed-4b61-a632-a80aefddbd49","savedPayload":{"position":{"x":15605.880534235934,"y":41317.2164786825},"targetPosition":{"x":15256.164851580297,"y":41600.41065465493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"72244463-734d-4495-9eab-9ed63818963d","savedPayload":{"position":{"x":15700.62460484811,"y":41530.015145386824},"targetPosition":{"x":15256.164851580297,"y":41600.41065465493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"11d0bcf4-9c53-428c-9fff-feb3f72c4ad1","savedPayload":{"position":{"x":15466.220447542168,"y":41681.043443302624},"targetPosition":{"x":15256.164851580297,"y":41600.41065465493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"ff07193a-4761-45da-a5b0-d4a0f65d5dbb","savedPayload":{"position":{"x":15397.76193956651,"y":41775.268495982746},"targetPosition":{"x":15256.164851580297,"y":41600.41065465493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7abd43da-a0dc-477c-b6eb-9e63b21e5262","savedPayload":{"position":{"x":15256.164851580297,"y":41600.41065465493},"targetPosition":{"x":14811.705098312485,"y":41670.80616392304},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily Chaikin Oscillator Data Procedure","project":"Superalgos","id":"d3a96bb9-4c2d-4bbd-ada0-1c8bb456fffe","savedPayload":{"position":{"x":15997.953657659551,"y":41569.246548686424},"targetPosition":{"x":15586.85820172038,"y":41752.27803807054},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"bcb93023-ae74-48f0-a26b-2f2d57c57740"}}}],"outputDatasetFolders":[],"id":"4858b9f4-4354-4e9a-9581-da02aa2619e1","savedPayload":{"position":{"x":15586.85820172038,"y":41752.27803807054},"targetPosition":{"x":15175.76274578121,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Chaikin Oscillator Multi-Period-Daily","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"973153da-c1d7-4643-a367-21c40ce30ebd","savedPayload":{"position":{"x":16034.393054636104,"y":41799.31584654098},"targetPosition":{"x":15623.297598696934,"y":41982.34733592509},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"4a5ee296-a995-48fe-b8ac-1b7e54cbdcdd"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"8327acb7-ef19-4e57-b44d-2871da44d621","savedPayload":{"position":{"x":16067.757351964747,"y":41911.95182665699},"targetPosition":{"x":15623.297598696934,"y":41982.34733592509},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{\n \"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"209f3ffc-3c8b-4e5f-91ce-80e8c5f41bf1","savedPayload":{"position":{"x":16070.832451612658,"y":42029.385144395535},"targetPosition":{"x":15623.297598696934,"y":41982.34733592509},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"93f3541a-f954-4980-bcc8-4e0ae868f5ca","savedPayload":{"position":{"x":16043.408790620675,"y":42143.61291322048},"targetPosition":{"x":15623.297598696934,"y":41982.34733592509},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Daily","project":"Superalgos","id":"65ae3b73-5a3e-411e-ac6c-332f0f8a36a1","savedPayload":{"position":{"x":15987.35524616566,"y":42246.85069945671},"targetPosition":{"x":15623.297598696934,"y":41982.34733592509},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"2e683057-f911-4105-bc77-16f2706d1915"}}}],"dataMineDataDependencies":[],"id":"927e58b1-c870-45e0-b256-eb3fb22d9302","savedPayload":{"position":{"x":15623.297598696934,"y":41982.34733592509},"targetPosition":{"x":15175.76274578121,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"4a5ee296-a995-48fe-b8ac-1b7e54cbdcdd","savedPayload":{"position":{"x":15539.820393249936,"y":42199.812890986264},"targetPosition":{"x":15175.76274578121,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"5f26534d-432d-4be2-9aa8-0aa452dc95c6","savedPayload":{"position":{"x":15267.278490473265,"y":42140.857255424235},"targetPosition":{"x":15175.76274578121,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"11ee3e01-af54-40ed-b3ac-fde2d322cd7e","savedPayload":{"position":{"x":15152.24384154599,"y":42159.07695391251},"targetPosition":{"x":15175.76274578121,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e60b83a0-fb61-4bf2-87dc-9a3c444153b9","savedPayload":{"position":{"x":15175.76274578121,"y":41935.30952745465},"targetPosition":{"x":14811.705098312485,"y":41670.80616392304},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"Chaikin Oscillator Data Procedure","config":"{\n \"codeName\": \"ChaikinOscillator\",\n \"singularVariableName\": \"ChaikinOscillator\",\n \"pluralVariableName\": \"ChaikinOscillators\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"ec6522f5-9165-4607-87a6-ea63e2f4d20e","savedPayload":{"position":{"x":15125.937395081064,"y":42103.309816023444},"targetPosition":{"x":14858.635437824554,"y":41967.11266610158},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"bcb93023-ae74-48f0-a26b-2f2d57c57740","savedPayload":{"position":{"x":14994.832587746418,"y":42234.41462335809},"targetPosition":{"x":14858.635437824554,"y":41967.11266610158},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"59d6bee5-111c-4309-8070-ebe49c60285a","savedPayload":{"position":{"x":15231.062335674598,"y":42937.31790508857},"targetPosition":{"x":14997.918547237507,"y":42748.521787773614},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"4a56532a-32af-4c09-861a-7b0ec19aa90f","savedPayload":{"position":{"x":14997.918547237507,"y":42748.521787773614},"targetPosition":{"x":14764.774758800415,"y":42559.72567045866},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"cac1f7d5-bba0-487e-8a88-96d241085815","savedPayload":{"position":{"x":14979.795528527595,"y":43119.87392635699},"targetPosition":{"x":14872.285143664005,"y":42839.799798407825},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0d2e4662-fbdf-490b-8553-b069cf732f62","savedPayload":{"position":{"x":14872.285143664005,"y":42839.799798407825},"targetPosition":{"x":14764.774758800415,"y":42559.72567045866},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Chaikin Oscillator","config":"{\n \"codeName\": \"chaikinOscillator\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if ( isNaN(variable.chaikinOscillator ) )\n{ variable.chaikinOscillator = 0 }\nelse\n{ variable.chaikinOscillator }","project":"Superalgos","id":"c0570b4b-c935-4511-80a0-965874de3aab","savedPayload":{"position":{"x":14694.37924953231,"y":43004.18542372648},"targetPosition":{"x":14717.844419288345,"y":42856.032172637206},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"f07b74fd-4beb-409b-99e1-ed51c746bc63","savedPayload":{"position":{"x":14717.844419288345,"y":42856.032172637206},"targetPosition":{"x":14764.774758800415,"y":42559.72567045866},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Zero Line","config":"{\n \"codeName\": \"zeroLine\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"0","project":"Superalgos","id":"c37d5f0d-81f7-46bc-9693-9d854f2d4190","savedPayload":{"position":{"x":14481.580582827988,"y":42909.4413531143},"targetPosition":{"x":14575.978641485464,"y":42792.86945889575},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"b5d9bc2b-386e-4670-abee-e828107a5015","savedPayload":{"position":{"x":14575.978641485464,"y":42792.86945889575},"targetPosition":{"x":14764.774758800415,"y":42559.72567045866},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"ADL","config":"{\n \"codeName\": \"ADL\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.accDistLine))\n{ variable.accDistLind = 0 }\nelse\n{ variable.accDistLine }","project":"Superalgos","id":"f617da69-165b-4875-88d6-0edfa8769d2f","savedPayload":{"position":{"x":14344.663566876674,"y":42720.99124775405},"targetPosition":{"x":14484.700630851254,"y":42667.23605532225},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c105d752-f310-4917-ac54-65ff02021576","savedPayload":{"position":{"x":14484.700630851254,"y":42667.23605532225},"targetPosition":{"x":14764.774758800415,"y":42559.72567045866},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e5529d72-8e8d-4a32-b700-13bdb3ab4dd0","savedPayload":{"position":{"x":14764.774758800415,"y":42559.72567045866},"targetPosition":{"x":14858.635437824554,"y":41967.11266610158},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Loop Code */\n\n/* Chaikin Oscillator\n\nKEY TAKEAWAYS\n- The Chaikin Indicator applies MACD to the accumulation-distribution line rather than closing price.\n- A cross above the accumulation-distribution line indicates that market players are accumulating shares, securities or contracts, which is typically bullish.\n\n1. Money Flow Multiplier = [(Close - Low) - (High - Close)] / (High - Low) \n2. Money Flow Volume = Money Flow Multiplier x Volume for the Period\n3. ADL = Previous ADL + Current Period's Money Flow Volume\n4. Chaikin Oscillator = ('fast'-period EMA of ADL) - ('slow'-period EMA of ADL) */\n\n\nlet fastPeriod = 5 // Change value to set 'fast' period (must be less than or equal to 'fast')\nlet slowPeriod = 17 // Change value to set 'slow' period (must be greater than or equal to 'slow')\n\nlet candle = record.current\nlet volume = getElement('volumes', candle)\n\n\n// Set varibles\nvariable.totalVolume = volume.buy + volume.sell\t\nvariable.moneyFlowMultiplier = ((candle.close - candle.min) - (candle.max - candle.close)) / (candle.max - candle.min) \nvariable.moneyFlowVolume = variable.moneyFlowMultiplier * variable.totalVolume \nvariable.currentADL = variable.totalVolume + variable.moneyFlowVolume\nvariable.savedADL.push(variable.currentADL) // Push the currentADL into an array to be able to use \"previous ADL\"\n\nif (variable.savedADL.length > 2) { // Make sure we only save the current and previous\n variable.savedADL.splice(0, 1)\n}\n\n// Calculating the 'accDistLine' using previous ADL value if it is defined, else current\nif (variable.savedADL[0] === 'undefined')\n{variable.accDistLine = variable.savedADL[1] + variable.moneyFlowVolume} // Calculating with Current ADL\nelse\n{variable.accDistLine = variable.savedADL[0] + variable.moneyFlowVolume} // Calculating with Previous ADL\n\n\n// Calculate fastEMA and slowEMA of ADL\nif(isNaN(variable.previousEmaFast))\n{variable.previousEmaFast = variable.accDistLine}\nelse\n{variable.previousEmaFast}\n\nvariable.fastEMA = calculateEMAs(fastPeriod, variable.accDistLine, variable.previousEmaFast)\nvariable.previousEmaFast = variable.fastEMA\n\nif(isNaN(variable.previousEmaSlow))\n{variable.previousEmaSlow = variable.accDistLine}\nelse\n{variable.previousEmaSlow}\nvariable.slowEMA = calculateEMAs(slowPeriod, variable.accDistLine, variable.previousEmaSlow)\nvariable.previousEmaSlow = variable.slowEMA\n\n\n// Create EMA function for 'fast' and 'slow' ADL\nfunction calculateEMAs(periods, adl, previousEMA) {\n let k = 2 / (periods + 1)\n return adl * k + previousEMA * (1-k)\n}\n\n// Calculate Chaikin Oscillator value\nvariable.chaikinOscillator = variable.fastEMA - variable.slowEMA\n\n/*\n// Printing values to console to check\nconsole.log(\"Volume: \", variable.totalVolume)\nconsole.log(\"MF x: \", variable.moneyFlowMultiplier)\nconsole.log(\"MF Vol: \", variable.moneyFlowVolume)\nconsole.log(\"Current ADL: \", variable.currentADL)\nconsole.log(\"AccDistLine: \", variable.accDistLine)\nconsole.log(\"Fast EMA: \", variable.fastEMA)\nconsole.log(\"Slow EMA: \", variable.slowEMA)\nconsole.log(\"Chaikin Oscillator: \", variable.chaikinOscillator)\n*/","project":"Superalgos","id":"c0132fa6-7f08-4457-9656-05bba93d9cca","savedPayload":{"position":{"x":14521.50340346859,"y":42395.751051403655},"targetPosition":{"x":14571.50340346859,"y":42309.14851102521},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"01efe8a3-bfc2-43ee-b29e-a72c9fa7ab5f","savedPayload":{"position":{"x":14571.50340346859,"y":42309.14851102521},"targetPosition":{"x":14646.50340346859,"y":42179.244700457544},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build arrays \n\nvariable.savedADL = []\n\n","project":"Superalgos","id":"6199432b-91d5-471d-b5e2-5cbbfeed340c","savedPayload":{"position":{"x":14429.99705252248,"y":42304.244700457544},"targetPosition":{"x":14516.599592900924,"y":42254.244700457544},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"2ea55eba-609e-4780-8333-7ca25058c8ab","savedPayload":{"position":{"x":14516.599592900924,"y":42254.244700457544},"targetPosition":{"x":14646.50340346859,"y":42179.244700457544},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4be72b8f-5821-473b-9b38-26c665856101","savedPayload":{"position":{"x":14646.50340346859,"y":42179.244700457544},"targetPosition":{"x":14858.635437824554,"y":41967.11266610158},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"14ad8763-cbf9-43e0-8132-16be260a8d2c","savedPayload":{"position":{"x":14858.635437824554,"y":41967.11266610158},"targetPosition":{"x":14811.705098312485,"y":41670.80616392304},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"Chaikin Oscillator","id":"653018cc-a18a-4370-a6c5-e0ad879b2c2f"}}}],"id":"627939de-3884-4de8-99a9-35d0e66fa2d4","savedPayload":{"position":{"x":14781.132034355964,"y":41706.60262259126},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"ARPS Slow","config":"{\n \"codeName\": \"ARPS-Slow\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market Slow ARPS","project":"Superalgos","id":"03519cbc-2f6a-4ac2-9c28-e33e61384619","savedPayload":{"position":{"x":16874.72948123781,"y":41057.10591487127},"targetPosition":{"x":16932.963766385874,"y":41274.43922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"c7403fbf-2ca8-41b4-8e24-a5ec34818127"}}}],"outputDatasetFolders":[],"id":"27246891-a94e-4a4e-9cb1-b7487c876f47","savedPayload":{"position":{"x":16932.963766385874,"y":41274.43922578631},"targetPosition":{"x":16991.198051533946,"y":41491.77253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Slow Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"76089903-5360-4ee6-ae07-dcc91ed96482","savedPayload":{"position":{"x":16993.18233668201,"y":41177.011367860556},"targetPosition":{"x":17049.43233668201,"y":41274.43922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2b630c1d-86e7-4144-be9e-b7ba0ae8ecf6"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"50b106cc-4d03-499e-a5a3-e1aa4cd8215c","savedPayload":{"position":{"x":17078.549479256042,"y":41165.77257032879},"targetPosition":{"x":17049.43233668201,"y":41274.43922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"d9a2dab2-c16a-4d07-9978-77e9bf72f5d2","savedPayload":{"position":{"x":17146.86019460776,"y":41218.18922578631},"targetPosition":{"x":17049.43233668201,"y":41274.43922578631},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}}],"dataMineDataDependencies":[],"id":"90f657aa-0f1f-43c2-ab2d-c91a6cfba4b6","savedPayload":{"position":{"x":17049.43233668201,"y":41274.43922578631},"targetPosition":{"x":16991.198051533946,"y":41491.77253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"2b630c1d-86e7-4144-be9e-b7ba0ae8ecf6","savedPayload":{"position":{"x":17309.39610306789,"y":41173.5744851674},"targetPosition":{"x":16991.198051533946,"y":41491.77253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"087388b9-9acb-40ac-b76e-23bf36e35f05","savedPayload":{"position":{"x":17208.531362448986,"y":41433.538251553284},"targetPosition":{"x":16991.198051533946,"y":41491.77253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"57d2e4a3-6ed0-4b57-a107-39438f91b0e9","savedPayload":{"position":{"x":17208.531362448986,"y":41550.00682184941},"targetPosition":{"x":16991.198051533946,"y":41491.77253670135},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c4f909d9-665a-41ee-9dce-d8e75ea7a43f","savedPayload":{"position":{"x":14356.867965644036,"y":42156.60262259126},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily Slow ARPS","project":"Superalgos","id":"45e34e9d-ef1b-4273-a805-def2f0d4092f","savedPayload":{"position":{"x":17573,"y":41030.547724829295},"targetPosition":{"x":17348,"y":41420.259156532295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"4bff21d4-3de0-4e8e-9f63-b7792996247d"}}}],"outputDatasetFolders":[],"id":"d47a3468-9012-45ea-8c97-317d574f239b","savedPayload":{"position":{"x":17348,"y":41420.259156532295},"targetPosition":{"x":17123,"y":41809.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"ARPS Slow Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"0ce21a09-c93a-499b-8367-f9abf9192022","savedPayload":{"position":{"x":17757.79899745976,"y":41207.568832659854},"targetPosition":{"x":17512.711431703,"y":41584.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a4e156b7-d673-49b0-81bf-6d3d503abd34"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"09887b9d-20ed-4069-b794-d0ad12ec4847","savedPayload":{"position":{"x":17862.42711435863,"y":41301.776412262865},"targetPosition":{"x":17512.711431703,"y":41584.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"febb0ddf-d6b6-4930-9620-58e0033a3e14","savedPayload":{"position":{"x":17932.822623626736,"y":41423.70501093991},"targetPosition":{"x":17512.711431703,"y":41584.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"a9bcd7f0-525e-4eea-a2ad-0e6f987e5799","savedPayload":{"position":{"x":17962.094722342554,"y":41561.41940792597},"targetPosition":{"x":17512.711431703,"y":41584.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}}],"dataMineDataDependencies":[],"id":"d237a234-82ae-473d-9659-0433797141b0","savedPayload":{"position":{"x":17512.711431703,"y":41584.970588235294},"targetPosition":{"x":17123,"y":41809.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"a4e156b7-d673-49b0-81bf-6d3d503abd34","savedPayload":{"position":{"x":17573,"y":41809.970588235294},"targetPosition":{"x":17123,"y":41809.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"c02c96bc-833b-4463-b774-a6753f47278c","savedPayload":{"position":{"x":17317.855715851496,"y":41922.470588235294},"targetPosition":{"x":17123,"y":41809.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"9087ca64-0068-4292-8d22-9228c58f34c5","savedPayload":{"position":{"x":17235.5,"y":42004.82630408679},"targetPosition":{"x":17123,"y":41809.970588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"6d1b63a8-1ea2-47f3-8349-499c63f39446","savedPayload":{"position":{"x":14038.66991411009,"y":42024.8006741252},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"Slow ARPS","config":"{\n \"codeName\": \"slowARPS\",\n \"singularVariableName\": \"slowARPS\",\n \"pluralVariableName\": \"slowARPSs\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"c7403fbf-2ca8-41b4-8e24-a5ec34818127","savedPayload":{"position":{"x":13880.532389956294,"y":41949.307720903744},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"4bff21d4-3de0-4e8e-9f63-b7792996247d","savedPayload":{"position":{"x":13771.551010755491,"y":41799.307720903744},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"1ab4b7a0-7c36-4ab7-8db3-1485543531b2","savedPayload":{"position":{"x":17750.13933855677,"y":42462.84585808014},"targetPosition":{"x":17453.832836378235,"y":42509.776197592204},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"26848c50-95de-4b02-bc64-38b35ba53578","savedPayload":{"position":{"x":17453.832836378235,"y":42509.776197592204},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"a2f026df-7bfd-46a9-937e-2ebcf911b373","savedPayload":{"position":{"x":17750.13933855677,"y":42650.56721612842},"targetPosition":{"x":17453.832836378235,"y":42603.63687661635},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"b80933e3-e479-4d3c-a4ee-c5f81266839e","savedPayload":{"position":{"x":17453.832836378235,"y":42603.63687661635},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate ARPS","config":"{\n \"codeName\": \"ARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.ARPS))\n{variable.ARPS = 0}\nelse {variable.ARPS}","project":"Superalgos","id":"9a85c68f-55f6-4400-b541-e6fbef799189","savedPayload":{"position":{"x":17558.479270084455,"y":42761.00226198707},"targetPosition":{"x":17424.8282914562,"y":42692.90368702614},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"864fb9fd-074e-47ff-8b46-741e984babad","savedPayload":{"position":{"x":17424.8282914562,"y":42692.90368702614},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bull","config":"{\n \"codeName\": \"apsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBull))\n{variable.apsBull = 0}\nelse {variable.apsBull}","project":"Superalgos","id":"6ebf0e39-e7e9-41d2-9419-58dd5037f95f","savedPayload":{"position":{"x":17475.724385733636,"y":42874.90458863822},"targetPosition":{"x":17369.658368555654,"y":42768.83857146024},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"08b55166-37ee-4088-9878-8b8954315cee","savedPayload":{"position":{"x":17369.658368555654,"y":42768.83857146024},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate Aps Bear","config":"{\n \"codeName\": \"apsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.apsBear))\n{variable.apsBear = 0}\nelse {variable.apsBear}","project":"Superalgos","id":"9b6e5a56-c971-42c5-9eda-919e82fc653b","savedPayload":{"position":{"x":17361.822059082486,"y":42957.65947298904},"targetPosition":{"x":17293.723484121554,"y":42824.00849436079},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"2d5b640c-0bf8-4170-a216-d1a75e321225","savedPayload":{"position":{"x":17293.723484121554,"y":42824.00849436079},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Rate SMA","config":"{\n \"codeName\": \"SMA\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(variable.SMA))\n{variable.SMA = 0}\nelse {variable.SMA}","project":"Superalgos","id":"c4b17d80-7441-482b-b920-89d68f56553e","savedPayload":{"position":{"x":17227.921843467797,"y":43001.166290372086},"targetPosition":{"x":17204.456673711764,"y":42853.013039282814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"7833873a-bac5-4646-87e8-c8c2ae5409a2","savedPayload":{"position":{"x":17204.456673711764,"y":42853.013039282814},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage ARPS","config":"{\n \"codeName\": \"percentageARPS\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageARPS))\n{variable.percentageARPS = 0}\nelse {variable.percentageARPS}","project":"Superalgos","id":"681f8933-bb6c-4311-92ff-215eb5a37f33","savedPayload":{"position":{"x":17087.130824931584,"y":43001.166290372086},"targetPosition":{"x":17110.595994687625,"y":42853.013039282814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"9dcd16cf-c609-43b7-896f-3f5d7209ae7e","savedPayload":{"position":{"x":17110.595994687625,"y":42853.013039282814},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bull","config":"{\n \"codeName\": \"percentageApsBull\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBull))\n{variable.percentageApsBull = 0}\nelse {variable.percentageApsBull}","project":"Superalgos","id":"ab02063d-1b37-4024-b0fa-ee38859a6b50","savedPayload":{"position":{"x":16953.230609316895,"y":42957.65947298904},"targetPosition":{"x":17021.329184277827,"y":42824.00849436079},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"2f44af53-9e90-4943-989c-54b2520c65aa","savedPayload":{"position":{"x":17021.329184277827,"y":42824.00849436079},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"Percentage Aps Bear","config":"{\n \"codeName\": \"percentageApsBear\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isNaN(variable.percentageApsBear))\n{variable.percentageApsBear = 0}\nelse {variable.percentageApsBear}","project":"Superalgos","id":"c20bbde5-2d5b-4a30-9c6e-f98155159f5d","savedPayload":{"position":{"x":16839.328282665745,"y":42874.90458863822},"targetPosition":{"x":16945.394299843727,"y":42768.83857146024},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"93555a22-0783-448a-be65-e529d4f8e685","savedPayload":{"position":{"x":16945.394299843727,"y":42768.83857146024},"targetPosition":{"x":17157.52633419969,"y":42556.70653710428},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ee9dcc1e-1f97-417a-bc3a-03ed97bf942b","savedPayload":{"position":{"x":13486.234055866944,"y":41521.19242596629},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"// Loop Code\n\nlet nCandles = 17 // Change here number of candles to use\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \n\n// Build arrays\n\nvariable.lastNCandlesARPS.push(candle.max - candle.min)\nvariable.lastNCandlesSMA.push(candle.close)\nvariable.lastNCandlesApsBull.push(candle.max - candle.open)\nvariable.lastNCandlesApsBear.push (candle.open - candle.min)\n\n// console.log(variable.lastNCandlesARPS)\n\n// Keep arrays the correct size of nCandles\n\nif (variable.lastNCandlesARPS.length > nCandles) {\n variable.lastNCandlesARPS.splice(0, 1)\n}\n\nif (variable.lastNCandlesSMA.length > nCandles) {\n variable.lastNCandlesSMA.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBull.length > nCandles) {\n variable.lastNCandlesApsBull.splice(0, 1)\n}\n\nif (variable.lastNCandlesApsBear.length > nCandles) {\n variable.lastNCandlesApsBear.splice(0, 1)\n}\n\n\n// Call the functions\nvariable.smaARPS = calculateSMA(variable.lastNCandlesARPS, nCandles)\nvariable.smaSMA = calculateSMA(variable.lastNCandlesSMA, nCandles)\nvariable.smaApsBull = calculateSMA(variable.lastNCandlesApsBull, nCandles)\nvariable.smaApsBear = calculateSMA(variable.lastNCandlesApsBear, nCandles)\n\n// Build SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calc\n if (src.length < periods) { return 0 }\n \n let sum = 0 // Initialize sum variable\n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// Calc final ARPS ApsBull ApsBear SMA as Rate\n\nvariable.ARPS = variable.smaARPS\n\n\nif (variable.smaApsBull > variable.smaApsBear) \n{\n\tvariable.apsBull = variable.smaSMA + ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\nelse \n{\n\tvariable.apsBull = variable.smaSMA - ((variable.smaApsBull / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\n\nif (variable.smaApsBear > variable.smaApsBull) \n{\n\tvariable.apsBear = variable.smaSMA + ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBear - variable.smaApsBull) * 2)\n}\nelse \n{\n\tvariable.apsBear = variable.smaSMA - ((variable.smaApsBear / variable.smaARPS) * (variable.smaApsBull - variable.smaApsBear) * 2)\n}\n\nvariable.SMA = variable.smaSMA\n\n\n// Calc final ARPS ApsBull ApsBear as %\n\nvariable.percentageARPS = (variable.smaARPS/candle.close) *100\nvariable.percentageApsBull = (variable.smaApsBull/variable.smaARPS) *100\nvariable.percentageApsBear = (variable.smaApsBear/variable.smaARPS) *100\n\n\n// End of Code :-)","project":"Superalgos","id":"966b7e24-c167-459d-8975-5a7b4e6b8d5e","savedPayload":{"position":{"x":13686.245899592052,"y":41306.56742651631},"targetPosition":{"x":13763.960495737749,"y":41369.499465621295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c17982f3-0168-48b9-90ac-b7bef7cdaa07","savedPayload":{"position":{"x":13763.960495737749,"y":41369.499465621295},"targetPosition":{"x":13880.532389956294,"y":41463.89752427877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 4 arrays \n\nvariable.lastNCandlesARPS = []\nvariable.lastNCandlesSMA = []\nvariable.lastNCandlesApsBull = [] \nvariable.lastNCandlesApsBear = [] \n","project":"Superalgos","id":"b324a567-8972-40c1-9e4b-ece388320ef1","savedPayload":{"position":{"x":13790.940402569968,"y":41230.50241765447},"targetPosition":{"x":13826.777197524498,"y":41323.86046030419},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"ce407fea-a38d-4b44-abb5-2195ffc010e3","savedPayload":{"position":{"x":13826.777197524498,"y":41323.86046030419},"targetPosition":{"x":13880.532389956294,"y":41463.89752427877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ba9e95be-ac7a-43ca-8709-08a562dce5be","savedPayload":{"position":{"x":13880.532389956294,"y":41463.89752427877},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d56a976b-05eb-4aa5-9608-d8839690052c","savedPayload":{"position":{"x":14056.867965644036,"y":41706.60262259126},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"ARPS Slow","id":"ba1f7fe7-29a3-4cf2-b185-dc2c65e5cc5a"}}}],"id":"66aba56e-6265-4de6-baa9-eaea3f5fd8b8","savedPayload":{"position":{"x":14569,"y":41794.470588235294},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Indicator Bot","name":"Average VS Average","config":"{\n \"codeName\": \"averageVsAverage\"\n}","project":"Superalgos","processes":[{"type":"Process Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Market\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Market averageVsAverage","project":"Superalgos","id":"ff8f0062-8f35-45b5-9640-7998961fa0b8","savedPayload":{"position":{"x":14605.61507507505,"y":42398.460093163274},"targetPosition":{"x":14430.75723374723,"y":42256.86300517706},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2fa9132f-8809-4ab6-a7d3-21769b765195"}}}],"outputDatasetFolders":[],"id":"97c82560-d099-42c7-8d64-b8dc57e522ec","savedPayload":{"position":{"x":14430.75723374723,"y":42256.86300517706},"targetPosition":{"x":14255.899392419411,"y":42115.265917190845},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Average VS Average Multi-Period-Market","config":"{\n \"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"70ebbcf2-3a50-4b5d-b857-a1bd35617a0b","savedPayload":{"position":{"x":14445.198836524623,"y":42354.43865572675},"targetPosition":{"x":14336.532181067103,"y":42325.32151315272},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"27ca72af-be47-4d79-9b0c-dadda0003dd2"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Market","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"964c9245-0231-4904-8625-db801ad1fa00","savedPayload":{"position":{"x":14407.33072506021,"y":42412.750433816625},"targetPosition":{"x":14336.532181067103,"y":42325.32151315272},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"a0a61ba9-91cb-4ec7-92fe-134ff079de2d"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Market","project":"Superalgos","id":"445b8c4a-cfcf-4e00-b334-8eba9c4ce149","savedPayload":{"position":{"x":14342.419976144434,"y":42437.667335812606},"targetPosition":{"x":14336.532181067103,"y":42325.32151315272},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"2b03494a-67d6-47f1-89b6-53fc4c9116a8"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Market","project":"Superalgos","id":"1bc1b344-3f7d-48b7-950c-c85db9d23d2d","savedPayload":{"position":{"x":14275.260289627913,"y":42419.67195204658},"targetPosition":{"x":14336.532181067103,"y":42325.32151315272},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Market","id":"9bf0483c-4825-4a46-9cf4-1b5262579fc1"}}}],"dataMineDataDependencies":[],"id":"38f8eb3e-5d3b-43c4-b303-d9d63e2b75b9","savedPayload":{"position":{"x":14336.532181067103,"y":42325.32151315272},"targetPosition":{"x":14255.899392419411,"y":42115.265917190845},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"27ca72af-be47-4d79-9b0c-dadda0003dd2","savedPayload":{"position":{"x":14185.503883151307,"y":42559.725670458654},"targetPosition":{"x":14255.899392419411,"y":42115.265917190845},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"0f18ef7c-8f85-43f3-81dd-d942b1317690","savedPayload":{"position":{"x":14114.302304433199,"y":42290.12375851866},"targetPosition":{"x":14255.899392419411,"y":42115.265917190845},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"1824fa00-dd30-4cdc-acc0-01c2f29056c5"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"7bc96372-69d4-4b2a-9a50-3aa19a47bb65","savedPayload":{"position":{"x":14045.84379645754,"y":42195.89870583854},"targetPosition":{"x":14255.899392419411,"y":42115.265917190845},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"ae0de8e8-9ccc-480f-938c-cb05d8cba570","savedPayload":{"position":{"x":14356.867965644036,"y":42156.60262259126},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Process Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"normalWaitTime\": 0,\n \"retryWaitTime\": 10000,\n \"framework\": {\n \"name\": \"Multi-Period-Daily\"\n }\n}","project":"Superalgos","processOutput":{"type":"Process Output","name":"New Process Output","project":"Superalgos","outputDatasets":[{"type":"Output Dataset","name":"Multi-Period-Daily averageVsAverage","project":"Superalgos","id":"624d6b5e-41d4-4bd9-a445-21dd56645dc3","savedPayload":{"position":{"x":14056.312871159678,"y":42830.37923328609},"targetPosition":{"x":14009.275062689234,"y":42382.84438037037},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"144e811d-ea2c-41d9-9c5b-68f6ba800157"}}}],"outputDatasetFolders":[],"id":"6255fc01-a43a-4ac9-9e81-1013d85c6b12","savedPayload":{"position":{"x":14009.275062689234,"y":42382.84438037037},"targetPosition":{"x":13962.23725421879,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"processDependencies":{"type":"Process Dependencies","name":"New Process Dependencies","project":"Superalgos","statusDependencies":[{"type":"Status Dependency","name":"Average VS Average Multi-Period-Daily","config":"{ \n\"mainUtility\": \"Self Reference\"\n}","project":"Superalgos","id":"f0e71f8c-1f06-426d-8cc5-35a631c8e096","savedPayload":{"position":{"x":13826.243573305124,"y":42793.93983630954},"targetPosition":{"x":13779.20576483468,"y":42346.40498339382},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"f11c0a9b-276d-4e7c-8369-784bea139ced"}}},{"type":"Status Dependency","name":"Candles Volumes Multi-Period-Daily","config":"{\n \"mainUtility\": \"Market Ending Point\"\n}","project":"Superalgos","id":"207c7107-7169-4143-b9bc-627f1d4a92da","savedPayload":{"position":{"x":13708.810255566576,"y":42790.86473666163},"targetPosition":{"x":13779.20576483468,"y":42346.40498339382},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"2a021da8-9feb-475e-90ab-1586968c17c7"}}},{"type":"Status Dependency","name":"Exchange Raw Data Historic-OHLCVs","config":"{ \n\"mainUtility\": \"Market Starting Point\"\n}","project":"Superalgos","id":"e5d78941-5578-4385-a414-5273061e512a","savedPayload":{"position":{"x":13596.17427545057,"y":42757.50043933299},"targetPosition":{"x":13779.20576483468,"y":42346.40498339382},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Status Report","name":"New Status Report","id":"181c7c34-7243-497a-9ddb-1b0067c6d66e"}}}],"dataDependencies":[{"type":"Data Dependency","name":"Candles Multi-Period-Daily","project":"Superalgos","id":"68f9c948-a066-447b-870a-86238da7c2ff","savedPayload":{"position":{"x":13496.011588862253,"y":42696.12066604946},"targetPosition":{"x":13779.20576483468,"y":42346.40498339382},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"678a567c-f08d-49b9-813b-4e54fd6afadb"}}},{"type":"Data Dependency","name":"Volumes Multi-Period-Daily","project":"Superalgos","id":"56a9550b-8f7b-46b5-803f-f517209e23c2","savedPayload":{"position":{"x":13415.148117365954,"y":42610.90834692543},"targetPosition":{"x":13779.20576483468,"y":42346.40498339382},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Dataset Definition","name":"Multi-Period-Daily","id":"2e683057-f911-4105-bc77-16f2706d1915"}}}],"dataMineDataDependencies":[],"id":"76ba561f-3ffb-48cf-9c10-bbe6387e1a0f","savedPayload":{"position":{"x":13779.20576483468,"y":42346.40498339382},"targetPosition":{"x":13962.23725421879,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"statusReport":{"type":"Status Report","name":"New Status Report","project":"Superalgos","id":"f11c0a9b-276d-4e7c-8369-784bea139ced","savedPayload":{"position":{"x":13598.179606750064,"y":42199.812890986264},"targetPosition":{"x":13962.23725421879,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"24742d14-280e-4f10-8602-bdd2862f4625","savedPayload":{"position":{"x":13738.469827760928,"y":41958.82843168987},"targetPosition":{"x":13962.23725421879,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"f29d08f9-e7c8-490c-8fca-14851a0d3dc3"}}},"executionFinishedEvent":{"type":"Execution Finished Event","name":"New Execution Finished Event","project":"Superalgos","id":"716ce0a4-f43e-4f76-8101-20a577815d99","savedPayload":{"position":{"x":13756.689526249203,"y":41843.793782762594},"targetPosition":{"x":13962.23725421879,"y":41935.30952745465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"e0452a39-e3ec-4b20-bd70-0ebcb12c6246","savedPayload":{"position":{"x":14038.66991411009,"y":42024.8006741252},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"products":[{"type":"Product Definition","name":"averageVsAverage","config":"{\n \"codeName\": \"averageVsAverage\",\n \"singularVariableName\": \"averageVsAverage\",\n \"pluralVariableName\": \"averageVsAverages\"\n}","project":"Superalgos","datasets":[{"type":"Dataset Definition","name":"Multi-Period-Market","config":"{\n \"codeName\": \"Multi-Period-Market\",\n \"type\": \"Market Files\",\n \"validTimeFrames\": [\n \"24-hs\",\n \"12-hs\",\n \"08-hs\",\n \"06-hs\",\n \"04-hs\",\n \"03-hs\",\n \"02-hs\",\n \"01-hs\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period\",\n \"fileName\": \"Data.json\"\n}","project":"Superalgos","id":"2fa9132f-8809-4ab6-a7d3-21769b765195","savedPayload":{"position":{"x":13880.532389956294,"y":41949.307720903744},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Dataset Definition","name":"Multi-Period-Daily","config":"{\n \"codeName\": \"Multi-Period-Daily\",\n \"type\": \"Daily Files\",\n \"validTimeFrames\": [\n \"45-min\",\n \"40-min\",\n \"30-min\",\n \"20-min\",\n \"15-min\",\n \"10-min\",\n \"05-min\",\n \"04-min\",\n \"03-min\",\n \"02-min\",\n \"01-min\"\n ],\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset/@Period/@Year/@Month/@Day\",\n \"fileName\": \"Data.json\",\n \"dataRange\": {\n \"filePath\": \"Project/@Project/@MineType/@Mine/@Bot/@Exchange/@BaseAsset-@QuotedAsset/Output/@Product/@Dataset\",\n \"fileName\": \"Data.Range.json\"\n }\n}","project":"Superalgos","id":"144e811d-ea2c-41d9-9c5b-68f6ba800157","savedPayload":{"position":{"x":13771.551010755491,"y":41799.307720903744},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"record":{"type":"Record Definition","name":"New Record Definition","project":"Superalgos","properties":[{"type":"Record Property","name":"Begin","config":"{\n \"codeName\": \"begin\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.begin))\n{record.current.begin = 0}\nelse {record.current.begin}","project":"Superalgos","id":"938c01c4-07de-4033-bdaa-17d8fb09d38a","savedPayload":{"position":{"x":12646.856347572095,"y":42200.0096619911},"targetPosition":{"x":13071.120416284024,"y":41775.74559327917},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"35c4d523-27c6-48c2-b2a1-2b4b63c2e84c","savedPayload":{"position":{"x":13071.120416284024,"y":41775.74559327917},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"End","config":"{\n \"codeName\": \"end\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Formula","code":"if (isNaN(record.current.end))\n{record.current.end = 0}\nelse {record.current.end}","project":"Superalgos","id":"e78d81f6-95be-4eee-a18e-5bfa7640c553","savedPayload":{"position":{"x":12426.176655969914,"y":41896.2701242547},"targetPosition":{"x":12960.780570482933,"y":41623.87582441097},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"05257927-f8b2-4a8b-a50e-a04c1efc3a3e","savedPayload":{"position":{"x":12960.780570482933,"y":41623.87582441097},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"fastPriceRange","config":"{\n \"codeName\": \"fastPriceRange\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.fastPriceRange)) {\nvariable.fastPriceRange\n}\nelse {\nvariable.fastPriceRange = 1\n}","project":"Superalgos","id":"46081807-6648-45a7-a65a-16a9e8da966d","savedPayload":{"position":{"x":13050.924731728142,"y":41421.87703383534},"targetPosition":{"x":13199.077982817413,"y":41398.41186407931},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"5307878c-aafa-410b-b43a-0bcd0020bb08","savedPayload":{"position":{"x":13199.077982817413,"y":41398.41186407931},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"slowPriceRange","config":"{\n \"codeName\": \"slowPriceRange\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.slowPriceRange)) { \nvariable.slowPriceRange\n}\nelse { \nvariable.slowPriceRange = 1\n}","project":"Superalgos","id":"9e21a59a-9c44-47f3-be7f-5c03e8e945ef","savedPayload":{"position":{"x":13050.924731728142,"y":41281.086015299144},"targetPosition":{"x":13199.077982817413,"y":41304.55118505518},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"fdcb9976-a574-40be-bf72-1719da5dcd4e","savedPayload":{"position":{"x":13199.077982817413,"y":41304.55118505518},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"longTermPriceRange","config":"{\n \"codeName\": \"longTermPriceRange\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.longTermPriceRange)) {\nvariable.longTermPriceRange\n}\nelse {\nvariable.longTermPriceRange = 1\n}","project":"Superalgos","id":"2e627fae-2cb1-4f65-84a6-e77c6e88fa17","savedPayload":{"position":{"x":13094.431549111188,"y":41147.18579968445},"targetPosition":{"x":13228.082527739443,"y":41215.28437464538},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"f8988c1b-4938-4a4a-b7f9-7d77d91ce534","savedPayload":{"position":{"x":13228.082527739443,"y":41215.28437464538},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"bullPriceDeviation","config":"{\n \"codeName\": \"bullPriceDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.bullPriceDeviation)) {\nvariable.bullPriceDeviation\n}\nelse {\nvariable.bullPriceDeviation = 1\n}","project":"Superalgos","id":"908c053b-f1eb-4ea4-b545-e954ffd3db1b","savedPayload":{"position":{"x":13177.186433462008,"y":41033.2834730333},"targetPosition":{"x":13283.25245063999,"y":41139.34949021128},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"37955412-117b-41ee-a43d-b803e46416d8","savedPayload":{"position":{"x":13283.25245063999,"y":41139.34949021128},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"smaPrice","config":"{\n \"codeName\": \"smaPrice\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.smaPrice)) {\nvariable.smaPrice\n}\nelse {\nvariable.smaPrice = 1\n}","project":"Superalgos","id":"8f6487d2-ef0b-42d9-b7a3-74045069fdad","savedPayload":{"position":{"x":13291.088760113158,"y":40950.52858868248},"targetPosition":{"x":13359.18733507409,"y":41084.17956731073},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"c760cbf7-ea72-4716-aca7-f6a43d60a9af","savedPayload":{"position":{"x":13359.18733507409,"y":41084.17956731073},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"volumeDeviation","config":"{\n \"codeName\": \"volumeDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.volumeDeviation)) {\nvariable.volumeDeviation\n}\nelse {\nvariable.volumeDeviation = 1\n}","project":"Superalgos","id":"50217133-ddcd-4dd5-8c05-4c284eb3a164","savedPayload":{"position":{"x":13424.988975727849,"y":40907.02177129943},"targetPosition":{"x":13448.454145483884,"y":41055.1750223887},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"9d53e819-26a4-4e2d-999c-8c68a079a7ed","savedPayload":{"position":{"x":13448.454145483884,"y":41055.1750223887},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Record Property","name":"openInterestDeviation","config":"{\n \"codeName\": \"openInterestDeviation\",\n \"isString\": false,\n \"isCalculated\": false\n}","project":"Superalgos","recordFormula":{"type":"Record Formula","name":"New Record Formula","code":"if (isFinite(variable.openInterestDeviation)) {\nvariable.openInterestDeviation\n}\nelse {\nvariable.openInterestDeviation = 1\n}","project":"Superalgos","id":"1a1bba7d-2ea4-452c-980a-885220669585","savedPayload":{"position":{"x":13565.779994264058,"y":40907.02177129943},"targetPosition":{"x":13542.314824508023,"y":41055.1750223887},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"78f159de-c0d7-4373-93a1-645e6791fdfa","savedPayload":{"position":{"x":13542.314824508023,"y":41055.1750223887},"targetPosition":{"x":13495.384484995953,"y":41351.48152456724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"a1e299c4-fed7-4543-9d78-5697aef59e84","savedPayload":{"position":{"x":13486.234055866944,"y":41521.19242596629},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"dataBuilding":{"type":"Data Building Procedure","name":"New Data Building Procedure","project":"Superalgos","loop":{"type":"Procedure Loop","name":"New Procedure Loop","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"EDIT TOP LINES HERE TO CHANGE PERIODS","code":"// The Average VS Average Oscillator\n\n/* The Average VS Average Oscillator can be used to recognize changes between a fast average ('fastPeriod') and a slow average ('slowPeriod'). It measures 'Price Action', 'Volume', and a so called 'Open Interest'.\n'Bull Price Action' and 'Bear Price Action' is defined by the amount between the candle close and max and min.\n'Bull Volume' and 'Bear Volume' is divided using the price action.\n'Open Interest' is based upon the statement where:\nBull Candle and Volume Increase = Bull Interest\nBull Candle and Volume Decrease = Bear Interest\nBear Candle and Volume Increase = Bear Interest\nBear Candle and Volume Decrease = Bull Interest */\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\n/* Loop code */\n\n// User defined lengths of the used periods\n\nlet fastPeriod = 5 // Change this number to the period of your choice (must be less than 'slowPeriod')\nlet slowPeriod = 21 // Change this number to the period of your choice (must be greater than 'fastPeriod')\nlet periodMultiplier = 3 // The 'slowPeriod' is muliplied by the 'periodMultiplier to create the \"long term\" trend\nlet fastBoost = 1.00 // '1.00' equals 'no extra boost' to your 'fastPeriod' where as '1.23' would boost the value by 23%\nlet gravity = 0 // '0' equals 'no gravity' (pullback towards midline ('slowPeriod'))\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring variables used\n\nlet candle = {\n open: record.current.open,\n close: record.current.close,\n min: record.current.min,\n max: record.current.max,\n begin: record.current.begin,\n end: record.current.end\n} \nlet volCandle = record.current\nlet volume = getElement('volumes', volCandle)\nlet totalVolume = volume.buy + volume.sell\nlet totalRange = candle.max - candle.min\nlet multipliedFast = fastPeriod * periodMultiplier\nlet multipliedSlow = slowPeriod * periodMultiplier\n\nif ( candle.close > candle.open ) { \n variable.bullPriceRange = ( candle.close - candle.min ),\n variable.bearPriceRange = ( candle.max - candle.close )\n}\nelse { \n variable.bullPriceRange = ( candle.close - candle.min ),\n variable.bearPriceRange = ( candle.max - candle.close )\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring 'Volume Difference'\n\nvariable.previousCurrentVolume.push(totalVolume)\nif (variable.previousCurrentVolume.length > 2) {\n variable.previousCurrentVolume.splice(0, 1)\n}\n\nif (variable.previousCurrentVolume[1] === 'undefined') {\n variable.positiveVolumeDifference = 0.01\n}\nelse {\n if (variable.previousCurrentVolume[variable.previousCurrentVolume.max] > variable.previousCurrentVolume[0]) {\n variable.positiveTotalVolumeDifference = (variable.previousCurrentVolume[1] - variable.previousCurrentVolume[0]) \n }\n else {\n variable.positiveTotalVolumeDifference = (variable.previousCurrentVolume[0] - variable.previousCurrentVolume[1])\n }\n}\n\nvariable.bullVolumeDifference = variable.positiveTotalVolumeDifference * (variable.bullPriceRange / totalRange)\nvariable.bearVolumeDifference = variable.positiveTotalVolumeDifference * (variable.bearPriceRange / totalRange)\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring 'Open Interest'\n// Converting values to percentages due to the differences of range and volume (range might be in decimals while volume often is in thousands)\n\nif ( candle.close > candle.open && variable.previousCurrentVolume[1] > variable.previousCurrentVolume[0] ) { // Candle UP & Volume UP, Bullish Interest\n variable.openInterest = 1 + ((variable.bullPriceRange / totalRange) * (variable.bullVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse if ( candle.close < candle.open && variable.previousCurrentVolume[1] < variable.previousCurrentVolume[0] ) { // Candle DOWN & Volume DOWN, Bullish Interest\n variable.openInterest = 1 + ((variable.bearPriceRange / totalRange) * (variable.bearVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse if ( candle.close > candle.open && variable.previousCurrentVolume[1] < variable.previousCurrentVolume[0] ) { // Candle UP & Volume DOWN, Bearish Interest\n variable.openInterest = 1 - ((variable.bullPriceRange / totalRange) * (variable.bullVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\nelse { // Candle DOWN & Volume UP, Bearish Interest\n variable.openInterest = 1 - ((variable.bearPriceRange / totalRange) * (variable.bearVolumeDifference / variable.positiveTotalVolumeDifference))\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Saving to arrays\n\nvariable.savedCandleClose.push(candle.close)\nif (variable.savedCandleClose.length > multipliedSlow) {\n variable.savedCandleClose.splice(0, 1)\n}\n\nvariable.savedTotalRange.push(totalRange)\nif (variable.savedTotalRange.length > multipliedSlow) {\n variable.savedTotalRange.splice(0, 1)\n}\n\nvariable.savedBullPriceRange.push(variable.bullPriceRange)\nif (variable.savedBullPriceRange.length > multipliedSlow) {\n variable.savedBullPriceRange.splice(0, 1)\n}\n\nvariable.savedTotalVolume.push(totalVolume)\nif (variable.savedTotalVolume.length > multipliedSlow) {\n variable.savedTotalVolume.splice(0, 1)\n}\n\nvariable.savedOpenInterest.push(variable.openInterest)\nif (variable.savedOpenInterest.length > multipliedSlow) {\n variable.savedOpenInterest.splice(0, 1)\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Calling SMA functions\n\nvariable.smaMultipliedFastCandleClose = calculateSMA(variable.savedCandleClose, multipliedFast)\nvariable.smaSlowCandleClose = calculateSMA(variable.savedCandleClose, slowPeriod)\nvariable.smaLongTermCandleClose = calculateSMA(variable.savedCandleClose, multipliedSlow)\n\nvariable.smaFastTotalRange = calculateSMA(variable.savedTotalRange, fastPeriod)\nvariable.smaSlowTotalRange = calculateSMA(variable.savedTotalRange, slowPeriod)\nvariable.smaLongTermRange = calculateSMA(variable.savedTotalRange, multipliedSlow)\n\nvariable.smaFastBullPriceRange = calculateSMA(variable.savedBullPriceRange, fastPeriod)\nvariable.smaSlowBullPriceRange = calculateSMA(variable.savedBullPriceRange, slowPeriod)\n\nvariable.smaFastTotalVolume = calculateSMA(variable.savedTotalVolume, fastPeriod)\nvariable.smaLongTermTotalVolume = calculateSMA(variable.savedTotalVolume, multipliedSlow)\n\nvariable.smaFastOpenInterest = calculateSMA(variable.savedOpenInterest, fastPeriod)\nvariable.smaSlowOpenInterest = calculateSMA(variable.savedOpenInterest, slowPeriod)\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Creating the SMA function\n\nfunction calculateSMA(src, periods) { \n // Check we have enough values to make the calculation\n if (src.length < periods) { return 0 }\n \n // Initialize sum variable\n let sum = 0 \n for (let i = src.length - periods; i < src.length; i++) {\n sum = sum + src[i]\n }\n let sma = sum / periods\n return sma\n}\n\n// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n// Declaring record variables by comparing 'fastPeriod' values with 'slowPeriod' values, also applying 'fastBoost' and 'gravity'\n\nvariable.fastPriceRange = variable.smaFastTotalRange\nvariable.slowPriceRange = variable.smaSlowTotalRange\nvariable.longTermPriceRange = variable.smaLongTermRange\n\nvariable.bullPriceDeviation = ((((variable.smaFastBullPriceRange * fastBoost) + (variable.smaSlowBullPriceRange * gravity)) / (gravity + 1)) / variable.slowPriceRange) * 2\n\nvariable.volumeDeviation = variable.smaFastTotalVolume / variable.smaLongTermTotalVolume\n\nvariable.openInterestDeviation = ((((variable.smaFastOpenInterest * fastBoost) + (variable.smaSlowOpenInterest * gravity)) / (gravity + 1)) / variable.smaSlowOpenInterest)\n\nvariable.smaPrice = variable.smaMultipliedFastCandleClose / variable.smaLongTermCandleClose\n\n// CJ.","project":"Superalgos","id":"7e403f54-4a96-4d44-b242-bbbf242c3114","savedPayload":{"position":{"x":13686.245899592052,"y":41306.56742651631},"targetPosition":{"x":13763.960495737749,"y":41369.499465621295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"5dd4bc88-e9e8-461e-9c87-03c0aeb5f14a","savedPayload":{"position":{"x":13763.960495737749,"y":41369.499465621295},"targetPosition":{"x":13880.532389956294,"y":41463.89752427877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"initialization":{"type":"Procedure Initialization","name":"New Procedure Initialization","project":"Superalgos","procedureJavascriptCode":{"type":"Procedure Javascript Code","name":"New Procedure Javascript Code","code":"/* Initialization Code */\n\n// Build 6 arrays \n\nvariable.previousCurrentVolume = []\nvariable.savedTotalRange = []\nvariable.savedBullPriceRange = [] \nvariable.savedTotalVolume = [] \nvariable.savedOpenInterest = [] \nvariable.savedCandleClose = [] ","project":"Superalgos","id":"562a1a92-04fd-4126-b3cc-219d21d96607","savedPayload":{"position":{"x":13790.940402569968,"y":41230.50241765447},"targetPosition":{"x":13826.777197524498,"y":41323.86046030419},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{}}},"id":"85dd9771-10b0-492c-ace8-0f18fc14d143","savedPayload":{"position":{"x":13826.777197524498,"y":41323.86046030419},"targetPosition":{"x":13880.532389956294,"y":41463.89752427877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"159c2cf8-383f-4228-9ad5-bc266cd18d5c","savedPayload":{"position":{"x":13880.532389956294,"y":41463.89752427877},"targetPosition":{"x":14056.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"371f636a-012c-4fb8-bf61-c83be358a508","savedPayload":{"position":{"x":14056.867965644036,"y":41706.60262259126},"targetPosition":{"x":14356.867965644036,"y":41706.60262259126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Plotter Module","name":"Average VS Average","id":"60771858-6287-419f-b6db-6ab6166063ba"}}}],"id":"3df48abc-f2a5-48ca-bd27-89913fdc0812","savedPayload":{"position":{"x":14356.867965644036,"y":41706.60262259126},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"plotters":[{"type":"Plotter","name":"ARPS Fast Plotter","config":"{\n \"codeName\": \"ARPS-Fast\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"ARPS","config":"{\n \"codeName\": \"ARPS-Fast\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"SMA Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.SMA","project":"Superalgos","id":"1216597f-916f-40c3-b1cf-9795d7516eb9","savedPayload":{"position":{"x":16921.752452292843,"y":42034.291126365046},"targetPosition":{"x":16621.886722607793,"y":42025.316486514224},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"23be71f9-d898-4182-8fdf-b437ee15d96a","savedPayload":{"position":{"x":16621.886722607793,"y":42025.316486514224},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"SMA End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.SMA","project":"Superalgos","id":"96946ddb-82c4-4ded-a55f-f72a64f8b6d0","savedPayload":{"position":{"x":16854.572466325473,"y":42292.727316933786},"targetPosition":{"x":16588.296729624104,"y":42154.534581798594},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0a02c972-ecf7-4263-b396-7ec44323d68b","savedPayload":{"position":{"x":16588.296729624104,"y":42154.534581798594},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBull","project":"Superalgos","id":"5f7ae8c1-7d37-4d18-b40c-7f65d33a617e","savedPayload":{"position":{"x":16681.914129735487,"y":42496.42197547013},"targetPosition":{"x":16501.967561329115,"y":42256.38191106677},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0958d221-456d-414b-b383-e6fbec8df430","savedPayload":{"position":{"x":16501.967561329115,"y":42256.38191106677},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBull","project":"Superalgos","id":"0fa59969-0560-4070-8569-674718ff52e5","savedPayload":{"position":{"x":16437.974543600074,"y":42605.03087669991},"targetPosition":{"x":16379.997768261406,"y":42310.686361681655},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"bcc803c6-3d10-48dd-82f2-63603a7c3c97","savedPayload":{"position":{"x":16379.997768261406,"y":42310.686361681655},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBear","project":"Superalgos","id":"d812fcd7-98e8-4c00-a7b3-9711dc93ba86","savedPayload":{"position":{"x":16171.068934676035,"y":42597.042695733806},"targetPosition":{"x":16246.544963799388,"y":42306.69227119861},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"c591ce36-7a4f-4ff2-be7c-48e6e7786502","savedPayload":{"position":{"x":16246.544963799388,"y":42306.69227119861},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBear","project":"Superalgos","id":"92d970a0-e07c-4958-ab07-f4d968d1bf33","savedPayload":{"position":{"x":15934.061232193262,"y":42474.03958978076},"targetPosition":{"x":16128.041112558001,"y":42245.19071822209},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"221a1676-98f3-4175-a301-4f4e85abfe4f","savedPayload":{"position":{"x":16128.041112558001,"y":42245.19071822209},"targetPosition":{"x":16322.02099292274,"y":42016.3418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8a7b65d5-ae94-4075-98d6-1fb143128c07","savedPayload":{"position":{"x":13941.02099292274,"y":42028.34184666341},"targetPosition":{"x":13819,"y":41754.27820937063},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"SMA","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"8a3b9f48-6556-4ffc-8694-44db9d0552e3","savedPayload":{"position":{"x":16464.409913763688,"y":42538.924830358024},"targetPosition":{"x":16301.01820325918,"y":42287.3236599744},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"f2b46265-4f40-4572-a023-e95007bcbf2a","savedPayload":{"position":{"x":16301.01820325918,"y":42287.3236599744},"targetPosition":{"x":16137.626492754673,"y":42035.72248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"SMA Begin","project":"Superalgos","id":"a24fec7c-4b4e-4533-b40b-fe86bb05a8e6","savedPayload":{"position":{"x":16075.252985509345,"y":42329.16676981091},"targetPosition":{"x":16137.626492754673,"y":42035.72248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA Begin","id":"23be71f9-d898-4182-8fdf-b437ee15d96a"}}},{"type":"Polygon Vertex","name":"SMA End","project":"Superalgos","id":"cfccbef2-3746-43c5-8368-fcd84072eec1","savedPayload":{"position":{"x":15886.025322371046,"y":42199.114200095275},"targetPosition":{"x":16137.626492754673,"y":42035.72248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA End","id":"0a02c972-ecf7-4263-b396-7ec44323d68b"}}}],"id":"b5e43c46-948c-4f56-bfe5-83ba923a20a5","savedPayload":{"position":{"x":13756.626492754673,"y":42047.72248959077},"targetPosition":{"x":13819,"y":41754.27820937063},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bull","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"d8e0d8e9-27ef-4fab-ac43-23868fea8813","savedPayload":{"position":{"x":15945.654978611015,"y":42542.19511213103},"targetPosition":{"x":15961.355765483899,"y":42242.60625170465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"19197333-4a73-4f74-8d05-de667c8d8bf1","savedPayload":{"position":{"x":15961.355765483899,"y":42242.60625170465},"targetPosition":{"x":15977.056552356782,"y":41943.017391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bull Begin","project":"Superalgos","id":"afc2f8ff-8082-496f-8106-a1f8379cfd12","savedPayload":{"position":{"x":15754.113104713564,"y":42143.75657318594},"targetPosition":{"x":15977.056552356782,"y":41943.017391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull Begin","id":"0958d221-456d-414b-b383-e6fbec8df430"}}},{"type":"Polygon Vertex","name":"APS Bull End","project":"Superalgos","id":"1606a418-a639-4cd4-909d-de72d689acf0","savedPayload":{"position":{"x":15677.46769193041,"y":41927.3166044054},"targetPosition":{"x":15977.056552356782,"y":41943.017391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull End","id":"bcc803c6-3d10-48dd-82f2-63603a7c3c97"}}}],"id":"7b2bf0a5-4eb1-4cf6-bb1e-8b7545691dfa","savedPayload":{"position":{"x":13596.056552356782,"y":41955.017391278285},"targetPosition":{"x":13819,"y":41754.27820937063},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bear","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed RED","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"0e69ccc1-020e-47e3-9251-1af8231e41c1","savedPayload":{"position":{"x":15524.051196759618,"y":42239.9243252251},"targetPosition":{"x":15712.847314074568,"y":42006.780536788014},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"af7adcc4-8cd2-408f-8550-e017bdbd7d38","savedPayload":{"position":{"x":15712.847314074568,"y":42006.780536788014},"targetPosition":{"x":15901.643431389519,"y":41773.636748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bear Begin","project":"Superalgos","id":"5b569cf7-d916-4891-9f48-4ffbd9a07acb","savedPayload":{"position":{"x":15603.286862779038,"y":41804.99528733122},"targetPosition":{"x":15901.643431389519,"y":41773.636748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear Begin","id":"c591ce36-7a4f-4ff2-be7c-48e6e7786502"}}},{"type":"Polygon Vertex","name":"APS Bear End","project":"Superalgos","id":"1197f1d6-2c5f-4c4f-b478-0ff005c8408c","savedPayload":{"position":{"x":15668.499642952427,"y":41584.84063103597},"targetPosition":{"x":15901.643431389519,"y":41773.636748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear End","id":"221a1676-98f3-4175-a301-4f4e85abfe4f"}}}],"id":"0dbddbd2-336e-4495-adee-2cb008743b39","savedPayload":{"position":{"x":13520.643431389519,"y":41785.636748350924},"targetPosition":{"x":13819,"y":41754.27820937063},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"ab1a9808-3321-487e-a4ee-598cbe1e06e6","savedPayload":{"position":{"x":13819,"y":41754.27820937063},"targetPosition":{"x":13969,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[{"type":"Plotter Panel","name":"ARPS","config":"{\n \"codeName\": \"ARPS\"\n}","project":"Superalgos","panelData":[{"type":"Panel Data","name":"Average Range % per Candle","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageARPS","project":"Superalgos","id":"40a7c8ec-adfa-4319-afbb-4fdce8d83548","savedPayload":{"position":{"x":13239.444504226558,"y":41234.66296709996},"targetPosition":{"x":13529.222252113279,"y":41157.0172535692},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.BLACK\"\n}","project":"Superalgos","id":"485aa9f4-e9cb-4734-883f-8a3f68a2f054","savedPayload":{"position":{"x":13317.090217757315,"y":40944.88521921324},"targetPosition":{"x":13529.222252113279,"y":41157.0172535692},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"9cdae6f2-28fd-47bc-930d-3454aa053de4","savedPayload":{"position":{"x":13529.222252113279,"y":41157.0172535692},"targetPosition":{"x":13819,"y":41234.66296709996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BULL","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBull","project":"Superalgos","id":"6d06c410-c7fc-46d9-a935-5125326f4ff6","savedPayload":{"position":{"x":13409.192378864669,"y":40824.85534596463},"targetPosition":{"x":13669,"y":40974.85534596463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n}","project":"Superalgos","id":"567e7a98-a673-46ad-9b48-64c55f4e2c91","savedPayload":{"position":{"x":13669,"y":40674.85534596463},"targetPosition":{"x":13669,"y":40974.85534596463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"da3f2ea2-6452-4f7a-afd0-c91bb3915956","savedPayload":{"position":{"x":13669,"y":40974.85534596463},"targetPosition":{"x":13819,"y":41234.66296709996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BEAR","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBear","project":"Superalgos","id":"8bb34797-b438-46b7-98ac-13626abeb3d9","savedPayload":{"position":{"x":13819,"y":40655.10747132652},"targetPosition":{"x":13896.645713530756,"y":40944.88521921324},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n\"paletteColor\": \"UI_COLOR.RED\"\n}","project":"Superalgos","id":"fc5e8a98-9891-4c4e-aaf4-3b1d485c1d0d","savedPayload":{"position":{"x":14108.77774788672,"y":40732.753184857276},"targetPosition":{"x":13896.645713530756,"y":40944.88521921324},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e738ec96-c711-4b1d-9689-7bbe923b84db","savedPayload":{"position":{"x":13896.645713530756,"y":40944.88521921324},"targetPosition":{"x":13819,"y":41234.66296709996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"97906f34-67ef-438b-85a7-59cebfd1dcfb","savedPayload":{"position":{"x":13819,"y":41234.66296709996},"targetPosition":{"x":13969,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2675db9e-a697-4f84-a252-8c27ed423e24","savedPayload":{"position":{"x":13969,"y":41494.470588235294},"targetPosition":{"x":14269,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e9b75238-86e2-4069-8f82-d8884bf729ee","savedPayload":{"position":{"x":14269,"y":41494.470588235294},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"Chaikin Oscillator Plotter","config":"{\n \"codeName\": \"Chaikin-Oscillator\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"Chaikin Oscillator","config":"{\n \"codeName\": \"chaikinOscillator\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"Zero Line Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.zeroLine","project":"Superalgos","id":"fec8363f-45ef-4e43-850a-4102ae1d1f62","savedPayload":{"position":{"x":15743.934675239096,"y":41002.99424592844},"targetPosition":{"x":15977.078463676187,"y":40814.19812861349},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"b4d7a68b-446d-4aab-938b-3da564ec607d","savedPayload":{"position":{"x":15977.078463676187,"y":40814.19812861349},"targetPosition":{"x":16210.222252113279,"y":40625.40201129854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Zero Line End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.zeroLine","project":"Superalgos","id":"3db966a2-1491-4758-a29f-e6caedcf2208","savedPayload":{"position":{"x":15611.044531260533,"y":40656.803585044305},"targetPosition":{"x":15910.633391686906,"y":40641.10279817142},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"013e2783-f200-4b83-b914-91aefd6e7e6f","savedPayload":{"position":{"x":15910.633391686906,"y":40641.10279817142},"targetPosition":{"x":16210.222252113279,"y":40625.40201129854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Chaikin Oscillator Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.chaikinOscillator","project":"Superalgos","id":"78359bae-9317-4916-a89f-d41d00a24627","savedPayload":{"position":{"x":15707.019911346026,"y":40298.61859028952},"targetPosition":{"x":15958.621081729652,"y":40462.010300794034},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"b159f5cc-42a5-498f-a699-f033248a7eb1","savedPayload":{"position":{"x":15958.621081729652,"y":40462.010300794034},"targetPosition":{"x":16210.222252113279,"y":40625.40201129854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Chaikin Oscillator End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.chaikinOscillator","project":"Superalgos","id":"2384e88c-6e7a-4635-bb62-361dd0edda7d","savedPayload":{"position":{"x":15995.201482386099,"y":40065.25375540022},"targetPosition":{"x":16102.711867249689,"y":40345.32788334938},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"00cac505-e6ac-44b5-bc76-1e88a17ebd88","savedPayload":{"position":{"x":16102.711867249689,"y":40345.32788334938},"targetPosition":{"x":16210.222252113279,"y":40625.40201129854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2fba905c-acdb-4217-ba62-2e762b1ddeec","savedPayload":{"position":{"x":16210.222252113279,"y":40625.40201129854},"targetPosition":{"x":16500,"y":40703.047724829295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"Zero Line","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"d2054636-c85e-49df-ab90-313851dfcc4c","savedPayload":{"position":{"x":15770.444504226558,"y":40287.94867663245},"targetPosition":{"x":16060.222252113279,"y":40365.594390163205},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d3277379-9eb1-4fca-b134-c4dcdf45d532","savedPayload":{"position":{"x":16060.222252113279,"y":40365.594390163205},"targetPosition":{"x":16350,"y":40443.24010369396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"3b89ce9b-df0f-4fb3-b181-deb5d6926262","savedPayload":{"position":{"x":16200,"y":40183.43248255863},"targetPosition":{"x":16350,"y":40443.24010369396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"b4d7a68b-446d-4aab-938b-3da564ec607d"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"93d7041c-5f20-4b85-9f7a-f16d6427d7b2","savedPayload":{"position":{"x":16427.645713530757,"y":40153.46235580724},"targetPosition":{"x":16350,"y":40443.24010369396},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"013e2783-f200-4b83-b914-91aefd6e7e6f"}}}],"id":"bad71c42-7ad3-41df-9634-9599e0cd59c7","savedPayload":{"position":{"x":16350,"y":40443.24010369396},"targetPosition":{"x":16500,"y":40703.047724829295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"Chaikin Oscillator","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"d35e45c5-146b-41a2-8973-06c7dabc010b","savedPayload":{"position":{"x":16277.645713530756,"y":39893.65473467191},"targetPosition":{"x":16427.645713530757,"y":40153.46235580724},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d746e2c7-aae0-4c83-a1a2-23a1d779173c","savedPayload":{"position":{"x":16427.645713530757,"y":40153.46235580724},"targetPosition":{"x":16577.645713530757,"y":40413.269976942574},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Chaikin Oscillator Begin","project":"Superalgos","id":"cc9ee8d7-5b93-4c3b-a700-db3776fbe24a","savedPayload":{"position":{"x":16655.29142706151,"y":40123.49222905585},"targetPosition":{"x":16577.645713530757,"y":40413.269976942574},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Chaikin Oscillator Begin","id":"b159f5cc-42a5-498f-a699-f033248a7eb1"}}},{"type":"Polygon Vertex","name":"Chaikin Oscillator End","project":"Superalgos","id":"e9007c32-1519-497a-bed3-7eaa3f60ccff","savedPayload":{"position":{"x":16837.453334666086,"y":40263.269976942574},"targetPosition":{"x":16577.645713530757,"y":40413.269976942574},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Chaikin Oscillator End","id":"00cac505-e6ac-44b5-bc76-1e88a17ebd88"}}}],"id":"78c2a948-2c47-40c9-89d8-00d7992cb17c","savedPayload":{"position":{"x":16577.645713530757,"y":40413.269976942574},"targetPosition":{"x":16500,"y":40703.047724829295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"6f0e43ac-96e8-490f-9d08-8c7489a6614c","savedPayload":{"position":{"x":16500,"y":40703.047724829295},"targetPosition":{"x":16650,"y":40962.85534596463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[],"id":"653018cc-a18a-4370-a6c5-e0ad879b2c2f","savedPayload":{"position":{"x":16650,"y":40962.85534596463},"targetPosition":{"x":16800,"y":41222.66296709996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"412c32ee-724a-4b58-9fef-58ecf975de8b","savedPayload":{"position":{"x":14356.867965644036,"y":41282.33855387933},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"ARPS Slow Plotter","config":"{\n \"codeName\": \"ARPS-Slow\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"ARPS Slow","config":"{\n \"codeName\": \"slowARPS\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"SMA Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.SMA","project":"Superalgos","id":"ca8a3ebb-25b0-4359-b3c5-218fc7ee69a0","savedPayload":{"position":{"x":16845.752452292843,"y":42258.791126365046},"targetPosition":{"x":16545.886722607793,"y":42249.816486514224},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e5da7299-927f-46e1-95a0-18230e59af0e","savedPayload":{"position":{"x":16545.886722607793,"y":42249.816486514224},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"SMA End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.SMA","project":"Superalgos","id":"f9baacc0-6c94-421b-8a65-629e37e19e7d","savedPayload":{"position":{"x":16778.572466325473,"y":42517.227316933786},"targetPosition":{"x":16512.296729624104,"y":42379.034581798594},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1fa7c445-e500-44ac-94d2-1f4f8b4a4a32","savedPayload":{"position":{"x":16512.296729624104,"y":42379.034581798594},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBull","project":"Superalgos","id":"89b91ab8-fd0b-4f22-885e-968f84dba9db","savedPayload":{"position":{"x":16605.914129735487,"y":42720.92197547013},"targetPosition":{"x":16425.96756132911,"y":42480.88191106677},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"3ec07cce-c6fd-4e38-9581-20665a1f42e3","savedPayload":{"position":{"x":16425.96756132911,"y":42480.88191106677},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bull End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBull","project":"Superalgos","id":"6bff0f0a-5220-41a3-b785-0c3fdc0d7c22","savedPayload":{"position":{"x":16361.974543600072,"y":42829.53087669991},"targetPosition":{"x":16303.997768261404,"y":42535.186361681655},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1b9fcdbe-6783-4719-b3ca-a8811b2ef7e6","savedPayload":{"position":{"x":16303.997768261404,"y":42535.186361681655},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.apsBear","project":"Superalgos","id":"2a45e116-9295-46fe-beb5-e97bb88fa18f","savedPayload":{"position":{"x":16095.068934676034,"y":42821.542695733806},"targetPosition":{"x":16170.544963799386,"y":42531.19227119861},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"b1673c67-03d9-4f80-b7d7-6ea05d917b9a","savedPayload":{"position":{"x":16170.544963799386,"y":42531.19227119861},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"APS Bear End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.apsBear","project":"Superalgos","id":"9b122b4f-ea2b-426b-8b72-e57e62688280","savedPayload":{"position":{"x":15858.06123219326,"y":42698.53958978076},"targetPosition":{"x":16052.041112558,"y":42469.69071822209},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1a63a717-1978-47a8-9b3d-50995f7d77a9","savedPayload":{"position":{"x":16052.041112558,"y":42469.69071822209},"targetPosition":{"x":16246.020992922739,"y":42240.8418466634},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c574a116-3471-454e-aa91-939ea988d761","savedPayload":{"position":{"x":14635.54422723201,"y":40672.91838677305},"targetPosition":{"x":14915.618355181172,"y":40780.428771636645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"SMA","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 2,\n 2\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"722a1147-5e6d-4b23-8f45-61450a7d0b00","savedPayload":{"position":{"x":16388.409913763688,"y":42763.424830358024},"targetPosition":{"x":16225.018203259178,"y":42511.8236599744},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"4383c9dd-82d5-494b-aef3-5df2cc85d159","savedPayload":{"position":{"x":16225.018203259178,"y":42511.8236599744},"targetPosition":{"x":16061.62649275467,"y":42260.22248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"SMA Begin","project":"Superalgos","id":"1e9c722a-92cc-4189-836f-53ad2dc7938f","savedPayload":{"position":{"x":15999.252985509343,"y":42553.66676981091},"targetPosition":{"x":16061.62649275467,"y":42260.22248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA Begin","id":"e5da7299-927f-46e1-95a0-18230e59af0e"}}},{"type":"Polygon Vertex","name":"SMA End","project":"Superalgos","id":"2f93dabf-aae9-44e0-9273-8124fcdc3dab","savedPayload":{"position":{"x":15810.025322371044,"y":42423.614200095275},"targetPosition":{"x":16061.62649275467,"y":42260.22248959077},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"SMA End","id":"1fa7c445-e500-44ac-94d2-1f4f8b4a4a32"}}}],"id":"2490ae4c-0fce-4ad1-85bc-a651044a408c","savedPayload":{"position":{"x":14752.226644676664,"y":40528.82760125302},"targetPosition":{"x":14915.618355181172,"y":40780.428771636645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bull","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed TURQUOISE","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"4a8be682-30e9-4595-8fd7-a7bdd5275af8","savedPayload":{"position":{"x":15869.654978611014,"y":42766.69511213103},"targetPosition":{"x":15885.355765483897,"y":42467.10625170465},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"106b5fd8-64f3-4731-96e3-641dddb9bb06","savedPayload":{"position":{"x":15885.355765483897,"y":42467.10625170465},"targetPosition":{"x":15901.05655235678,"y":42167.517391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bull Begin","project":"Superalgos","id":"1e039cea-279e-4319-a562-65d2b3e42415","savedPayload":{"position":{"x":15678.113104713562,"y":42368.25657318594},"targetPosition":{"x":15901.05655235678,"y":42167.517391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull Begin","id":"3ec07cce-c6fd-4e38-9581-20665a1f42e3"}}},{"type":"Polygon Vertex","name":"APS Bull End","project":"Superalgos","id":"667f6ce6-e9c3-4485-89bd-270311441baf","savedPayload":{"position":{"x":15601.467691930407,"y":42151.8166044054},"targetPosition":{"x":15901.05655235678,"y":42167.517391278285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bull End","id":"1b9fcdbe-6783-4719-b3ca-a8811b2ef7e6"}}}],"id":"0f06b5f2-e742-4520-8e0e-6a7e9bd4974e","savedPayload":{"position":{"x":14931.319142054055,"y":40480.83991121027},"targetPosition":{"x":14915.618355181172,"y":40780.428771636645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"APS Bear","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"Dashed RED","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"153aa0a3-9042-429c-9eae-dc5385217116","savedPayload":{"position":{"x":15448.051196759616,"y":42464.4243252251},"targetPosition":{"x":15636.847314074566,"y":42231.280536788014},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"f031e2cb-6fb6-469d-8baa-bcfe24dec1c3","savedPayload":{"position":{"x":15636.847314074566,"y":42231.280536788014},"targetPosition":{"x":15825.643431389517,"y":41998.136748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"APS Bear Begin","project":"Superalgos","id":"03a063b9-6203-4384-b89e-e85341b0cb24","savedPayload":{"position":{"x":15527.286862779036,"y":42029.49528733122},"targetPosition":{"x":15825.643431389517,"y":41998.136748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear Begin","id":"b1673c67-03d9-4f80-b7d7-6ea05d917b9a"}}},{"type":"Polygon Vertex","name":"APS Bear End","project":"Superalgos","id":"2507628c-b9e6-4103-9c94-21abc3489762","savedPayload":{"position":{"x":15592.499642952425,"y":41809.34063103597},"targetPosition":{"x":15825.643431389517,"y":41998.136748350924},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"APS Bear End","id":"1a63a717-1978-47a8-9b3d-50995f7d77a9"}}}],"id":"7c0e4100-b3c1-4e60-85f1-1d9e1bd6f7fd","savedPayload":{"position":{"x":15104.414472496122,"y":40547.284983199555},"targetPosition":{"x":14915.618355181172,"y":40780.428771636645},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"aeebf45e-fe48-4377-a483-c9c67690a62f","savedPayload":{"position":{"x":14915.618355181172,"y":40780.428771636645},"targetPosition":{"x":14993.264068711927,"y":41070.206519523366},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[{"type":"Plotter Panel","name":"ARPS","config":"{\n \"codeName\": \"ARPS\"\n}","project":"Superalgos","panelData":[{"type":"Panel Data","name":"Average Range % per Candle","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageARPS","project":"Superalgos","id":"61766652-706a-4bb9-87ef-2d6e6943d853","savedPayload":{"position":{"x":15692.84943773398,"y":40738.04461191879},"targetPosition":{"x":15542.84943773398,"y":40997.852233054124},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.BLACK\"\n}","project":"Superalgos","id":"51875264-c8ee-4839-aa4d-1b9b71d891ff","savedPayload":{"position":{"x":15842.84943773398,"y":40997.852233054124},"targetPosition":{"x":15542.84943773398,"y":40997.852233054124},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1b4f7f01-5b42-4954-8668-3cbda5b77063","savedPayload":{"position":{"x":15542.84943773398,"y":40997.852233054124},"targetPosition":{"x":15283.041816598648,"y":41147.852233054124},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BULL","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBull","project":"Superalgos","id":"e9c52716-c5f2-4624-ba6e-c173c7f7dbfd","savedPayload":{"position":{"x":15862.59731237209,"y":41147.852233054124},"targetPosition":{"x":15572.81956448537,"y":41225.49794658488},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n \"paletteColor\": \"UI_COLOR.PATINATED_TURQUOISE\"\n}","project":"Superalgos","id":"7feaef19-3ea1-4124-8aa4-afd75c5816f1","savedPayload":{"position":{"x":15784.951598841333,"y":41437.629980940845},"targetPosition":{"x":15572.81956448537,"y":41225.49794658488},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"bce58d87-f0fc-4515-ab47-1d5d57162bac","savedPayload":{"position":{"x":15572.81956448537,"y":41225.49794658488},"targetPosition":{"x":15283.041816598648,"y":41147.852233054124},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Panel Data","name":"Average % BEAR","config":"{\n \"valueDecimals\": 2\n}","project":"Superalgos","dataFormula":{"type":"Data Formula","name":"New Data Formula","code":"record.percentageApsBear","project":"Superalgos","id":"e00cdf0d-5b55-4ce1-a960-bae254b568dd","savedPayload":{"position":{"x":15692.84943773398,"y":41557.65985418946},"targetPosition":{"x":15433.041816598648,"y":41407.65985418946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"textStyle":{"type":"Text Style","name":"New Text Style","config":"{\n\"paletteColor\": \"UI_COLOR.RED\"\n}","project":"Superalgos","id":"f7999c40-89bc-4c73-9ea5-1b2266814a5c","savedPayload":{"position":{"x":15433.041816598648,"y":41707.65985418946},"targetPosition":{"x":15433.041816598648,"y":41407.65985418946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"dd112929-5166-4ac7-9c61-9158e3eab9e0","savedPayload":{"position":{"x":15433.041816598648,"y":41407.65985418946},"targetPosition":{"x":15283.041816598648,"y":41147.852233054124},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1e96ebb8-5d70-440d-977f-1781f746f31a","savedPayload":{"position":{"x":15283.041816598648,"y":41147.852233054124},"targetPosition":{"x":14993.264068711927,"y":41070.206519523366},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ba1f7fe7-29a3-4cf2-b185-dc2c65e5cc5a","savedPayload":{"position":{"x":14993.264068711927,"y":41070.206519523366},"targetPosition":{"x":14781.132034355964,"y":41282.33855387933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"75c554ed-b9fd-4fb9-9f27-7d6e5e665f8a","savedPayload":{"position":{"x":14569,"y":41194.470588235294},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plotter","name":"Average VS Average Plotter","config":"{\n \"codeName\": \"averageVsAverage\"\n}","project":"Superalgos","modules":[{"type":"Plotter Module","name":"Average VS Average","config":"{\n \"codeName\": \"averageVsAverage\",\n \"icon\": \"oscillator\"\n}","project":"Superalgos","shapes":{"type":"Shapes","name":"New Shapes","project":"Superalgos","chartPoints":[{"type":"Chart Points","name":"New Chart Points","project":"Superalgos","points":[{"type":"Point","name":"Zero Line Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = 1","project":"Superalgos","id":"5ebd08dc-c6b9-4429-92c5-b44e86727d6a","savedPayload":{"position":{"x":14886.480951457786,"y":41080.62920696757},"targetPosition":{"x":15113.94976613913,"y":40692.35361109852},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9","savedPayload":{"position":{"x":15113.94976613913,"y":40692.35361109852},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"Zero Line End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = 1","project":"Superalgos","id":"246941f4-3c18-4ca4-be0f-e8cef636bec1","savedPayload":{"position":{"x":14686.129369247508,"y":40921.00268583042},"targetPosition":{"x":15013.773975033992,"y":40612.54035052995},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"c575e8b4-3491-4533-be08-fae19636edd9","savedPayload":{"position":{"x":15013.773975033992,"y":40612.54035052995},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"bullPriceDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.bullPriceDeviation","project":"Superalgos","id":"e7e97620-5c89-4806-8855-1118189cca8c","savedPayload":{"position":{"x":14538.865421803868,"y":40711.396596873456},"targetPosition":{"x":14940.142001312171,"y":40507.737306051466},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"5856cd48-be9d-43a4-ab20-5215f4d8008f","savedPayload":{"position":{"x":14940.142001312171,"y":40507.737306051466},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"bullPriceDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.bullPriceDeviation","project":"Superalgos","id":"1fea2d4e-6680-48ab-b7c8-385f26b473d7","savedPayload":{"position":{"x":14456.61955833634,"y":40468.79197884859},"targetPosition":{"x":14899.019069578408,"y":40386.43499703903},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"0f7c9019-cf97-455b-997b-23bb7fd5ee8d","savedPayload":{"position":{"x":14899.019069578408,"y":40386.43499703903},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"volumeDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.volumeDeviation","project":"Superalgos","id":"7bd64bdc-26e2-473e-b6b4-dfd9a1b90395","savedPayload":{"position":{"x":14446.054849568074,"y":40212.84321508295},"targetPosition":{"x":14893.736715194274,"y":40258.46061515621},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"48b16beb-f1d0-46df-ab29-5c6d43a905ff","savedPayload":{"position":{"x":14893.736715194274,"y":40258.46061515621},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"volumeDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.volumeDeviation","project":"Superalgos","id":"da79b97b-1844-4fda-89ee-ad427795597e","savedPayload":{"position":{"x":14508.027185372732,"y":39964.285752230935},"targetPosition":{"x":14924.722883096603,"y":40134.181883730205},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"55ea7fa6-9f58-4dad-b95b-6800ec0046d4","savedPayload":{"position":{"x":14924.722883096603,"y":40134.181883730205},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"openInterestDeviation Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.openInterestDeviation","project":"Superalgos","id":"d1dea870-5cc2-40ec-a697-16f607c5d976","savedPayload":{"position":{"x":14637.515935667096,"y":39743.25623770467},"targetPosition":{"x":14989.467258243785,"y":40023.66712646707},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"01f5ed3c-22df-4a5e-bc9a-1c1bcd82e187","savedPayload":{"position":{"x":14989.467258243785,"y":40023.66712646707},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"openInterestDeviation End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.openInterestDeviation","project":"Superalgos","id":"9516a25e-3b91-4d82-a02f-6ec800fdfdff","savedPayload":{"position":{"x":14824.030692001568,"y":39567.661168257924},"targetPosition":{"x":15082.724636411021,"y":39935.8695917437},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"5f18a8ed-6d3a-4e97-b2c7-8833ae328ee0","savedPayload":{"position":{"x":15082.724636411021,"y":39935.8695917437},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"smaPrice Begin","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.begin\ny = record.previous.smaPrice","project":"Superalgos","id":"de1c3212-9782-4dd2-b7a6-6d1215fcaa4f","savedPayload":{"position":{"x":15052.461138063893,"y":39451.72621211319},"targetPosition":{"x":15196.939859442184,"y":39877.902113671335},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"ae121f69-414a-4593-bee4-3f42c4855e75","savedPayload":{"position":{"x":15196.939859442184,"y":39877.902113671335},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Point","name":"smaPrice End","project":"Superalgos","pointFormula":{"type":"Point Formula","name":"New Point Formula","code":"x = record.end\ny = record.smaPrice","project":"Superalgos","id":"8c70536b-5484-4c7f-a7d9-1a4b83f180f4","savedPayload":{"position":{"x":15304.301197642275,"y":39404.84372992559},"targetPosition":{"x":15322.859889231375,"y":39854.46087257753},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"1b413b15-e479-4d18-9c8e-0cc067c791eb","savedPayload":{"position":{"x":15322.859889231375,"y":39854.46087257753},"targetPosition":{"x":15341.418580820475,"y":40304.078015229476},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"61cb4958-a145-4e5b-ac3d-976868a2bbb3","savedPayload":{"position":{"x":15015.217885284577,"y":40450.23598100091},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"polygons":[{"type":"Polygon","name":"Zero Line","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.75,\n \"lineWidth\": 0.75,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.75,\n \"lineWidth\": 1.5,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.TITANIUM_YELLOW\"\n }\n}","project":"Superalgos","id":"a2aa7fc6-9333-44d9-a272-79da7527502a","savedPayload":{"position":{"x":14967.529071742714,"y":40194.74209150929},"targetPosition":{"x":15267.520679261095,"y":40196.986065336605},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"cef91315-4506-4374-83a2-c899fcdec3a3","savedPayload":{"position":{"x":15267.520679261095,"y":40196.986065336605},"targetPosition":{"x":15567.512286779476,"y":40199.23003916392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"b8cb8331-a6ec-4693-81e5-0c518f8d3bf7","savedPayload":{"position":{"x":15356.972915914279,"y":39985.51721007852},"targetPosition":{"x":15567.512286779476,"y":40199.23003916392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"5fb2e9a0-5ae9-4132-9309-4ed517d26111","savedPayload":{"position":{"x":15569.756260606797,"y":39899.23843164554},"targetPosition":{"x":15567.512286779476,"y":40199.23003916392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"c575e8b4-3491-4533-be08-fae19636edd9"}}}],"id":"cca59d3d-d290-4534-802f-8b20224875d7","savedPayload":{"position":{"x":15179.249380243593,"y":40559.21607573988},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"smaPrice ABOVE","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.smaPrice > record.previous.smaPrice","project":"Superalgos","id":"f3e0632e-6cf2-4f0b-bef7-82b15c1c4795","savedPayload":{"position":{"x":15310.005105837628,"y":40240.27137909361},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.8,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n },\n \"atMousePosition\": {\n \"opacity\": 1,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"8ce4673b-02f7-4fdd-a41a-68bd3603eb11","savedPayload":{"position":{"x":15009.10307759985,"y":40076.377090912705},"targetPosition":{"x":15305.40957977839,"y":40123.30743042477},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"b0533485-c84c-492b-be01-f5da1e7acfa0","savedPayload":{"position":{"x":15305.40957977839,"y":40123.30743042477},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"4a3ebec3-46cf-424b-8b19-3246dcd527b6","savedPayload":{"position":{"x":15090.131983344474,"y":39856.73863110726},"targetPosition":{"x":15345.924032650702,"y":40013.48820052205},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"968cf63e-2566-4697-92c2-4e9a01de083a","savedPayload":{"position":{"x":15345.924032650702,"y":40013.48820052205},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"smaPrice Begin","project":"Superalgos","id":"960b6798-dc4b-4ccf-a1d2-8d114b228ba4","savedPayload":{"position":{"x":15425.380506269188,"y":39927.53267162435},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice Begin","id":"ae121f69-414a-4593-bee4-3f42c4855e75"}}},{"type":"Polygon Vertex","name":"smaPrice End","project":"Superalgos","id":"ec3a86be-3906-4395-ad66-22974b63e702","savedPayload":{"position":{"x":15531.68247280016,"y":39878.52679381753},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice End","id":"1b413b15-e479-4d18-9c8e-0cc067c791eb"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"47505d15-f5cd-4eed-a2ca-0e19e1fd5425","savedPayload":{"position":{"x":15648.646421469,"y":39873.93126775829},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"c575e8b4-3491-4533-be08-fae19636edd9"}}},{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"a95edd6e-9ac7-4c4b-8d44-2ea5d4c91126","savedPayload":{"position":{"x":15758.465651371716,"y":39914.44572063061},"targetPosition":{"x":15601.71608195693,"y":40170.23776993684},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9"}}}],"id":"0b45de42-16c8-4845-9634-0c4594a848a5","savedPayload":{"position":{"x":15283.041816598647,"y":40568.29673728068},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"smaPrice BELOW","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.smaPrice < record.previous.smaPrice","project":"Superalgos","id":"ba7bc4d2-ea9d-46e5-8a46-4076b973082d","savedPayload":{"position":{"x":15397.288894196598,"y":40090.60339533746},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.8,\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 1,\n \"paletteColor\": \"UI_COLOR.RED\"\n }\n}","project":"Superalgos","id":"c397754e-7f7f-4101-85bc-ce03e0560cd1","savedPayload":{"position":{"x":15170.588626615936,"y":39833.67858732003},"targetPosition":{"x":15432.974538757755,"y":39979.12147339393},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"f869822a-1175-4ca9-b1ab-0eb6c8e8aa21","savedPayload":{"position":{"x":15432.974538757755,"y":39979.12147339393},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n }\n}","project":"Superalgos","id":"45046251-89ef-4e4a-a6ad-508940e81d8b","savedPayload":{"position":{"x":15321.851668917003,"y":39654.99946535638},"targetPosition":{"x":15508.606059908288,"y":39889.7819124121},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d72f0442-35cd-4291-9ed0-2d18974d8622","savedPayload":{"position":{"x":15508.606059908288,"y":39889.7819124121},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"smaPrice Begin","project":"Superalgos","id":"1de42509-51b7-4db5-bb4b-ec99f020f67f","savedPayload":{"position":{"x":15612.669244154475,"y":39836.18585068633},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice Begin","id":"ae121f69-414a-4593-bee4-3f42c4855e75"}}},{"type":"Polygon Vertex","name":"smaPrice End","project":"Superalgos","id":"086e31ca-712a-4a76-bfde-85f94a0c1f3d","savedPayload":{"position":{"x":15729.321415029946,"y":39826.49280276485},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"smaPrice End","id":"1b413b15-e479-4d18-9c8e-0cc067c791eb"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"d2474336-018f-4a72-b944-8cca376adeab","savedPayload":{"position":{"x":15840.803336973475,"y":39862.178447326005},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"c575e8b4-3491-4533-be08-fae19636edd9"}}},{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"61bd3a59-9a0b-45bf-8541-69e9cce47c5b","savedPayload":{"position":{"x":15930.142897955298,"y":39937.80996847654},"targetPosition":{"x":15695.360450899574,"y":40124.564359467826},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9"}}}],"id":"7c193813-cccc-44d2-aa9d-0896829f042b","savedPayload":{"position":{"x":15377.469033973204,"y":40612.3288718807},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"volumeDeviation ABOVE","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.volumeDeviation > record.previous.volumeDeviation","project":"Superalgos","id":"7d0a809e-062d-422f-8b7d-10485a9f795b","savedPayload":{"position":{"x":15538.426213757815,"y":39964.97108377715},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.2,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"e43653a6-3d17-4654-b54a-df888f3c6314","savedPayload":{"position":{"x":15458.518676912643,"y":39619.62199501265},"targetPosition":{"x":15628.748638340277,"y":39866.64782409201},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"0d23723f-0ff9-45ad-87df-48ea3e1c2303","savedPayload":{"position":{"x":15628.748638340277,"y":39866.64782409201},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"31da194c-7e54-492e-ad59-4de79fd948f2","savedPayload":{"position":{"x":15752.787194516952,"y":39817.25105942903},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"610ad563-a4f0-4056-b455-f8769a6b14c5","savedPayload":{"position":{"x":15885.974525003989,"y":39826.56442484125},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"c575e8b4-3491-4533-be08-fae19636edd9"}}},{"type":"Polygon Vertex","name":"volumeDeviation End","project":"Superalgos","id":"88f8f21a-a2a3-4495-b6b5-87535eba5707","savedPayload":{"position":{"x":16001.931245563013,"y":39892.743294087864},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation End","id":"55ea7fa6-9f58-4dad-b95b-6800ec0046d4"}}},{"type":"Polygon Vertex","name":"volumeDeviation Begin","project":"Superalgos","id":"a5449c88-9bfc-4dea-b10b-7d52c7033224","savedPayload":{"position":{"x":16077.690705571462,"y":40002.68013048401},"targetPosition":{"x":15798.978599767912,"y":40113.673653171376},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation Begin","id":"48b16beb-f1d0-46df-ab29-5c6d43a905ff"}}}],"id":"471faeec-673f-4e1b-b09e-876a5a47fc26","savedPayload":{"position":{"x":15451.141716354588,"y":40686.00155426209},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"volumeDeviation BELOW","project":"Superalgos","polygonCondition":{"type":"Polygon Condition","name":"New Polygon Condition","code":"record.volumeDeviation < record.previous.volumeDeviation","project":"Superalgos","id":"d6e67762-8e26-49eb-9dfb-76e9f91ce637","savedPayload":{"position":{"x":15464.277178666107,"y":40013.38730342399},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonBody":{"type":"Polygon Body","name":"New Polygon Body","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 0.2,\n \"paletteColor\": \"UI_COLOR.RED\"\n },\n \"atMousePosition\": {\n \"opacity\": 0.3,\n \"paletteColor\": \"UI_COLOR.RED\"\n }\n}","project":"Superalgos","id":"6a4f75ce-c32a-4c6d-abf4-ca5930321ad4","savedPayload":{"position":{"x":15325.614376933983,"y":39687.160641468035},"targetPosition":{"x":15536.15374779918,"y":39900.87347055344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"8d9386bd-34ff-4935-9ff4-bf8c61aaa81e","savedPayload":{"position":{"x":15536.15374779918,"y":39900.87347055344},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"Zero Line Begin","project":"Superalgos","id":"95297404-bf72-4524-b035-271c2077d97a","savedPayload":{"position":{"x":15649.730221428039,"y":39830.68808449909},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line Begin","id":"afd0f39f-5fc0-4d14-b192-818f6d7ff2b9"}}},{"type":"Polygon Vertex","name":"Zero Line End","project":"Superalgos","id":"af1b8269-e003-490a-8615-db6ee76fc758","savedPayload":{"position":{"x":15782.511386026452,"y":39816.73222173629},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"Zero Line End","id":"c575e8b4-3491-4533-be08-fae19636edd9"}}},{"type":"Polygon Vertex","name":"volumeDeviation End","project":"Superalgos","id":"6fd2d967-3262-4e23-807a-55ea30878977","savedPayload":{"position":{"x":15908.198303491583,"y":39861.77001204262},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation End","id":"55ea7fa6-9f58-4dad-b95b-6800ec0046d4"}}},{"type":"Polygon Vertex","name":"volumeDeviation Begin","project":"Superalgos","id":"4cdb7b68-9c6b-42ac-be3a-6de38cd9674f","savedPayload":{"position":{"x":16001.89713837058,"y":39956.88116869569},"targetPosition":{"x":15746.693118664378,"y":40114.58629963884},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"volumeDeviation Begin","id":"48b16beb-f1d0-46df-ab29-5c6d43a905ff"}}}],"id":"0f21f203-c9c7-49b9-a385-2c35777d29f7","savedPayload":{"position":{"x":15495.173850954612,"y":40780.428771636645},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"openInterestDeviation","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 1,\n \"lineDash\": [\n 2,\n 7\n ],\n \"paletteColor\": \"UI_COLOR.GREY\"\n }\n}","project":"Superalgos","id":"a4cb8a9f-a8b0-4a8a-aec3-943acf806a1a","savedPayload":{"position":{"x":15975.977724920001,"y":39597.23231105389},"targetPosition":{"x":15981.213446851187,"y":39897.18661960081},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"3713f189-0b41-47c9-9c2e-298c552add2a","savedPayload":{"position":{"x":15981.213446851187,"y":39897.18661960081},"targetPosition":{"x":15986.449168782372,"y":40197.14092814773},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"openInterestDeviation Begin","project":"Superalgos","id":"350b9484-0724-4be2-874e-ca36e33624cd","savedPayload":{"position":{"x":16194.84667992007,"y":39981.33898804614},"targetPosition":{"x":15986.449168782372,"y":40197.14092814773},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"openInterestDeviation Begin","id":"01f5ed3c-22df-4a5e-bc9a-1c1bcd82e187"}}},{"type":"Polygon Vertex","name":"openInterestDeviation End","project":"Superalgos","id":"faa57ea2-d4ae-4e99-a3c5-8f4c81b4a34a","savedPayload":{"position":{"x":16286.40347732929,"y":40191.90520621655},"targetPosition":{"x":15986.449168782372,"y":40197.14092814773},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"openInterestDeviation End","id":"5f18a8ed-6d3a-4e97-b2c7-8833ae328ee0"}}}],"id":"7f7d3fc6-4d2a-4089-bcf7-a16c360c5d22","savedPayload":{"position":{"x":15504.254512495414,"y":40884.2212079917},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Polygon","name":"bullPriceDeviation","project":"Superalgos","polygonBorder":{"type":"Polygon Border","name":"New Polygon Border","project":"Superalgos","style":{"type":"Style","name":"New Style","config":"{\n \"default\": {\n \"opacity\": 1,\n \"lineWidth\": 3,\n \"lineDash\": [\n 0,\n 0\n ],\n \"paletteColor\": \"UI_COLOR.GREEN\"\n }\n}","project":"Superalgos","id":"c4087104-30ad-4af1-8803-59af51da41f3","savedPayload":{"position":{"x":16243.030764208715,"y":39714.12037885301},"targetPosition":{"x":16145.36031787157,"y":39997.77595153281},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"styleConditions":[],"id":"d8c419ea-638b-43bc-923e-eed6ed4f37ee","savedPayload":{"position":{"x":16145.36031787157,"y":39997.77595153281},"targetPosition":{"x":16047.689871534423,"y":40281.4315242126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"polygonVertexes":[{"type":"Polygon Vertex","name":"bullPriceDeviation Begin","project":"Superalgos","id":"334d6bde-0a67-4e7e-b0df-3c28eed184b9","savedPayload":{"position":{"x":16317.328085424173,"y":40149.92018017588},"targetPosition":{"x":16047.689871534423,"y":40281.4315242126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"bullPriceDeviation Begin","id":"5856cd48-be9d-43a4-ab20-5215f4d8008f"}}},{"type":"Polygon Vertex","name":"bullPriceDeviation End","project":"Superalgos","id":"be73fa5c-820b-431b-9eba-a7a4a899335a","savedPayload":{"position":{"x":16331.345444214217,"y":40379.10197054975},"targetPosition":{"x":16047.689871534423,"y":40281.4315242126},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Point","name":"bullPriceDeviation End","id":"0f7c9019-cf97-455b-997b-23bb7fd5ee8d"}}}],"id":"5d8bc357-8920-4c8f-b491-d7441fbc1116","savedPayload":{"position":{"x":15477.288439178887,"y":40984.85996368961},"targetPosition":{"x":15205.396103067891,"y":40858.0744851674},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"images":[],"texts":[],"id":"4fab7c9a-d0ea-4a8b-ba5e-b542d1f03aad","savedPayload":{"position":{"x":15205.396103067891,"y":40858.0744851674},"targetPosition":{"x":14993.264068711927,"y":41070.206519523366},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"panels":[],"id":"60771858-6287-419f-b6db-6ab6166063ba","savedPayload":{"position":{"x":14993.264068711927,"y":41070.206519523366},"targetPosition":{"x":14781.132034355964,"y":41282.33855387933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3a455597-8c02-4f2f-acb0-031e12ecc725","savedPayload":{"position":{"x":14781.132034355964,"y":41282.33855387933},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"326278f7-adb0-4a6f-b606-1313b910818a","savedPayload":{"position":{"x":14569,"y":41494.470588235294},"targetPosition":{"x":14569,"y":41494.470588235294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}} \ No newline at end of file diff --git a/Projects/Superalgos/Plugins/Workspaces/Creating-Custom-Charts.json b/Projects/Superalgos/Plugins/Workspaces/Creating-Custom-Charts.json index 93f1de96a..873292da9 100644 --- a/Projects/Superalgos/Plugins/Workspaces/Creating-Custom-Charts.json +++ b/Projects/Superalgos/Plugins/Workspaces/Creating-Custom-Charts.json @@ -1 +1 @@ -{"type":"Workspace","name":"Creating Custom Charts","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":[{"type":"Project Data Tasks","name":"Superalgos","project":"Superalgos","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binanceus","project":"Superalgos","marketDataTasks":[{"type":"Market Data Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Exchange Raw Data","project":"Superalgos","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","project":"Superalgos","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","project":"Superalgos","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":26497.378634092645,"y":28190.39686701245},"targetPosition":{"x":26757.186255227978,"y":28040.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":26757.186255227978,"y":28040.39686701245},"targetPosition":{"x":27016.99387636331,"y":27890.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":27016.99387636331,"y":27890.39686701245},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":26407.46825383848,"y":27662.75115348169},"targetPosition":{"x":26697.2460017252,"y":27585.105439950934},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":26485.113967369238,"y":27372.97340559497},"targetPosition":{"x":26697.2460017252,"y":27585.105439950934},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":26697.2460017252,"y":27585.105439950934},"targetPosition":{"x":26987.023749611923,"y":27662.75115348169},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":26987.023749611923,"y":27662.75115348169},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","project":"Superalgos","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":26716.99387636331,"y":27070.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":26976.801497498644,"y":26920.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"be19d91b-9337-4f84-96b3-f4e54ea12df5"}}}],"id":"112be2cf-74ea-4272-9566-cf0cd24c111c","savedPayload":{"position":{"x":26976.801497498644,"y":27220.781624741783},"targetPosition":{"x":27126.801497498644,"y":27480.589245877116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e74c3232-7b59-4006-87fa-b3b2a328a52b","savedPayload":{"position":{"x":27126.801497498644,"y":27480.589245877116},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea","savedPayload":{"position":{"x":27276.801497498644,"y":27740.39686701245},"targetPosition":{"x":27566.579245385365,"y":27818.042580543206},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33","savedPayload":{"position":{"x":27566.579245385365,"y":27818.042580543206},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}},{"type":"Data Mine Tasks","name":"Sparta","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Sparta","project":"Superalgos","tasks":[{"type":"Task","name":"Simple Moving Average (SMA)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Simple Moving Average (SMA)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Period-Market","project":"Superalgos","id":"577e56c5-4bae-4528-8ed4-f7032a6cc2b2","savedPayload":{"position":{"x":26676.801497498644,"y":27220.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"456269f6-9849-4d5f-9c8c-7cd7d1eef297"}}},{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Period-Daily","project":"Superalgos","id":"1ebcdf4e-828a-4fc6-8516-1fd1466f747f","savedPayload":{"position":{"x":26716.99387636331,"y":27070.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"333ae5d7-7ec1-4f08-b206-91e3b4f2c99f"}}}],"id":"78619a39-67e7-4be3-92d4-794e699bc134","savedPayload":{"position":{"x":26976.801497498644,"y":27220.781624741783},"targetPosition":{"x":27266.579245385365,"y":27298.42733827254},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c1c85b8e-3c0c-4527-b4c3-b8a9f2bfc22b","savedPayload":{"position":{"x":27266.579245385365,"y":27298.42733827254},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Moving Average Convergence Diveregence (MACD) Multi-Period-Market","project":"Superalgos","id":"f22238fe-0c4c-44bb-9a21-edc1b6ff4eb8","savedPayload":{"position":{"x":27044.224958916122,"y":26644.32577517667},"targetPosition":{"x":27256.356993272086,"y":26856.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"44019efe-950a-4eec-a546-cd2ee26818b9"}}},{"type":"Indicator Process Instance","name":"Moving Average Convergence Diveregence (MACD) Multi-Period-Daily","project":"Superalgos","id":"9cc5b202-a9c4-4632-9c21-3b01a2f74255","savedPayload":{"position":{"x":27178.71127974133,"y":26566.68006164591},"targetPosition":{"x":27256.356993272086,"y":26856.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"8e5db945-8507-4489-9288-21cfa1e9301c"}}}],"id":"4efb5b27-ab99-4e9a-a2a3-8990e8713fe2","savedPayload":{"position":{"x":27256.356993272086,"y":26856.457809532632},"targetPosition":{"x":27406.356993272086,"y":27116.265430667965},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"129e39d0-f14f-449f-96ba-b7c2f40ba33a","savedPayload":{"position":{"x":27406.356993272086,"y":27116.265430667965},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Relative Strenght Index (RSI)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Relative Strenght Index (RSI)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Relative Strenght Index (RSI) Multi-Period-Market","project":"Superalgos","id":"824c6e6f-65af-464b-948b-d529f5776982","savedPayload":{"position":{"x":27711.6484203336,"y":26496.517556029856},"targetPosition":{"x":27711.6484203336,"y":26796.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"96f31416-5090-428a-be83-985a0b3ab275"}}},{"type":"Indicator Process Instance","name":"Relative Strenght Index (RSI) Multi-Period-Daily","project":"Superalgos","id":"ced7678d-e4c1-4891-be78-265d79aab04c","savedPayload":{"position":{"x":27861.6484203336,"y":26536.709934894523},"targetPosition":{"x":27711.6484203336,"y":26796.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"f1177bcd-22dc-425b-8f30-878844aa82b8"}}}],"id":"1cacb36f-7b2a-499c-aeb0-a6b0a4a1969a","savedPayload":{"position":{"x":27711.6484203336,"y":26796.517556029856},"targetPosition":{"x":27634.002706802843,"y":27086.295303916577},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bbdf0a91-954a-422d-bff1-b4c206425006","savedPayload":{"position":{"x":27634.002706802843,"y":27086.295303916577},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"172d0669-960d-47c7-aba9-8984b98389ac","savedPayload":{"position":{"x":27556.356993272086,"y":27376.073051803298},"targetPosition":{"x":27706.356993272086,"y":27635.88067293863},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b9dc8332-3efb-46a4-9e39-7fd204ac0173","savedPayload":{"position":{"x":27706.356993272086,"y":27635.88067293863},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Sparta","id":"9cfffc48-486a-48cb-b641-98c82e314d3a"}}},{"type":"Data Mine Tasks","name":"Alpha","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Alpha","project":"Superalgos","tasks":[{"type":"Task","name":"Stochastic","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Stochastic","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Stochastic Multi-Period-Market","project":"Superalgos","id":"244f2d9d-0b4d-4a73-acac-b95c7f060c20","savedPayload":{"position":{"x":28166.939847395115,"y":26436.57730252708},"targetPosition":{"x":28166.939847395115,"y":26736.57730252708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"6a6a6533-21a9-4be9-b2f0-ace1adfe45b8"}}},{"type":"Indicator Process Instance","name":"Stochastic Multi-Period-Daily","project":"Superalgos","id":"93f3e4f4-1774-481a-be53-20c0c19fb54f","savedPayload":{"position":{"x":28316.939847395115,"y":26476.769681391746},"targetPosition":{"x":28166.939847395115,"y":26736.57730252708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"6a39c43d-0ad2-4c98-ae06-6e40f55d1753"}}}],"id":"8e66e327-a785-489b-ab0b-f3bc84546d1e","savedPayload":{"position":{"x":28166.939847395115,"y":26736.57730252708},"targetPosition":{"x":28089.294133864358,"y":27026.3550504138},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"66046624-d8cc-4d5b-a24a-4ce998353616","savedPayload":{"position":{"x":28089.294133864358,"y":27026.3550504138},"targetPosition":{"x":28011.6484203336,"y":27316.13279830052},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e66a0d4c-201f-4955-83d4-9e0a5308ad80","savedPayload":{"position":{"x":28011.6484203336,"y":27316.13279830052},"targetPosition":{"x":27934.002706802843,"y":27605.910546187242},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f4378a66-6833-4164-bec1-4f1c3b42d5b4","savedPayload":{"position":{"x":27934.002706802843,"y":27605.910546187242},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Alpha","id":"511bef1e-62d8-4ff9-8d87-15bd0d3d630c"}}}],"id":"70d459d6-d270-49e0-b70d-2053c65a40e2","savedPayload":{"position":{"x":27856.356993272086,"y":27895.688294073963},"targetPosition":{"x":28006.356993272086,"y":28155.495915209296},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"af949a76-a6f4-4ec6-869e-f240480eea81","savedPayload":{"position":{"x":28006.356993272086,"y":28155.495915209296},"targetPosition":{"x":28156.356993272086,"y":28415.30353634463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"9b93b56d-dccf-4a8c-bbd0-8c608c31363c","savedPayload":{"position":{"x":28156.356993272086,"y":28415.30353634463},"targetPosition":{"x":28306.356993272086,"y":28675.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":28306.356993272086,"y":28675.11115747996},"targetPosition":{"x":28456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[{"type":"Project Learning Tasks","name":"Superalgos","project":"Superalgos","exchangeLearningTasks":[],"id":"ddd4bf4d-46fd-4c16-86d3-1785f5ad629e","savedPayload":{"position":{"x":25559.356993272086,"y":30511.30353634463},"targetPosition":{"x":25409.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":28606.356993272086,"y":28675.11115747996},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binanceus","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Backtesting Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b","savedPayload":{"position":{"x":31532.291877706186,"y":28455.48478700282},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 1000\n}","project":"Superalgos","id":"ed578090-732c-4e41-a4ae-9d4f34607170","savedPayload":{"position":{"x":31621.55868811598,"y":28426.48024208079},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeRange":{"type":"Time Range","name":"New Time Range","config":"{ \n\"initialDatetime\": \"2020-09-01\",\n\"finalDatetime\": \"2020-09-02\",\n \"allowStartingFromThePast\": false\n}","project":"Superalgos","id":"47fa4509-16f4-42b7-9453-fa3b3d2885b0","savedPayload":{"position":{"x":31715.41936714012,"y":28426.48024208079},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"dfe3514c-1aa9-4cea-bb2d-e6657037e69d","savedPayload":{"position":{"x":31804.686177549913,"y":28455.48478700282},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"c711e510-373f-468d-8ed9-1601da6a06f5","savedPayload":{"position":{"x":31880.621061984013,"y":28510.654709903367},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"fdc7c383-8301-4393-b415-8c2d542e05fe","savedPayload":{"position":{"x":31935.79098488456,"y":28586.589594337467},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"28db17c9-2703-430b-a162-5e04b68640a3","savedPayload":{"position":{"x":31964.79552980659,"y":28675.85640474726},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"78270062-7d10-4afa-baee-2bda8a4b4ed2","savedPayload":{"position":{"x":31964.79552980659,"y":28769.7170837714},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"4c9cdc50-70c0-43ee-ad54-052f8b7ecbc8","savedPayload":{"position":{"x":31935.79098488456,"y":28858.983894181194},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e79ab7df-ba40-46aa-abcd-63df8031a931","savedPayload":{"position":{"x":31668.48902762805,"y":28722.78674425933},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2","savedPayload":{"position":{"x":31756.356993272086,"y":28934.918778615294},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"720feaab-efc8-435a-bb3c-ab4e33ed1ca2","savedPayload":{"position":{"x":31668.48902762805,"y":29147.050812971258},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f","savedPayload":{"position":{"x":31456.356993272086,"y":28934.918778615294},"targetPosition":{"x":31156.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"60a5e5c0-cfb3-4488-b46c-55d637212aa5","savedPayload":{"position":{"x":31156.356993272086,"y":28934.918778615294},"targetPosition":{"x":30856.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"cbfbb9e7-9c30-4482-8a9f-4c90771feffc","savedPayload":{"position":{"x":30856.356993272086,"y":28934.918778615294},"targetPosition":{"x":30556.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08222935-2499-4a3e-a927-4f5dfbc392df","savedPayload":{"position":{"x":30556.356993272086,"y":28934.918778615294},"targetPosition":{"x":30256.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"56c5656b-a7e0-42ed-92d6-631e78ca99d0","savedPayload":{"position":{"x":30256.356993272086,"y":28934.918778615294},"targetPosition":{"x":29956.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ce02342-473e-4614-ac76-c7788f56ab8e","savedPayload":{"position":{"x":29956.356993272086,"y":28934.918778615294},"targetPosition":{"x":29656.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"2db856e0-4719-408c-88bc-5b47d412c066","savedPayload":{"position":{"x":29656.356993272086,"y":28934.918778615294},"targetPosition":{"x":29356.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"ba36975c-08d6-458d-b7c0-eb4684a85b5d","savedPayload":{"position":{"x":29356.356993272086,"y":28934.918778615294},"targetPosition":{"x":29056.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"55c01047-3fce-41b3-9214-2e885f28b987","savedPayload":{"position":{"x":29056.356993272086,"y":28934.918778615294},"targetPosition":{"x":28756.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":28756.356993272086,"y":28934.918778615294},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binanceus","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Live Trading Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"5db563b5-a8d6-48c6-a34e-bbca8825ce37","savedPayload":{"position":{"x":27214.318791376507,"y":32665.54775609566},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 100\n}","project":"Superalgos","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689","savedPayload":{"position":{"x":27314.957547074417,"y":32638.58168277913},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"727de4cc-40e6-4064-843c-8cb3a9f2fcdf","savedPayload":{"position":{"x":27418.749983429472,"y":32647.662344319935},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"598dc355-73c9-4e7f-a0e9-ee5fd7952825","savedPayload":{"position":{"x":27513.177200804028,"y":32691.69447891996},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"a3646bab-4d27-48a7-b17c-79d6da48f64d","savedPayload":{"position":{"x":27586.849883185412,"y":32765.367161301343},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"5021a926-442a-4341-8844-8a432293ecb1","savedPayload":{"position":{"x":27630.882017785436,"y":32859.7943786759},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"e8cedec0-1bc2-46ba-98de-b7ff746a74c8","savedPayload":{"position":{"x":27639.96267932624,"y":32963.586815030954},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"67da1d57-62ff-424c-ab2e-034e008fc079","savedPayload":{"position":{"x":27612.99660600971,"y":33064.225570728864},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"726c35b1-e30b-4620-819f-a88a955f1902","savedPayload":{"position":{"x":27341.104269898715,"y":32937.440092206656},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"ff1cd7c1-9415-4c49-8ecf-188fd0c60ea4","savedPayload":{"position":{"x":27428.97223554275,"y":33149.57212656262},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"5fd0a826-0819-4f19-a999-66cc64be0272","savedPayload":{"position":{"x":27341.104269898715,"y":33361.70416091858},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"1ce123af-467f-4295-b317-dba8729faf25","savedPayload":{"position":{"x":27128.97223554275,"y":33149.57212656262},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"0d54601b-fcac-42c9-8ce6-d532bfc81de5","savedPayload":{"position":{"x":26978.97223554275,"y":33409.37974769795},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"7e2fdde9-8b64-44a3-85f1-10c3935bd3e3"}}},"id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d","savedPayload":{"position":{"x":26828.97223554275,"y":33149.57212656262},"targetPosition":{"x":26569.16461440742,"y":32999.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"2451fc98-0396-44df-902c-a3eaa90f0618","savedPayload":{"position":{"x":26569.16461440742,"y":32999.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"keyReference":{"type":"Key Reference","name":"Key for Lighting Strike","project":"Superalgos","id":"a0622fc9-c4e3-44c3-963d-7ae5fa163e99","savedPayload":{"position":{"x":26309.356993272086,"y":33149.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},"id":"c8492c4a-a7a7-4a80-a25a-a610377e6180","savedPayload":{"position":{"x":26309.356993272086,"y":32849.57212656262},"targetPosition":{"x":26159.356993272086,"y":32589.76450542729},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dd73b670-11d7-4cdc-848b-c063fb7a3848","savedPayload":{"position":{"x":26159.356993272086,"y":32589.76450542729},"targetPosition":{"x":26009.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1e087225-153c-4c7e-b9ec-2a36f32ee511","savedPayload":{"position":{"x":26009.356993272086,"y":32329.956884291958},"targetPosition":{"x":25859.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"013985a8-7bf7-4b91-8e2d-f4e8bd81cb62","savedPayload":{"position":{"x":25859.356993272086,"y":32070.149263156625},"targetPosition":{"x":25709.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"d539c0ac-aaeb-4c44-9dba-ac26df819a8d","savedPayload":{"position":{"x":25709.356993272086,"y":31810.341642021293},"targetPosition":{"x":25559.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"f4fc305a-6764-427e-86a7-6557118a4b35","savedPayload":{"position":{"x":25559.356993272086,"y":31550.53402088596},"targetPosition":{"x":25409.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":28606.356993272086,"y":29194.726399750627},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Data Products","name":"Superalgos","project":"Superalgos","exchangeDataProducts":[{"type":"Exchange Data Products","name":"Binanceus","project":"Superalgos","marketDataProducts":[{"type":"Market Data Products","name":"Binanceus BTC/USDT","project":"Superalgos","dataProducts":[],"dataMineProducts":[{"type":"Data Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Candles Volumes","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Candles","project":"Superalgos","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab","savedPayload":{"position":{"x":25635.373168930517,"y":32126.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Candles","id":"fe6065ec-4d2d-47a0-bae0-8647f0e195d7"}}},{"type":"Data Product","name":"Volumes","project":"Superalgos","id":"07c11481-7dbd-477d-8bf7-79212542a6aa","savedPayload":{"position":{"x":25617.373168930517,"y":32183.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Volumes","id":"1a366aef-efef-470e-88e0-2a6fbe4dd91f"}}}],"dataProductFolders":[],"id":"73bb62ff-8212-4387-b160-40ee8de2a133","savedPayload":{"position":{"x":28609.517851064033,"y":30737.271265196097},"targetPosition":{"x":28332.353991310647,"y":30622.46623548657},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Resistances and Supports","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Resistances","project":"Superalgos","id":"a1669770-1bbe-40f7-acb3-ded15272935f","savedPayload":{"position":{"x":25621.373168930517,"y":32076.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Resistances","id":"7a734501-a0fb-4305-803e-7e95d477c513"}}},{"type":"Data Product","name":"Supports","project":"Superalgos","id":"64899503-b618-493a-ba94-bfad2051a611","savedPayload":{"position":{"x":25644.373168930517,"y":32138.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Supports","id":"bc3c43de-6312-47d4-ae3d-0c95c1b039e0"}}}],"dataProductFolders":[],"id":"a1855a09-0948-43de-bba7-8900c5c161d8","savedPayload":{"position":{"x":28371.51184897666,"y":30919.89969389871},"targetPosition":{"x":28332.353991310647,"y":30622.46623548657},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0","savedPayload":{"position":{"x":28332.353991310647,"y":30622.46623548657},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}},{"type":"Data Mine Products","name":"Sparta","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Simple Moving Average (SMA)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Popular SMAs","project":"Superalgos","id":"1b8ea542-14d1-42c0-9af9-c429c308c6fd","savedPayload":{"position":{"x":28043.567704942016,"y":30688.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Popular SMAs","id":"4029d5bf-a8ad-4d80-b874-2af506e0ab34"}}},{"type":"Data Product","name":"Base7 SMAs","project":"Superalgos","id":"589f977c-a9d4-446c-8b5e-ff54250d3b3a","savedPayload":{"position":{"x":28038.567704942016,"y":30670.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base7 SMAs","id":"a03ef0ea-5be9-4d40-952e-24789e77dbb6"}}},{"type":"Data Product","name":"Base11 SMAs","project":"Superalgos","id":"e582bbcc-1d03-4645-8320-acc12afd08cf","savedPayload":{"position":{"x":28120.567704942016,"y":30666.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base11 SMAs","id":"05fabbf9-7798-4a53-995e-53ae74bef3de"}}},{"type":"Data Product","name":"Base5 SMAs","project":"Superalgos","id":"53fe6df8-67cb-4c21-983d-875ea9b532db","savedPayload":{"position":{"x":28117.567704942016,"y":30709.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base5 SMAs","id":"2dcb55de-1673-409e-aa52-f51e7c7f8fa3"}}},{"type":"Data Product","name":"Base6 SMAs","project":"Superalgos","id":"eaaf75ea-2937-460f-87ee-990e632d6475","savedPayload":{"position":{"x":28135.567704942016,"y":30655.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base6 SMAs","id":"4ae22e54-cd02-4e2e-b638-1c5ea9a171ac"}}},{"type":"Data Product","name":"Base12 SMAs","project":"Superalgos","id":"8637a545-6fef-404b-b14f-8f4d11704e57","savedPayload":{"position":{"x":28181.567704942016,"y":30549.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base12 SMAs","id":"723d28e9-a010-48c5-bda0-43a4c2343ddf"}}},{"type":"Data Product","name":"Base30 SMAs","project":"Superalgos","id":"0ce01d0f-adf0-4fe5-961d-037ca8721a97","savedPayload":{"position":{"x":28223.567704942016,"y":30691.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base30 SMAs","id":"607ebabd-9602-4e5c-803d-d4207dbd6794"}}}],"dataProductFolders":[],"id":"f6551bb8-06bd-4873-80b4-d233142c385b","savedPayload":{"position":{"x":28293.196133644633,"y":30919.89969389871},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"MACD 122609","project":"Superalgos","id":"9bc1f567-146e-474e-a12d-942e1f8b8876","savedPayload":{"position":{"x":27977.567704942016,"y":30613.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 122609","id":"6c0c9bf0-90af-4497-b4fb-49b5872b1119"}}},{"type":"Data Product","name":"MACD 031016","project":"Superalgos","id":"e8b6b822-9b76-4559-aefc-957751616417","savedPayload":{"position":{"x":28066.567704942016,"y":30615.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 031016","id":"d1482dc0-e9f1-47ba-b75e-961fa914a53a"}}},{"type":"Data Product","name":"MACD 081709","project":"Superalgos","id":"951914c1-dded-4dda-9f38-c5cc3359c4c0","savedPayload":{"position":{"x":28099.567704942016,"y":30629.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 081709","id":"683e6b29-9f82-4a8e-93eb-20ac0e81a750"}}},{"type":"Data Product","name":"MACD 245209","project":"Superalgos","id":"db2799ed-9bbc-4ba7-87b8-a33efbd513ba","savedPayload":{"position":{"x":28090.567704942016,"y":30512.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 245209","id":"47984765-8180-45cf-a9eb-f0a8b22d165d"}}}],"dataProductFolders":[],"id":"bdee55fc-b907-4378-acba-bd7795cfb8a0","savedPayload":{"position":{"x":28071.409847276,"y":30979.327150223482},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Relative Strenght Index (RSI)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"RSI14","project":"Superalgos","id":"9c42c985-a07d-4892-8853-636d8fec20a0","savedPayload":{"position":{"x":28059.567704942016,"y":30670.89369181134},"targetPosition":{"x":28114.567704942016,"y":30712.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"RSI14","id":"e24248b9-90df-4b26-b5cc-0bac80efa0c7"}}}],"dataProductFolders":[],"id":"3b96186a-c4b9-4409-bf16-2ba82ec6d37c","savedPayload":{"position":{"x":27872.561702854644,"y":30864.522120513957},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4e954d81-88ad-44b4-9ddf-5930e50d367e","savedPayload":{"position":{"x":28110.567704942016,"y":30681.89369181134},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Sparta","id":"9cfffc48-486a-48cb-b641-98c82e314d3a"}}},{"type":"Data Mine Products","name":"Alpha","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Stochastic","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Stoch-14-3-3","project":"Superalgos","id":"0ac3f528-2409-45ae-9654-e7dbfd3dbb98","savedPayload":{"position":{"x":27900.719560520658,"y":30610.088662101814},"targetPosition":{"x":27845.719560520658,"y":30534.088662101814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stoch-14-3-3","id":"393dc97b-76ee-409a-9b8f-f264ed652b0b"}}}],"dataProductFolders":[],"id":"8bf2e1e4-cb46-4216-8393-2a6124f3f1f2","savedPayload":{"position":{"x":27673.713558433286,"y":30749.71709080443},"targetPosition":{"x":27911.719560520658,"y":30567.088662101814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"44ad7330-2754-433c-85e7-67bac01affb2","savedPayload":{"position":{"x":27911.719560520658,"y":30567.088662101814},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Alpha","id":"511bef1e-62d8-4ff9-8d87-15bd0d3d630c"}}}],"id":"6d7273da-5366-4fe3-9749-e643038abd7a","savedPayload":{"position":{"x":28149.72556260803,"y":30384.460233399197},"targetPosition":{"x":28188.883420274044,"y":30087.026774987055},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"9bc0aea4-0596-449c-91bd-4fb4cb672aa8","savedPayload":{"position":{"x":28188.883420274044,"y":30087.026774987055},"targetPosition":{"x":28228.041277940058,"y":29789.593316574912},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"db554581-93fa-465d-89f7-50f026e839d8","savedPayload":{"position":{"x":28228.041277940058,"y":29789.593316574912},"targetPosition":{"x":28267.19913560607,"y":29492.15985816277},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"32e7c122-fa5a-4d00-9d71-d54e890e32de","savedPayload":{"position":{"x":28267.19913560607,"y":29492.15985816277},"targetPosition":{"x":28306.356993272086,"y":29194.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":[{"type":"Project Trading Products","name":"Superalgos","project":"Superalgos","exchangeTradingProducts":[{"type":"Exchange Trading Products","name":"Binanceus","project":"Superalgos","marketTradingProducts":[{"type":"Market Trading Products","name":"Binanceus BTC/USDT","project":"Superalgos","tradingSessionReferences":[{"type":"Trading Session Reference","name":"Lightning Strike Backtesting Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631","savedPayload":{"position":{"x":24463.592002018682,"y":31980.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84","savedPayload":{"position":{"x":24313.592002018682,"y":31909.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960","savedPayload":{"position":{"x":24420.592002018682,"y":31952.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"7c580919-08ce-4aff-9e84-888fdf07caec","savedPayload":{"position":{"x":24281.592002018682,"y":31964.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"389797d4-8456-4258-9adf-246a6ba69016","savedPayload":{"position":{"x":24441.592002018682,"y":31984.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa","savedPayload":{"position":{"x":24417.592002018682,"y":31995.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe","savedPayload":{"position":{"x":24475.592002018682,"y":31901.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c","savedPayload":{"position":{"x":24306.592002018682,"y":32068.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"a606455e-f5ce-4535-b1af-6d9dd529f91c","savedPayload":{"position":{"x":24377.592002018682,"y":31972.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86","savedPayload":{"position":{"x":24475.592002018682,"y":31953.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"556e97e8-eba3-419d-869d-950cc99371da","savedPayload":{"position":{"x":24448.592002018682,"y":32071.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"3af0887b-ae23-4f57-b376-4a540fe13112","savedPayload":{"position":{"x":24454.592002018682,"y":32022.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a","savedPayload":{"position":{"x":24352.592002018682,"y":32024.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f","savedPayload":{"position":{"x":24398.592002018682,"y":32035.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"895feaf2-ae82-4b8e-ada6-780beab73ea9","savedPayload":{"position":{"x":24447.592002018682,"y":32101.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"b0961496-1af9-48cd-bbeb-ac5973192e78","savedPayload":{"position":{"x":24555.592002018682,"y":31897.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d","savedPayload":{"position":{"x":24541.592002018682,"y":31929.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"e298787f-b7f2-4334-931e-38b9441e43f9","savedPayload":{"position":{"x":24504.592002018682,"y":31961.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c","savedPayload":{"position":{"x":24444.592002018682,"y":31908.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"9fe11205-286a-4610-81ec-29cbc70d6075","savedPayload":{"position":{"x":24520.592002018682,"y":31974.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd","savedPayload":{"position":{"x":24483.592002018682,"y":31990.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77","savedPayload":{"position":{"x":24491.592002018682,"y":32003.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"e734b6be-ba40-468c-a94f-1153dc85e00c","savedPayload":{"position":{"x":24445.592002018682,"y":32089.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"9a973229-4d9d-45af-b5aa-64906a915f6e","savedPayload":{"position":{"x":24422.592002018682,"y":32032.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"56517fe9-64da-4404-83f3-005106bc1c0a","savedPayload":{"position":{"x":24412.592002018682,"y":32018.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"d00c76e7-4be0-4518-9892-a0f6df943951","savedPayload":{"position":{"x":24594.592002018682,"y":31949.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"b5154bc1-4311-4148-b396-5ebca1c62417","savedPayload":{"position":{"x":24511.592002018682,"y":32023.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"89edd698-1d64-4500-bcef-d13ea74bee1c","savedPayload":{"position":{"x":24421.592002018682,"y":32058.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"a0c29c57-0a20-4084-9697-142300f62f9c","savedPayload":{"position":{"x":24383.592002018682,"y":32063.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"aa0fe882-89a8-4811-8988-c589554afe9d","savedPayload":{"position":{"x":24294.592002018682,"y":32008.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"bbc65054-b22b-4cbb-816b-529672e2f498","savedPayload":{"position":{"x":24324.592002018682,"y":32032.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"776a3ece-8255-4e80-b60f-85bb818b561f","savedPayload":{"position":{"x":24340.592002018682,"y":32026.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"7593aaf9-0505-4b58-9920-235340ff2d2f","savedPayload":{"position":{"x":24325.592002018682,"y":32003.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd","savedPayload":{"position":{"x":24332.592002018682,"y":32039.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"faab4399-898b-4393-8c27-fa2f3109c60a","savedPayload":{"position":{"x":24307.592002018682,"y":32057.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157","savedPayload":{"position":{"x":24297.592002018682,"y":32133.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7","savedPayload":{"position":{"x":24389.592002018682,"y":31999.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"1a16bc12-581d-4626-846c-895f08e65fdf","savedPayload":{"position":{"x":24378.592002018682,"y":32060.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba","savedPayload":{"position":{"x":24433.592002018682,"y":31946.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049","savedPayload":{"position":{"x":24490.592002018682,"y":31966.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc","savedPayload":{"position":{"x":24570.592002018682,"y":32052.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed","savedPayload":{"position":{"x":24567.592002018682,"y":32057.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b","savedPayload":{"position":{"x":24545.592002018682,"y":31956.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642","savedPayload":{"position":{"x":24672.592002018682,"y":31889.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"97736b8e-761c-43f2-83bf-df8f5d41b963","savedPayload":{"position":{"x":24586.592002018682,"y":31971.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"9fc29be1-9393-4933-95d3-bebddd73c05e","savedPayload":{"position":{"x":24507.592002018682,"y":31875.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"b555388f-db93-4db1-91be-7772550afa70","savedPayload":{"position":{"x":24439.592002018682,"y":31926.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"41953904-e48c-4176-bf0f-09d133bc444c","savedPayload":{"position":{"x":24441.592002018682,"y":31883.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c","savedPayload":{"position":{"x":24463.592002018682,"y":31931.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"ac789224-64dc-4ff5-a316-2dfbb6347b8a","savedPayload":{"position":{"x":24487.592002018682,"y":31875.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"6e49b57f-8c94-410f-985b-82c126155b11","savedPayload":{"position":{"x":24693.592002018682,"y":31870.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba","savedPayload":{"position":{"x":24673.592002018682,"y":32018.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f","savedPayload":{"position":{"x":24656.592002018682,"y":31987.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"01491591-0462-453c-91e0-6da6f554a729","savedPayload":{"position":{"x":24536.592002018682,"y":31883.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2","savedPayload":{"position":{"x":24558.592002018682,"y":31830.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"2a4cb5a2-8e6a-4b14-816a-b8e0cce4dae5","savedPayload":{"position":{"x":24616.592002018682,"y":31921.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"39e122ca-cdc4-49a6-91a6-2f2c05f62ea0","savedPayload":{"position":{"x":24528.592002018682,"y":31946.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"363150a9-d4e7-4e2e-b327-89109935718c","savedPayload":{"position":{"x":24436.592002018682,"y":31978.531877463392},"targetPosition":{"x":24383.592002018682,"y":32012.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7","savedPayload":{"position":{"x":24383.592002018682,"y":32012.531877463392},"targetPosition":{"x":24343.592002018682,"y":31925.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"a5de30a4-022e-4f8a-afd0-3eb6d8600ae8","savedPayload":{"position":{"x":27706.356993272086,"y":30533.956884291958},"targetPosition":{"x":27706.356993272086,"y":30233.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Trading Session Reference","name":"Lightning Strike Live Trading Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"dc6cc4ef-4bd7-4837-8442-919462314db3","savedPayload":{"position":{"x":24040.07658106541,"y":32774.458634291004},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"776ed571-8321-47aa-8cfb-c8ebf565dace","savedPayload":{"position":{"x":24033.260548494378,"y":32904.51628344689},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"ded93703-a48d-44be-9703-878c28f949cd","savedPayload":{"position":{"x":23982.373237179447,"y":33024.39927619857},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a","savedPayload":{"position":{"x":23893.552407881933,"y":33119.64795433567},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027","savedPayload":{"position":{"x":23777.51116347094,"y":33178.77392155408},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2","savedPayload":{"position":{"x":23521.347601016434,"y":33165.348958112605},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65","savedPayload":{"position":{"x":23412.122389176475,"y":33094.417276175125},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"6a331de0-7872-4f86-bea0-6dd802c97921","savedPayload":{"position":{"x":23667.871774199913,"y":32820.15963806794},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"88dd680c-a81b-48ae-96ba-838281abfa35","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"74c10f36-887b-4233-81e5-abe365511bfa","savedPayload":{"position":{"x":23477.99935320648,"y":32860.51826703026},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"7a95a249-132d-4e0f-9182-cc7af45cacea","savedPayload":{"position":{"x":22959.25825209631,"y":32970.78009187916},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"7eca88a8-3724-4ca1-aa30-9227727eb834","savedPayload":{"position":{"x":23293.38569866695,"y":32800.533654476836},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2","savedPayload":{"position":{"x":23104.83496583686,"y":33026.66175662281},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d","savedPayload":{"position":{"x":22898.332847281992,"y":32921.44367184458},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125","savedPayload":{"position":{"x":22793.11476250377,"y":32714.941553289715},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70","savedPayload":{"position":{"x":22829.37044365631,"y":32486.0321914973},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"7236bd16-a6e3-48ac-89bf-dc8674b7e812","savedPayload":{"position":{"x":23163.497890226947,"y":32656.27862889963},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e","savedPayload":{"position":{"x":22942.973442347367,"y":32795.291108279984},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6","savedPayload":{"position":{"x":22818.117657046547,"y":32684.55024509317},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"1c6eed42-23aa-4174-aade-be29222acb8c","savedPayload":{"position":{"x":22753.675141305597,"y":32530.603279980434},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85","savedPayload":{"position":{"x":22762.409525702606,"y":32363.941297417976},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6","savedPayload":{"position":{"x":22842.590858287545,"y":32217.573747027367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"c451c035-5ece-451f-836f-b5334cb3f967","savedPayload":{"position":{"x":22978.338242782465,"y":32120.49051724367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"ce9593a8-3e87-43bb-88c7-af50cf651806","savedPayload":{"position":{"x":23123.13926126462,"y":32466.406207906195},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8be94a26-6821-48bb-8169-3eae2a1131af","savedPayload":{"position":{"x":23497.625336797584,"y":32486.0321914973},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"ba606f99-2ae5-44dc-b7db-399e657830e1","savedPayload":{"position":{"x":23295.861450927674,"y":32622.443323337528},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee","savedPayload":{"position":{"x":23182.53338349962,"y":32592.0771591904},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8","savedPayload":{"position":{"x":23084.13564726847,"y":32528.17692212845},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"dcff6f56-7646-4505-aa93-6682a110f3f2","savedPayload":{"position":{"x":23010.300098233878,"y":32436.997612574425},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5","savedPayload":{"position":{"x":22968.25427437787,"y":32327.464496631084},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7","savedPayload":{"position":{"x":22962.11391388994,"y":32210.299438849055},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"e4811789-fd94-49b0-9917-8d9d434f997d","savedPayload":{"position":{"x":22992.480078037068,"y":32096.971371421},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"029ff3a7-9c65-425f-855a-882df68fa05b","savedPayload":{"position":{"x":23056.38031509902,"y":31998.573635189852},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38","savedPayload":{"position":{"x":23147.559624653044,"y":31924.73808615526},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"7096a712-deb7-4adb-86e0-d688f24d2832","savedPayload":{"position":{"x":23335.059624653044,"y":32249.497612574425},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"c6fd6067-4b57-4860-ae3b-5668e4444490","savedPayload":{"position":{"x":23053.23606537805,"y":32137.53752778946},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"60f88096-7343-42d1-afad-83fecd22fb44","savedPayload":{"position":{"x":23012.87743641572,"y":31947.665106796027},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"9f939086-c934-4924-8353-776707a7cf10","savedPayload":{"position":{"x":22722.769389032703,"y":31897.43943333598},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"da5f279e-d387-43cf-80f4-fc114b9ac906","savedPayload":{"position":{"x":22710.63986411075,"y":31665.99431034305},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"367646bb-839a-4071-8305-6d26a647585d","savedPayload":{"position":{"x":22836.866902325462,"y":31471.62171671013},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9","savedPayload":{"position":{"x":23053.23606537805,"y":31388.56537672353},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"88643ab2-7859-45d4-b967-8681cf970828","savedPayload":{"position":{"x":23072.862048969153,"y":31763.051452256495},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf","savedPayload":{"position":{"x":22846.73394682318,"y":31574.500719426407},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4","savedPayload":{"position":{"x":22951.952031601402,"y":31367.99860087154},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710","savedPayload":{"position":{"x":23158.45415015627,"y":31262.780516093317},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91","savedPayload":{"position":{"x":23387.363511948686,"y":31299.036197245856},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"869369c1-13de-4086-ad40-77b3d54cfc36","savedPayload":{"position":{"x":23217.117074546357,"y":31633.163643816493},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90","savedPayload":{"position":{"x":23092.488032560257,"y":31388.56537672353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"88997c97-e77f-490e-9eb5-c7531beec132","savedPayload":{"position":{"x":23236.74305813746,"y":31258.67756828353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4","savedPayload":{"position":{"x":23426.615479130895,"y":31218.3189393212},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"9b064960-3829-441f-b955-334fb8324a53","savedPayload":{"position":{"x":23611.229133670426,"y":31278.303551874633},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1","savedPayload":{"position":{"x":23741.116942110428,"y":31422.558577451837},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"7f74f2e1-91b6-4d7a-87cb-1d6232a41876","savedPayload":{"position":{"x":23406.98949553979,"y":31592.805014854166},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"291949a0-847b-4b18-b3b4-191496fc38a9","savedPayload":{"position":{"x":23387.363511948686,"y":31967.29109038713},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ae78f4fc-6ee5-4ae4-9847-3bab0e2e51a6","savedPayload":{"position":{"x":23701.86497492822,"y":32171.530728517766},"targetPosition":{"x":24068.670325203395,"y":32093.563844461107},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2b0766-a3d5-47e1-acd8-7345af564388","savedPayload":{"position":{"x":24068.670325203395,"y":32093.563844461107},"targetPosition":{"x":24313.207225386846,"y":32041.58592175667},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"9ef30086-0c9d-47c2-8983-db5fc9a99583","savedPayload":{"position":{"x":27446.549372136753,"y":30383.956884291958},"targetPosition":{"x":27706.356993272086,"y":30233.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"026bab29-64d0-4d83-862c-446657efa101","savedPayload":{"position":{"x":27706.356993272086,"y":30233.956884291958},"targetPosition":{"x":27856.356993272086,"y":29974.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"f601d2a7-fada-477f-9b63-3ef7ed42d44a","savedPayload":{"position":{"x":27856.356993272086,"y":29974.149263156625},"targetPosition":{"x":28006.356993272086,"y":29714.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"691abc38-257f-462f-bee5-1cc51d77cea6","savedPayload":{"position":{"x":28006.356993272086,"y":29714.341642021293},"targetPosition":{"x":28156.356993272086,"y":29454.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"e4e268f3-a677-4f90-90a1-d87244e647e5","savedPayload":{"position":{"x":28156.356993272086,"y":29454.53402088596},"targetPosition":{"x":28306.356993272086,"y":29194.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":[{"type":"Project Learning Products","name":"Superalgos","project":"Superalgos","exchangeLearningProducts":[],"id":"071c1c13-0e4c-4649-b2eb-7dc422278961","savedPayload":{"position":{"x":27830.344989097342,"y":29559.98325715586},"targetPosition":{"x":28068.350991184714,"y":29377.354828453244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"2845a687-becc-4c3b-bc79-b2293ba876ba","savedPayload":{"position":{"x":28068.350991184714,"y":29377.354828453244},"targetPosition":{"x":28306.356993272086,"y":29194.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":28306.356993272086,"y":29194.726399750627},"targetPosition":{"x":28456.356993272086,"y":28934.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":28456.356993272086,"y":28934.918778615294},"targetPosition":{"x":28156.356993272086,"y":28934.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":28156.356993272086,"y":28934.918778615294},"targetPosition":{"x":28156.356993272086,"y":28934.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":[{"type":"Crypto Exchange","name":"Binanceus","config":"{\n \"codeName\": \"binanceus\",\n \"API\": [\n {\n \"method\": \"fetchTrades\",\n \"fetchType\": \"by Id\",\n \"fetchTradesMethod\": \"publicGetHistoricalTrades\",\n \"firstId\": \"f\"\n }\n ]\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"EUR\"} \n}","project":"Superalgos","assets":[{"type":"Asset","name":"Bitcoin","config":"{ \n\"codeName\": \"BTC\"\n}","project":"Superalgos","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa","savedPayload":{"position":{"x":19793.079365950267,"y":30513.325102172115},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Asset","name":"Tether","config":"{ \n\"codeName\": \"USDT\"\n}","project":"Superalgos","id":"f110bfa0-bd5b-469b-a940-4524c8688136","savedPayload":{"position":{"x":20005.21140030623,"y":30725.45713652808},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"95d2c30f-215b-486e-8119-f4eac0279575","savedPayload":{"position":{"x":19715.43365241951,"y":30803.102850058836},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"E"}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","code":"{ \n\"codeName\": \"Write here the code name of the Market here.\"\n}","project":"Superalgos","markets":[{"type":"Market","name":"BTC/USDT","config":"{ \n\"codeName\": \"BTC/USDT\"\n}","project":"Superalgos","baseAsset":{"type":"Market Base Asset","name":"Bitcoin","project":"Superalgos","id":"1017b30d-de1b-4212-991e-9fd0a5b6c814","savedPayload":{"position":{"x":20393.079365950267,"y":30937.589170884043},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},"quotedAsset":{"type":"Market Quoted Asset","name":"Tether","project":"Superalgos","id":"705c4a67-787a-48cd-a3dc-3a557438bf0b","savedPayload":{"position":{"x":20393.079365950267,"y":31092.880597945557},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}},"id":"9a867bf0-a71d-445c-b99a-75b60bbdce09","savedPayload":{"position":{"x":20103.301618063546,"y":31015.2348844148},"targetPosition":{"x":19803.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2fd80894-900e-44ac-a1a7-56c14124f7a1","savedPayload":{"position":{"x":19803.301618063546,"y":31015.2348844148},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b","savedPayload":{"position":{"x":19503.301618063546,"y":31015.2348844148},"targetPosition":{"x":19203.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""},"tutorial":{"status":"Done"}}}],"id":"e3879d63-6f8f-41a3-8ac3-0349c4361722","savedPayload":{"position":{"x":19203.301618063546,"y":31015.2348844148},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Untested","project":"Superalgos","exchanges":[{"type":"Crypto Exchange","name":"ACX","config":"{ \n\"codeName\": \"acx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ebcb522b-ae58-46d2-9d82-a9b0beec3976","savedPayload":{"position":{"x":17935.64382962515,"y":31014.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b2649588-27c6-442c-b179-f6d8817188b3","savedPayload":{"position":{"x":17954.64382962515,"y":31004.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9c21b2d-de21-43b5-8b48-51367a8c981c","savedPayload":{"position":{"x":19313.14497226101,"y":30565.583066825377},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"AOFEX","config":"{ \n\"codeName\": \"aofex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"623ef91b-04c0-4bd5-ac0d-b32c809be3ea","savedPayload":{"position":{"x":17973.64382962515,"y":30923.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"9d0b5855-59a6-4dda-9a4b-33d7a44d582e","savedPayload":{"position":{"x":17901.64382962515,"y":30994.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c2e9bb45-97c7-47e8-b13c-56946e673c53","savedPayload":{"position":{"x":19413.67778623216,"y":30647.89853748846},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bequant","config":"{ \n\"codeName\": \"bequant\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"b23c8adf-c880-48fd-b4af-4b4be86cf0e5","savedPayload":{"position":{"x":18059.64382962515,"y":31101.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"523bd94f-68f9-457e-91fd-806c1b95e98d","savedPayload":{"position":{"x":18006.64382962515,"y":31117.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e928d3e-a2c2-4341-aa2f-b753551c9479","savedPayload":{"position":{"x":19504.72140465123,"y":30740.600980501622},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bibox","config":"{ \n\"codeName\": \"bibox\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"13c1f22c-9a35-4d3f-b000-c96984fd6a2b","savedPayload":{"position":{"x":17995.64382962515,"y":31047.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3c6df49d-70c3-468a-bdd8-6768ce6d3a9d","savedPayload":{"position":{"x":17916.64382962515,"y":31018.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e5f9ee4d-77a3-48ae-b354-b2f6a97d5e47","savedPayload":{"position":{"x":19585.208424334218,"y":30842.603544479174},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BigONE","config":"{ \n\"codeName\": \"bigone\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"3f289513-c1c8-457c-b65a-8cf62b5f5eb5","savedPayload":{"position":{"x":17778.64382962515,"y":31071.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b365e73-1cee-496a-921f-121cb628a130","savedPayload":{"position":{"x":17798.64382962515,"y":31121.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fb9ee540-bf12-4dda-bf87-cb6b58fce649","savedPayload":{"position":{"x":19654.195208565325,"y":30952.710342620318},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance Jersey","config":"{ \n\"codeName\": \"binanceje\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0b979ea9-7a2d-4744-9517-2dfa632dfafc","savedPayload":{"position":{"x":17852.64382962515,"y":30989.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b9a4497d-20f1-4c61-9a79-444e0fe0ddf4","savedPayload":{"position":{"x":17924.64382962515,"y":30952.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2782350a-84a2-40ec-87c6-3c8043376a18","savedPayload":{"position":{"x":19710.872950374665,"y":31069.630473388454},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance US","config":"{ \n\"codeName\": \"binanceus\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"817ee1cf-b44c-4458-a9c4-a05a17ea0510","savedPayload":{"position":{"x":17943.64382962515,"y":30999.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c6694e9e-74dc-4c2e-9151-90f1d6631b45","savedPayload":{"position":{"x":17937.64382962515,"y":30989.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0b2b67d2-853b-470e-8b13-925956ad5621","savedPayload":{"position":{"x":19754.577155060477,"y":31191.993155151424},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitbank","config":"{ \n\"codeName\": \"bitbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eb6b6842-9bf7-450e-baa3-7a87541a1cf6","savedPayload":{"position":{"x":17955.64382962515,"y":31107.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6353ff56-759f-457d-81f3-fdb8ae5b3e83","savedPayload":{"position":{"x":17942.64382962515,"y":31183.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c9a96a7-ed12-4b3e-bb51-306a8da131f5","savedPayload":{"position":{"x":19784.79543078195,"y":31318.363797342816},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitBay","config":"{ \n\"codeName\": \"bitbay\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83b4e523-72a7-41ce-9363-fe0c799dcac1","savedPayload":{"position":{"x":17861.64382962515,"y":30965.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"966698f7-8a28-42d7-bb80-f7cd0601e44f","savedPayload":{"position":{"x":17823.64382962515,"y":31026.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8778eee5-97a2-4f9d-bd25-cd5a64ec6663","savedPayload":{"position":{"x":19801.173495885087,"y":31447.26081972472},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"33508b53-2769-4f3d-8c98-9fa37e5cbf5b","savedPayload":{"position":{"x":17888.64382962515,"y":31043.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4d4ad5a1-81a7-4f92-83db-99f57ce261bb","savedPayload":{"position":{"x":17975.64382962515,"y":30868.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c076027-683d-4778-8a6a-e60984980fdf","savedPayload":{"position":{"x":19803.51933253116,"y":31577.173022561386},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8fc7f955-5c81-446c-bbeb-205988bf1fc0","savedPayload":{"position":{"x":17830.64382962515,"y":31051.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d5ba38e9-3282-4634-b922-16532c71f426","savedPayload":{"position":{"x":17819.64382962515,"y":31118.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f3114102-a73c-4086-9594-5888ef1ab4ec","savedPayload":{"position":{"x":19791.80543793031,"y":31706.577304054405},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitforex","config":"{ \n\"codeName\": \"bitforex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"698e5e38-ad73-4cb6-b7f6-2b69913faff9","savedPayload":{"position":{"x":17897.64382962515,"y":30956.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"f0142bd4-1b63-4d12-a4b7-e150d0da197f","savedPayload":{"position":{"x":18020.64382962515,"y":31021.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"499a5a3b-7871-4c95-9b2e-d58d4d9e2392","savedPayload":{"position":{"x":19766.169146786622,"y":31833.956517318737},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitkk","config":"{ \n\"codeName\": \"bitkk\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"efbb916c-780b-447f-a4c2-df68570d4ee1","savedPayload":{"position":{"x":17931.64382962515,"y":30937.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0d829516-81d9-46a5-9861-7d94cc89455d","savedPayload":{"position":{"x":17951.64382962515,"y":30912.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ded39740-3c93-4fda-bb9c-6ac75d2109f4","savedPayload":{"position":{"x":19726.911021174266,"y":31957.817257542785},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMart","config":"{ \n\"codeName\": \"bitmart\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"10374855-6b4a-460b-9c95-70072ac00315","savedPayload":{"position":{"x":17907.64382962515,"y":30901.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3aded60c-4061-48ff-ad33-212c965b5c43","savedPayload":{"position":{"x":17829.64382962515,"y":30925.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c7ed52a7-895b-46f1-a745-35954d8bcfc6","savedPayload":{"position":{"x":19674.491326722004,"y":32076.707370794375},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMax","config":"{ \n\"codeName\": \"bitmax\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8a042d0d-7a7a-4a76-889e-42d8642404f4","savedPayload":{"position":{"x":17944.64382962515,"y":31046.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0c4fcc48-51e6-4ff2-925f-405cda6d1122","savedPayload":{"position":{"x":17898.64382962515,"y":31024.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fc6a9048-ab8c-48f9-91ae-6c95c28714b0","savedPayload":{"position":{"x":19609.524636419505,"y":32189.2329791979},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMEX","config":"{ \n\"codeName\": \"bitmex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f7636e2b-354a-4217-894b-5e26eddc0c2a","savedPayload":{"position":{"x":17894.64382962515,"y":30934.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6eb2ddd1-6d06-456c-b4e0-7df56ba182e6","savedPayload":{"position":{"x":17823.64382962515,"y":30834.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1e2f1dd0-ebf1-4485-83d8-7723a9e3e714","savedPayload":{"position":{"x":19532.77262531095,"y":32294.07482287797},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bittrex","config":"{ \n\"codeName\": \"bittrex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"88d4ef94-f030-42df-9115-69d9611317b1","savedPayload":{"position":{"x":17839.64382962515,"y":31009.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"7fe8234d-9a39-4b28-bf98-43b4fdb57ee5","savedPayload":{"position":{"x":17878.64382962515,"y":31045.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f598f002-8fc5-491f-888e-07d017ea83c6","savedPayload":{"position":{"x":19445.135140551556,"y":32390.003727075255},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bit-Z","config":"{ \n\"codeName\": \"bitz\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0a22e02b-7d2e-4955-9cfc-ed7d95f0c9a0","savedPayload":{"position":{"x":17751.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"298b45af-b73d-4cd5-848a-97de7b857569","savedPayload":{"position":{"x":17944.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6cc10926-fe41-43be-887b-fa8aba1c7377","savedPayload":{"position":{"x":19347.639651522415,"y":32475.89501309667},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC-Alpha","config":"{ \n\"codeName\": \"btcalpha\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"263e3b9c-8fdd-4376-b53b-87f32d0f5898","savedPayload":{"position":{"x":17904.64382962515,"y":30922.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"804603e1-3e0f-4219-a9b7-ee27810d4f07","savedPayload":{"position":{"x":17829.64382962515,"y":30977.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"30e5485f-213b-435b-a670-07b76cfe5cae","savedPayload":{"position":{"x":19241.429203691412,"y":32550.741684144767},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC Markets","config":"{ \n\"codeName\": \"btcmarkets\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"fcb3b880-0852-4d93-8714-67373f9dca16","savedPayload":{"position":{"x":17911.64382962515,"y":31036.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"953d8eff-0b2e-4b07-8635-393fddae0c9d","savedPayload":{"position":{"x":18025.64382962515,"y":31127.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ac2fda42-95ca-404a-8dd2-72bff0ff5a0f","savedPayload":{"position":{"x":19127.749017450227,"y":32613.66623143447},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Buda","config":"{ \n\"codeName\": \"buda\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"27f3573d-e1f0-473f-9bfd-f9198e7240a0","savedPayload":{"position":{"x":17945.64382962515,"y":30937.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ddc0981-4e45-42f3-ae11-f5b136b2bc3d","savedPayload":{"position":{"x":17783.64382962515,"y":31008.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"90fe3d74-662e-4fac-aff3-f41990b61ccf","savedPayload":{"position":{"x":19007.931889043757,"y":32663.930922181273},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BW","config":"{ \n\"codeName\": \"bw\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"457616cd-25f9-4ad3-8c18-6331859dd42e","savedPayload":{"position":{"x":17890.64382962515,"y":31014.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8c1f9aa2-4253-4129-a533-e515644ddb38","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d72db90c-d572-4cbb-8348-e3cc485d8e86","savedPayload":{"position":{"x":18883.38256475272,"y":32700.94644884361},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bybit","config":"{ \n\"codeName\": \"bybit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"18fdf7c8-03c4-4f81-a88e-de97589765e1","savedPayload":{"position":{"x":17803.64382962515,"y":31059.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a62b2603-ac6f-4b6e-9541-86daf32027b1","savedPayload":{"position":{"x":17847.64382962515,"y":31104.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"516c3831-456b-4d17-b0a0-6a363ba2ddb2","savedPayload":{"position":{"x":18755.561271527895,"y":32724.27883821499},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ByteTrade","config":"{ \n\"codeName\": \"bytetrade\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e7a1e531-5a9e-466e-b98d-672de39eed3a","savedPayload":{"position":{"x":18088.64382962515,"y":31024.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"edafaba7-fd82-4d9f-b3f7-5d1c01c56599","savedPayload":{"position":{"x":17941.64382962515,"y":30943.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45e2306f-03e8-4d17-a73a-72c11dd14e78","savedPayload":{"position":{"x":18625.966597164217,"y":32733.65453936303},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CEX.IO","config":"{ \n\"codeName\": \"cex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9de19f0a-5824-4e42-af00-484b64421dc3","savedPayload":{"position":{"x":17890.64382962515,"y":31049.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"39db01bc-0cea-422f-b9e9-7d84e3f5446d","savedPayload":{"position":{"x":17918.64382962515,"y":31105.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"346bfc30-e32a-453a-bdc6-0ead48221581","savedPayload":{"position":{"x":18496.117920729066,"y":32728.96363076407},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Prime","config":"{ \n\"codeName\": \"coinbaseprime\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"73cabd8d-9308-49ed-b544-44f785ee7d38","savedPayload":{"position":{"x":17867.64382962515,"y":30962.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"31bd1360-f0c5-4d70-876a-b152f7cedfd7","savedPayload":{"position":{"x":17960.64382962515,"y":30864.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a8281db-6ace-4186-8cfb-cd249c4af48b","savedPayload":{"position":{"x":18367.537599231866,"y":32710.26110903248},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Pro","config":"{ \n\"codeName\": \"coinbasepro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a29d6e1a-a94e-4b6b-8741-e9af6e4762f4","savedPayload":{"position":{"x":17788.64382962515,"y":30897.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"10cd9004-0088-4bc0-8fe6-b937f1bb311b","savedPayload":{"position":{"x":17865.64382962515,"y":30918.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4242da4b-a67e-44d8-8a19-b1c2f078c94c","savedPayload":{"position":{"x":18241.733119380056,"y":32677.766244135688},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CoinEx","config":"{ \n\"codeName\": \"coinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"af78f796-60e5-4794-87b8-772c7bc74be1","savedPayload":{"position":{"x":18043.64382962515,"y":31069.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d351e6d9-36eb-4d0e-aca5-94429bbb23a3","savedPayload":{"position":{"x":18094.64382962515,"y":31090.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"62ad0961-6bdf-4a4a-a340-610816742d0a","savedPayload":{"position":{"x":18120.179423675774,"y":32631.860008654276},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"COSS","config":"{ \n\"codeName\": \"coss\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e6315232-c6b1-4e25-aade-7bc7ba9ba6ac","savedPayload":{"position":{"x":17787.64382962515,"y":30984.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b1e8451f-09a2-47b0-add3-cf9c35c487bb","savedPayload":{"position":{"x":17829.64382962515,"y":31095.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"695029de-7f61-45bb-aa4c-c6d51e6369ed","savedPayload":{"position":{"x":18004.301618063546,"y":32573.08061122679},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CREX24","config":"{ \n\"codeName\": \"crex24\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c5e12f4a-fb26-40d3-9e70-751b55018e74","savedPayload":{"position":{"x":17910.64382962515,"y":31024.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"00cb629e-bad4-4c6e-8abb-499cad3992f4","savedPayload":{"position":{"x":17938.64382962515,"y":31054.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07a7ec7c-273e-4675-8d8d-21ab8514a1f0","savedPayload":{"position":{"x":17895.458263866083,"y":32502.117186545547},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Deribit","config":"{ \n\"codeName\": \"deribit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f0b2354b-89e3-4eca-b051-664a3b8283f6","savedPayload":{"position":{"x":17862.64382962515,"y":30844.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ae1f824-82a8-4796-a2d5-3d2358d8089f","savedPayload":{"position":{"x":17912.64382962515,"y":31024.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"21971815-4248-45df-8e04-20b9a5a83f06","savedPayload":{"position":{"x":17794.92544989493,"y":32419.801715882462},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DigiFinex","config":"{ \n\"codeName\": \"digifinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e583c93e-9a44-4e0d-acb7-56d7e00a555a","savedPayload":{"position":{"x":17954.64382962515,"y":30992.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8917c7c0-b420-4d4f-a35a-c0fc6870f0de","savedPayload":{"position":{"x":18052.64382962515,"y":30972.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7d56781-0c51-4ec1-95fd-bf4dc8c00352","savedPayload":{"position":{"x":17703.88183147586,"y":32327.0992728693},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DSX","config":"{ \n\"codeName\": \"dsx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"d672ab56-cd32-4ff5-8fc5-3733262aeccb","savedPayload":{"position":{"x":17916.64382962515,"y":31106.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3731a7b5-ba9d-483e-bb41-abf3ae0232c6","savedPayload":{"position":{"x":17878.64382962515,"y":30946.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4c543abc-7372-4701-bc58-107578d45c25","savedPayload":{"position":{"x":17623.394811792878,"y":32225.09670889175},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoin","config":"{ \n\"codeName\": \"fcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a97d578c-6d7f-403c-8294-18aacf14abd8","savedPayload":{"position":{"x":17893.64382962515,"y":30953.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"442c3834-482e-4928-9255-8ac859ae012e","savedPayload":{"position":{"x":17905.64382962515,"y":30896.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ddedcbd-07cb-4928-91b3-348f47118391","savedPayload":{"position":{"x":17554.408027561767,"y":32114.989910750606},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoinJP","config":"{ \n\"codeName\": \"fcoinjp\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"4a8a9810-6df6-451a-ab26-22bd7e7be85a","savedPayload":{"position":{"x":17930.64382962515,"y":31129.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"138ab40c-18ca-4a11-9709-0baa040873e6","savedPayload":{"position":{"x":18007.64382962515,"y":31122.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"982627ea-df84-4ba9-9219-612fbe1e4276","savedPayload":{"position":{"x":17497.730285752426,"y":31998.069779982467},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FTX","config":"{ \n\"codeName\": \"ftx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"20c0a4f5-bdb9-46cc-af7e-2111964551e3","savedPayload":{"position":{"x":17886.64382962515,"y":30940.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"75c99a0b-d3c9-4073-9283-d33e539c36bb","savedPayload":{"position":{"x":17992.64382962515,"y":31061.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0c0bcf5c-2774-423e-9fcf-c512b38dd06d","savedPayload":{"position":{"x":17454.026081066615,"y":31875.707098219504},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gate.io","config":"{ \n\"codeName\": \"gateio\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"71a15089-9d40-4726-9a41-37d406064164","savedPayload":{"position":{"x":17930.64382962515,"y":30993.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c025e976-c2c6-49de-81ec-48e2f737b412","savedPayload":{"position":{"x":17925.64382962515,"y":31053.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4028289-4cdb-4da0-90e6-5f93328b8e03","savedPayload":{"position":{"x":17423.807805345143,"y":31749.336456028108},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gemini","config":"{ \n\"codeName\": \"gemini\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9eb15872-8d15-4086-9920-46909eb5f9e7","savedPayload":{"position":{"x":17951.64382962515,"y":30901.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a84dcf06-57c6-47d7-97a0-9f03f3af8b34","savedPayload":{"position":{"x":18045.64382962515,"y":30891.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"58bf8247-baef-4ea6-a483-7ed8f0ba5043","savedPayload":{"position":{"x":17407.429740242005,"y":31620.439433646203},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1632c520-fa79-442f-b33b-430cb1356de6","savedPayload":{"position":{"x":17809.64382962515,"y":31086.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"576d1666-dbd3-4914-9fe2-fa05bdf72eea","savedPayload":{"position":{"x":17840.64382962515,"y":31148.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8384fa0b-854c-4c23-846e-a5da0179a738","savedPayload":{"position":{"x":17405.083903595932,"y":31490.527230809537},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9a29cb9e-ee8d-4315-8532-eef82224b84a","savedPayload":{"position":{"x":17838.64382962515,"y":30922.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"badd79e7-1e21-4dc3-bfa7-8dfb4a6c6267","savedPayload":{"position":{"x":17920.64382962515,"y":30944.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"09c634c2-5aba-49c5-80bc-4fd4175e7f0c","savedPayload":{"position":{"x":17416.79779819678,"y":31361.12294931652},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Pro","config":"{ \n\"codeName\": \"huobipro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"86caa38c-5bdf-40e4-b27b-8d8b64319575","savedPayload":{"position":{"x":18071.64382962515,"y":31171.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"001225af-c715-4566-9502-f8f0ac1c4531","savedPayload":{"position":{"x":18040.64382962515,"y":31019.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"967c3914-a76d-4389-9c7e-9c258ae683bd","savedPayload":{"position":{"x":17442.43408934047,"y":31233.743736052187},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Russia","config":"{ \n\"codeName\": \"huobiru\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9b7b32d6-a42e-44bb-8065-5aa32b1e844b","savedPayload":{"position":{"x":17980.64382962515,"y":31034.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8d74201c-33cd-4e12-8920-b08d0ef97572","savedPayload":{"position":{"x":17992.64382962515,"y":31105.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6f97bb5c-8d85-43ee-86a1-33e22cdfbb5e","savedPayload":{"position":{"x":17481.692214952825,"y":31109.882995828142},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KKEX","config":"{ \n\"codeName\": \"kkex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"daa4e07a-1cd8-4d92-8004-2eabfaa62f77","savedPayload":{"position":{"x":17924.64382962515,"y":31038.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"cb64951f-d984-4f51-a751-166a316084f3","savedPayload":{"position":{"x":17945.64382962515,"y":31156.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"16ae95ce-796f-4f2b-942c-f98dcbf9cf4b","savedPayload":{"position":{"x":17534.11190940509,"y":30990.99288257655},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Kraken","config":"{ \n\"codeName\": \"kraken\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"747af60f-c8b9-4377-aa6c-172d4137ea23","savedPayload":{"position":{"x":17854.64382962515,"y":31008.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c75f7d97-9dc2-4d3e-89eb-f8a3d5f16368","savedPayload":{"position":{"x":17916.64382962515,"y":30872.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"644efe9c-597a-4ddf-9e28-b33fb3b62d3e","savedPayload":{"position":{"x":17599.078599707587,"y":30878.467274173025},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KuCoin","config":"{ \n\"codeName\": \"kucoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"01ca3037-4ed3-499e-ad6b-e14ca1d4a51f","savedPayload":{"position":{"x":17919.64382962515,"y":30949.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b3c4ce0-98b1-4d46-bd02-6cf44c3dd686","savedPayload":{"position":{"x":17998.64382962515,"y":30978.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d79bc720-68e1-4771-a66a-bcffa30639d3","savedPayload":{"position":{"x":17675.830610816145,"y":30773.625430492953},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"LBank","config":"{ \n\"codeName\": \"lbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"def3f9d0-f09e-4e09-8b6d-a4c322a4384b","savedPayload":{"position":{"x":17877.64382962515,"y":31024.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"53eac3c1-96d6-4cb1-b54d-f3f174eaf733","savedPayload":{"position":{"x":17764.64382962515,"y":31036.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cb2558d6-dab0-4f35-b83f-7cfc161b3d4f","savedPayload":{"position":{"x":17763.468095575536,"y":30677.69652629567},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Mercado Bitcoin","config":"{ \n\"codeName\": \"mercado\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83ab2c39-e844-496f-bebb-7b8607428902","savedPayload":{"position":{"x":17849.64382962515,"y":31081.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d69e722e-c71a-462a-8bbd-d3482d0eab21","savedPayload":{"position":{"x":17771.64382962515,"y":30887.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5002072e-145c-4aeb-a611-3e0e4c60ee5d","savedPayload":{"position":{"x":17860.963584604677,"y":30591.805240274254},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKCoin","config":"{ \n\"codeName\": \"okcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1e4dd5c8-0545-4698-8695-c985880243a3","savedPayload":{"position":{"x":17921.64382962515,"y":31043.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0e188cae-9764-4963-a78b-e5d7ef272522","savedPayload":{"position":{"x":18005.64382962515,"y":30891.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1f860b4b-2893-4a51-8649-19c47d494a37","savedPayload":{"position":{"x":17967.17403243568,"y":30516.958569226157},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKEX","config":"{ \n\"codeName\": \"okex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"7f618566-3d10-4c3c-90b2-7541a5146eeb","savedPayload":{"position":{"x":17770.64382962515,"y":31094.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"21205576-5d12-452c-814f-eb56182162ae","savedPayload":{"position":{"x":17794.64382962515,"y":31173.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"aa0edec0-8b27-4f94-abce-1e437ce5aba6","savedPayload":{"position":{"x":18080.854218676865,"y":30454.034021936455},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"RightBTC","config":"{ \n\"codeName\": \"rightbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ade372e9-5070-4fa9-843e-57732c4106c3","savedPayload":{"position":{"x":17999.64382962515,"y":30964.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b63d440e-4501-475c-b8a6-2b9a144e32a1","savedPayload":{"position":{"x":17984.64382962515,"y":30901.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c20cd9e1-52a0-4d17-b90c-e9d5b63315ce","savedPayload":{"position":{"x":18200.67134708334,"y":30403.76933118965},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"STEX","config":"{ \n\"codeName\": \"stex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f1d65161-4922-4a1e-ac98-df1a842347a7","savedPayload":{"position":{"x":17872.64382962515,"y":31001.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c313b2c6-6154-4a9a-b826-fd99cc500cd9","savedPayload":{"position":{"x":17888.64382962515,"y":31186.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0ea23137-3c65-4de1-9772-6ac1b65196e8","savedPayload":{"position":{"x":18325.220671374373,"y":30366.753804527314},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TideBit","config":"{ \n\"codeName\": \"tidebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c92318bd-8b2d-489b-b8e8-cf30fb63286e","savedPayload":{"position":{"x":17981.64382962515,"y":31021.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"83bca3ec-fc1c-435c-b5fe-b1cf92463fd1","savedPayload":{"position":{"x":18051.64382962515,"y":31072.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5563c310-701a-4c1e-8155-87c08c927ce3","savedPayload":{"position":{"x":18453.041964599197,"y":30343.421415155935},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TimeX","config":"{ \n\"codeName\": \"timex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"5c004b5f-eec4-414f-8d01-d9b3fddeee9e","savedPayload":{"position":{"x":17892.64382962515,"y":30973.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"59a33add-d0e9-4ae1-8a01-f1e0ed09cb61","savedPayload":{"position":{"x":17911.64382962515,"y":30878.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"27d69fa7-b561-4986-8c0d-1b374e7e1bf1","savedPayload":{"position":{"x":18582.63663896287,"y":30334.045714007894},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TOP.Q","config":"{ \n\"codeName\": \"topq\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eafef6a3-eed2-470e-a15c-aa4c10001cd2","savedPayload":{"position":{"x":17818.64382962515,"y":31115.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"2d5eb813-ceb6-40cd-8682-7205596bb8b5","savedPayload":{"position":{"x":17759.64382962515,"y":31188.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8fdf13d8-e8d2-4ef4-8b34-f492a25d753a","savedPayload":{"position":{"x":18712.485315398026,"y":30338.736622606855},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Upbit","config":"{ \n\"codeName\": \"upbit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f456fec2-cee6-4f0c-b865-1188088879c9","savedPayload":{"position":{"x":17919.64382962515,"y":30973.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"947c1ca0-bff9-4372-b153-40054e29b705","savedPayload":{"position":{"x":17921.64382962515,"y":31014.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"74e57ecd-3394-42b4-b2c4-6f216f7e41db","savedPayload":{"position":{"x":18841.065636895226,"y":30357.439144338445},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"WhiteBit","config":"{ \n\"codeName\": \"whitebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c16eae45-a568-4b2e-b064-4431bdf34c24","savedPayload":{"position":{"x":17767.64382962515,"y":30899.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"dfdf793f-4ba6-4215-a325-323c0f223553","savedPayload":{"position":{"x":17920.64382962515,"y":31004.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"467ece1e-d1d0-4a11-ae7a-d0e22cd4eba5","savedPayload":{"position":{"x":18966.87011674703,"y":30389.934009235236},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ZB","config":"{ \n\"codeName\": \"zb\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"db206cbd-a587-4e8e-acbe-6581ad3b5cc4","savedPayload":{"position":{"x":17855.64382962515,"y":31027.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"1dd658c5-7755-44b7-85f0-9bcd787762a0","savedPayload":{"position":{"x":17789.64382962515,"y":31044.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07df07e8-39a8-4fbc-a0c8-150f20b6ac59","savedPayload":{"position":{"x":19088.423812451314,"y":30435.840244716648},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51f64e29-e3ab-4683-a5de-f397fbf94260","savedPayload":{"position":{"x":18603.301618063546,"y":31534.850126685462},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Testing Queue","project":"Superalgos","exchanges":[],"id":"895ce4b1-4890-4216-89ba-a012181d2546","savedPayload":{"position":{"x":18753.301618063546,"y":30755.427263279467},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"signalsProviders":[],"id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d","savedPayload":{"position":{"x":18917.301618063546,"y":19655.2348844148},"targetPosition":{"x":18917.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}},{"type":"Charting Space","name":"New Charting Space","project":"Superalgos","viewport":{"type":"Viewport","name":"New Viewport","config":"{\"zoom\":\"0.00\"}","project":"Superalgos","id":"01713f1d-91b8-44f9-9c5d-a0c12fd09037","savedPayload":{"position":{"x":22918.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"frame":{"position":{"x":245.62500000000045,"y":440.12500000000006}}}},"projectDashboards":[{"type":"Project Dashboards","name":"Superalgos","project":"Superalgos","dashboards":[{"type":"Dashboard","name":"Testing Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Example Custom Chart","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-01-01T00:00:00.000Z\",\n \"toDate\": \"2021-01-23T23:59:59.999Z\"\n}","project":"Superalgos","id":"691e2b6e-6b13-4a94-a8cd-15bbad6e8d2b","savedPayload":{"position":{"x":21942.434665834,"y":29653.977644897117},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 3744.3087,\n \"maxValue\": 42369.5\n}","project":"Superalgos","id":"d1c91955-e558-4ffe-a349-895405dd7475","savedPayload":{"position":{"x":21837.45195066214,"y":29705.749390696466},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\"value\":\"24-hs\"}","project":"Superalgos","id":"69064a57-bfa3-4a7a-a597-55887057befb","savedPayload":{"position":{"x":21720.64837946537,"y":29713.405101221888},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"Indicators","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"550e7d96-2b55-4cb5-91d5-6fbceb32cbb8","savedPayload":{"position":{"x":21459.806237131383,"y":30535.58688508041},"targetPosition":{"x":21459.806237131383,"y":30235.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}}],"layerFolders":[],"id":"a9026e9d-f9c2-4509-9a75-862421b5c70b","savedPayload":{"position":{"x":21459.806237131383,"y":30235.58688508041},"targetPosition":{"x":21459.806237131383,"y":29935.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"ea7115b6-1324-43dc-8fa2-90c12c2c2c48","savedPayload":{"position":{"x":21049.99861599605,"y":30345.394506215744},"targetPosition":{"x":21199.99861599605,"y":30085.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d16e7e1-8676-4041-a1b1-0172e023558a","savedPayload":{"position":{"x":20899.99861599605,"y":30085.58688508041},"targetPosition":{"x":21199.99861599605,"y":30085.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"b7fed612-b218-4378-bb3f-6c90fb947449","savedPayload":{"position":{"x":21199.99861599605,"y":30085.58688508041},"targetPosition":{"x":21459.806237131383,"y":29935.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa6b9a8f-d5f4-4f60-b3fa-bdf957806bfb","savedPayload":{"position":{"x":21459.806237131383,"y":29935.58688508041},"targetPosition":{"x":21609.806237131383,"y":29675.779263945078},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"6a4b0ce0-7e88-4fe3-b9b5-2116d81b2da0","savedPayload":{"position":{"x":21609.806237131383,"y":29675.779263945078},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fbbb590b-c94d-4625-94e2-bc4bfa2ab6f9","savedPayload":{"position":{"x":17117.615314676776,"y":27603.533941128822},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab219d3d-1f44-4448-b5f9-f9f6ace6caea","savedPayload":{"position":{"x":17051.16747388602,"y":27764.15503654623},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"7dd6f9d6-3840-4a95-a9c9-9445a1335868","savedPayload":{"position":{"x":16933.846232243683,"y":27892.241373813282},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371bfe04-1b2d-4d60-ae70-03a2f7522466","savedPayload":{"position":{"x":16779.824555577114,"y":27972.466666709206},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"7c580919-08ce-4aff-9e84-888fdf07caec"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f1dea1ef-69f3-4b64-8586-ec43aa281cde","savedPayload":{"position":{"x":16607.980005705944,"y":27995.20904027392},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"389797d4-8456-4258-9adf-246a6ba69016"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eca94344-450b-4dc9-ad80-8e202b6e0517","savedPayload":{"position":{"x":16468.146686869968,"y":28016.33671006015},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4c54659-0b38-4faf-9827-47976eb9cca7","savedPayload":{"position":{"x":16286.534133073324,"y":27862.805158861436},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"e82d97df-5b25-4967-b2b4-da065c5d3ad9","savedPayload":{"position":{"x":16186.118842172375,"y":27726.349378357005},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c"}}}],"layerFolders":[],"id":"851d853d-e2d7-4138-b5fd-563f1f844f64","savedPayload":{"position":{"x":16629.455267522357,"y":27495.510435539556},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"dc84698a-bce4-4979-9aca-80661b054191","savedPayload":{"position":{"x":16413.05839477738,"y":27900.48601747122},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d3456e5b-0438-4273-a3ce-6b1d60573c33","savedPayload":{"position":{"x":15940.04282322282,"y":27710.982017672217},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"556e97e8-eba3-419d-869d-950cc99371da"}}}],"layerFolders":[],"id":"6ad8b449-785f-40cc-afc0-19c68b508c17","savedPayload":{"position":{"x":16372.806838862034,"y":27461.836330732353},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"4b8d055f-0c36-40a6-af78-5faf9b34b72c","savedPayload":{"position":{"x":16011.911411221576,"y":27821.709717793714},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac24a200-397f-4d7c-9916-581328c74f22","savedPayload":{"position":{"x":15678.683136179856,"y":27381.4342703589},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f"}}}],"layerFolders":[],"id":"acf27818-08f1-4c0d-9cc9-30c38ba892fb","savedPayload":{"position":{"x":16167.428268555628,"y":27304.34657839513},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b9eeeeb3-43db-4d4f-9f28-f42e947494f9","savedPayload":{"position":{"x":15829.8024827204,"y":27504.536838373795},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"b0961496-1af9-48cd-bbeb-ac5973192e78"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eda9462a-9688-42cf-ae97-b3dfd02c718c","savedPayload":{"position":{"x":15609.804663880679,"y":27268.796716857654},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"1481d280-6112-4d0d-8a48-3fe4e65efc9d","savedPayload":{"position":{"x":15542.751172927,"y":26994.51154740736},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"e298787f-b7f2-4334-931e-38b9441e43f9"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2f579332-aa55-4e51-bbf4-370614838fd3","savedPayload":{"position":{"x":15731.678465146957,"y":26701.21391555524},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c"}}}],"layerFolders":[],"id":"5b4e1c43-9fb7-439f-9ca9-e600bd41718d","savedPayload":{"position":{"x":16068.487948353533,"y":27065.178022212927},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be00b86a-5b53-4dbd-ab79-7d135115a05e","savedPayload":{"position":{"x":15729.681254722265,"y":27141.496363567436},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3870b052-156c-4f10-9658-3fe3df4baf10","savedPayload":{"position":{"x":15655.766921038878,"y":26926.520781829942},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"5fa754c9-ffc3-499c-b566-0031b276cb73","savedPayload":{"position":{"x":15602.003963464067,"y":26726.16283946371},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"e734b6be-ba40-468c-a94f-1153dc85e00c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"15ec260c-02f5-46e0-853b-6e751175dac7","savedPayload":{"position":{"x":15694.595933594896,"y":26519.078790508484},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"9a973229-4d9d-45af-b5aa-64906a915f6e"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be57de60-d843-4bc8-bcb8-d8be27ceffbb","savedPayload":{"position":{"x":15860.599521408476,"y":26370.959361875106},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"56517fe9-64da-4404-83f3-005106bc1c0a"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"407c7816-701b-43bf-92d8-cc728af78f0e","savedPayload":{"position":{"x":16074.514663407172,"y":26309.4257023683},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"d00c76e7-4be0-4518-9892-a0f6df943951"}}}],"layerFolders":[],"id":"ac1ed18a-243b-4211-bb24-83bbfc20cd0a","savedPayload":{"position":{"x":16102.435022890473,"y":26808.60560739891},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"41428787-ca89-4ab9-a5cc-29e66e7c486d","savedPayload":{"position":{"x":16563.94253388532,"y":27000.12691029475},"targetPosition":{"x":16959.887378913278,"y":26696.345955873618},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"153096ea-a48c-4ed5-9f8e-49eafa7a779c","savedPayload":{"position":{"x":16959.887378913278,"y":26696.345955873618},"targetPosition":{"x":17356.087169245202,"y":26392.358194020195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"918bdf6d-3cfe-4c8b-894d-320cc72aef70","savedPayload":{"position":{"x":17356.087169245202,"y":26392.358194020195},"targetPosition":{"x":17752.58716757543,"y":26088.09403049708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"f0cc2b79-bae6-4441-a456-9fda5962a74f","savedPayload":{"position":{"x":21521.80023504401,"y":29598.600071512363},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"49761e84-d6c2-4c25-9604-fb2ddf93e510","savedPayload":{"position":{"x":16656.868785422477,"y":26432.858992462687},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"a0c29c57-0a20-4084-9697-142300f62f9c"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"622a88bb-151c-48ef-bb99-e093498bf002","savedPayload":{"position":{"x":16532.079378960796,"y":26407.941535439437},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"aa0fe882-89a8-4811-8988-c589554afe9d"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fba6a9fb-5e9a-46dd-aa2b-33950f0ec9f1","savedPayload":{"position":{"x":16422.17772780151,"y":26345.322337891994},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"bbc65054-b22b-4cbb-816b-529672e2f498"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ec0d56a-b497-4d90-9157-094c08930962","savedPayload":{"position":{"x":16337.350686782229,"y":26251.937657405022},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"776a3ece-8255-4e80-b60f-85bb818b561f"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5db72b24-ad72-49dd-8a32-1256fb25d04a","savedPayload":{"position":{"x":16285.989038785094,"y":26136.930218774854},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"7593aaf9-0505-4b58-9920-235340ff2d2f"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"cbdfc3db-d5dd-476c-bf02-cf86d8a01300","savedPayload":{"position":{"x":16272.745363533515,"y":26011.773677977748},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"105a157c-b33a-40d0-9711-19526b04bfda","savedPayload":{"position":{"x":16299.015550574797,"y":25888.784732962406},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"faab4399-898b-4393-8c27-fa2f3109c60a"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab8b1fdc-4319-4b37-ae29-333912412215","savedPayload":{"position":{"x":16361.786293229427,"y":25778.482294029163},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"051bd185-3255-41a5-bf62-ea8b27b32ddf","savedPayload":{"position":{"x":16480.783502595135,"y":25721.83855865352},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7"}}}],"layerFolders":[],"id":"838dab4e-c0bf-47f3-ac6a-8f815e5e666b","savedPayload":{"position":{"x":16674.50340983706,"y":26032.473650601696},"targetPosition":{"x":17060.504725681127,"y":25928.810868229375},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"74e5c728-fd06-4e79-8ec1-32ab2720adf5","savedPayload":{"position":{"x":17060.504725681127,"y":25928.810868229375},"targetPosition":{"x":17476.621526107163,"y":25817.204586634994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8a7bce21-b09a-41e3-b9af-87f1939e9136","savedPayload":{"position":{"x":17183.249075924137,"y":26042.417976975546},"targetPosition":{"x":17666.14324924388,"y":25913.066804430764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"a514d9bb-8862-4c81-b82e-dbde66abeb77","savedPayload":{"position":{"x":21470.02848924466,"y":29493.617356340503},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"17c8f568-4716-4a19-a607-689b78a83ef9","savedPayload":{"position":{"x":15863.39648009967,"y":25920.19809968253},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba"}}},{"type":"Layer","name":"Strategies","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"86978570-76c1-4780-a91d-4e72e88ef817","savedPayload":{"position":{"x":15705.823183600161,"y":25714.050844388883},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"653e6b00-bda3-4662-a2bd-934212e884d1","savedPayload":{"position":{"x":15327.86442305616,"y":25820.329298596927},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc"}}},{"type":"Layer","name":"Market Sell Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2887f930-5d79-42ff-ab1d-7d5cdc6b47da","savedPayload":{"position":{"x":15180.506269267476,"y":25548.319695716105},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"3040a2f6-0b1c-4ed3-a816-39c916465c9a","savedPayload":{"position":{"x":15221.387997903394,"y":25243.251366030032},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a59ef70f-534f-410b-99ef-3a700d2ca82a","savedPayload":{"position":{"x":15398.72702979423,"y":25036.45705462772},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642"}}}],"layerFolders":[],"id":"334a2964-17df-4237-a302-962416655896","savedPayload":{"position":{"x":15672.454225865862,"y":25457.66729056814},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a6b1a2c5-ca70-42b9-932f-2ff00aff2524","savedPayload":{"position":{"x":15292.017678857432,"y":25360.154463716302},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"9fc29be1-9393-4933-95d3-bebddd73c05e"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"663ddaf7-784f-4baa-8f69-3ed0ef5cd685","savedPayload":{"position":{"x":15298.823311983959,"y":25050.998457959326},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"b555388f-db93-4db1-91be-7772550afa70"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a4be770-082c-4d0f-a747-0b74d792e76f","savedPayload":{"position":{"x":15476.277795953174,"y":24812.240105588095},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"41953904-e48c-4176-bf0f-09d133bc444c"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"efb9d388-a679-49b2-b792-1b8258a489d6","savedPayload":{"position":{"x":15784.125039599678,"y":24724.90131904347},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c"}}}],"layerFolders":[],"id":"eea75e9a-a735-4db8-9eea-cf2c4e4119e3","savedPayload":{"position":{"x":15771.52653783795,"y":25218.00065188687},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb0ea641-23a7-48d0-a70d-f3314722f129","savedPayload":{"position":{"x":15517.085211279895,"y":24978.036206455075},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"6e49b57f-8c94-410f-985b-82c126155b11"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"fa1cf76f-30a6-4cfd-ba4f-8511afca64b8","savedPayload":{"position":{"x":15592.85911518537,"y":24750.27204370447},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"bf7d5c92-8894-4040-8d2f-3f5cdec443af","savedPayload":{"position":{"x":15786.287615627753,"y":24593.84817912013},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"125c9155-a747-4ac4-9d9f-1b93a4ae8d17","savedPayload":{"position":{"x":16042.541437710524,"y":24564.41238111062},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"01491591-0462-453c-91e0-6da6f554a729"}}},{"type":"Layer","name":"Take Profit","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3745d5cd-a2be-43ed-b5df-d05c328f8665","savedPayload":{"position":{"x":16280.917386265202,"y":24663.928419862754},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2"}}}],"layerFolders":[],"id":"9854e8b2-d863-42f3-afd5-416d5e2c548e","savedPayload":{"position":{"x":15977.296572394282,"y":25060.75923245295},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6e31ae33-68d1-4dca-8b29-6e59a2a4448e","savedPayload":{"position":{"x":16168.303357177294,"y":25522.64736240649},"targetPosition":{"x":16663.0166511096,"y":25588.08600416838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8c851b59-3105-460c-bb4b-cb4944db1049","savedPayload":{"position":{"x":16663.0166511096,"y":25588.08600416838},"targetPosition":{"x":17157.9116821377,"y":25653.201834587282},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"be53f7bc-6c26-4fd7-a0d0-96b965bbf655","savedPayload":{"position":{"x":17157.9116821377,"y":25653.201834587282},"targetPosition":{"x":17653.521538239824,"y":25718.280363218284},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"43eeb152-b0b8-468d-84d1-7d03fd636387","savedPayload":{"position":{"x":21462.37277871924,"y":29376.81378514373},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"499eac86-6c40-4362-a36a-5f2002081866","savedPayload":{"position":{"x":22018.806237131383,"y":29379.971642809745},"targetPosition":{"x":22168.806237131383,"y":29120.164021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":-155},"width":240,"height":111.125,"radius":0},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}}],"id":"885265c2-ebb1-4283-a617-34a88780276d","savedPayload":{"position":{"x":22168.806237131383,"y":29120.164021674413},"targetPosition":{"x":22318.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Testing Environment","name":"New Testing Environment","id":"5882d8a8-345b-4188-b1c1-797e9ff805d9"}}},{"type":"Dashboard","name":"Production Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Live Trading Session My Computer","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-10-06T17:09:32.085Z\",\n \"toDate\": \"2020-10-06T21:09:32.085Z\"\n}","project":"Superalgos","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e","savedPayload":{"position":{"x":21721.37277871924,"y":28379.89901593443},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 10419.75,\n \"maxValue\": 10844.37\n}","project":"Superalgos","id":"ee3f6af0-8649-489b-9168-b4f16d2f5a78","savedPayload":{"position":{"x":21729.02848924466,"y":28263.095444737657},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\n \"value\": \"01-min\",\n \"autoMinScale\": false,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-10-05T09:53:58.939Z\",\n \"toDate\": \"2020-10-05T13:53:58.939Z\"\n}","project":"Superalgos","id":"480f9696-76df-4026-a435-7bf364c08056","savedPayload":{"position":{"x":21780.80023504401,"y":28158.112729565797},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"New Data Mine Products","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"e3cbbcbe-c938-4669-b670-c317476e0a3b","savedPayload":{"position":{"x":16992.282280946285,"y":23856.49271176323},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}},{"type":"Layer","name":"Volumes","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"385a5f98-118a-43fd-b019-54e825d1f4ae","savedPayload":{"position":{"x":17192.242023030805,"y":23510.135246216414},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Volumes","id":"07c11481-7dbd-477d-8bf7-79212542a6aa"}}}],"layerFolders":[],"id":"6848a114-9979-41dd-8d95-3a899679ba08","savedPayload":{"position":{"x":17392.615945713467,"y":23857.108132968406},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0cf13cfa-2a37-4691-902c-513ab5780da8","savedPayload":{"position":{"x":17538.760168957182,"y":23310.0159698544},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"d9245f0b-54e8-44b1-94bd-56c7048eb5c1","savedPayload":{"position":{"x":17938.505496583897,"y":23310.043709247824},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"20bd60bb-917b-4a0f-acc5-b019d1c3bd81","savedPayload":{"position":{"x":17738.97910230742,"y":23657.072015580987},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4cbbc012-c91e-4acd-a8d2-feb149e728a0","savedPayload":{"position":{"x":17738.764681458488,"y":24056.665358937673},"targetPosition":{"x":17963.331767523672,"y":24445.732145877373},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"bb7afb85-32ea-4471-8400-615a34fc126f","savedPayload":{"position":{"x":21868.806237131383,"y":28080.93353713308},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"05da2270-0016-4d22-89d8-b77cd14008a9","savedPayload":{"position":{"x":12224.806237131383,"y":25700.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"dc6cc4ef-4bd7-4837-8442-919462314db3"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4165460-e0a7-4a0d-b506-15e756dfac93","savedPayload":{"position":{"x":12219.806237131383,"y":25689.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"776ed571-8321-47aa-8cfb-c8ebf565dace"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371e0cd7-af57-4469-836d-45c4e6059760","savedPayload":{"position":{"x":12317.806237131383,"y":25717.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"ded93703-a48d-44be-9703-878c28f949cd"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5ed81442-77cc-4101-b1ff-8c7cbac57d4f","savedPayload":{"position":{"x":12245.806237131383,"y":25698.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5e046a6a-4f38-4b44-bae1-1aed6d4d3753","savedPayload":{"position":{"x":12313.806237131383,"y":25819.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b78a78ec-dca3-499b-881a-d2e3a82bf116","savedPayload":{"position":{"x":12330.806237131383,"y":25734.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb95c2a9-6f82-4a2a-9105-17b8f6c3c51a","savedPayload":{"position":{"x":12364.806237131383,"y":25720.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ad5b6f0-f4a9-4aab-aedf-9175647498b0","savedPayload":{"position":{"x":12321.806237131383,"y":25708.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65"}}}],"layerFolders":[],"id":"7216b7a3-1371-4f07-a395-74c547579ab4","savedPayload":{"position":{"x":12315.806237131383,"y":25752.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d2c0a1c8-70ef-4f7b-835a-a99ac6a5837a","savedPayload":{"position":{"x":12210.806237131383,"y":25770.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"88dd680c-a81b-48ae-96ba-838281abfa35"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"076af680-2114-480b-a979-f7eea4966d7b","savedPayload":{"position":{"x":12302.806237131383,"y":25739.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062"}}}],"layerFolders":[],"id":"56112c60-50dd-4d19-89aa-1d46005f194f","savedPayload":{"position":{"x":12305.806237131383,"y":25783.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb93ebef-f7ee-42c2-93b8-fe46eba0874a","savedPayload":{"position":{"x":12424.806237131383,"y":25721.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"595e7228-5676-4f5c-82bf-baa43e9325ab","savedPayload":{"position":{"x":12488.806237131383,"y":25680.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"7a95a249-132d-4e0f-9182-cc7af45cacea"}}}],"layerFolders":[],"id":"9f594c8a-87fe-4c4b-b550-493405fe0b2d","savedPayload":{"position":{"x":12427.806237131383,"y":25692.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3ce44f39-8ac9-4984-ad9d-daa53ed3f707","savedPayload":{"position":{"x":12377.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7d5f0aa-8259-4271-aa95-7b351aa9b9c0","savedPayload":{"position":{"x":12337.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a9f6580-ab06-4005-9274-98f7e9a491e5","savedPayload":{"position":{"x":12387.806237131383,"y":25625.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f60905ad-b491-45ee-9768-8087df9aef78","savedPayload":{"position":{"x":12466.806237131383,"y":25757.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70"}}}],"layerFolders":[],"id":"5389c77c-63a7-4495-9cc5-cdc0c70b76e6","savedPayload":{"position":{"x":12422.806237131383,"y":25658.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f602d8ef-b6a6-423f-a772-9a4b5d5b9c43","savedPayload":{"position":{"x":12422.806237131383,"y":25747.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0a0dd259-5704-46de-900f-5d1dc24af4f6","savedPayload":{"position":{"x":12488.806237131383,"y":25650.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de6f83f6-a6d9-45c7-93fd-e2c72238040e","savedPayload":{"position":{"x":12410.806237131383,"y":25733.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"1c6eed42-23aa-4174-aade-be29222acb8c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac0f1c2a-5eed-45ee-84da-3d24e455abd3","savedPayload":{"position":{"x":12379.806237131383,"y":25663.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"89def699-c33f-4344-a045-babca1f545ee","savedPayload":{"position":{"x":12478.806237131383,"y":25752.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7e04514-bf32-4021-822c-47af56c55a76","savedPayload":{"position":{"x":12504.806237131383,"y":25780.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"c451c035-5ece-451f-836f-b5334cb3f967"}}}],"layerFolders":[],"id":"a302255a-cf35-4801-ae3c-95cb47ae9613","savedPayload":{"position":{"x":12437.806237131383,"y":25742.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1857004e-2f12-4287-8847-173043d8d2ab","savedPayload":{"position":{"x":12363.806237131383,"y":25731.664021674413},"targetPosition":{"x":12380.806237131383,"y":25686.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"23ad1663-d4da-4ece-8964-30012894ae5b","savedPayload":{"position":{"x":12380.806237131383,"y":25686.664021674413},"targetPosition":{"x":12448.806237131383,"y":25597.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ddb3fafa-58f4-46c1-9b24-61efe3ec13a6","savedPayload":{"position":{"x":12448.806237131383,"y":25597.664021674413},"targetPosition":{"x":12446.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"788a0207-20ea-411c-862d-b1b13db4e09f","savedPayload":{"position":{"x":21979.64837946537,"y":28043.307699856272},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2a1db97f-553d-47ea-b452-c90ba9af9e79","savedPayload":{"position":{"x":12242.806237131383,"y":25582.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"ba606f99-2ae5-44dc-b7db-399e657830e1"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3c1c9d45-c482-4374-92ad-c3c28bfb7679","savedPayload":{"position":{"x":12270.806237131383,"y":25723.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a560c8af-91cd-4aea-ab9f-01ed60892abb","savedPayload":{"position":{"x":12340.806237131383,"y":25546.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"40debb84-1e2e-452b-99ff-95ff3994fb29","savedPayload":{"position":{"x":12322.806237131383,"y":25605.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"dcff6f56-7646-4505-aa93-6682a110f3f2"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5785c4fb-879d-4b89-aab8-9ec37d5f561b","savedPayload":{"position":{"x":12240.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74d8c1f7-8dd5-4e2c-b3cf-7f7bcfe7143c","savedPayload":{"position":{"x":12342.806237131383,"y":25543.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4476fcb1-3898-440f-b69e-afba06be912a","savedPayload":{"position":{"x":12402.806237131383,"y":25585.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"e4811789-fd94-49b0-9917-8d9d434f997d"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"43fe3418-9b3c-4cd9-b9a9-3994851e0b65","savedPayload":{"position":{"x":12310.806237131383,"y":25555.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"029ff3a7-9c65-425f-855a-882df68fa05b"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de34ba07-61b5-4785-bcf5-ff5b81d63e48","savedPayload":{"position":{"x":12227.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38"}}}],"layerFolders":[],"id":"36e02794-0943-4520-af39-2f274050610c","savedPayload":{"position":{"x":12310.806237131383,"y":25627.664021674413},"targetPosition":{"x":12365.806237131383,"y":25585.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ccfa34c-ca21-4ac3-be74-30f85549bf5e","savedPayload":{"position":{"x":12365.806237131383,"y":25585.664021674413},"targetPosition":{"x":12339.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c1c4bd7c-b755-461a-a5ed-b59804b4c280","savedPayload":{"position":{"x":12339.806237131383,"y":25637.664021674413},"targetPosition":{"x":12377.806237131383,"y":25540.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"ed6507e7-437f-4740-a897-11dc4da4d20a","savedPayload":{"position":{"x":22096.45195066214,"y":28050.963410381693},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"76852fcc-d524-43b8-a0b1-8645c2fed91e","savedPayload":{"position":{"x":12710.806237131383,"y":25614.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"c6fd6067-4b57-4860-ae3b-5668e4444490"}}},{"type":"Layer","name":"Strategies","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"43b43957-23d5-401b-b3e0-391c430b72c9","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"60f88096-7343-42d1-afad-83fecd22fb44"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"aaff7fb6-bd83-48f2-819a-a1dd674876a7","savedPayload":{"position":{"x":12579.806237131383,"y":25470.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"9f939086-c934-4924-8353-776707a7cf10"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bec241f4-5a8f-4fe7-9620-76d92f64da9c","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"da5f279e-d387-43cf-80f4-fc114b9ac906"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d03d083-7199-4bf2-8e8a-4c96f23a16a8","savedPayload":{"position":{"x":12735.806237131383,"y":25521.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"367646bb-839a-4071-8305-6d26a647585d"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"cb5de20d-e440-4bdb-a074-c408740e9022","savedPayload":{"position":{"x":12631.806237131383,"y":25476.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9"}}}],"layerFolders":[],"id":"a8409c29-905d-495f-bbca-3d0eef14f91c","savedPayload":{"position":{"x":12649.806237131383,"y":25488.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"04d1a0a8-1419-4fbd-9c28-eef6cfefd5d4","savedPayload":{"position":{"x":12584.806237131383,"y":25552.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74cda6e5-4fe2-41ef-a611-2c0374780ad5","savedPayload":{"position":{"x":12663.806237131383,"y":25503.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fb041378-9424-4709-a9ed-79426fcdfe68","savedPayload":{"position":{"x":12721.806237131383,"y":25661.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"6c4ac373-c5ff-4bfd-8047-4caaba6b7788","savedPayload":{"position":{"x":12659.806237131383,"y":25585.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91"}}}],"layerFolders":[],"id":"4b2ee5fd-d4f7-4a7c-bb6e-5e4c633b1b9f","savedPayload":{"position":{"x":12680.806237131383,"y":25593.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"4f77d851-9e93-4e85-9cfb-ec2ab200d79b","savedPayload":{"position":{"x":12581.806237131383,"y":25650.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"0213c668-a6d8-4737-ae57-d59d62b8f715","savedPayload":{"position":{"x":12767.806237131383,"y":25594.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"88997c97-e77f-490e-9eb5-c7531beec132"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f07986eb-010f-46cd-803d-dcac674adb80","savedPayload":{"position":{"x":12745.806237131383,"y":25673.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3f8f8fa3-2149-42d6-92e9-214354cfa186","savedPayload":{"position":{"x":12630.806237131383,"y":25581.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"9b064960-3829-441f-b955-334fb8324a53"}}},{"type":"Layer","name":"Take Profit","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"65ec58e6-2c00-41d4-a145-e6b7e7178bf0","savedPayload":{"position":{"x":12743.806237131383,"y":25590.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1"}}}],"layerFolders":[],"id":"66e5c011-9163-422d-863f-115135f832ad","savedPayload":{"position":{"x":12672.806237131383,"y":25618.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"91b8a8e8-823d-4746-967f-c8d85a1ad3ad","savedPayload":{"position":{"x":12687.806237131383,"y":25530.664021674413},"targetPosition":{"x":12591.806237131383,"y":25565.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dcaccce7-d98d-49b3-b3b6-e83495b688c3","savedPayload":{"position":{"x":12591.806237131383,"y":25565.664021674413},"targetPosition":{"x":12523.806237131383,"y":25633.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e328f755-80a6-4799-8f12-002a2ddb983d","savedPayload":{"position":{"x":12523.806237131383,"y":25633.664021674413},"targetPosition":{"x":12489.806237131383,"y":25562.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"93708a53-ad8d-48e0-9728-b87ea96d1545","savedPayload":{"position":{"x":22201.434665834,"y":28102.735156181043},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7","savedPayload":{"position":{"x":22018.806237131383,"y":28340.741158268414},"targetPosition":{"x":22168.806237131383,"y":28600.548779403747},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":65},"width":240,"height":113.625,"radius":0},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4","savedPayload":{"position":{"x":22168.806237131383,"y":28600.548779403747},"targetPosition":{"x":22318.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Production Environment","name":"New Production Environment","id":"65a40d20-837c-4652-8356-f8054b4e1346"}}}],"id":"84a1b1ba-4888-4eac-8762-7084f0ee5de7","savedPayload":{"position":{"x":22318.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"21d2ec55-9e56-4652-8e96-c7e451262c36","savedPayload":{"position":{"x":22618.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"c"}}},{"type":"Plugins","name":"New Plugins","project":"Superalgos","pluginProjects":[{"type":"Plugin Project","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","pluginDataMines":{"type":"Plugin Data Mines","name":"New Plugin Data Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"d5234bd2-ef4e-4856-a6a0-ce7659653a48","savedPayload":{"position":{"x":14648.352187356151,"y":28990.05301821844},"targetPosition":{"x":14635.871225686036,"y":10349.288271084537},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ecc1a524-de9b-4e73-8874-b99a7ea0402b","savedPayload":{"position":{"x":14635.871225686036,"y":10349.288271084537},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plugin File","name":"Alpha","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Alpha","project":"Superalgos","id":"9d9d6275-91e1-448d-b162-8069adf7f207","savedPayload":{"position":{"x":14658.262986317583,"y":19632.85151122931},"targetPosition":{"x":14810.468084630062,"y":10200.168466117855},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5b8a1d1e-59db-484c-8dfe-7d35f2aa8770","savedPayload":{"position":{"x":14810.468084630062,"y":10200.168466117855},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plugin File","name":"Sparta","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Sparta","project":"Superalgos","id":"449f1832-f5b8-4e7e-a010-d892d721d3bc","savedPayload":{"position":{"x":14665.067482786275,"y":37715.63150649338},"targetPosition":{"x":15039.37033286441,"y":10218.18346374989},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0486ca8b-855a-4295-ba63-6f63421b4a13","savedPayload":{"position":{"x":15039.37033286441,"y":10218.18346374989},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cbc3d9be-5e59-45d8-bb0f-4ec82763691d","savedPayload":{"position":{"x":14903.173182942546,"y":10485.4854210064},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingMines":{"type":"Plugin Trading Mines","name":"New Plugin Trading Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"ad1ce785-858f-4cfc-ba68-108b5e0c54d9","savedPayload":{"position":{"x":31037.217404066585,"y":10729.643045797242},"targetPosition":{"x":15481.28847788,"y":10418.13122451946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8a64c00e-4f8c-49bf-b57d-4e2e388bae41","savedPayload":{"position":{"x":15481.28847788,"y":10418.13122451946},"targetPosition":{"x":15238.583379567515,"y":10594.466800207203},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8d881813-3ab9-4e8b-ab5a-48dedab2dd19","savedPayload":{"position":{"x":15238.583379567515,"y":10594.466800207203},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingSystems":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters-Lightning-Strike","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","project":"Superalgos","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4","savedPayload":{"position":{"x":24926.365708673427,"y":19688.576468868458},"targetPosition":{"x":15481.28847788,"y":11123.473527270431},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5fdcecee-8c8f-4e0f-b36b-81e9231970a6","savedPayload":{"position":{"x":15481.28847788,"y":11123.473527270431},"targetPosition":{"x":15238.583379567515,"y":10947.137951582688},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3569d452-c593-4e54-a356-7ff8c6b519f3","savedPayload":{"position":{"x":15238.583379567515,"y":10947.137951582688},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingEngines":{"type":"Plugin Trading Engines","name":"New Plugin Trading Engines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Low-Frequency","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Low-Frequency","project":"Superalgos","id":"e117a2a4-09b3-4181-8455-e680de3bdeb3","savedPayload":{"position":{"x":31033.55093774257,"y":19568.049392142086},"targetPosition":{"x":14810.468084630062,"y":11341.436285672036},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9270d67-4630-4ac9-91ca-1dec4fb5aa38","savedPayload":{"position":{"x":14810.468084630062,"y":11341.436285672036},"targetPosition":{"x":14903.173182942546,"y":11056.119330783491},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"87a28762-63d0-45f7-bd39-9dea436d8244","savedPayload":{"position":{"x":14903.173182942546,"y":11056.119330783491},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4e402d7-5228-408c-9d67-379d6ef40bae","savedPayload":{"position":{"x":14995.87828125503,"y":10770.802375894946},"targetPosition":{"x":14695.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6","savedPayload":{"position":{"x":14695.87828125503,"y":10770.802375894946},"targetPosition":{"x":14695.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Design Space","name":"My Design Space","project":"Superalgos","spaceStyle":{"type":"Space Style","name":"My Space Style","config":" {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"node\": {\n \"fontSize\": 16,\n \"imageSize\": 60,\n \"type\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"name\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"menuItem\": {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"fontColor\": \"UI_COLOR.WHITE\",\n \"fontSize\": 14,\n \"imageSize\": 14\n }\n }\n }","project":"Superalgos","id":"fad0e429-f7a7-4b62-a2a5-2ead29b8f695","savedPayload":{"position":{"x":25236.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaceSettings":{"type":"Space Settings","name":"New Space Settings","config":"{\n \"node\": {\n \"distancePercentage\": 60,\n \"radiusPercentage\": 85,\n \"massPercentage\": 100,\n \"animationSteps\": 2, \n \"menuItem\": {\n \"widthPercentage\": 100,\n \"heightPercentage\": 60,\n \"radiusPercentage\": 90\n }\n },\n \"physics\": false\n}","project":"Superalgos","id":"05c9d6d5-24c4-4eec-9aca-9668d6486fdd","savedPayload":{"position":{"x":24636.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"f8485ce5-67f3-4476-b9e2-80994e49c318","savedPayload":{"position":{"x":24940.875,"y":10745.347826086958},"targetPosition":{"x":24940.875,"y":10745.347826086958},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":255,"y":588.3125}}}},{"type":"Superalgos Project","name":"New Superalgos Project","project":"Superalgos","projectDefinition":{"type":"Project Definition","name":"Superalgos","config":"{\n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb","savedPayload":{"position":{"x":19378,"y":10727.5},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaces":{"type":"Spaces","name":"New Spaces","project":"Superalgos","id":"4d0ee814-4e48-4688-9cc5-7ee03de5192b","savedPayload":{"position":{"x":18810.69804274349,"y":10863.697149921863},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"trading":{"type":"Trading","name":"New Trading","project":"Superalgos","id":"0dcf22f9-cec5-48b5-b6c1-eb93d75c0055","savedPayload":{"position":{"x":18778.92479988006,"y":10751.037728718353},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"otherHierarchies":{"type":"Other Hierarchies","name":"New Other Hierarchies","project":"Superalgos","id":"228d01b9-466f-4374-afdd-15fff0426fab","savedPayload":{"position":{"x":18786.289023880698,"y":10657.466390843229},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cf9f8b3b-77c6-43c6-b01f-95cf366a91f6","savedPayload":{"position":{"x":19078,"y":10727.5},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Tutorial","name":"Basic Education","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to School!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes Menu","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Arrangement Features","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Pins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Start With the Menu","config":"{\n \"icon\": {\n \"name\": \"unpinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Start With the Menu\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"117e0e8d-77c2-4ee9-b29f-d82f7b6f6995","savedPayload":{"position":{"x":25490.027487270225,"y":39634.40851272507},"targetPosition":{"x":25536.957826782294,"y":39930.71501490362},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Session Base Asset","name":"","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b"}}},{"type":"Tutorial Step","name":"Pinned Nodes Can't Dance","config":"{\n \"icon\": {\n \"name\": \"pinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Pinned Nodes Can't Dance\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"734c6647-9e74-4d72-a621-29e0ff3e0bd3","savedPayload":{"position":{"x":25606.991435939068,"y":39639.00403878431},"targetPosition":{"x":25536.957826782294,"y":39930.71501490362},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"c69e3a63-8d67-4e41-b16e-39a88a9776e3","savedPayload":{"position":{"x":25536.957826782294,"y":39930.71501490362},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Angle to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Mary Go Round","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-360-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Mary Go Round\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"836a107b-368d-4ef0-8a43-5daeefcb0fe2","savedPayload":{"position":{"x":25886.240655911173,"y":40433.23445084565},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"180 Degrees","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-180-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - 180 Degrees\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d9f1b166-20de-4ee5-94f7-0f9f363a5a82","savedPayload":{"position":{"x":25941.41057881172,"y":40509.16933527975},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Node's Independence","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-90-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Node's Independence\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c941ec5d-dcf0-48d5-a67b-5ce312c70470","savedPayload":{"position":{"x":25970.41512373375,"y":40598.43614568955},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Free-range Nodes","config":"{\n \"icon\": {\n \"name\": \"remove-angle-to-parent-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free-range Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"1b8726e1-8fa5-4584-8906-5c084785f476","savedPayload":{"position":{"x":25970.41512373375,"y":40692.29682471368},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"0a6ecc28-5731-49a1-878d-c1d2656cbecc","savedPayload":{"position":{"x":25706.338469709655,"y":40006.12813587088},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Distance to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Controlling Distances","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Controlling Distances\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e1a511e3-e833-4dcb-882c-28517b6fbaa2","savedPayload":{"position":{"x":26046.281424608744,"y":39996.77620519132},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Play With The Tape!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Play With The Tape!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"9ea33644-954d-475a-b3a1-9bca07951e58","savedPayload":{"position":{"x":26092.48784824228,"y":40104.32456902345},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"How About The Hierarchy?","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one-and-a-half\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About The Hierarchy?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"88ef7405-4f63-42a7-b02c-19f52b8f7576","savedPayload":{"position":{"x":26094.020040291325,"y":40221.36873391642},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}}],"tutorialTopics":[],"id":"c02373f4-3bf5-4b99-8dce-a152af6ec770","savedPayload":{"position":{"x":25799.043568022138,"y":40166.698076268774},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Arrangement Style","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Arrangement Style","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Arrangement Style\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"b03d5c5f-0ee9-48bf-a164-ce60a23b163f","savedPayload":{"position":{"x":26079.560122587445,"y":40358.9456609292},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Shall We Improve This? ","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Shall We Improve This?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"90b822dd-2f06-4474-a728-3500f3a30af4","savedPayload":{"position":{"x":26053.726562387557,"y":40473.113569359586},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Freeze","config":"{\n \"icon\": {\n \"name\": \"freeze-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Freeze!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2e3e7d2f-35ba-4620-b62a-f18d55e30989","savedPayload":{"position":{"x":25986.169297802902,"y":40568.70488774053},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Design Space","name":"My Design Space","id":"f8485ce5-67f3-4476-b9e2-80994e49c318"}}}],"tutorialTopics":[],"id":"14dbd920-b2e0-4b8f-ae74-22d2a3077082","savedPayload":{"position":{"x":25779.662925094777,"y":40351.092576436844},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"3f1d0740-00c0-4818-b256-3280bd99ae74","savedPayload":{"position":{"x":25505.599287801997,"y":40229.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Productivity Tools","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Backups","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Backups\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"561b5fd8-43dd-42cf-9230-c098ebc7e176","savedPayload":{"position":{"x":25851.150517837592,"y":40156.65592801336},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"Working With Versions","config":"{\n \"icon\": {\n \"name\": \"hand-drag\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working With Versions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e60db488-cf9d-4bb0-b1a8-0d66ef657613","savedPayload":{"position":{"x":25973.52309136077,"y":40210.04653605334},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}},{"type":"Tutorial Step","name":"Detaching and Attaching","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Detaching and Attaching\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ae239506-f063-4e2f-8933-9f44dcc40fe2","savedPayload":{"position":{"x":26060.6116537401,"y":40311.245281501426},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Attaching The Backup","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Attaching The Backup\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cbdcbdcc-5f47-40a0-870c-ad71d0d12079","savedPayload":{"position":{"x":26095.16724712524,"y":40440.208511700446},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Detached Nodes Don't Count","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Irrelevant Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"60c572fe-8649-46eb-921e-4815fb9419b1","savedPayload":{"position":{"x":26070.34571244971,"y":40571.39347727926},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Nodes' Attaching Rules","config":"{\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Nodes' Attaching Rules\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"14d77d4f-ae2a-41ca-bcf1-d60044ac45a8","savedPayload":{"position":{"x":25991.063259072154,"y":40678.81738692698},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}}],"tutorialTopics":[],"id":"c63ac428-2adf-4189-8560-5129c15ea793","savedPayload":{"position":{"x":25795.377035688718,"y":40451.425869983344},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"References","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing with References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing with References\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"References\"\n }\n }\n}","project":"Superalgos","id":"2733bece-0fd3-4846-9f88-8a95bf4f96f8","savedPayload":{"position":{"x":26003.4129110247,"y":40496.44315481149},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Let's See Some References","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's See Some References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"775cc223-54d4-47e4-9863-a44e09dc2ff4","savedPayload":{"position":{"x":26055.18465682405,"y":40601.425869983344},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Visualizing References","config":"{\n \"icon\": {\n \"name\": \"key-r\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Visualizing References\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5b81ad17-e34c-4eed-98f5-d45a84d6f812","savedPayload":{"position":{"x":26062.840367349472,"y":40718.22944118012},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Establishing References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Establishing References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a5847b14-8e83-4f7f-bd1f-55c3ddc3a99b","savedPayload":{"position":{"x":26025.214530072662,"y":40829.0715835141},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}},{"type":"Tutorial Step","name":"Let's Get On With It!","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Get On With It!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Establish and Remove References\",\n \"anchor\": \"What If the Nodes Are Far Away or in Different Hierarchies?\"\n }\n }\n}","project":"Superalgos","id":"f4a434bf-93ac-4aae-9b1a-a5f3e510ed57","savedPayload":{"position":{"x":25948.035337639947,"y":40917.07758560147},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Done?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Done?\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"6449893d-f990-47f3-97d1-089487e3c8b1","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"One Last Point!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Point!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"ae02f7ce-5dc4-4014-b385-5405e915c4c1","savedPayload":{"position":{"x":25726.249051271316,"y":40976.50504192625},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}}],"tutorialTopics":[],"id":"e837dc7b-f8e0-4c01-b6f2-87898c505c30","savedPayload":{"position":{"x":25765.40690893733,"y":40679.0715835141},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Backups & Clones","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Backups!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Backups!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Backups\"\n }\n }\n}","project":"Superalgos","id":"49f383cc-5720-4f22-a444-6a12709be5da","savedPayload":{"position":{"x":25880.678459744897,"y":40858.00718906684},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Hammering Backups Home","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Hammering Backups Home\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"823bae09-4875-4b2c-b461-62b016247779","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}},{"type":"Tutorial Step","name":"Back It Up Again!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back It Up Again!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8737b5cf-02ec-46d6-b6a3-705da85b00ce","savedPayload":{"position":{"x":25765.87343003537,"y":41056.855333488194},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"One Last Backup!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Backup!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"41e890ee-f42a-4396-9493-8298445b94b6","savedPayload":{"position":{"x":25660.89071486351,"y":41108.627079287544},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Point","name":"End Upper Band","id":"ff8660a3-65b0-4df3-b823-f0656537ea30"}}},{"type":"Tutorial Step","name":"No Need to Memorize","config":"{\n \"icon\": {\n \"name\": \"docs-warning-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - No Need to Memorize\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d14e808a-d408-455b-be7b-0feb0c862662","savedPayload":{"position":{"x":25544.08714366674,"y":41116.28278981297},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What About Clones?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Clones?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Clones\"\n }\n }\n}","project":"Superalgos","id":"7942b504-e00b-4d78-b4a9-defd17ac6e08","savedPayload":{"position":{"x":25433.245001332754,"y":41078.656952536156},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Only Share Shares!","config":"{\n \"icon\": {\n \"name\": \"share-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Only Share Shares!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Shares\"\n }\n }\n}","project":"Superalgos","id":"39e09d3f-db3f-4961-9e32-915ba513a9a6","savedPayload":{"position":{"x":25345.238999245383,"y":41001.47776010344},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"974c84fb-0112-4a8b-9f53-6d057b22a073","savedPayload":{"position":{"x":25583.245001332754,"y":40818.84933140082},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"338435fb-8de8-47e5-a51c-891399879226","savedPayload":{"position":{"x":25505.599287801997,"y":40529.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"22c3e696-b371-48f9-814b-74a883ba6e7c","savedPayload":{"position":{"x":25245.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Workspaces","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Working with Workspaces","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working with Workspaces\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Workspaces\"\n }\n }\n}","project":"Superalgos","id":"cd7b285d-22bf-4b30-82c1-4aade52c9dfe","savedPayload":{"position":{"x":25385.569414553385,"y":40716.52491818019},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Your Workspace vs Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Workspace vs Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Plugin Workspaces\"\n }\n }\n}","project":"Superalgos","id":"fa5f23d3-3a4b-4b29-9e16-f9d251678272","savedPayload":{"position":{"x":25245.791666666664,"y":40898.68682578477},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Current Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - The Current Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"78deb6f1-5589-4b91-ad96-d4397fafd6fd","savedPayload":{"position":{"x":25018.145953135907,"y":40928.656952536156},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Workspace","name":"Basic Education","id":"979bbac5-358b-427c-95d6-2b1df435d74e"}}}],"tutorialTopics":[],"id":"ad149fde-4bf0-4b26-b4a5-809fc8ba62e1","savedPayload":{"position":{"x":25095.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Plugins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"366bcfde-71f9-4173-a80f-8fd4f5d7abcf","savedPayload":{"position":{"x":24978.42009536928,"y":40876.885206736806},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugins","name":"New Plugins","id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6"}}},{"type":"Tutorial Step","name":"How Plugins Work","config":"{\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How Plugins Work\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"3e106105-19ca-4a7d-8915-c2ea46d92cec","savedPayload":{"position":{"x":24873.43738019742,"y":40928.656952536156},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Positioning Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-file-position\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Positioning Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"298ab522-ebbc-4b94-8fca-bce27208f8a2","savedPayload":{"position":{"x":24756.63380900065,"y":40936.31266306158},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4"}}},{"type":"Tutorial Step","name":"Placing Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-trading-systems\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Placing Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"89958980-e536-414d-a55b-25149b6ebca2","savedPayload":{"position":{"x":24645.791666666664,"y":40898.68682578477},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","id":"3569d452-c593-4e54-a356-7ff8c6b519f3"}}},{"type":"Tutorial Step","name":"Non-Persistence of Changes","config":"{\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Non-Persistence of Changes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"2658f4f8-46df-4a83-9a39-6327553ba244","savedPayload":{"position":{"x":24557.785664579293,"y":40821.50763335205},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Starting From a Plugin","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Starting From a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"286d6e2a-0020-4461-98e4-974315326ddd","savedPayload":{"position":{"x":24506.013918779943,"y":40716.52491818019},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Improving a Plugin","config":"{\n \"icon\": {\n \"name\": \"sensor-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Improving a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4a1b74f7-8ed5-4771-b0e0-3d1427a5510a","savedPayload":{"position":{"x":24498.35820825452,"y":40599.72134698342},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"73a666a2-268d-42d1-ac73-e7ae316542e7","savedPayload":{"position":{"x":24795.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Exchanges","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Talking Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Talking Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Community Effort to Test Exchanges\"\n }\n }\n}","project":"Superalgos","id":"70ece243-3a2a-4b2a-9963-5044c11df654","savedPayload":{"position":{"x":24433.6596323107,"y":40591.203617870066},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Testing New Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Testing New Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Test New Exchanges\"\n }\n }\n}","project":"Superalgos","id":"11a7025e-6b0b-4ac3-9994-e014b1980b08","savedPayload":{"position":{"x":24345.791666666664,"y":40379.0715835141},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Clean Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Clean Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"57edeba5-84fb-4ae2-bbf8-c16f71c842c1","savedPayload":{"position":{"x":24433.6596323107,"y":40166.93954915814},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"3bba7ba9-7d4c-4d84-9c25-307f59bd7670","savedPayload":{"position":{"x":24645.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Data","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing With Data","config":"{\n \"icon\": {\n \"name\": \"dataset-definition\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing With Data\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"811af117-7a9f-4522-a391-f310fcab8167","savedPayload":{"position":{"x":24495.791666666664,"y":40119.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"About Other Markets","config":"{\n \"icon\": {\n \"name\": \"market\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Other Markets\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"7eb3bc72-7230-4c9a-bc7d-a568d3cc2465","savedPayload":{"position":{"x":24535.98404553133,"y":39969.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Markets","name":"New Exchange Markets","id":"2fd80894-900e-44ac-a1a7-56c14124f7a1"}}},{"type":"Tutorial Step","name":"Building Indicators","config":"{\n \"icon\": {\n \"name\": \"indicator-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Building Indicators\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Build an Indicator - Video Series\"\n }\n }\n}","project":"Superalgos","id":"bbdede43-5ebe-4438-969e-e56fb8d36af7","savedPayload":{"position":{"x":24645.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Indicators?","config":"{\n \"icon\": {\n \"name\": \"data-mine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More Indicators?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"Community Data Mines\"\n }\n }\n}","project":"Superalgos","id":"fd066dc6-57fb-4121-b8e7-1edc06bdf3a0","savedPayload":{"position":{"x":24795.791666666664,"y":39819.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About Strategies?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About Strategies?\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c18673fd-a8cf-4aba-b89b-d38d96991c82","savedPayload":{"position":{"x":24945.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"2c2b7b0c-de6e-480d-93d2-27bbb74b972b","savedPayload":{"position":{"x":24795.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your Graduation","config":"{\n \"icon\": {\n \"name\": \"trading-strategy\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Graduation\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2c47bc65-09a1-4576-a69c-990e47930ac5","savedPayload":{"position":{"x":25245.791666666664,"y":39859.456341243436},"targetPosition":{"x":25095.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"0f058d80-353d-4073-8b41-805938e1551e","savedPayload":{"position":{"x":25095.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8","savedPayload":{"position":{"x":24945.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Contribute to Superalgos","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial - Wanna Help? Come On In!\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"You are in command","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - You Are In Command\"\n },\n \"icon\": {\n \"name\": \"strategy-manage-stage\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"cf295c5b-14f3-4440-b684-c9a429110269","savedPayload":{"position":{"x":31497,"y":40092.69237886467},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Free For Everyone?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free For Everyone?\"\n },\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"64170c58-8848-453c-8bb9-ea8483476b6d","savedPayload":{"position":{"x":31606.807621135333,"y":40202.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"A Brilliant Idea","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Brilliant Idea\"\n },\n \"icon\": {\n \"name\": \"nodes-highlights\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4a969dfa-6c68-4eb5-98c3-c20f2b9bebbc","savedPayload":{"position":{"x":31647,"y":40352.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What is a Contribution?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What is a Contribution?\"\n },\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"556f8af1-63ae-423a-a5fe-5720e7b4ae96","savedPayload":{"position":{"x":31606.807621135333,"y":40502.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What About Free Riders?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Free Riders?\"\n },\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ca46f639-4472-420d-a647-2c3be58a6f4b","savedPayload":{"position":{"x":31497,"y":40612.30762113533},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"2fefbfbf-c5e3-4da4-82b6-a36e5fb1edcd","savedPayload":{"position":{"x":31347,"y":40352.5},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Branches","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Switching Branches","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Switching Branches\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c3dc484a-9bf2-47f2-aafe-56abd3dbe8ea","savedPayload":{"position":{"x":31438.780298432423,"y":40661.3546836069},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Now the Current Branch","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Now the Current Branch\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c755cfee-f1b5-47a1-8c72-f7bd1285ed5d","savedPayload":{"position":{"x":31407.007055568993,"y":40774.01410481041},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Before You Switch","config":"{\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Before You Switch\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c5186485-0efc-4ced-b670-a012564ffe0d","savedPayload":{"position":{"x":31334.539512811538,"y":40865.93874456856},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Double Trouble?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Double Trouble?\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": false\n }\n}","project":"Superalgos","id":"b9110aee-2bb4-4930-a6b3-d3b14d4d62d3","savedPayload":{"position":{"x":31232.410196624965,"y":40923.1339097771},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Switch Already!","config":"{\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Switch Already!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"searchPage\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"014163bf-692e-40dc-be33-8bbba811310d","savedPayload":{"position":{"x":31116.167369594128,"y":40936.892155008485},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Welcome Back!","config":"{\n \"icon\": {\n \"name\": \"hits\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Back!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"7cfebeab-bd19-4caf-af9c-60eda4325bc7","savedPayload":{"position":{"x":31003.50794839062,"y":40905.11891214506},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Update the App!","config":"{\n \"icon\": {\n \"name\": \"indicator-process-instance\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Update the App!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"08e24e17-777d-45bc-887d-e68d734ef751","savedPayload":{"position":{"x":30911.583308632475,"y":40832.651369387604},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"65f4de98-58c6-44b1-9c61-46aa0a45a71c","savedPayload":{"position":{"x":31139.705098312483,"y":40637.81695488855},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Editing","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Add Your Review!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Add Your Review!\"\n },\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"a49ea1fc-8cfe-41a1-a781-860e294cf1f6","savedPayload":{"position":{"x":30857.86197012711,"y":40824.01445226733},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Did It Work?","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Did It Work?\"\n },\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"3803ec52-574c-4961-8366-551ed8abd757","savedPayload":{"position":{"x":30724.483848017513,"y":40818.0244338965},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Breaking Up The Command","config":"{\n \"icon\": {\n \"name\": \"copy-path\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Breaking Up The Command\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c23381c5-d2e3-4b19-9065-8401c0e024d6","savedPayload":{"position":{"x":30606.913283905604,"y":40754.75701548882},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Editing Crash Course","config":"{\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Editing Crash Course\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"686bdf5e-b7a5-4237-9779-f806c0d93065","savedPayload":{"position":{"x":30528.436569922083,"y":40646.743085183916},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Sign!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Sign!\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ef70642b-3699-4101-bb45-7c76cf125af3","savedPayload":{"position":{"x":30504.596981725124,"y":40515.37612658259},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Save!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Save!\"\n },\n \"icon\": {\n \"name\": \"under-construction\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"d61352ca-f701-4403-af3f-dcbfcd05b402","savedPayload":{"position":{"x":30540.116242130494,"y":40386.67497694584},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"8bd606bc-a0bd-47e3-99df-a53bf79e0bb9","savedPayload":{"position":{"x":30804.294901687517,"y":40528.83557568774},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"GitHub","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Get Ready to Push!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Get Ready to Push!\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7859f5c1-bba6-405a-9b62-ec086b59be27","savedPayload":{"position":{"x":30561.589803375035,"y":40352.5},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Translation for Mere Mortals","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Translation for Mere Mortals\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c35d39f0-5c90-48fd-badc-592be51a8605","savedPayload":{"position":{"x":30518.977946798972,"y":40268.869522624744},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Contributable files?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Contributable files?\"\n },\n \"icon\": {\n \"name\": \"dataset\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"a2846838-6234-4fb1-8f28-2ce5a69607d4","savedPayload":{"position":{"x":30504.294901687517,"y":40176.16442431226},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Authentication","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"5934eb7c-d208-498e-9bce-fca825fa129c","savedPayload":{"position":{"x":30518.977946798972,"y":40083.45932599977},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Auth Clip","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Auth Clip\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"ec8aca7b-50a2-4635-b0db-f3ed2c2796e3","savedPayload":{"position":{"x":30561.589803375035,"y":39999.828848624515},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Set Up the Token!","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Set Up the Token!\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"f7b3489d-a282-4e12-a28d-6300619713f5","savedPayload":{"position":{"x":30627.959325999775,"y":39933.45932599977},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Github API","name":"New Github API","id":"9ea7bee2-c4db-4cee-a05f-63fcf3a86a4a"}}},{"type":"Tutorial Step","name":"A Note On Keys and Tokens!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Note On Keys and Tokens!\"\n },\n \"icon\": {\n \"name\": \"exchange-account-key\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"f7cd63ca-f5bd-4f92-ad8b-ec65ee5efe44","savedPayload":{"position":{"x":30711.589803375035,"y":39890.84746942371},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Run the Command!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Run the Command!\"\n },\n \"icon\": {\n \"name\": \"docs-json-code-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"79cc032d-7cdc-4b3a-ac77-7ed2d2bbed06","savedPayload":{"position":{"x":30804.294901687517,"y":39876.16442431226},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Congrats and Thank You!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Congrats and Thank You!\"\n },\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7793d0b5-b468-4e4f-aff0-e4b43cf01925","savedPayload":{"position":{"x":30897,"y":39890.84746942371},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"924146dc-0d92-41ad-9de8-8b341e379fb2","savedPayload":{"position":{"x":30804.294901687517,"y":40176.16442431226},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"More on Contributions","config":"{\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More on Contributions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"af57eaca-ba68-4f71-9bb0-b5f825de2e49","savedPayload":{"position":{"x":31077.331591067155,"y":39773.738764891306},"targetPosition":{"x":31139.705098312483,"y":40067.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"A Book on Tutorials","config":"{\n \"icon\": {\n \"name\": \"scripts-library\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Book on Tutorials\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"First Steps Tutorials\"\n }\n }\n}","project":"Superalgos","id":"440515fe-9612-4c12-9180-638cc37b75bb","savedPayload":{"position":{"x":31362.6485459557,"y":39866.44386320379},"targetPosition":{"x":31139.705098312483,"y":40067.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b34d468c-ec85-489c-b6a7-28862c0956c6","savedPayload":{"position":{"x":31139.705098312483,"y":40067.18304511145},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"a8711464-9e92-4e16-9622-a1b499a856ca","savedPayload":{"position":{"x":31047,"y":40352.5},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Setting up a new Chart","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Introduction\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Getting Started","config":"{\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Before we begin","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Before We Begin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c8304d44-191c-49c8-a982-88a5ea42b395","savedPayload":{"position":{"x":19758.164424312257,"y":40103.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Charts without tears","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Charts without tears\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a2d5c58d-1aa9-4958-9aca-0e5fcc806e2f","savedPayload":{"position":{"x":20058.164424312257,"y":40403.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Looking for a quick fix?","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Looking for a quick fix?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"d9407975-f8f8-42fe-b4c4-f0589471cdf8","savedPayload":{"position":{"x":19758.164424312257,"y":40703.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}}],"tutorialTopics":[],"id":"c30627fc-e01f-48bd-8347-99c1b13b0088","savedPayload":{"position":{"x":19758.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Dashboards and Time Machines","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dashing Dashboards","config":"{\n \"icon\": {\n \"name\": \"dashboard\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Dashing Dashboards\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e902be8c-fe3e-463a-b429-1dec70cb12b4","savedPayload":{"position":{"x":19867.97204544759,"y":40513.60252282285},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Time Machines hold it all together","config":"{\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Time Machines hold it all together\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Node\",\n \"type\": \"Time Machine\"\n }\n }\n}","project":"Superalgos","id":"fa55dca7-9a95-4e4c-a3c1-571d1aac5ebf","savedPayload":{"position":{"x":19758.164424312257,"y":40923.41014395818},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Keep it in one place","config":"{\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Keep it in one place\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"da032cf6-441b-4a53-a968-49f97c0a1c5b","savedPayload":{"position":{"x":19348.356803176925,"y":40813.60252282285},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Dashboard","name":"Testing Environment My Computer","id":"885265c2-ebb1-4283-a617-34a88780276d"}}}],"tutorialTopics":[],"id":"c8d6c07d-70c6-4999-b77b-155f5bf07dac","savedPayload":{"position":{"x":19608.164424312257,"y":40663.60252282285},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Your first custom Chart","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Add the Chart","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Without Further Ado","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Without Further Ado\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ea3312d6-88fc-4e7a-9ae5-9620e3bddfdd","savedPayload":{"position":{"x":19597.94217219898,"y":41165.51230506553},"targetPosition":{"x":19385.810137843015,"y":40953.38027070957},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Why is it blank?","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Why is it blank?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"a2131ede-c79b-4313-bd85-40fbd29287e7","savedPayload":{"position":{"x":19308.164424312257,"y":41243.15801859629},"targetPosition":{"x":19385.810137843015,"y":40953.38027070957},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}}],"tutorialTopics":[],"id":"f46dff3b-4bc8-46f0-a581-a8bf72c7f1e2","savedPayload":{"position":{"x":19385.810137843015,"y":40953.38027070957},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Managing Layers","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"The Chart of many talents","config":"{\n \"icon\": {\n \"name\": \"timeline-chart\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - The Chart of many talents\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c0c76521-31f9-474a-862e-40afc6507f9d","savedPayload":{"position":{"x":19158.164424312257,"y":41223.41014395818},"targetPosition":{"x":19158.164424312257,"y":40923.41014395818},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Herding layers","config":"{\n \"icon\": {\n \"name\": \"layer-manager\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Herding layers\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"426ca9c5-6476-4c7f-bb34-af88b41de96e","savedPayload":{"position":{"x":18898.356803176925,"y":41073.41014395818},"targetPosition":{"x":19158.164424312257,"y":40923.41014395818},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}}],"tutorialTopics":[],"id":"875b6687-2c74-4dff-9f62-96c342298b59","savedPayload":{"position":{"x":19158.164424312257,"y":40923.41014395818},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Working with Data Storage","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your data treasure trove","config":"{\n \"icon\": {\n \"name\": \"data-storage\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Your data treasure trove\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8ef69b83-1314-4f88-bfbb-fa4ae7aaf4c9","savedPayload":{"position":{"x":18868.386676425536,"y":41001.05585748894},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Data Storage","name":"New Data Storage","id":"e2697759-6038-4943-b90c-5a68651ff9a8"}}},{"type":"Tutorial Step","name":"Follow the Tree!","config":"{\n \"icon\": {\n \"name\": \"data-mines-data\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Follow the Tree!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"57ee6e8b-b8b4-4d79-b0b6-e80e9bbff001","savedPayload":{"position":{"x":18728.608928538815,"y":40818.89394988436},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Dashboard","name":"Testing Environment My Computer","id":"885265c2-ebb1-4283-a617-34a88780276d"}}},{"type":"Tutorial Step","name":"The data you want to see","config":"{\n \"icon\": {\n \"name\": \"data-storage\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - The data you want to see\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"b12414e1-02e3-4b84-abf1-c56eef5ccc3a","savedPayload":{"position":{"x":18758.579055290204,"y":40591.248236353604},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a new Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}}],"tutorialTopics":[],"id":"ca9d3427-37c7-4559-a1ac-6004aa913562","savedPayload":{"position":{"x":19018.386676425536,"y":40741.248236353604},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"1246dd21-45b1-4664-845f-ccea597a602e","savedPayload":{"position":{"x":19308.164424312257,"y":40663.60252282285},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Connecting to Data Mine Products","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Hooking up a Chart to Data Products","config":"{\n \"icon\": {\n \"name\": \"data-mine-products\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Hooking up a Chart to Data Products\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cc2794e2-9140-4ca5-89d0-c812eee41f6d","savedPayload":{"position":{"x":19250.86952262474,"y":40689.11185657606},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Data Products make the world go round","config":"{\n \"icon\": {\n \"name\": \"data-mine-products\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Data Products make the world go round\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"67529836-d0a7-4a27-8b09-63f599a7c03f","savedPayload":{"position":{"x":18915.459325999775,"y":40580.130477375256},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Make the connection","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Make the connection\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4b347096-6bcd-45f3-b40d-6fcd6b3837eb","savedPayload":{"position":{"x":18915.459325999775,"y":40227.45932599977},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Add the Layers","config":"{\n \"icon\": {\n \"name\": \"layer\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Add the Layers\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"f0411061-33a3-4f21-ad4e-670f8381f209","savedPayload":{"position":{"x":19250.86952262474,"y":40118.477946798965},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"d4893496-189d-4fe8-a6b1-864dcd9a46b6","savedPayload":{"position":{"x":19158.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Connecting to Trading Mine Products","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Hooking up a Chart to a Trading System","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Hooking up a Chart to a Trading System\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cedbe86a-bf7b-4f1d-95dd-641198dc2146","savedPayload":{"position":{"x":19107.4252424046,"y":40366.9307281954},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Connection one","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Connection one\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"68c45d99-618b-4371-8e93-b81d80d60dde","savedPayload":{"position":{"x":19034.100787019477,"y":40021.96628762944},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Connection two","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Connection two\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c7b0d632-79d4-4c8b-a991-67298d30016f","savedPayload":{"position":{"x":19339.522963292555,"y":39845.630711941696},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Check the Chart","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Check the Chart\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c8bebdf9-b4b5-4737-aeff-4a578389c810","savedPayload":{"position":{"x":19601.6087045324,"y":40081.61377330685},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"ab24e3dc-c131-4a6d-a1a0-7df304237185","savedPayload":{"position":{"x":19308.164424312257,"y":40143.98728055218},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Before I go","config":"{\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Easy as 1,2,3","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Easy as 1, 2, 3\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"88edf6e9-f780-4e0f-b031-cbe2bc2cfdaf","savedPayload":{"position":{"x":19458.164424312257,"y":39884.17965941685},"targetPosition":{"x":19608.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Before I go","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Before I go\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"72bd2fd9-4de6-4bd4-bc9d-a9fba53d9827","savedPayload":{"position":{"x":19908.164424312257,"y":40143.98728055218},"targetPosition":{"x":19608.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"0570a00c-734e-44fb-9761-44ccb63212ff","savedPayload":{"position":{"x":19608.164424312257,"y":40143.98728055218},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"f87a4d66-cd01-4712-8ec6-c232677c5547","savedPayload":{"position":{"x":19458.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isPlaying":false,"isRunning":false},"tutorial":{"status":"Done"}}}]} \ No newline at end of file +{"type":"Workspace","name":"Creating Custom Charts","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":[{"type":"Project Data Tasks","name":"Superalgos","project":"Superalgos","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binanceus","project":"Superalgos","marketDataTasks":[{"type":"Market Data Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Exchange Raw Data","project":"Superalgos","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","project":"Superalgos","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","project":"Superalgos","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":26497.378634092645,"y":28190.39686701245},"targetPosition":{"x":26757.186255227978,"y":28040.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":26757.186255227978,"y":28040.39686701245},"targetPosition":{"x":27016.99387636331,"y":27890.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":27016.99387636331,"y":27890.39686701245},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":26407.46825383848,"y":27662.75115348169},"targetPosition":{"x":26697.2460017252,"y":27585.105439950934},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":26485.113967369238,"y":27372.97340559497},"targetPosition":{"x":26697.2460017252,"y":27585.105439950934},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":26697.2460017252,"y":27585.105439950934},"targetPosition":{"x":26987.023749611923,"y":27662.75115348169},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":26987.023749611923,"y":27662.75115348169},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","project":"Superalgos","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":26716.99387636331,"y":27070.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":26976.801497498644,"y":26920.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"be19d91b-9337-4f84-96b3-f4e54ea12df5"}}}],"id":"112be2cf-74ea-4272-9566-cf0cd24c111c","savedPayload":{"position":{"x":26976.801497498644,"y":27220.781624741783},"targetPosition":{"x":27126.801497498644,"y":27480.589245877116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e74c3232-7b59-4006-87fa-b3b2a328a52b","savedPayload":{"position":{"x":27126.801497498644,"y":27480.589245877116},"targetPosition":{"x":27276.801497498644,"y":27740.39686701245},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea","savedPayload":{"position":{"x":27276.801497498644,"y":27740.39686701245},"targetPosition":{"x":27566.579245385365,"y":27818.042580543206},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33","savedPayload":{"position":{"x":27566.579245385365,"y":27818.042580543206},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}},{"type":"Data Mine Tasks","name":"Sparta","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Sparta","project":"Superalgos","tasks":[{"type":"Task","name":"Simple Moving Average (SMA)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Simple Moving Average (SMA)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Period-Market","project":"Superalgos","id":"577e56c5-4bae-4528-8ed4-f7032a6cc2b2","savedPayload":{"position":{"x":26676.801497498644,"y":27220.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"456269f6-9849-4d5f-9c8c-7cd7d1eef297"}}},{"type":"Indicator Process Instance","name":"Simple Moving Average (SMA) Multi-Period-Daily","project":"Superalgos","id":"1ebcdf4e-828a-4fc6-8516-1fd1466f747f","savedPayload":{"position":{"x":26716.99387636331,"y":27070.781624741783},"targetPosition":{"x":26976.801497498644,"y":27220.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"333ae5d7-7ec1-4f08-b206-91e3b4f2c99f"}}}],"id":"78619a39-67e7-4be3-92d4-794e699bc134","savedPayload":{"position":{"x":26976.801497498644,"y":27220.781624741783},"targetPosition":{"x":27266.579245385365,"y":27298.42733827254},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c1c85b8e-3c0c-4527-b4c3-b8a9f2bfc22b","savedPayload":{"position":{"x":27266.579245385365,"y":27298.42733827254},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Moving Average Convergence Diveregence (MACD) Multi-Period-Market","project":"Superalgos","id":"f22238fe-0c4c-44bb-9a21-edc1b6ff4eb8","savedPayload":{"position":{"x":27044.224958916122,"y":26644.32577517667},"targetPosition":{"x":27256.356993272086,"y":26856.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"44019efe-950a-4eec-a546-cd2ee26818b9"}}},{"type":"Indicator Process Instance","name":"Moving Average Convergence Diveregence (MACD) Multi-Period-Daily","project":"Superalgos","id":"9cc5b202-a9c4-4632-9c21-3b01a2f74255","savedPayload":{"position":{"x":27178.71127974133,"y":26566.68006164591},"targetPosition":{"x":27256.356993272086,"y":26856.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"8e5db945-8507-4489-9288-21cfa1e9301c"}}}],"id":"4efb5b27-ab99-4e9a-a2a3-8990e8713fe2","savedPayload":{"position":{"x":27256.356993272086,"y":26856.457809532632},"targetPosition":{"x":27406.356993272086,"y":27116.265430667965},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"129e39d0-f14f-449f-96ba-b7c2f40ba33a","savedPayload":{"position":{"x":27406.356993272086,"y":27116.265430667965},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Relative Strenght Index (RSI)","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Relative Strenght Index (RSI)","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Relative Strenght Index (RSI) Multi-Period-Market","project":"Superalgos","id":"824c6e6f-65af-464b-948b-d529f5776982","savedPayload":{"position":{"x":27711.6484203336,"y":26496.517556029856},"targetPosition":{"x":27711.6484203336,"y":26796.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"96f31416-5090-428a-be83-985a0b3ab275"}}},{"type":"Indicator Process Instance","name":"Relative Strenght Index (RSI) Multi-Period-Daily","project":"Superalgos","id":"ced7678d-e4c1-4891-be78-265d79aab04c","savedPayload":{"position":{"x":27861.6484203336,"y":26536.709934894523},"targetPosition":{"x":27711.6484203336,"y":26796.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"f1177bcd-22dc-425b-8f30-878844aa82b8"}}}],"id":"1cacb36f-7b2a-499c-aeb0-a6b0a4a1969a","savedPayload":{"position":{"x":27711.6484203336,"y":26796.517556029856},"targetPosition":{"x":27634.002706802843,"y":27086.295303916577},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bbdf0a91-954a-422d-bff1-b4c206425006","savedPayload":{"position":{"x":27634.002706802843,"y":27086.295303916577},"targetPosition":{"x":27556.356993272086,"y":27376.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"172d0669-960d-47c7-aba9-8984b98389ac","savedPayload":{"position":{"x":27556.356993272086,"y":27376.073051803298},"targetPosition":{"x":27706.356993272086,"y":27635.88067293863},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b9dc8332-3efb-46a4-9e39-7fd204ac0173","savedPayload":{"position":{"x":27706.356993272086,"y":27635.88067293863},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Sparta","id":"9cfffc48-486a-48cb-b641-98c82e314d3a"}}},{"type":"Data Mine Tasks","name":"Alpha","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Alpha","project":"Superalgos","tasks":[{"type":"Task","name":"Stochastic","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Stochastic","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Stochastic Multi-Period-Market","project":"Superalgos","id":"244f2d9d-0b4d-4a73-acac-b95c7f060c20","savedPayload":{"position":{"x":28166.939847395115,"y":26436.57730252708},"targetPosition":{"x":28166.939847395115,"y":26736.57730252708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"6a6a6533-21a9-4be9-b2f0-ace1adfe45b8"}}},{"type":"Indicator Process Instance","name":"Stochastic Multi-Period-Daily","project":"Superalgos","id":"93f3e4f4-1774-481a-be53-20c0c19fb54f","savedPayload":{"position":{"x":28316.939847395115,"y":26476.769681391746},"targetPosition":{"x":28166.939847395115,"y":26736.57730252708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"6a39c43d-0ad2-4c98-ae06-6e40f55d1753"}}}],"id":"8e66e327-a785-489b-ab0b-f3bc84546d1e","savedPayload":{"position":{"x":28166.939847395115,"y":26736.57730252708},"targetPosition":{"x":28089.294133864358,"y":27026.3550504138},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"66046624-d8cc-4d5b-a24a-4ce998353616","savedPayload":{"position":{"x":28089.294133864358,"y":27026.3550504138},"targetPosition":{"x":28011.6484203336,"y":27316.13279830052},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e66a0d4c-201f-4955-83d4-9e0a5308ad80","savedPayload":{"position":{"x":28011.6484203336,"y":27316.13279830052},"targetPosition":{"x":27934.002706802843,"y":27605.910546187242},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f4378a66-6833-4164-bec1-4f1c3b42d5b4","savedPayload":{"position":{"x":27934.002706802843,"y":27605.910546187242},"targetPosition":{"x":27856.356993272086,"y":27895.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Alpha","id":"511bef1e-62d8-4ff9-8d87-15bd0d3d630c"}}}],"id":"70d459d6-d270-49e0-b70d-2053c65a40e2","savedPayload":{"position":{"x":27856.356993272086,"y":27895.688294073963},"targetPosition":{"x":28006.356993272086,"y":28155.495915209296},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"af949a76-a6f4-4ec6-869e-f240480eea81","savedPayload":{"position":{"x":28006.356993272086,"y":28155.495915209296},"targetPosition":{"x":28156.356993272086,"y":28415.30353634463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"9b93b56d-dccf-4a8c-bbd0-8c608c31363c","savedPayload":{"position":{"x":28156.356993272086,"y":28415.30353634463},"targetPosition":{"x":28306.356993272086,"y":28675.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":28306.356993272086,"y":28675.11115747996},"targetPosition":{"x":28456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[{"type":"Project Learning Tasks","name":"Superalgos","project":"Superalgos","exchangeLearningTasks":[],"id":"ddd4bf4d-46fd-4c16-86d3-1785f5ad629e","savedPayload":{"position":{"x":25559.356993272086,"y":30511.30353634463},"targetPosition":{"x":25409.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":28606.356993272086,"y":28675.11115747996},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binanceus","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Backtesting Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b","savedPayload":{"position":{"x":31532.291877706186,"y":28455.48478700282},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 1000\n}","project":"Superalgos","id":"ed578090-732c-4e41-a4ae-9d4f34607170","savedPayload":{"position":{"x":31621.55868811598,"y":28426.48024208079},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeRange":{"type":"Time Range","name":"New Time Range","config":"{ \n\"initialDatetime\": \"2020-09-01\",\n\"finalDatetime\": \"2020-09-02\",\n \"allowStartingFromThePast\": false\n}","project":"Superalgos","id":"47fa4509-16f4-42b7-9453-fa3b3d2885b0","savedPayload":{"position":{"x":31715.41936714012,"y":28426.48024208079},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"dfe3514c-1aa9-4cea-bb2d-e6657037e69d","savedPayload":{"position":{"x":31804.686177549913,"y":28455.48478700282},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"c711e510-373f-468d-8ed9-1601da6a06f5","savedPayload":{"position":{"x":31880.621061984013,"y":28510.654709903367},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"fdc7c383-8301-4393-b415-8c2d542e05fe","savedPayload":{"position":{"x":31935.79098488456,"y":28586.589594337467},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"28db17c9-2703-430b-a162-5e04b68640a3","savedPayload":{"position":{"x":31964.79552980659,"y":28675.85640474726},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"78270062-7d10-4afa-baee-2bda8a4b4ed2","savedPayload":{"position":{"x":31964.79552980659,"y":28769.7170837714},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"4c9cdc50-70c0-43ee-ad54-052f8b7ecbc8","savedPayload":{"position":{"x":31935.79098488456,"y":28858.983894181194},"targetPosition":{"x":31668.48902762805,"y":28722.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e79ab7df-ba40-46aa-abcd-63df8031a931","savedPayload":{"position":{"x":31668.48902762805,"y":28722.78674425933},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2","savedPayload":{"position":{"x":31756.356993272086,"y":28934.918778615294},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"720feaab-efc8-435a-bb3c-ab4e33ed1ca2","savedPayload":{"position":{"x":31668.48902762805,"y":29147.050812971258},"targetPosition":{"x":31456.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f","savedPayload":{"position":{"x":31456.356993272086,"y":28934.918778615294},"targetPosition":{"x":31156.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"60a5e5c0-cfb3-4488-b46c-55d637212aa5","savedPayload":{"position":{"x":31156.356993272086,"y":28934.918778615294},"targetPosition":{"x":30856.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"cbfbb9e7-9c30-4482-8a9f-4c90771feffc","savedPayload":{"position":{"x":30856.356993272086,"y":28934.918778615294},"targetPosition":{"x":30556.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08222935-2499-4a3e-a927-4f5dfbc392df","savedPayload":{"position":{"x":30556.356993272086,"y":28934.918778615294},"targetPosition":{"x":30256.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"56c5656b-a7e0-42ed-92d6-631e78ca99d0","savedPayload":{"position":{"x":30256.356993272086,"y":28934.918778615294},"targetPosition":{"x":29956.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ce02342-473e-4614-ac76-c7788f56ab8e","savedPayload":{"position":{"x":29956.356993272086,"y":28934.918778615294},"targetPosition":{"x":29656.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"2db856e0-4719-408c-88bc-5b47d412c066","savedPayload":{"position":{"x":29656.356993272086,"y":28934.918778615294},"targetPosition":{"x":29356.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"ba36975c-08d6-458d-b7c0-eb4684a85b5d","savedPayload":{"position":{"x":29356.356993272086,"y":28934.918778615294},"targetPosition":{"x":29056.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"55c01047-3fce-41b3-9214-2e885f28b987","savedPayload":{"position":{"x":29056.356993272086,"y":28934.918778615294},"targetPosition":{"x":28756.356993272086,"y":28934.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":28756.356993272086,"y":28934.918778615294},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binanceus","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binanceus BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Live Trading Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"5db563b5-a8d6-48c6-a34e-bbca8825ce37","savedPayload":{"position":{"x":27214.318791376507,"y":32665.54775609566},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 100\n}","project":"Superalgos","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689","savedPayload":{"position":{"x":27314.957547074417,"y":32638.58168277913},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"727de4cc-40e6-4064-843c-8cb3a9f2fcdf","savedPayload":{"position":{"x":27418.749983429472,"y":32647.662344319935},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"598dc355-73c9-4e7f-a0e9-ee5fd7952825","savedPayload":{"position":{"x":27513.177200804028,"y":32691.69447891996},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"a3646bab-4d27-48a7-b17c-79d6da48f64d","savedPayload":{"position":{"x":27586.849883185412,"y":32765.367161301343},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"5021a926-442a-4341-8844-8a432293ecb1","savedPayload":{"position":{"x":27630.882017785436,"y":32859.7943786759},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"e8cedec0-1bc2-46ba-98de-b7ff746a74c8","savedPayload":{"position":{"x":27639.96267932624,"y":32963.586815030954},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"67da1d57-62ff-424c-ab2e-034e008fc079","savedPayload":{"position":{"x":27612.99660600971,"y":33064.225570728864},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"726c35b1-e30b-4620-819f-a88a955f1902","savedPayload":{"position":{"x":27341.104269898715,"y":32937.440092206656},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"ff1cd7c1-9415-4c49-8ecf-188fd0c60ea4","savedPayload":{"position":{"x":27428.97223554275,"y":33149.57212656262},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"5fd0a826-0819-4f19-a999-66cc64be0272","savedPayload":{"position":{"x":27341.104269898715,"y":33361.70416091858},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"1ce123af-467f-4295-b317-dba8729faf25","savedPayload":{"position":{"x":27128.97223554275,"y":33149.57212656262},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"0d54601b-fcac-42c9-8ce6-d532bfc81de5","savedPayload":{"position":{"x":26978.97223554275,"y":33409.37974769795},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"7e2fdde9-8b64-44a3-85f1-10c3935bd3e3"}}},"id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d","savedPayload":{"position":{"x":26828.97223554275,"y":33149.57212656262},"targetPosition":{"x":26569.16461440742,"y":32999.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"2451fc98-0396-44df-902c-a3eaa90f0618","savedPayload":{"position":{"x":26569.16461440742,"y":32999.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"keyReference":{"type":"Key Reference","name":"Key for Lighting Strike","project":"Superalgos","id":"a0622fc9-c4e3-44c3-963d-7ae5fa163e99","savedPayload":{"position":{"x":26309.356993272086,"y":33149.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},"id":"c8492c4a-a7a7-4a80-a25a-a610377e6180","savedPayload":{"position":{"x":26309.356993272086,"y":32849.57212656262},"targetPosition":{"x":26159.356993272086,"y":32589.76450542729},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dd73b670-11d7-4cdc-848b-c063fb7a3848","savedPayload":{"position":{"x":26159.356993272086,"y":32589.76450542729},"targetPosition":{"x":26009.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1e087225-153c-4c7e-b9ec-2a36f32ee511","savedPayload":{"position":{"x":26009.356993272086,"y":32329.956884291958},"targetPosition":{"x":25859.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"013985a8-7bf7-4b91-8e2d-f4e8bd81cb62","savedPayload":{"position":{"x":25859.356993272086,"y":32070.149263156625},"targetPosition":{"x":25709.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"d539c0ac-aaeb-4c44-9dba-ac26df819a8d","savedPayload":{"position":{"x":25709.356993272086,"y":31810.341642021293},"targetPosition":{"x":25559.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"f4fc305a-6764-427e-86a7-6557118a4b35","savedPayload":{"position":{"x":25559.356993272086,"y":31550.53402088596},"targetPosition":{"x":25409.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":28606.356993272086,"y":29194.726399750627},"targetPosition":{"x":28456.356993272086,"y":28934.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":[{"type":"Project Data Products","name":"Superalgos","project":"Superalgos","exchangeDataProducts":[{"type":"Exchange Data Products","name":"Binanceus","project":"Superalgos","marketDataProducts":[{"type":"Market Data Products","name":"Binanceus BTC/USDT","project":"Superalgos","dataProducts":[],"dataMineProducts":[{"type":"Data Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Candles Volumes","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Candles","project":"Superalgos","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab","savedPayload":{"position":{"x":25635.373168930517,"y":32126.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Candles","id":"fe6065ec-4d2d-47a0-bae0-8647f0e195d7"}}},{"type":"Data Product","name":"Volumes","project":"Superalgos","id":"07c11481-7dbd-477d-8bf7-79212542a6aa","savedPayload":{"position":{"x":25617.373168930517,"y":32183.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Volumes","id":"1a366aef-efef-470e-88e0-2a6fbe4dd91f"}}}],"dataProductFolders":[],"id":"73bb62ff-8212-4387-b160-40ee8de2a133","savedPayload":{"position":{"x":28609.517851064033,"y":30737.271265196097},"targetPosition":{"x":28332.353991310647,"y":30622.46623548657},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Resistances and Supports","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Resistances","project":"Superalgos","id":"a1669770-1bbe-40f7-acb3-ded15272935f","savedPayload":{"position":{"x":25621.373168930517,"y":32076.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Resistances","id":"7a734501-a0fb-4305-803e-7e95d477c513"}}},{"type":"Data Product","name":"Supports","project":"Superalgos","id":"64899503-b618-493a-ba94-bfad2051a611","savedPayload":{"position":{"x":25644.373168930517,"y":32138.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Supports","id":"bc3c43de-6312-47d4-ae3d-0c95c1b039e0"}}}],"dataProductFolders":[],"id":"a1855a09-0948-43de-bba7-8900c5c161d8","savedPayload":{"position":{"x":28371.51184897666,"y":30919.89969389871},"targetPosition":{"x":28332.353991310647,"y":30622.46623548657},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0","savedPayload":{"position":{"x":28332.353991310647,"y":30622.46623548657},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}},{"type":"Data Mine Products","name":"Sparta","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Simple Moving Average (SMA)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Popular SMAs","project":"Superalgos","id":"1b8ea542-14d1-42c0-9af9-c429c308c6fd","savedPayload":{"position":{"x":28043.567704942016,"y":30688.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Popular SMAs","id":"4029d5bf-a8ad-4d80-b874-2af506e0ab34"}}},{"type":"Data Product","name":"Base7 SMAs","project":"Superalgos","id":"589f977c-a9d4-446c-8b5e-ff54250d3b3a","savedPayload":{"position":{"x":28038.567704942016,"y":30670.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base7 SMAs","id":"a03ef0ea-5be9-4d40-952e-24789e77dbb6"}}},{"type":"Data Product","name":"Base11 SMAs","project":"Superalgos","id":"e582bbcc-1d03-4645-8320-acc12afd08cf","savedPayload":{"position":{"x":28120.567704942016,"y":30666.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base11 SMAs","id":"05fabbf9-7798-4a53-995e-53ae74bef3de"}}},{"type":"Data Product","name":"Base5 SMAs","project":"Superalgos","id":"53fe6df8-67cb-4c21-983d-875ea9b532db","savedPayload":{"position":{"x":28117.567704942016,"y":30709.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base5 SMAs","id":"2dcb55de-1673-409e-aa52-f51e7c7f8fa3"}}},{"type":"Data Product","name":"Base6 SMAs","project":"Superalgos","id":"eaaf75ea-2937-460f-87ee-990e632d6475","savedPayload":{"position":{"x":28135.567704942016,"y":30655.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base6 SMAs","id":"4ae22e54-cd02-4e2e-b638-1c5ea9a171ac"}}},{"type":"Data Product","name":"Base12 SMAs","project":"Superalgos","id":"8637a545-6fef-404b-b14f-8f4d11704e57","savedPayload":{"position":{"x":28181.567704942016,"y":30549.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base12 SMAs","id":"723d28e9-a010-48c5-bda0-43a4c2343ddf"}}},{"type":"Data Product","name":"Base30 SMAs","project":"Superalgos","id":"0ce01d0f-adf0-4fe5-961d-037ca8721a97","savedPayload":{"position":{"x":28223.567704942016,"y":30691.89369181134},"targetPosition":{"x":28135.567704942016,"y":30616.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Base30 SMAs","id":"607ebabd-9602-4e5c-803d-d4207dbd6794"}}}],"dataProductFolders":[],"id":"f6551bb8-06bd-4873-80b4-d233142c385b","savedPayload":{"position":{"x":28293.196133644633,"y":30919.89969389871},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Moving Average Convergence Diveregence (MACD)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"MACD 122609","project":"Superalgos","id":"9bc1f567-146e-474e-a12d-942e1f8b8876","savedPayload":{"position":{"x":27977.567704942016,"y":30613.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 122609","id":"6c0c9bf0-90af-4497-b4fb-49b5872b1119"}}},{"type":"Data Product","name":"MACD 031016","project":"Superalgos","id":"e8b6b822-9b76-4559-aefc-957751616417","savedPayload":{"position":{"x":28066.567704942016,"y":30615.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 031016","id":"d1482dc0-e9f1-47ba-b75e-961fa914a53a"}}},{"type":"Data Product","name":"MACD 081709","project":"Superalgos","id":"951914c1-dded-4dda-9f38-c5cc3359c4c0","savedPayload":{"position":{"x":28099.567704942016,"y":30629.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 081709","id":"683e6b29-9f82-4a8e-93eb-20ac0e81a750"}}},{"type":"Data Product","name":"MACD 245209","project":"Superalgos","id":"db2799ed-9bbc-4ba7-87b8-a33efbd513ba","savedPayload":{"position":{"x":28090.567704942016,"y":30512.89369181134},"targetPosition":{"x":28040.567704942016,"y":30604.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"MACD 245209","id":"47984765-8180-45cf-a9eb-f0a8b22d165d"}}}],"dataProductFolders":[],"id":"bdee55fc-b907-4378-acba-bd7795cfb8a0","savedPayload":{"position":{"x":28071.409847276,"y":30979.327150223482},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Relative Strenght Index (RSI)","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"RSI14","project":"Superalgos","id":"9c42c985-a07d-4892-8853-636d8fec20a0","savedPayload":{"position":{"x":28059.567704942016,"y":30670.89369181134},"targetPosition":{"x":28114.567704942016,"y":30712.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"RSI14","id":"e24248b9-90df-4b26-b5cc-0bac80efa0c7"}}}],"dataProductFolders":[],"id":"3b96186a-c4b9-4409-bf16-2ba82ec6d37c","savedPayload":{"position":{"x":27872.561702854644,"y":30864.522120513957},"targetPosition":{"x":28110.567704942016,"y":30681.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4e954d81-88ad-44b4-9ddf-5930e50d367e","savedPayload":{"position":{"x":28110.567704942016,"y":30681.89369181134},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Sparta","id":"9cfffc48-486a-48cb-b641-98c82e314d3a"}}},{"type":"Data Mine Products","name":"Alpha","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Stochastic","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Stoch-14-3-3","project":"Superalgos","id":"0ac3f528-2409-45ae-9654-e7dbfd3dbb98","savedPayload":{"position":{"x":27900.719560520658,"y":30610.088662101814},"targetPosition":{"x":27845.719560520658,"y":30534.088662101814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stoch-14-3-3","id":"393dc97b-76ee-409a-9b8f-f264ed652b0b"}}}],"dataProductFolders":[],"id":"8bf2e1e4-cb46-4216-8393-2a6124f3f1f2","savedPayload":{"position":{"x":27673.713558433286,"y":30749.71709080443},"targetPosition":{"x":27911.719560520658,"y":30567.088662101814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"44ad7330-2754-433c-85e7-67bac01affb2","savedPayload":{"position":{"x":27911.719560520658,"y":30567.088662101814},"targetPosition":{"x":28149.72556260803,"y":30384.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Alpha","id":"511bef1e-62d8-4ff9-8d87-15bd0d3d630c"}}}],"id":"6d7273da-5366-4fe3-9749-e643038abd7a","savedPayload":{"position":{"x":28149.72556260803,"y":30384.460233399197},"targetPosition":{"x":28188.883420274044,"y":30087.026774987055},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"9bc0aea4-0596-449c-91bd-4fb4cb672aa8","savedPayload":{"position":{"x":28188.883420274044,"y":30087.026774987055},"targetPosition":{"x":28228.041277940058,"y":29789.593316574912},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"db554581-93fa-465d-89f7-50f026e839d8","savedPayload":{"position":{"x":28228.041277940058,"y":29789.593316574912},"targetPosition":{"x":28267.19913560607,"y":29492.15985816277},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"32e7c122-fa5a-4d00-9d71-d54e890e32de","savedPayload":{"position":{"x":28267.19913560607,"y":29492.15985816277},"targetPosition":{"x":28306.356993272086,"y":29194.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":[{"type":"Project Trading Products","name":"Superalgos","project":"Superalgos","exchangeTradingProducts":[{"type":"Exchange Trading Products","name":"Binanceus","project":"Superalgos","marketTradingProducts":[{"type":"Market Trading Products","name":"Binanceus BTC/USDT","project":"Superalgos","tradingSessionReferences":[{"type":"Trading Session Reference","name":"Lightning Strike Backtesting Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631","savedPayload":{"position":{"x":24463.592002018682,"y":31980.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84","savedPayload":{"position":{"x":24313.592002018682,"y":31909.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960","savedPayload":{"position":{"x":24420.592002018682,"y":31952.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"7c580919-08ce-4aff-9e84-888fdf07caec","savedPayload":{"position":{"x":24281.592002018682,"y":31964.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"389797d4-8456-4258-9adf-246a6ba69016","savedPayload":{"position":{"x":24441.592002018682,"y":31984.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa","savedPayload":{"position":{"x":24417.592002018682,"y":31995.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe","savedPayload":{"position":{"x":24475.592002018682,"y":31901.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c","savedPayload":{"position":{"x":24306.592002018682,"y":32068.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"a606455e-f5ce-4535-b1af-6d9dd529f91c","savedPayload":{"position":{"x":24377.592002018682,"y":31972.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86","savedPayload":{"position":{"x":24475.592002018682,"y":31953.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"556e97e8-eba3-419d-869d-950cc99371da","savedPayload":{"position":{"x":24448.592002018682,"y":32071.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"3af0887b-ae23-4f57-b376-4a540fe13112","savedPayload":{"position":{"x":24454.592002018682,"y":32022.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a","savedPayload":{"position":{"x":24352.592002018682,"y":32024.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f","savedPayload":{"position":{"x":24398.592002018682,"y":32035.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"895feaf2-ae82-4b8e-ada6-780beab73ea9","savedPayload":{"position":{"x":24447.592002018682,"y":32101.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"b0961496-1af9-48cd-bbeb-ac5973192e78","savedPayload":{"position":{"x":24555.592002018682,"y":31897.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d","savedPayload":{"position":{"x":24541.592002018682,"y":31929.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"e298787f-b7f2-4334-931e-38b9441e43f9","savedPayload":{"position":{"x":24504.592002018682,"y":31961.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c","savedPayload":{"position":{"x":24444.592002018682,"y":31908.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"9fe11205-286a-4610-81ec-29cbc70d6075","savedPayload":{"position":{"x":24520.592002018682,"y":31974.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd","savedPayload":{"position":{"x":24483.592002018682,"y":31990.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77","savedPayload":{"position":{"x":24491.592002018682,"y":32003.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"e734b6be-ba40-468c-a94f-1153dc85e00c","savedPayload":{"position":{"x":24445.592002018682,"y":32089.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"9a973229-4d9d-45af-b5aa-64906a915f6e","savedPayload":{"position":{"x":24422.592002018682,"y":32032.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"56517fe9-64da-4404-83f3-005106bc1c0a","savedPayload":{"position":{"x":24412.592002018682,"y":32018.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"d00c76e7-4be0-4518-9892-a0f6df943951","savedPayload":{"position":{"x":24594.592002018682,"y":31949.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"b5154bc1-4311-4148-b396-5ebca1c62417","savedPayload":{"position":{"x":24511.592002018682,"y":32023.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"89edd698-1d64-4500-bcef-d13ea74bee1c","savedPayload":{"position":{"x":24421.592002018682,"y":32058.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"a0c29c57-0a20-4084-9697-142300f62f9c","savedPayload":{"position":{"x":24383.592002018682,"y":32063.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"aa0fe882-89a8-4811-8988-c589554afe9d","savedPayload":{"position":{"x":24294.592002018682,"y":32008.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"bbc65054-b22b-4cbb-816b-529672e2f498","savedPayload":{"position":{"x":24324.592002018682,"y":32032.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"776a3ece-8255-4e80-b60f-85bb818b561f","savedPayload":{"position":{"x":24340.592002018682,"y":32026.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"7593aaf9-0505-4b58-9920-235340ff2d2f","savedPayload":{"position":{"x":24325.592002018682,"y":32003.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd","savedPayload":{"position":{"x":24332.592002018682,"y":32039.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"faab4399-898b-4393-8c27-fa2f3109c60a","savedPayload":{"position":{"x":24307.592002018682,"y":32057.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157","savedPayload":{"position":{"x":24297.592002018682,"y":32133.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7","savedPayload":{"position":{"x":24389.592002018682,"y":31999.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"1a16bc12-581d-4626-846c-895f08e65fdf","savedPayload":{"position":{"x":24378.592002018682,"y":32060.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba","savedPayload":{"position":{"x":24433.592002018682,"y":31946.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049","savedPayload":{"position":{"x":24490.592002018682,"y":31966.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc","savedPayload":{"position":{"x":24570.592002018682,"y":32052.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed","savedPayload":{"position":{"x":24567.592002018682,"y":32057.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b","savedPayload":{"position":{"x":24545.592002018682,"y":31956.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642","savedPayload":{"position":{"x":24672.592002018682,"y":31889.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"97736b8e-761c-43f2-83bf-df8f5d41b963","savedPayload":{"position":{"x":24586.592002018682,"y":31971.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"9fc29be1-9393-4933-95d3-bebddd73c05e","savedPayload":{"position":{"x":24507.592002018682,"y":31875.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"b555388f-db93-4db1-91be-7772550afa70","savedPayload":{"position":{"x":24439.592002018682,"y":31926.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"41953904-e48c-4176-bf0f-09d133bc444c","savedPayload":{"position":{"x":24441.592002018682,"y":31883.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c","savedPayload":{"position":{"x":24463.592002018682,"y":31931.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"ac789224-64dc-4ff5-a316-2dfbb6347b8a","savedPayload":{"position":{"x":24487.592002018682,"y":31875.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"6e49b57f-8c94-410f-985b-82c126155b11","savedPayload":{"position":{"x":24693.592002018682,"y":31870.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba","savedPayload":{"position":{"x":24673.592002018682,"y":32018.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f","savedPayload":{"position":{"x":24656.592002018682,"y":31987.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"01491591-0462-453c-91e0-6da6f554a729","savedPayload":{"position":{"x":24536.592002018682,"y":31883.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2","savedPayload":{"position":{"x":24558.592002018682,"y":31830.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"2a4cb5a2-8e6a-4b14-816a-b8e0cce4dae5","savedPayload":{"position":{"x":24616.592002018682,"y":31921.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"39e122ca-cdc4-49a6-91a6-2f2c05f62ea0","savedPayload":{"position":{"x":24528.592002018682,"y":31946.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"363150a9-d4e7-4e2e-b327-89109935718c","savedPayload":{"position":{"x":24436.592002018682,"y":31978.531877463392},"targetPosition":{"x":24383.592002018682,"y":32012.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7","savedPayload":{"position":{"x":24383.592002018682,"y":32012.531877463392},"targetPosition":{"x":24343.592002018682,"y":31925.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"a5de30a4-022e-4f8a-afd0-3eb6d8600ae8","savedPayload":{"position":{"x":27706.356993272086,"y":30533.956884291958},"targetPosition":{"x":27706.356993272086,"y":30233.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Trading Session Reference","name":"Lightning Strike Live Trading Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"dc6cc4ef-4bd7-4837-8442-919462314db3","savedPayload":{"position":{"x":24040.07658106541,"y":32774.458634291004},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"776ed571-8321-47aa-8cfb-c8ebf565dace","savedPayload":{"position":{"x":24033.260548494378,"y":32904.51628344689},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"ded93703-a48d-44be-9703-878c28f949cd","savedPayload":{"position":{"x":23982.373237179447,"y":33024.39927619857},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a","savedPayload":{"position":{"x":23893.552407881933,"y":33119.64795433567},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027","savedPayload":{"position":{"x":23777.51116347094,"y":33178.77392155408},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2","savedPayload":{"position":{"x":23521.347601016434,"y":33165.348958112605},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65","savedPayload":{"position":{"x":23412.122389176475,"y":33094.417276175125},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"6a331de0-7872-4f86-bea0-6dd802c97921","savedPayload":{"position":{"x":23667.871774199913,"y":32820.15963806794},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"88dd680c-a81b-48ae-96ba-838281abfa35","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"74c10f36-887b-4233-81e5-abe365511bfa","savedPayload":{"position":{"x":23477.99935320648,"y":32860.51826703026},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"7a95a249-132d-4e0f-9182-cc7af45cacea","savedPayload":{"position":{"x":22959.25825209631,"y":32970.78009187916},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"7eca88a8-3724-4ca1-aa30-9227727eb834","savedPayload":{"position":{"x":23293.38569866695,"y":32800.533654476836},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2","savedPayload":{"position":{"x":23104.83496583686,"y":33026.66175662281},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d","savedPayload":{"position":{"x":22898.332847281992,"y":32921.44367184458},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125","savedPayload":{"position":{"x":22793.11476250377,"y":32714.941553289715},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70","savedPayload":{"position":{"x":22829.37044365631,"y":32486.0321914973},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"7236bd16-a6e3-48ac-89bf-dc8674b7e812","savedPayload":{"position":{"x":23163.497890226947,"y":32656.27862889963},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e","savedPayload":{"position":{"x":22942.973442347367,"y":32795.291108279984},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6","savedPayload":{"position":{"x":22818.117657046547,"y":32684.55024509317},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"1c6eed42-23aa-4174-aade-be29222acb8c","savedPayload":{"position":{"x":22753.675141305597,"y":32530.603279980434},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85","savedPayload":{"position":{"x":22762.409525702606,"y":32363.941297417976},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6","savedPayload":{"position":{"x":22842.590858287545,"y":32217.573747027367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"c451c035-5ece-451f-836f-b5334cb3f967","savedPayload":{"position":{"x":22978.338242782465,"y":32120.49051724367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"ce9593a8-3e87-43bb-88c7-af50cf651806","savedPayload":{"position":{"x":23123.13926126462,"y":32466.406207906195},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8be94a26-6821-48bb-8169-3eae2a1131af","savedPayload":{"position":{"x":23497.625336797584,"y":32486.0321914973},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"ba606f99-2ae5-44dc-b7db-399e657830e1","savedPayload":{"position":{"x":23295.861450927674,"y":32622.443323337528},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee","savedPayload":{"position":{"x":23182.53338349962,"y":32592.0771591904},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8","savedPayload":{"position":{"x":23084.13564726847,"y":32528.17692212845},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"dcff6f56-7646-4505-aa93-6682a110f3f2","savedPayload":{"position":{"x":23010.300098233878,"y":32436.997612574425},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5","savedPayload":{"position":{"x":22968.25427437787,"y":32327.464496631084},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7","savedPayload":{"position":{"x":22962.11391388994,"y":32210.299438849055},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"e4811789-fd94-49b0-9917-8d9d434f997d","savedPayload":{"position":{"x":22992.480078037068,"y":32096.971371421},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"029ff3a7-9c65-425f-855a-882df68fa05b","savedPayload":{"position":{"x":23056.38031509902,"y":31998.573635189852},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38","savedPayload":{"position":{"x":23147.559624653044,"y":31924.73808615526},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"7096a712-deb7-4adb-86e0-d688f24d2832","savedPayload":{"position":{"x":23335.059624653044,"y":32249.497612574425},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"c6fd6067-4b57-4860-ae3b-5668e4444490","savedPayload":{"position":{"x":23053.23606537805,"y":32137.53752778946},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"60f88096-7343-42d1-afad-83fecd22fb44","savedPayload":{"position":{"x":23012.87743641572,"y":31947.665106796027},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"9f939086-c934-4924-8353-776707a7cf10","savedPayload":{"position":{"x":22722.769389032703,"y":31897.43943333598},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"da5f279e-d387-43cf-80f4-fc114b9ac906","savedPayload":{"position":{"x":22710.63986411075,"y":31665.99431034305},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"367646bb-839a-4071-8305-6d26a647585d","savedPayload":{"position":{"x":22836.866902325462,"y":31471.62171671013},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9","savedPayload":{"position":{"x":23053.23606537805,"y":31388.56537672353},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"88643ab2-7859-45d4-b967-8681cf970828","savedPayload":{"position":{"x":23072.862048969153,"y":31763.051452256495},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf","savedPayload":{"position":{"x":22846.73394682318,"y":31574.500719426407},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4","savedPayload":{"position":{"x":22951.952031601402,"y":31367.99860087154},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710","savedPayload":{"position":{"x":23158.45415015627,"y":31262.780516093317},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91","savedPayload":{"position":{"x":23387.363511948686,"y":31299.036197245856},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"869369c1-13de-4086-ad40-77b3d54cfc36","savedPayload":{"position":{"x":23217.117074546357,"y":31633.163643816493},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90","savedPayload":{"position":{"x":23092.488032560257,"y":31388.56537672353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"88997c97-e77f-490e-9eb5-c7531beec132","savedPayload":{"position":{"x":23236.74305813746,"y":31258.67756828353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4","savedPayload":{"position":{"x":23426.615479130895,"y":31218.3189393212},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"9b064960-3829-441f-b955-334fb8324a53","savedPayload":{"position":{"x":23611.229133670426,"y":31278.303551874633},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1","savedPayload":{"position":{"x":23741.116942110428,"y":31422.558577451837},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"7f74f2e1-91b6-4d7a-87cb-1d6232a41876","savedPayload":{"position":{"x":23406.98949553979,"y":31592.805014854166},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"291949a0-847b-4b18-b3b4-191496fc38a9","savedPayload":{"position":{"x":23387.363511948686,"y":31967.29109038713},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ae78f4fc-6ee5-4ae4-9847-3bab0e2e51a6","savedPayload":{"position":{"x":23701.86497492822,"y":32171.530728517766},"targetPosition":{"x":24068.670325203395,"y":32093.563844461107},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2b0766-a3d5-47e1-acd8-7345af564388","savedPayload":{"position":{"x":24068.670325203395,"y":32093.563844461107},"targetPosition":{"x":24313.207225386846,"y":32041.58592175667},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"9ef30086-0c9d-47c2-8983-db5fc9a99583","savedPayload":{"position":{"x":27446.549372136753,"y":30383.956884291958},"targetPosition":{"x":27706.356993272086,"y":30233.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"026bab29-64d0-4d83-862c-446657efa101","savedPayload":{"position":{"x":27706.356993272086,"y":30233.956884291958},"targetPosition":{"x":27856.356993272086,"y":29974.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"f601d2a7-fada-477f-9b63-3ef7ed42d44a","savedPayload":{"position":{"x":27856.356993272086,"y":29974.149263156625},"targetPosition":{"x":28006.356993272086,"y":29714.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binanceus","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"691abc38-257f-462f-bee5-1cc51d77cea6","savedPayload":{"position":{"x":28006.356993272086,"y":29714.341642021293},"targetPosition":{"x":28156.356993272086,"y":29454.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"e4e268f3-a677-4f90-90a1-d87244e647e5","savedPayload":{"position":{"x":28156.356993272086,"y":29454.53402088596},"targetPosition":{"x":28306.356993272086,"y":29194.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":[{"type":"Project Learning Products","name":"Superalgos","project":"Superalgos","exchangeLearningProducts":[],"id":"071c1c13-0e4c-4649-b2eb-7dc422278961","savedPayload":{"position":{"x":27830.344989097342,"y":29559.98325715586},"targetPosition":{"x":28068.350991184714,"y":29377.354828453244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"2845a687-becc-4c3b-bc79-b2293ba876ba","savedPayload":{"position":{"x":28068.350991184714,"y":29377.354828453244},"targetPosition":{"x":28306.356993272086,"y":29194.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":28306.356993272086,"y":29194.726399750627},"targetPosition":{"x":28456.356993272086,"y":28934.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":28456.356993272086,"y":28934.918778615294},"targetPosition":{"x":28156.356993272086,"y":28934.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":28156.356993272086,"y":28934.918778615294},"targetPosition":{"x":28156.356993272086,"y":28934.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":[{"type":"Crypto Exchange","name":"Binanceus","config":"{\n \"codeName\": \"binanceus\",\n \"API\": [\n {\n \"method\": \"fetchTrades\",\n \"fetchType\": \"by Id\",\n \"fetchTradesMethod\": \"publicGetHistoricalTrades\",\n \"firstId\": \"f\"\n }\n ]\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"EUR\"} \n}","project":"Superalgos","assets":[{"type":"Asset","name":"Bitcoin","config":"{ \n\"codeName\": \"BTC\"\n}","project":"Superalgos","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa","savedPayload":{"position":{"x":19807.079365950267,"y":19153.325102172115},"targetPosition":{"x":19729.43365241951,"y":19443.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Asset","name":"Tether","config":"{ \n\"codeName\": \"USDT\"\n}","project":"Superalgos","id":"f110bfa0-bd5b-469b-a940-4524c8688136","savedPayload":{"position":{"x":20019.21140030623,"y":19365.45713652808},"targetPosition":{"x":19729.43365241951,"y":19443.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"95d2c30f-215b-486e-8119-f4eac0279575","savedPayload":{"position":{"x":19729.43365241951,"y":19443.102850058836},"targetPosition":{"x":19517.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"E"}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","code":"{ \n\"codeName\": \"Write here the code name of the Market here.\"\n}","project":"Superalgos","markets":[{"type":"Market","name":"BTC/USDT","config":"{ \n\"codeName\": \"BTC/USDT\"\n}","project":"Superalgos","baseAsset":{"type":"Market Base Asset","name":"Bitcoin","project":"Superalgos","id":"1017b30d-de1b-4212-991e-9fd0a5b6c814","savedPayload":{"position":{"x":20407.079365950267,"y":19577.589170884043},"targetPosition":{"x":20117.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},"quotedAsset":{"type":"Market Quoted Asset","name":"Tether","project":"Superalgos","id":"705c4a67-787a-48cd-a3dc-3a557438bf0b","savedPayload":{"position":{"x":20407.079365950267,"y":19732.880597945557},"targetPosition":{"x":20117.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}},"id":"9a867bf0-a71d-445c-b99a-75b60bbdce09","savedPayload":{"position":{"x":20117.301618063546,"y":19655.2348844148},"targetPosition":{"x":19817.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2fd80894-900e-44ac-a1a7-56c14124f7a1","savedPayload":{"position":{"x":19817.301618063546,"y":19655.2348844148},"targetPosition":{"x":19517.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b","savedPayload":{"position":{"x":19517.301618063546,"y":19655.2348844148},"targetPosition":{"x":19217.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""},"tutorial":{"status":"Done"}}}],"id":"e3879d63-6f8f-41a3-8ac3-0349c4361722","savedPayload":{"position":{"x":19217.301618063546,"y":19655.2348844148},"targetPosition":{"x":18917.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Untested","project":"Superalgos","exchanges":[{"type":"Crypto Exchange","name":"ACX","config":"{ \n\"codeName\": \"acx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ebcb522b-ae58-46d2-9d82-a9b0beec3976","savedPayload":{"position":{"x":17935.64382962515,"y":31014.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b2649588-27c6-442c-b179-f6d8817188b3","savedPayload":{"position":{"x":17954.64382962515,"y":31004.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9c21b2d-de21-43b5-8b48-51367a8c981c","savedPayload":{"position":{"x":19313.14497226101,"y":30565.583066825377},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"AOFEX","config":"{ \n\"codeName\": \"aofex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"623ef91b-04c0-4bd5-ac0d-b32c809be3ea","savedPayload":{"position":{"x":17973.64382962515,"y":30923.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"9d0b5855-59a6-4dda-9a4b-33d7a44d582e","savedPayload":{"position":{"x":17901.64382962515,"y":30994.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c2e9bb45-97c7-47e8-b13c-56946e673c53","savedPayload":{"position":{"x":19413.67778623216,"y":30647.89853748846},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bequant","config":"{ \n\"codeName\": \"bequant\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"b23c8adf-c880-48fd-b4af-4b4be86cf0e5","savedPayload":{"position":{"x":18059.64382962515,"y":31101.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"523bd94f-68f9-457e-91fd-806c1b95e98d","savedPayload":{"position":{"x":18006.64382962515,"y":31117.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e928d3e-a2c2-4341-aa2f-b753551c9479","savedPayload":{"position":{"x":19504.72140465123,"y":30740.600980501622},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bibox","config":"{ \n\"codeName\": \"bibox\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"13c1f22c-9a35-4d3f-b000-c96984fd6a2b","savedPayload":{"position":{"x":17995.64382962515,"y":31047.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3c6df49d-70c3-468a-bdd8-6768ce6d3a9d","savedPayload":{"position":{"x":17916.64382962515,"y":31018.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e5f9ee4d-77a3-48ae-b354-b2f6a97d5e47","savedPayload":{"position":{"x":19585.208424334218,"y":30842.603544479174},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BigONE","config":"{ \n\"codeName\": \"bigone\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"3f289513-c1c8-457c-b65a-8cf62b5f5eb5","savedPayload":{"position":{"x":17778.64382962515,"y":31071.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b365e73-1cee-496a-921f-121cb628a130","savedPayload":{"position":{"x":17798.64382962515,"y":31121.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fb9ee540-bf12-4dda-bf87-cb6b58fce649","savedPayload":{"position":{"x":19654.195208565325,"y":30952.710342620318},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance Jersey","config":"{ \n\"codeName\": \"binanceje\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0b979ea9-7a2d-4744-9517-2dfa632dfafc","savedPayload":{"position":{"x":17852.64382962515,"y":30989.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b9a4497d-20f1-4c61-9a79-444e0fe0ddf4","savedPayload":{"position":{"x":17924.64382962515,"y":30952.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2782350a-84a2-40ec-87c6-3c8043376a18","savedPayload":{"position":{"x":19710.872950374665,"y":31069.630473388454},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance US","config":"{ \n\"codeName\": \"binanceus\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"817ee1cf-b44c-4458-a9c4-a05a17ea0510","savedPayload":{"position":{"x":17943.64382962515,"y":30999.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c6694e9e-74dc-4c2e-9151-90f1d6631b45","savedPayload":{"position":{"x":17937.64382962515,"y":30989.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0b2b67d2-853b-470e-8b13-925956ad5621","savedPayload":{"position":{"x":19754.577155060477,"y":31191.993155151424},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitbank","config":"{ \n\"codeName\": \"bitbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eb6b6842-9bf7-450e-baa3-7a87541a1cf6","savedPayload":{"position":{"x":17955.64382962515,"y":31107.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6353ff56-759f-457d-81f3-fdb8ae5b3e83","savedPayload":{"position":{"x":17942.64382962515,"y":31183.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c9a96a7-ed12-4b3e-bb51-306a8da131f5","savedPayload":{"position":{"x":19784.79543078195,"y":31318.363797342816},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitBay","config":"{ \n\"codeName\": \"bitbay\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83b4e523-72a7-41ce-9363-fe0c799dcac1","savedPayload":{"position":{"x":17861.64382962515,"y":30965.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"966698f7-8a28-42d7-bb80-f7cd0601e44f","savedPayload":{"position":{"x":17823.64382962515,"y":31026.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8778eee5-97a2-4f9d-bd25-cd5a64ec6663","savedPayload":{"position":{"x":19801.173495885087,"y":31447.26081972472},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"33508b53-2769-4f3d-8c98-9fa37e5cbf5b","savedPayload":{"position":{"x":17888.64382962515,"y":31043.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4d4ad5a1-81a7-4f92-83db-99f57ce261bb","savedPayload":{"position":{"x":17975.64382962515,"y":30868.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c076027-683d-4778-8a6a-e60984980fdf","savedPayload":{"position":{"x":19803.51933253116,"y":31577.173022561386},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8fc7f955-5c81-446c-bbeb-205988bf1fc0","savedPayload":{"position":{"x":17830.64382962515,"y":31051.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d5ba38e9-3282-4634-b922-16532c71f426","savedPayload":{"position":{"x":17819.64382962515,"y":31118.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f3114102-a73c-4086-9594-5888ef1ab4ec","savedPayload":{"position":{"x":19791.80543793031,"y":31706.577304054405},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitforex","config":"{ \n\"codeName\": \"bitforex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"698e5e38-ad73-4cb6-b7f6-2b69913faff9","savedPayload":{"position":{"x":17897.64382962515,"y":30956.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"f0142bd4-1b63-4d12-a4b7-e150d0da197f","savedPayload":{"position":{"x":18020.64382962515,"y":31021.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"499a5a3b-7871-4c95-9b2e-d58d4d9e2392","savedPayload":{"position":{"x":19766.169146786622,"y":31833.956517318737},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitkk","config":"{ \n\"codeName\": \"bitkk\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"efbb916c-780b-447f-a4c2-df68570d4ee1","savedPayload":{"position":{"x":17931.64382962515,"y":30937.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0d829516-81d9-46a5-9861-7d94cc89455d","savedPayload":{"position":{"x":17951.64382962515,"y":30912.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ded39740-3c93-4fda-bb9c-6ac75d2109f4","savedPayload":{"position":{"x":19726.911021174266,"y":31957.817257542785},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMart","config":"{ \n\"codeName\": \"bitmart\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"10374855-6b4a-460b-9c95-70072ac00315","savedPayload":{"position":{"x":17907.64382962515,"y":30901.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3aded60c-4061-48ff-ad33-212c965b5c43","savedPayload":{"position":{"x":17829.64382962515,"y":30925.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c7ed52a7-895b-46f1-a745-35954d8bcfc6","savedPayload":{"position":{"x":19674.491326722004,"y":32076.707370794375},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMax","config":"{ \n\"codeName\": \"bitmax\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8a042d0d-7a7a-4a76-889e-42d8642404f4","savedPayload":{"position":{"x":17944.64382962515,"y":31046.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0c4fcc48-51e6-4ff2-925f-405cda6d1122","savedPayload":{"position":{"x":17898.64382962515,"y":31024.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fc6a9048-ab8c-48f9-91ae-6c95c28714b0","savedPayload":{"position":{"x":19609.524636419505,"y":32189.2329791979},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMEX","config":"{ \n\"codeName\": \"bitmex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f7636e2b-354a-4217-894b-5e26eddc0c2a","savedPayload":{"position":{"x":17894.64382962515,"y":30934.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6eb2ddd1-6d06-456c-b4e0-7df56ba182e6","savedPayload":{"position":{"x":17823.64382962515,"y":30834.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1e2f1dd0-ebf1-4485-83d8-7723a9e3e714","savedPayload":{"position":{"x":19532.77262531095,"y":32294.07482287797},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bittrex","config":"{ \n\"codeName\": \"bittrex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"88d4ef94-f030-42df-9115-69d9611317b1","savedPayload":{"position":{"x":17839.64382962515,"y":31009.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"7fe8234d-9a39-4b28-bf98-43b4fdb57ee5","savedPayload":{"position":{"x":17878.64382962515,"y":31045.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f598f002-8fc5-491f-888e-07d017ea83c6","savedPayload":{"position":{"x":19445.135140551556,"y":32390.003727075255},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bit-Z","config":"{ \n\"codeName\": \"bitz\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0a22e02b-7d2e-4955-9cfc-ed7d95f0c9a0","savedPayload":{"position":{"x":17751.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"298b45af-b73d-4cd5-848a-97de7b857569","savedPayload":{"position":{"x":17944.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6cc10926-fe41-43be-887b-fa8aba1c7377","savedPayload":{"position":{"x":19347.639651522415,"y":32475.89501309667},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC-Alpha","config":"{ \n\"codeName\": \"btcalpha\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"263e3b9c-8fdd-4376-b53b-87f32d0f5898","savedPayload":{"position":{"x":17904.64382962515,"y":30922.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"804603e1-3e0f-4219-a9b7-ee27810d4f07","savedPayload":{"position":{"x":17829.64382962515,"y":30977.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"30e5485f-213b-435b-a670-07b76cfe5cae","savedPayload":{"position":{"x":19241.429203691412,"y":32550.741684144767},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC Markets","config":"{ \n\"codeName\": \"btcmarkets\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"fcb3b880-0852-4d93-8714-67373f9dca16","savedPayload":{"position":{"x":17911.64382962515,"y":31036.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"953d8eff-0b2e-4b07-8635-393fddae0c9d","savedPayload":{"position":{"x":18025.64382962515,"y":31127.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ac2fda42-95ca-404a-8dd2-72bff0ff5a0f","savedPayload":{"position":{"x":19127.749017450227,"y":32613.66623143447},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Buda","config":"{ \n\"codeName\": \"buda\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"27f3573d-e1f0-473f-9bfd-f9198e7240a0","savedPayload":{"position":{"x":17945.64382962515,"y":30937.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ddc0981-4e45-42f3-ae11-f5b136b2bc3d","savedPayload":{"position":{"x":17783.64382962515,"y":31008.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"90fe3d74-662e-4fac-aff3-f41990b61ccf","savedPayload":{"position":{"x":19007.931889043757,"y":32663.930922181273},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BW","config":"{ \n\"codeName\": \"bw\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"457616cd-25f9-4ad3-8c18-6331859dd42e","savedPayload":{"position":{"x":17890.64382962515,"y":31014.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8c1f9aa2-4253-4129-a533-e515644ddb38","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d72db90c-d572-4cbb-8348-e3cc485d8e86","savedPayload":{"position":{"x":18883.38256475272,"y":32700.94644884361},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bybit","config":"{ \n\"codeName\": \"bybit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"18fdf7c8-03c4-4f81-a88e-de97589765e1","savedPayload":{"position":{"x":17803.64382962515,"y":31059.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a62b2603-ac6f-4b6e-9541-86daf32027b1","savedPayload":{"position":{"x":17847.64382962515,"y":31104.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"516c3831-456b-4d17-b0a0-6a363ba2ddb2","savedPayload":{"position":{"x":18755.561271527895,"y":32724.27883821499},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ByteTrade","config":"{ \n\"codeName\": \"bytetrade\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e7a1e531-5a9e-466e-b98d-672de39eed3a","savedPayload":{"position":{"x":18088.64382962515,"y":31024.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"edafaba7-fd82-4d9f-b3f7-5d1c01c56599","savedPayload":{"position":{"x":17941.64382962515,"y":30943.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45e2306f-03e8-4d17-a73a-72c11dd14e78","savedPayload":{"position":{"x":18625.966597164217,"y":32733.65453936303},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CEX.IO","config":"{ \n\"codeName\": \"cex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9de19f0a-5824-4e42-af00-484b64421dc3","savedPayload":{"position":{"x":17890.64382962515,"y":31049.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"39db01bc-0cea-422f-b9e9-7d84e3f5446d","savedPayload":{"position":{"x":17918.64382962515,"y":31105.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"346bfc30-e32a-453a-bdc6-0ead48221581","savedPayload":{"position":{"x":18496.117920729066,"y":32728.96363076407},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Prime","config":"{ \n\"codeName\": \"coinbaseprime\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"73cabd8d-9308-49ed-b544-44f785ee7d38","savedPayload":{"position":{"x":17867.64382962515,"y":30962.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"31bd1360-f0c5-4d70-876a-b152f7cedfd7","savedPayload":{"position":{"x":17960.64382962515,"y":30864.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a8281db-6ace-4186-8cfb-cd249c4af48b","savedPayload":{"position":{"x":18367.537599231866,"y":32710.26110903248},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Pro","config":"{ \n\"codeName\": \"coinbasepro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a29d6e1a-a94e-4b6b-8741-e9af6e4762f4","savedPayload":{"position":{"x":17788.64382962515,"y":30897.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"10cd9004-0088-4bc0-8fe6-b937f1bb311b","savedPayload":{"position":{"x":17865.64382962515,"y":30918.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4242da4b-a67e-44d8-8a19-b1c2f078c94c","savedPayload":{"position":{"x":18241.733119380056,"y":32677.766244135688},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CoinEx","config":"{ \n\"codeName\": \"coinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"af78f796-60e5-4794-87b8-772c7bc74be1","savedPayload":{"position":{"x":18043.64382962515,"y":31069.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d351e6d9-36eb-4d0e-aca5-94429bbb23a3","savedPayload":{"position":{"x":18094.64382962515,"y":31090.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"62ad0961-6bdf-4a4a-a340-610816742d0a","savedPayload":{"position":{"x":18120.179423675774,"y":32631.860008654276},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"COSS","config":"{ \n\"codeName\": \"coss\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e6315232-c6b1-4e25-aade-7bc7ba9ba6ac","savedPayload":{"position":{"x":17787.64382962515,"y":30984.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b1e8451f-09a2-47b0-add3-cf9c35c487bb","savedPayload":{"position":{"x":17829.64382962515,"y":31095.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"695029de-7f61-45bb-aa4c-c6d51e6369ed","savedPayload":{"position":{"x":18004.301618063546,"y":32573.08061122679},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CREX24","config":"{ \n\"codeName\": \"crex24\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c5e12f4a-fb26-40d3-9e70-751b55018e74","savedPayload":{"position":{"x":17910.64382962515,"y":31024.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"00cb629e-bad4-4c6e-8abb-499cad3992f4","savedPayload":{"position":{"x":17938.64382962515,"y":31054.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07a7ec7c-273e-4675-8d8d-21ab8514a1f0","savedPayload":{"position":{"x":17895.458263866083,"y":32502.117186545547},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Deribit","config":"{ \n\"codeName\": \"deribit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f0b2354b-89e3-4eca-b051-664a3b8283f6","savedPayload":{"position":{"x":17862.64382962515,"y":30844.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ae1f824-82a8-4796-a2d5-3d2358d8089f","savedPayload":{"position":{"x":17912.64382962515,"y":31024.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"21971815-4248-45df-8e04-20b9a5a83f06","savedPayload":{"position":{"x":17794.92544989493,"y":32419.801715882462},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DigiFinex","config":"{ \n\"codeName\": \"digifinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e583c93e-9a44-4e0d-acb7-56d7e00a555a","savedPayload":{"position":{"x":17954.64382962515,"y":30992.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8917c7c0-b420-4d4f-a35a-c0fc6870f0de","savedPayload":{"position":{"x":18052.64382962515,"y":30972.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7d56781-0c51-4ec1-95fd-bf4dc8c00352","savedPayload":{"position":{"x":17703.88183147586,"y":32327.0992728693},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DSX","config":"{ \n\"codeName\": \"dsx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"d672ab56-cd32-4ff5-8fc5-3733262aeccb","savedPayload":{"position":{"x":17916.64382962515,"y":31106.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3731a7b5-ba9d-483e-bb41-abf3ae0232c6","savedPayload":{"position":{"x":17878.64382962515,"y":30946.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4c543abc-7372-4701-bc58-107578d45c25","savedPayload":{"position":{"x":17623.394811792878,"y":32225.09670889175},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoin","config":"{ \n\"codeName\": \"fcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a97d578c-6d7f-403c-8294-18aacf14abd8","savedPayload":{"position":{"x":17893.64382962515,"y":30953.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"442c3834-482e-4928-9255-8ac859ae012e","savedPayload":{"position":{"x":17905.64382962515,"y":30896.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ddedcbd-07cb-4928-91b3-348f47118391","savedPayload":{"position":{"x":17554.408027561767,"y":32114.989910750606},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoinJP","config":"{ \n\"codeName\": \"fcoinjp\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"4a8a9810-6df6-451a-ab26-22bd7e7be85a","savedPayload":{"position":{"x":17930.64382962515,"y":31129.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"138ab40c-18ca-4a11-9709-0baa040873e6","savedPayload":{"position":{"x":18007.64382962515,"y":31122.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"982627ea-df84-4ba9-9219-612fbe1e4276","savedPayload":{"position":{"x":17497.730285752426,"y":31998.069779982467},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FTX","config":"{ \n\"codeName\": \"ftx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"20c0a4f5-bdb9-46cc-af7e-2111964551e3","savedPayload":{"position":{"x":17886.64382962515,"y":30940.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"75c99a0b-d3c9-4073-9283-d33e539c36bb","savedPayload":{"position":{"x":17992.64382962515,"y":31061.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0c0bcf5c-2774-423e-9fcf-c512b38dd06d","savedPayload":{"position":{"x":17454.026081066615,"y":31875.707098219504},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gate.io","config":"{ \n\"codeName\": \"gateio\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"71a15089-9d40-4726-9a41-37d406064164","savedPayload":{"position":{"x":17930.64382962515,"y":30993.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c025e976-c2c6-49de-81ec-48e2f737b412","savedPayload":{"position":{"x":17925.64382962515,"y":31053.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4028289-4cdb-4da0-90e6-5f93328b8e03","savedPayload":{"position":{"x":17423.807805345143,"y":31749.336456028108},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gemini","config":"{ \n\"codeName\": \"gemini\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9eb15872-8d15-4086-9920-46909eb5f9e7","savedPayload":{"position":{"x":17951.64382962515,"y":30901.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a84dcf06-57c6-47d7-97a0-9f03f3af8b34","savedPayload":{"position":{"x":18045.64382962515,"y":30891.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"58bf8247-baef-4ea6-a483-7ed8f0ba5043","savedPayload":{"position":{"x":17407.429740242005,"y":31620.439433646203},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1632c520-fa79-442f-b33b-430cb1356de6","savedPayload":{"position":{"x":17809.64382962515,"y":31086.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"576d1666-dbd3-4914-9fe2-fa05bdf72eea","savedPayload":{"position":{"x":17840.64382962515,"y":31148.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8384fa0b-854c-4c23-846e-a5da0179a738","savedPayload":{"position":{"x":17405.083903595932,"y":31490.527230809537},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9a29cb9e-ee8d-4315-8532-eef82224b84a","savedPayload":{"position":{"x":17838.64382962515,"y":30922.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"badd79e7-1e21-4dc3-bfa7-8dfb4a6c6267","savedPayload":{"position":{"x":17920.64382962515,"y":30944.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"09c634c2-5aba-49c5-80bc-4fd4175e7f0c","savedPayload":{"position":{"x":17416.79779819678,"y":31361.12294931652},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Pro","config":"{ \n\"codeName\": \"huobipro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"86caa38c-5bdf-40e4-b27b-8d8b64319575","savedPayload":{"position":{"x":18071.64382962515,"y":31171.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"001225af-c715-4566-9502-f8f0ac1c4531","savedPayload":{"position":{"x":18040.64382962515,"y":31019.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"967c3914-a76d-4389-9c7e-9c258ae683bd","savedPayload":{"position":{"x":17442.43408934047,"y":31233.743736052187},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Russia","config":"{ \n\"codeName\": \"huobiru\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9b7b32d6-a42e-44bb-8065-5aa32b1e844b","savedPayload":{"position":{"x":17980.64382962515,"y":31034.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8d74201c-33cd-4e12-8920-b08d0ef97572","savedPayload":{"position":{"x":17992.64382962515,"y":31105.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6f97bb5c-8d85-43ee-86a1-33e22cdfbb5e","savedPayload":{"position":{"x":17481.692214952825,"y":31109.882995828142},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KKEX","config":"{ \n\"codeName\": \"kkex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"daa4e07a-1cd8-4d92-8004-2eabfaa62f77","savedPayload":{"position":{"x":17924.64382962515,"y":31038.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"cb64951f-d984-4f51-a751-166a316084f3","savedPayload":{"position":{"x":17945.64382962515,"y":31156.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"16ae95ce-796f-4f2b-942c-f98dcbf9cf4b","savedPayload":{"position":{"x":17534.11190940509,"y":30990.99288257655},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Kraken","config":"{ \n\"codeName\": \"kraken\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"747af60f-c8b9-4377-aa6c-172d4137ea23","savedPayload":{"position":{"x":17854.64382962515,"y":31008.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c75f7d97-9dc2-4d3e-89eb-f8a3d5f16368","savedPayload":{"position":{"x":17916.64382962515,"y":30872.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"644efe9c-597a-4ddf-9e28-b33fb3b62d3e","savedPayload":{"position":{"x":17599.078599707587,"y":30878.467274173025},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KuCoin","config":"{ \n\"codeName\": \"kucoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"01ca3037-4ed3-499e-ad6b-e14ca1d4a51f","savedPayload":{"position":{"x":17919.64382962515,"y":30949.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b3c4ce0-98b1-4d46-bd02-6cf44c3dd686","savedPayload":{"position":{"x":17998.64382962515,"y":30978.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d79bc720-68e1-4771-a66a-bcffa30639d3","savedPayload":{"position":{"x":17675.830610816145,"y":30773.625430492953},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"LBank","config":"{ \n\"codeName\": \"lbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"def3f9d0-f09e-4e09-8b6d-a4c322a4384b","savedPayload":{"position":{"x":17877.64382962515,"y":31024.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"53eac3c1-96d6-4cb1-b54d-f3f174eaf733","savedPayload":{"position":{"x":17764.64382962515,"y":31036.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cb2558d6-dab0-4f35-b83f-7cfc161b3d4f","savedPayload":{"position":{"x":17763.468095575536,"y":30677.69652629567},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Mercado Bitcoin","config":"{ \n\"codeName\": \"mercado\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83ab2c39-e844-496f-bebb-7b8607428902","savedPayload":{"position":{"x":17849.64382962515,"y":31081.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d69e722e-c71a-462a-8bbd-d3482d0eab21","savedPayload":{"position":{"x":17771.64382962515,"y":30887.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5002072e-145c-4aeb-a611-3e0e4c60ee5d","savedPayload":{"position":{"x":17860.963584604677,"y":30591.805240274254},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKCoin","config":"{ \n\"codeName\": \"okcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1e4dd5c8-0545-4698-8695-c985880243a3","savedPayload":{"position":{"x":17921.64382962515,"y":31043.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0e188cae-9764-4963-a78b-e5d7ef272522","savedPayload":{"position":{"x":18005.64382962515,"y":30891.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1f860b4b-2893-4a51-8649-19c47d494a37","savedPayload":{"position":{"x":17967.17403243568,"y":30516.958569226157},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKEX","config":"{ \n\"codeName\": \"okex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"7f618566-3d10-4c3c-90b2-7541a5146eeb","savedPayload":{"position":{"x":17770.64382962515,"y":31094.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"21205576-5d12-452c-814f-eb56182162ae","savedPayload":{"position":{"x":17794.64382962515,"y":31173.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"aa0edec0-8b27-4f94-abce-1e437ce5aba6","savedPayload":{"position":{"x":18080.854218676865,"y":30454.034021936455},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"RightBTC","config":"{ \n\"codeName\": \"rightbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ade372e9-5070-4fa9-843e-57732c4106c3","savedPayload":{"position":{"x":17999.64382962515,"y":30964.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b63d440e-4501-475c-b8a6-2b9a144e32a1","savedPayload":{"position":{"x":17984.64382962515,"y":30901.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c20cd9e1-52a0-4d17-b90c-e9d5b63315ce","savedPayload":{"position":{"x":18200.67134708334,"y":30403.76933118965},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"STEX","config":"{ \n\"codeName\": \"stex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f1d65161-4922-4a1e-ac98-df1a842347a7","savedPayload":{"position":{"x":17872.64382962515,"y":31001.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c313b2c6-6154-4a9a-b826-fd99cc500cd9","savedPayload":{"position":{"x":17888.64382962515,"y":31186.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0ea23137-3c65-4de1-9772-6ac1b65196e8","savedPayload":{"position":{"x":18325.220671374373,"y":30366.753804527314},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TideBit","config":"{ \n\"codeName\": \"tidebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c92318bd-8b2d-489b-b8e8-cf30fb63286e","savedPayload":{"position":{"x":17981.64382962515,"y":31021.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"83bca3ec-fc1c-435c-b5fe-b1cf92463fd1","savedPayload":{"position":{"x":18051.64382962515,"y":31072.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5563c310-701a-4c1e-8155-87c08c927ce3","savedPayload":{"position":{"x":18453.041964599197,"y":30343.421415155935},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TimeX","config":"{ \n\"codeName\": \"timex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"5c004b5f-eec4-414f-8d01-d9b3fddeee9e","savedPayload":{"position":{"x":17892.64382962515,"y":30973.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"59a33add-d0e9-4ae1-8a01-f1e0ed09cb61","savedPayload":{"position":{"x":17911.64382962515,"y":30878.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"27d69fa7-b561-4986-8c0d-1b374e7e1bf1","savedPayload":{"position":{"x":18582.63663896287,"y":30334.045714007894},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TOP.Q","config":"{ \n\"codeName\": \"topq\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eafef6a3-eed2-470e-a15c-aa4c10001cd2","savedPayload":{"position":{"x":17818.64382962515,"y":31115.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"2d5eb813-ceb6-40cd-8682-7205596bb8b5","savedPayload":{"position":{"x":17759.64382962515,"y":31188.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8fdf13d8-e8d2-4ef4-8b34-f492a25d753a","savedPayload":{"position":{"x":18712.485315398026,"y":30338.736622606855},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Upbit","config":"{ \n\"codeName\": \"upbit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f456fec2-cee6-4f0c-b865-1188088879c9","savedPayload":{"position":{"x":17919.64382962515,"y":30973.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"947c1ca0-bff9-4372-b153-40054e29b705","savedPayload":{"position":{"x":17921.64382962515,"y":31014.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"74e57ecd-3394-42b4-b2c4-6f216f7e41db","savedPayload":{"position":{"x":18841.065636895226,"y":30357.439144338445},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"WhiteBit","config":"{ \n\"codeName\": \"whitebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c16eae45-a568-4b2e-b064-4431bdf34c24","savedPayload":{"position":{"x":17767.64382962515,"y":30899.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"dfdf793f-4ba6-4215-a325-323c0f223553","savedPayload":{"position":{"x":17920.64382962515,"y":31004.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"467ece1e-d1d0-4a11-ae7a-d0e22cd4eba5","savedPayload":{"position":{"x":18966.87011674703,"y":30389.934009235236},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ZB","config":"{ \n\"codeName\": \"zb\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"db206cbd-a587-4e8e-acbe-6581ad3b5cc4","savedPayload":{"position":{"x":17855.64382962515,"y":31027.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"1dd658c5-7755-44b7-85f0-9bcd787762a0","savedPayload":{"position":{"x":17789.64382962515,"y":31044.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07df07e8-39a8-4fbc-a0c8-150f20b6ac59","savedPayload":{"position":{"x":19088.423812451314,"y":30435.840244716648},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51f64e29-e3ab-4683-a5de-f397fbf94260","savedPayload":{"position":{"x":18617.301618063546,"y":20174.850126685462},"targetPosition":{"x":18917.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Testing Queue","project":"Superalgos","exchanges":[],"id":"895ce4b1-4890-4216-89ba-a012181d2546","savedPayload":{"position":{"x":18767.301618063546,"y":19395.427263279467},"targetPosition":{"x":18917.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"signalsProviders":[],"id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d","savedPayload":{"position":{"x":18917.301618063546,"y":19655.2348844148},"targetPosition":{"x":18917.301618063546,"y":19655.2348844148},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}},{"type":"Charting Space","name":"New Charting Space","project":"Superalgos","viewport":{"type":"Viewport","name":"New Viewport","config":"{\"zoom\":\"0.00\"}","project":"Superalgos","id":"01713f1d-91b8-44f9-9c5d-a0c12fd09037","savedPayload":{"position":{"x":22918.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"frame":{"position":{"x":245.62500000000045,"y":440.12500000000006}}}},"projectDashboards":[{"type":"Project Dashboards","name":"Superalgos","project":"Superalgos","dashboards":[{"type":"Dashboard","name":"Testing Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Example Custom Chart","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-01-01T00:00:00.000Z\",\n \"toDate\": \"2021-01-23T23:59:59.999Z\"\n}","project":"Superalgos","id":"691e2b6e-6b13-4a94-a8cd-15bbad6e8d2b","savedPayload":{"position":{"x":21942.434665834,"y":29653.977644897117},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 3744.3087,\n \"maxValue\": 42369.5\n}","project":"Superalgos","id":"d1c91955-e558-4ffe-a349-895405dd7475","savedPayload":{"position":{"x":21837.45195066214,"y":29705.749390696466},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\"value\":\"24-hs\"}","project":"Superalgos","id":"69064a57-bfa3-4a7a-a597-55887057befb","savedPayload":{"position":{"x":21720.64837946537,"y":29713.405101221888},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"Indicators","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"550e7d96-2b55-4cb5-91d5-6fbceb32cbb8","savedPayload":{"position":{"x":21459.806237131383,"y":30535.58688508041},"targetPosition":{"x":21459.806237131383,"y":30235.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}}],"layerFolders":[],"id":"a9026e9d-f9c2-4509-9a75-862421b5c70b","savedPayload":{"position":{"x":21459.806237131383,"y":30235.58688508041},"targetPosition":{"x":21459.806237131383,"y":29935.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"ea7115b6-1324-43dc-8fa2-90c12c2c2c48","savedPayload":{"position":{"x":21049.99861599605,"y":30345.394506215744},"targetPosition":{"x":21199.99861599605,"y":30085.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d16e7e1-8676-4041-a1b1-0172e023558a","savedPayload":{"position":{"x":20899.99861599605,"y":30085.58688508041},"targetPosition":{"x":21199.99861599605,"y":30085.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"b7fed612-b218-4378-bb3f-6c90fb947449","savedPayload":{"position":{"x":21199.99861599605,"y":30085.58688508041},"targetPosition":{"x":21459.806237131383,"y":29935.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa6b9a8f-d5f4-4f60-b3fa-bdf957806bfb","savedPayload":{"position":{"x":21459.806237131383,"y":29935.58688508041},"targetPosition":{"x":21609.806237131383,"y":29675.779263945078},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"6a4b0ce0-7e88-4fe3-b9b5-2116d81b2da0","savedPayload":{"position":{"x":21609.806237131383,"y":29675.779263945078},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fbbb590b-c94d-4625-94e2-bc4bfa2ab6f9","savedPayload":{"position":{"x":17117.615314676776,"y":27603.533941128822},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab219d3d-1f44-4448-b5f9-f9f6ace6caea","savedPayload":{"position":{"x":17051.16747388602,"y":27764.15503654623},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"7dd6f9d6-3840-4a95-a9c9-9445a1335868","savedPayload":{"position":{"x":16933.846232243683,"y":27892.241373813282},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371bfe04-1b2d-4d60-ae70-03a2f7522466","savedPayload":{"position":{"x":16779.824555577114,"y":27972.466666709206},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"7c580919-08ce-4aff-9e84-888fdf07caec"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f1dea1ef-69f3-4b64-8586-ec43aa281cde","savedPayload":{"position":{"x":16607.980005705944,"y":27995.20904027392},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"389797d4-8456-4258-9adf-246a6ba69016"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eca94344-450b-4dc9-ad80-8e202b6e0517","savedPayload":{"position":{"x":16468.146686869968,"y":28016.33671006015},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4c54659-0b38-4faf-9827-47976eb9cca7","savedPayload":{"position":{"x":16286.534133073324,"y":27862.805158861436},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"e82d97df-5b25-4967-b2b4-da065c5d3ad9","savedPayload":{"position":{"x":16186.118842172375,"y":27726.349378357005},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c"}}}],"layerFolders":[],"id":"851d853d-e2d7-4138-b5fd-563f1f844f64","savedPayload":{"position":{"x":16629.455267522357,"y":27495.510435539556},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"dc84698a-bce4-4979-9aca-80661b054191","savedPayload":{"position":{"x":16413.05839477738,"y":27900.48601747122},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d3456e5b-0438-4273-a3ce-6b1d60573c33","savedPayload":{"position":{"x":15940.04282322282,"y":27710.982017672217},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"556e97e8-eba3-419d-869d-950cc99371da"}}}],"layerFolders":[],"id":"6ad8b449-785f-40cc-afc0-19c68b508c17","savedPayload":{"position":{"x":16372.806838862034,"y":27461.836330732353},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"4b8d055f-0c36-40a6-af78-5faf9b34b72c","savedPayload":{"position":{"x":16011.911411221576,"y":27821.709717793714},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac24a200-397f-4d7c-9916-581328c74f22","savedPayload":{"position":{"x":15678.683136179856,"y":27381.4342703589},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f"}}}],"layerFolders":[],"id":"acf27818-08f1-4c0d-9cc9-30c38ba892fb","savedPayload":{"position":{"x":16167.428268555628,"y":27304.34657839513},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b9eeeeb3-43db-4d4f-9f28-f42e947494f9","savedPayload":{"position":{"x":15829.8024827204,"y":27504.536838373795},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"b0961496-1af9-48cd-bbeb-ac5973192e78"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eda9462a-9688-42cf-ae97-b3dfd02c718c","savedPayload":{"position":{"x":15609.804663880679,"y":27268.796716857654},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"1481d280-6112-4d0d-8a48-3fe4e65efc9d","savedPayload":{"position":{"x":15542.751172927,"y":26994.51154740736},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"e298787f-b7f2-4334-931e-38b9441e43f9"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2f579332-aa55-4e51-bbf4-370614838fd3","savedPayload":{"position":{"x":15731.678465146957,"y":26701.21391555524},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c"}}}],"layerFolders":[],"id":"5b4e1c43-9fb7-439f-9ca9-e600bd41718d","savedPayload":{"position":{"x":16068.487948353533,"y":27065.178022212927},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be00b86a-5b53-4dbd-ab79-7d135115a05e","savedPayload":{"position":{"x":15729.681254722265,"y":27141.496363567436},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3870b052-156c-4f10-9658-3fe3df4baf10","savedPayload":{"position":{"x":15655.766921038878,"y":26926.520781829942},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"5fa754c9-ffc3-499c-b566-0031b276cb73","savedPayload":{"position":{"x":15602.003963464067,"y":26726.16283946371},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"e734b6be-ba40-468c-a94f-1153dc85e00c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"15ec260c-02f5-46e0-853b-6e751175dac7","savedPayload":{"position":{"x":15694.595933594896,"y":26519.078790508484},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"9a973229-4d9d-45af-b5aa-64906a915f6e"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be57de60-d843-4bc8-bcb8-d8be27ceffbb","savedPayload":{"position":{"x":15860.599521408476,"y":26370.959361875106},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"56517fe9-64da-4404-83f3-005106bc1c0a"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"407c7816-701b-43bf-92d8-cc728af78f0e","savedPayload":{"position":{"x":16074.514663407172,"y":26309.4257023683},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"d00c76e7-4be0-4518-9892-a0f6df943951"}}}],"layerFolders":[],"id":"ac1ed18a-243b-4211-bb24-83bbfc20cd0a","savedPayload":{"position":{"x":16102.435022890473,"y":26808.60560739891},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"41428787-ca89-4ab9-a5cc-29e66e7c486d","savedPayload":{"position":{"x":16563.94253388532,"y":27000.12691029475},"targetPosition":{"x":16959.887378913278,"y":26696.345955873618},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"153096ea-a48c-4ed5-9f8e-49eafa7a779c","savedPayload":{"position":{"x":16959.887378913278,"y":26696.345955873618},"targetPosition":{"x":17356.087169245202,"y":26392.358194020195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"918bdf6d-3cfe-4c8b-894d-320cc72aef70","savedPayload":{"position":{"x":17356.087169245202,"y":26392.358194020195},"targetPosition":{"x":17752.58716757543,"y":26088.09403049708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"f0cc2b79-bae6-4441-a456-9fda5962a74f","savedPayload":{"position":{"x":21521.80023504401,"y":29598.600071512363},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"49761e84-d6c2-4c25-9604-fb2ddf93e510","savedPayload":{"position":{"x":16656.868785422477,"y":26432.858992462687},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"a0c29c57-0a20-4084-9697-142300f62f9c"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"622a88bb-151c-48ef-bb99-e093498bf002","savedPayload":{"position":{"x":16532.079378960796,"y":26407.941535439437},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"aa0fe882-89a8-4811-8988-c589554afe9d"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fba6a9fb-5e9a-46dd-aa2b-33950f0ec9f1","savedPayload":{"position":{"x":16422.17772780151,"y":26345.322337891994},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"bbc65054-b22b-4cbb-816b-529672e2f498"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ec0d56a-b497-4d90-9157-094c08930962","savedPayload":{"position":{"x":16337.350686782229,"y":26251.937657405022},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"776a3ece-8255-4e80-b60f-85bb818b561f"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5db72b24-ad72-49dd-8a32-1256fb25d04a","savedPayload":{"position":{"x":16285.989038785094,"y":26136.930218774854},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"7593aaf9-0505-4b58-9920-235340ff2d2f"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"cbdfc3db-d5dd-476c-bf02-cf86d8a01300","savedPayload":{"position":{"x":16272.745363533515,"y":26011.773677977748},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"105a157c-b33a-40d0-9711-19526b04bfda","savedPayload":{"position":{"x":16299.015550574797,"y":25888.784732962406},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"faab4399-898b-4393-8c27-fa2f3109c60a"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab8b1fdc-4319-4b37-ae29-333912412215","savedPayload":{"position":{"x":16361.786293229427,"y":25778.482294029163},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"051bd185-3255-41a5-bf62-ea8b27b32ddf","savedPayload":{"position":{"x":16480.783502595135,"y":25721.83855865352},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7"}}}],"layerFolders":[],"id":"838dab4e-c0bf-47f3-ac6a-8f815e5e666b","savedPayload":{"position":{"x":16674.50340983706,"y":26032.473650601696},"targetPosition":{"x":17060.504725681127,"y":25928.810868229375},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"74e5c728-fd06-4e79-8ec1-32ab2720adf5","savedPayload":{"position":{"x":17060.504725681127,"y":25928.810868229375},"targetPosition":{"x":17476.621526107163,"y":25817.204586634994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8a7bce21-b09a-41e3-b9af-87f1939e9136","savedPayload":{"position":{"x":17183.249075924137,"y":26042.417976975546},"targetPosition":{"x":17666.14324924388,"y":25913.066804430764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"a514d9bb-8862-4c81-b82e-dbde66abeb77","savedPayload":{"position":{"x":21470.02848924466,"y":29493.617356340503},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"17c8f568-4716-4a19-a607-689b78a83ef9","savedPayload":{"position":{"x":15863.39648009967,"y":25920.19809968253},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba"}}},{"type":"Layer","name":"Strategies","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"86978570-76c1-4780-a91d-4e72e88ef817","savedPayload":{"position":{"x":15705.823183600161,"y":25714.050844388883},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"653e6b00-bda3-4662-a2bd-934212e884d1","savedPayload":{"position":{"x":15327.86442305616,"y":25820.329298596927},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc"}}},{"type":"Layer","name":"Market Sell Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2887f930-5d79-42ff-ab1d-7d5cdc6b47da","savedPayload":{"position":{"x":15180.506269267476,"y":25548.319695716105},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"3040a2f6-0b1c-4ed3-a816-39c916465c9a","savedPayload":{"position":{"x":15221.387997903394,"y":25243.251366030032},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a59ef70f-534f-410b-99ef-3a700d2ca82a","savedPayload":{"position":{"x":15398.72702979423,"y":25036.45705462772},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642"}}}],"layerFolders":[],"id":"334a2964-17df-4237-a302-962416655896","savedPayload":{"position":{"x":15672.454225865862,"y":25457.66729056814},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a6b1a2c5-ca70-42b9-932f-2ff00aff2524","savedPayload":{"position":{"x":15292.017678857432,"y":25360.154463716302},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"9fc29be1-9393-4933-95d3-bebddd73c05e"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"663ddaf7-784f-4baa-8f69-3ed0ef5cd685","savedPayload":{"position":{"x":15298.823311983959,"y":25050.998457959326},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"b555388f-db93-4db1-91be-7772550afa70"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a4be770-082c-4d0f-a747-0b74d792e76f","savedPayload":{"position":{"x":15476.277795953174,"y":24812.240105588095},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"41953904-e48c-4176-bf0f-09d133bc444c"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"efb9d388-a679-49b2-b792-1b8258a489d6","savedPayload":{"position":{"x":15784.125039599678,"y":24724.90131904347},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c"}}}],"layerFolders":[],"id":"eea75e9a-a735-4db8-9eea-cf2c4e4119e3","savedPayload":{"position":{"x":15771.52653783795,"y":25218.00065188687},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb0ea641-23a7-48d0-a70d-f3314722f129","savedPayload":{"position":{"x":15517.085211279895,"y":24978.036206455075},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"6e49b57f-8c94-410f-985b-82c126155b11"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"fa1cf76f-30a6-4cfd-ba4f-8511afca64b8","savedPayload":{"position":{"x":15592.85911518537,"y":24750.27204370447},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"bf7d5c92-8894-4040-8d2f-3f5cdec443af","savedPayload":{"position":{"x":15786.287615627753,"y":24593.84817912013},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"125c9155-a747-4ac4-9d9f-1b93a4ae8d17","savedPayload":{"position":{"x":16042.541437710524,"y":24564.41238111062},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"01491591-0462-453c-91e0-6da6f554a729"}}},{"type":"Layer","name":"Take Profit","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3745d5cd-a2be-43ed-b5df-d05c328f8665","savedPayload":{"position":{"x":16280.917386265202,"y":24663.928419862754},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2"}}}],"layerFolders":[],"id":"9854e8b2-d863-42f3-afd5-416d5e2c548e","savedPayload":{"position":{"x":15977.296572394282,"y":25060.75923245295},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6e31ae33-68d1-4dca-8b29-6e59a2a4448e","savedPayload":{"position":{"x":16168.303357177294,"y":25522.64736240649},"targetPosition":{"x":16663.0166511096,"y":25588.08600416838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8c851b59-3105-460c-bb4b-cb4944db1049","savedPayload":{"position":{"x":16663.0166511096,"y":25588.08600416838},"targetPosition":{"x":17157.9116821377,"y":25653.201834587282},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"be53f7bc-6c26-4fd7-a0d0-96b965bbf655","savedPayload":{"position":{"x":17157.9116821377,"y":25653.201834587282},"targetPosition":{"x":17653.521538239824,"y":25718.280363218284},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"43eeb152-b0b8-468d-84d1-7d03fd636387","savedPayload":{"position":{"x":21462.37277871924,"y":29376.81378514373},"targetPosition":{"x":21759.806237131383,"y":29415.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"499eac86-6c40-4362-a36a-5f2002081866","savedPayload":{"position":{"x":22018.806237131383,"y":29379.971642809745},"targetPosition":{"x":22168.806237131383,"y":29120.164021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":-155},"width":240,"height":111.125,"radius":0},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}}],"id":"885265c2-ebb1-4283-a617-34a88780276d","savedPayload":{"position":{"x":22168.806237131383,"y":29120.164021674413},"targetPosition":{"x":22318.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Testing Environment","name":"New Testing Environment","id":"5882d8a8-345b-4188-b1c1-797e9ff805d9"}}},{"type":"Dashboard","name":"Production Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Live Trading Session","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-10-06T17:09:32.085Z\",\n \"toDate\": \"2020-10-06T21:09:32.085Z\"\n}","project":"Superalgos","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e","savedPayload":{"position":{"x":21721.37277871924,"y":28379.89901593443},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 10419.75,\n \"maxValue\": 10844.37\n}","project":"Superalgos","id":"ee3f6af0-8649-489b-9168-b4f16d2f5a78","savedPayload":{"position":{"x":21729.02848924466,"y":28263.095444737657},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\n \"value\": \"01-min\",\n \"autoMinScale\": false,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-10-05T09:53:58.939Z\",\n \"toDate\": \"2020-10-05T13:53:58.939Z\"\n}","project":"Superalgos","id":"480f9696-76df-4026-a435-7bf364c08056","savedPayload":{"position":{"x":21780.80023504401,"y":28158.112729565797},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"New Data Mine Products","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"e3cbbcbe-c938-4669-b670-c317476e0a3b","savedPayload":{"position":{"x":16992.282280946285,"y":23856.49271176323},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}},{"type":"Layer","name":"Volumes","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"385a5f98-118a-43fd-b019-54e825d1f4ae","savedPayload":{"position":{"x":17192.242023030805,"y":23510.135246216414},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Volumes","id":"07c11481-7dbd-477d-8bf7-79212542a6aa"}}}],"layerFolders":[],"id":"6848a114-9979-41dd-8d95-3a899679ba08","savedPayload":{"position":{"x":17392.615945713467,"y":23857.108132968406},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0cf13cfa-2a37-4691-902c-513ab5780da8","savedPayload":{"position":{"x":17538.760168957182,"y":23310.0159698544},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"d9245f0b-54e8-44b1-94bd-56c7048eb5c1","savedPayload":{"position":{"x":17938.505496583897,"y":23310.043709247824},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"20bd60bb-917b-4a0f-acc5-b019d1c3bd81","savedPayload":{"position":{"x":17738.97910230742,"y":23657.072015580987},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4cbbc012-c91e-4acd-a8d2-feb149e728a0","savedPayload":{"position":{"x":17738.764681458488,"y":24056.665358937673},"targetPosition":{"x":17963.331767523672,"y":24445.732145877373},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"bb7afb85-32ea-4471-8400-615a34fc126f","savedPayload":{"position":{"x":21868.806237131383,"y":28080.93353713308},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"05da2270-0016-4d22-89d8-b77cd14008a9","savedPayload":{"position":{"x":12224.806237131383,"y":25700.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"dc6cc4ef-4bd7-4837-8442-919462314db3"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4165460-e0a7-4a0d-b506-15e756dfac93","savedPayload":{"position":{"x":12219.806237131383,"y":25689.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"776ed571-8321-47aa-8cfb-c8ebf565dace"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371e0cd7-af57-4469-836d-45c4e6059760","savedPayload":{"position":{"x":12317.806237131383,"y":25717.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"ded93703-a48d-44be-9703-878c28f949cd"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5ed81442-77cc-4101-b1ff-8c7cbac57d4f","savedPayload":{"position":{"x":12245.806237131383,"y":25698.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5e046a6a-4f38-4b44-bae1-1aed6d4d3753","savedPayload":{"position":{"x":12313.806237131383,"y":25819.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b78a78ec-dca3-499b-881a-d2e3a82bf116","savedPayload":{"position":{"x":12330.806237131383,"y":25734.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb95c2a9-6f82-4a2a-9105-17b8f6c3c51a","savedPayload":{"position":{"x":12364.806237131383,"y":25720.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ad5b6f0-f4a9-4aab-aedf-9175647498b0","savedPayload":{"position":{"x":12321.806237131383,"y":25708.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65"}}}],"layerFolders":[],"id":"7216b7a3-1371-4f07-a395-74c547579ab4","savedPayload":{"position":{"x":12315.806237131383,"y":25752.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d2c0a1c8-70ef-4f7b-835a-a99ac6a5837a","savedPayload":{"position":{"x":12210.806237131383,"y":25770.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"88dd680c-a81b-48ae-96ba-838281abfa35"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"076af680-2114-480b-a979-f7eea4966d7b","savedPayload":{"position":{"x":12302.806237131383,"y":25739.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062"}}}],"layerFolders":[],"id":"56112c60-50dd-4d19-89aa-1d46005f194f","savedPayload":{"position":{"x":12305.806237131383,"y":25783.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb93ebef-f7ee-42c2-93b8-fe46eba0874a","savedPayload":{"position":{"x":12424.806237131383,"y":25721.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"595e7228-5676-4f5c-82bf-baa43e9325ab","savedPayload":{"position":{"x":12488.806237131383,"y":25680.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"7a95a249-132d-4e0f-9182-cc7af45cacea"}}}],"layerFolders":[],"id":"9f594c8a-87fe-4c4b-b550-493405fe0b2d","savedPayload":{"position":{"x":12427.806237131383,"y":25692.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3ce44f39-8ac9-4984-ad9d-daa53ed3f707","savedPayload":{"position":{"x":12377.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7d5f0aa-8259-4271-aa95-7b351aa9b9c0","savedPayload":{"position":{"x":12337.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a9f6580-ab06-4005-9274-98f7e9a491e5","savedPayload":{"position":{"x":12387.806237131383,"y":25625.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f60905ad-b491-45ee-9768-8087df9aef78","savedPayload":{"position":{"x":12466.806237131383,"y":25757.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70"}}}],"layerFolders":[],"id":"5389c77c-63a7-4495-9cc5-cdc0c70b76e6","savedPayload":{"position":{"x":12422.806237131383,"y":25658.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f602d8ef-b6a6-423f-a772-9a4b5d5b9c43","savedPayload":{"position":{"x":12422.806237131383,"y":25747.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0a0dd259-5704-46de-900f-5d1dc24af4f6","savedPayload":{"position":{"x":12488.806237131383,"y":25650.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de6f83f6-a6d9-45c7-93fd-e2c72238040e","savedPayload":{"position":{"x":12410.806237131383,"y":25733.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"1c6eed42-23aa-4174-aade-be29222acb8c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac0f1c2a-5eed-45ee-84da-3d24e455abd3","savedPayload":{"position":{"x":12379.806237131383,"y":25663.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"89def699-c33f-4344-a045-babca1f545ee","savedPayload":{"position":{"x":12478.806237131383,"y":25752.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7e04514-bf32-4021-822c-47af56c55a76","savedPayload":{"position":{"x":12504.806237131383,"y":25780.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"c451c035-5ece-451f-836f-b5334cb3f967"}}}],"layerFolders":[],"id":"a302255a-cf35-4801-ae3c-95cb47ae9613","savedPayload":{"position":{"x":12437.806237131383,"y":25742.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1857004e-2f12-4287-8847-173043d8d2ab","savedPayload":{"position":{"x":12363.806237131383,"y":25731.664021674413},"targetPosition":{"x":12380.806237131383,"y":25686.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"23ad1663-d4da-4ece-8964-30012894ae5b","savedPayload":{"position":{"x":12380.806237131383,"y":25686.664021674413},"targetPosition":{"x":12448.806237131383,"y":25597.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ddb3fafa-58f4-46c1-9b24-61efe3ec13a6","savedPayload":{"position":{"x":21940.490521799355,"y":27745.87424144413},"targetPosition":{"x":21979.64837946537,"y":28043.307699856272},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"788a0207-20ea-411c-862d-b1b13db4e09f","savedPayload":{"position":{"x":21979.64837946537,"y":28043.307699856272},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2a1db97f-553d-47ea-b452-c90ba9af9e79","savedPayload":{"position":{"x":12242.806237131383,"y":25582.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"ba606f99-2ae5-44dc-b7db-399e657830e1"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3c1c9d45-c482-4374-92ad-c3c28bfb7679","savedPayload":{"position":{"x":12270.806237131383,"y":25723.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a560c8af-91cd-4aea-ab9f-01ed60892abb","savedPayload":{"position":{"x":12340.806237131383,"y":25546.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"40debb84-1e2e-452b-99ff-95ff3994fb29","savedPayload":{"position":{"x":12322.806237131383,"y":25605.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"dcff6f56-7646-4505-aa93-6682a110f3f2"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5785c4fb-879d-4b89-aab8-9ec37d5f561b","savedPayload":{"position":{"x":12240.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74d8c1f7-8dd5-4e2c-b3cf-7f7bcfe7143c","savedPayload":{"position":{"x":12342.806237131383,"y":25543.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4476fcb1-3898-440f-b69e-afba06be912a","savedPayload":{"position":{"x":12402.806237131383,"y":25585.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"e4811789-fd94-49b0-9917-8d9d434f997d"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"43fe3418-9b3c-4cd9-b9a9-3994851e0b65","savedPayload":{"position":{"x":12310.806237131383,"y":25555.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"029ff3a7-9c65-425f-855a-882df68fa05b"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de34ba07-61b5-4785-bcf5-ff5b81d63e48","savedPayload":{"position":{"x":12227.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38"}}}],"layerFolders":[],"id":"36e02794-0943-4520-af39-2f274050610c","savedPayload":{"position":{"x":12310.806237131383,"y":25627.664021674413},"targetPosition":{"x":12365.806237131383,"y":25585.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ccfa34c-ca21-4ac3-be74-30f85549bf5e","savedPayload":{"position":{"x":12365.806237131383,"y":25585.664021674413},"targetPosition":{"x":12339.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c1c4bd7c-b755-461a-a5ed-b59804b4c280","savedPayload":{"position":{"x":12339.806237131383,"y":25637.664021674413},"targetPosition":{"x":12377.806237131383,"y":25540.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"ed6507e7-437f-4740-a897-11dc4da4d20a","savedPayload":{"position":{"x":22096.45195066214,"y":28050.963410381693},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"76852fcc-d524-43b8-a0b1-8645c2fed91e","savedPayload":{"position":{"x":12710.806237131383,"y":25614.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"c6fd6067-4b57-4860-ae3b-5668e4444490"}}},{"type":"Layer","name":"Strategies","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"43b43957-23d5-401b-b3e0-391c430b72c9","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"60f88096-7343-42d1-afad-83fecd22fb44"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"aaff7fb6-bd83-48f2-819a-a1dd674876a7","savedPayload":{"position":{"x":12579.806237131383,"y":25470.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"9f939086-c934-4924-8353-776707a7cf10"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bec241f4-5a8f-4fe7-9620-76d92f64da9c","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"da5f279e-d387-43cf-80f4-fc114b9ac906"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d03d083-7199-4bf2-8e8a-4c96f23a16a8","savedPayload":{"position":{"x":12735.806237131383,"y":25521.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"367646bb-839a-4071-8305-6d26a647585d"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"cb5de20d-e440-4bdb-a074-c408740e9022","savedPayload":{"position":{"x":12631.806237131383,"y":25476.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9"}}}],"layerFolders":[],"id":"a8409c29-905d-495f-bbca-3d0eef14f91c","savedPayload":{"position":{"x":12649.806237131383,"y":25488.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"04d1a0a8-1419-4fbd-9c28-eef6cfefd5d4","savedPayload":{"position":{"x":12584.806237131383,"y":25552.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74cda6e5-4fe2-41ef-a611-2c0374780ad5","savedPayload":{"position":{"x":12663.806237131383,"y":25503.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fb041378-9424-4709-a9ed-79426fcdfe68","savedPayload":{"position":{"x":12721.806237131383,"y":25661.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"6c4ac373-c5ff-4bfd-8047-4caaba6b7788","savedPayload":{"position":{"x":12659.806237131383,"y":25585.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91"}}}],"layerFolders":[],"id":"4b2ee5fd-d4f7-4a7c-bb6e-5e4c633b1b9f","savedPayload":{"position":{"x":12680.806237131383,"y":25593.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"4f77d851-9e93-4e85-9cfb-ec2ab200d79b","savedPayload":{"position":{"x":12581.806237131383,"y":25650.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"0213c668-a6d8-4737-ae57-d59d62b8f715","savedPayload":{"position":{"x":12767.806237131383,"y":25594.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"88997c97-e77f-490e-9eb5-c7531beec132"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f07986eb-010f-46cd-803d-dcac674adb80","savedPayload":{"position":{"x":12745.806237131383,"y":25673.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3f8f8fa3-2149-42d6-92e9-214354cfa186","savedPayload":{"position":{"x":12630.806237131383,"y":25581.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"9b064960-3829-441f-b955-334fb8324a53"}}},{"type":"Layer","name":"Take Profit","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"65ec58e6-2c00-41d4-a145-e6b7e7178bf0","savedPayload":{"position":{"x":12743.806237131383,"y":25590.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1"}}}],"layerFolders":[],"id":"66e5c011-9163-422d-863f-115135f832ad","savedPayload":{"position":{"x":12672.806237131383,"y":25618.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"91b8a8e8-823d-4746-967f-c8d85a1ad3ad","savedPayload":{"position":{"x":12687.806237131383,"y":25530.664021674413},"targetPosition":{"x":12591.806237131383,"y":25565.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dcaccce7-d98d-49b3-b3b6-e83495b688c3","savedPayload":{"position":{"x":12591.806237131383,"y":25565.664021674413},"targetPosition":{"x":12523.806237131383,"y":25633.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e328f755-80a6-4799-8f12-002a2ddb983d","savedPayload":{"position":{"x":12523.806237131383,"y":25633.664021674413},"targetPosition":{"x":12489.806237131383,"y":25562.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"93708a53-ad8d-48e0-9728-b87ea96d1545","savedPayload":{"position":{"x":22201.434665834,"y":28102.735156181043},"targetPosition":{"x":22018.806237131383,"y":28340.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7","savedPayload":{"position":{"x":22018.806237131383,"y":28340.741158268414},"targetPosition":{"x":22168.806237131383,"y":28600.548779403747},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":65},"width":240,"height":113.625,"radius":0},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4","savedPayload":{"position":{"x":22168.806237131383,"y":28600.548779403747},"targetPosition":{"x":22318.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Production Environment","name":"New Production Environment","id":"65a40d20-837c-4652-8356-f8054b4e1346"}}}],"id":"84a1b1ba-4888-4eac-8762-7084f0ee5de7","savedPayload":{"position":{"x":22318.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"21d2ec55-9e56-4652-8e96-c7e451262c36","savedPayload":{"position":{"x":22618.806237131383,"y":28860.35640053908},"targetPosition":{"x":22618.806237131383,"y":28860.35640053908},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"c"}}},{"type":"Plugins","name":"New Plugins","project":"Superalgos","pluginProjects":[{"type":"Plugin Project","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","pluginDataMines":{"type":"Plugin Data Mines","name":"New Plugin Data Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"d5234bd2-ef4e-4856-a6a0-ce7659653a48","savedPayload":{"position":{"x":14648.352187356151,"y":28990.05301821844},"targetPosition":{"x":14635.871225686036,"y":10349.288271084537},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ecc1a524-de9b-4e73-8874-b99a7ea0402b","savedPayload":{"position":{"x":14635.871225686036,"y":10349.288271084537},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plugin File","name":"Alpha","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Alpha","project":"Superalgos","id":"9d9d6275-91e1-448d-b162-8069adf7f207","savedPayload":{"position":{"x":14658.262986317583,"y":19632.85151122931},"targetPosition":{"x":14810.468084630062,"y":10200.168466117855},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5b8a1d1e-59db-484c-8dfe-7d35f2aa8770","savedPayload":{"position":{"x":14810.468084630062,"y":10200.168466117855},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Plugin File","name":"Sparta","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Sparta","project":"Superalgos","id":"449f1832-f5b8-4e7e-a010-d892d721d3bc","savedPayload":{"position":{"x":14665.067482786275,"y":37715.63150649338},"targetPosition":{"x":15039.37033286441,"y":10218.18346374989},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0486ca8b-855a-4295-ba63-6f63421b4a13","savedPayload":{"position":{"x":15039.37033286441,"y":10218.18346374989},"targetPosition":{"x":14903.173182942546,"y":10485.4854210064},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cbc3d9be-5e59-45d8-bb0f-4ec82763691d","savedPayload":{"position":{"x":14903.173182942546,"y":10485.4854210064},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingMines":{"type":"Plugin Trading Mines","name":"New Plugin Trading Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"ad1ce785-858f-4cfc-ba68-108b5e0c54d9","savedPayload":{"position":{"x":31037.217404066585,"y":10729.643045797242},"targetPosition":{"x":15481.28847788,"y":10418.13122451946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8a64c00e-4f8c-49bf-b57d-4e2e388bae41","savedPayload":{"position":{"x":15481.28847788,"y":10418.13122451946},"targetPosition":{"x":15238.583379567515,"y":10594.466800207203},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8d881813-3ab9-4e8b-ab5a-48dedab2dd19","savedPayload":{"position":{"x":15238.583379567515,"y":10594.466800207203},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingSystems":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters-Lightning-Strike","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","project":"Superalgos","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4","savedPayload":{"position":{"x":24926.365708673427,"y":19688.576468868458},"targetPosition":{"x":15481.28847788,"y":11123.473527270431},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5fdcecee-8c8f-4e0f-b36b-81e9231970a6","savedPayload":{"position":{"x":15481.28847788,"y":11123.473527270431},"targetPosition":{"x":15238.583379567515,"y":10947.137951582688},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3569d452-c593-4e54-a356-7ff8c6b519f3","savedPayload":{"position":{"x":15238.583379567515,"y":10947.137951582688},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingEngines":{"type":"Plugin Trading Engines","name":"New Plugin Trading Engines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Low-Frequency","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Low-Frequency","project":"Superalgos","id":"e117a2a4-09b3-4181-8455-e680de3bdeb3","savedPayload":{"position":{"x":31033.55093774257,"y":19568.049392142086},"targetPosition":{"x":14810.468084630062,"y":11341.436285672036},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9270d67-4630-4ac9-91ca-1dec4fb5aa38","savedPayload":{"position":{"x":14810.468084630062,"y":11341.436285672036},"targetPosition":{"x":14903.173182942546,"y":11056.119330783491},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"87a28762-63d0-45f7-bd39-9dea436d8244","savedPayload":{"position":{"x":14903.173182942546,"y":11056.119330783491},"targetPosition":{"x":14995.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4e402d7-5228-408c-9d67-379d6ef40bae","savedPayload":{"position":{"x":14995.87828125503,"y":10770.802375894946},"targetPosition":{"x":14695.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6","savedPayload":{"position":{"x":14695.87828125503,"y":10770.802375894946},"targetPosition":{"x":14695.87828125503,"y":10770.802375894946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Design Space","name":"My Design Space","project":"Superalgos","spaceStyle":{"type":"Space Style","name":"My Space Style","config":" {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"node\": {\n \"fontSize\": 16,\n \"imageSize\": 60,\n \"type\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"name\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"menuItem\": {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"fontColor\": \"UI_COLOR.WHITE\",\n \"fontSize\": 14,\n \"imageSize\": 14\n }\n }\n }","project":"Superalgos","id":"fad0e429-f7a7-4b62-a2a5-2ead29b8f695","savedPayload":{"position":{"x":25236.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaceSettings":{"type":"Space Settings","name":"New Space Settings","config":"{\n \"node\": {\n \"distancePercentage\": 60,\n \"radiusPercentage\": 85,\n \"massPercentage\": 100,\n \"animationSteps\": 2, \n \"menuItem\": {\n \"widthPercentage\": 100,\n \"heightPercentage\": 60,\n \"radiusPercentage\": 90\n }\n },\n \"physics\": false\n}","project":"Superalgos","id":"05c9d6d5-24c4-4eec-9aca-9668d6486fdd","savedPayload":{"position":{"x":24636.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"f8485ce5-67f3-4476-b9e2-80994e49c318","savedPayload":{"position":{"x":24940.875,"y":10745.347826086958},"targetPosition":{"x":24940.875,"y":10745.347826086958},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":255,"y":588.3125}}}},{"type":"Superalgos Project","name":"New Superalgos Project","project":"Superalgos","projectDefinition":{"type":"Project Definition","name":"Superalgos","config":"{\n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb","savedPayload":{"position":{"x":19378,"y":10727.5},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaces":{"type":"Spaces","name":"New Spaces","project":"Superalgos","id":"4d0ee814-4e48-4688-9cc5-7ee03de5192b","savedPayload":{"position":{"x":18810.69804274349,"y":10863.697149921863},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"trading":{"type":"Trading","name":"New Trading","project":"Superalgos","id":"0dcf22f9-cec5-48b5-b6c1-eb93d75c0055","savedPayload":{"position":{"x":18778.92479988006,"y":10751.037728718353},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"otherHierarchies":{"type":"Other Hierarchies","name":"New Other Hierarchies","project":"Superalgos","id":"228d01b9-466f-4374-afdd-15fff0426fab","savedPayload":{"position":{"x":18786.289023880698,"y":10657.466390843229},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cf9f8b3b-77c6-43c6-b01f-95cf366a91f6","savedPayload":{"position":{"x":19078,"y":10727.5},"targetPosition":{"x":19078,"y":10727.5},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Tutorial","name":"Basic Education","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to School!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes Menu","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Arrangement Features","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Pins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Start With the Menu","config":"{\n \"icon\": {\n \"name\": \"unpinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Start With the Menu\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"117e0e8d-77c2-4ee9-b29f-d82f7b6f6995","savedPayload":{"position":{"x":25490.027487270225,"y":39634.40851272507},"targetPosition":{"x":25536.957826782294,"y":39930.71501490362},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Session Base Asset","name":"","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b"}}},{"type":"Tutorial Step","name":"Pinned Nodes Can't Dance","config":"{\n \"icon\": {\n \"name\": \"pinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Pinned Nodes Can't Dance\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"734c6647-9e74-4d72-a621-29e0ff3e0bd3","savedPayload":{"position":{"x":25606.991435939068,"y":39639.00403878431},"targetPosition":{"x":25536.957826782294,"y":39930.71501490362},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"c69e3a63-8d67-4e41-b16e-39a88a9776e3","savedPayload":{"position":{"x":25536.957826782294,"y":39930.71501490362},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Angle to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Mary Go Round","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-360-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Mary Go Round\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"836a107b-368d-4ef0-8a43-5daeefcb0fe2","savedPayload":{"position":{"x":25886.240655911173,"y":40433.23445084565},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"180 Degrees","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-180-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - 180 Degrees\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d9f1b166-20de-4ee5-94f7-0f9f363a5a82","savedPayload":{"position":{"x":25941.41057881172,"y":40509.16933527975},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Node's Independence","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-90-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Node's Independence\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c941ec5d-dcf0-48d5-a67b-5ce312c70470","savedPayload":{"position":{"x":25970.41512373375,"y":40598.43614568955},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Free-range Nodes","config":"{\n \"icon\": {\n \"name\": \"remove-angle-to-parent-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free-range Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"1b8726e1-8fa5-4584-8906-5c084785f476","savedPayload":{"position":{"x":25970.41512373375,"y":40692.29682471368},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"0a6ecc28-5731-49a1-878d-c1d2656cbecc","savedPayload":{"position":{"x":25706.338469709655,"y":40006.12813587088},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Distance to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Controlling Distances","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Controlling Distances\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e1a511e3-e833-4dcb-882c-28517b6fbaa2","savedPayload":{"position":{"x":26046.281424608744,"y":39996.77620519132},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Play With The Tape!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Play With The Tape!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"9ea33644-954d-475a-b3a1-9bca07951e58","savedPayload":{"position":{"x":26092.48784824228,"y":40104.32456902345},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"How About The Hierarchy?","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one-and-a-half\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About The Hierarchy?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"88ef7405-4f63-42a7-b02c-19f52b8f7576","savedPayload":{"position":{"x":26094.020040291325,"y":40221.36873391642},"targetPosition":{"x":25799.043568022138,"y":40166.698076268774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}}],"tutorialTopics":[],"id":"c02373f4-3bf5-4b99-8dce-a152af6ec770","savedPayload":{"position":{"x":25799.043568022138,"y":40166.698076268774},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Arrangement Style","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Arrangement Style","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Arrangement Style\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"b03d5c5f-0ee9-48bf-a164-ce60a23b163f","savedPayload":{"position":{"x":26079.560122587445,"y":40358.9456609292},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Shall We Improve This? ","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Shall We Improve This?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"90b822dd-2f06-4474-a728-3500f3a30af4","savedPayload":{"position":{"x":26053.726562387557,"y":40473.113569359586},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Freeze","config":"{\n \"icon\": {\n \"name\": \"freeze-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Freeze!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2e3e7d2f-35ba-4620-b62a-f18d55e30989","savedPayload":{"position":{"x":25986.169297802902,"y":40568.70488774053},"targetPosition":{"x":25779.662925094777,"y":40351.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Design Space","name":"My Design Space","id":"f8485ce5-67f3-4476-b9e2-80994e49c318"}}}],"tutorialTopics":[],"id":"14dbd920-b2e0-4b8f-ae74-22d2a3077082","savedPayload":{"position":{"x":25779.662925094777,"y":40351.092576436844},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"3f1d0740-00c0-4818-b256-3280bd99ae74","savedPayload":{"position":{"x":25505.599287801997,"y":40229.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Productivity Tools","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Backups","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Backups\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"561b5fd8-43dd-42cf-9230-c098ebc7e176","savedPayload":{"position":{"x":25851.150517837592,"y":40156.65592801336},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"Working With Versions","config":"{\n \"icon\": {\n \"name\": \"hand-drag\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working With Versions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e60db488-cf9d-4bb0-b1a8-0d66ef657613","savedPayload":{"position":{"x":25973.52309136077,"y":40210.04653605334},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}},{"type":"Tutorial Step","name":"Detaching and Attaching","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Detaching and Attaching\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ae239506-f063-4e2f-8933-9f44dcc40fe2","savedPayload":{"position":{"x":26060.6116537401,"y":40311.245281501426},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Attaching The Backup","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Attaching The Backup\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cbdcbdcc-5f47-40a0-870c-ad71d0d12079","savedPayload":{"position":{"x":26095.16724712524,"y":40440.208511700446},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Detached Nodes Don't Count","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Irrelevant Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"60c572fe-8649-46eb-921e-4815fb9419b1","savedPayload":{"position":{"x":26070.34571244971,"y":40571.39347727926},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Nodes' Attaching Rules","config":"{\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Nodes' Attaching Rules\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"14d77d4f-ae2a-41ca-bcf1-d60044ac45a8","savedPayload":{"position":{"x":25991.063259072154,"y":40678.81738692698},"targetPosition":{"x":25795.377035688718,"y":40451.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}}],"tutorialTopics":[],"id":"c63ac428-2adf-4189-8560-5129c15ea793","savedPayload":{"position":{"x":25795.377035688718,"y":40451.425869983344},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"References","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing with References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing with References\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"References\"\n }\n }\n}","project":"Superalgos","id":"2733bece-0fd3-4846-9f88-8a95bf4f96f8","savedPayload":{"position":{"x":26003.4129110247,"y":40496.44315481149},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Let's See Some References","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's See Some References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"775cc223-54d4-47e4-9863-a44e09dc2ff4","savedPayload":{"position":{"x":26055.18465682405,"y":40601.425869983344},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Visualizing References","config":"{\n \"icon\": {\n \"name\": \"key-r\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Visualizing References\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5b81ad17-e34c-4eed-98f5-d45a84d6f812","savedPayload":{"position":{"x":26062.840367349472,"y":40718.22944118012},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Establishing References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Establishing References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a5847b14-8e83-4f7f-bd1f-55c3ddc3a99b","savedPayload":{"position":{"x":26025.214530072662,"y":40829.0715835141},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}},{"type":"Tutorial Step","name":"Let's Get On With It!","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Get On With It!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Establish and Remove References\",\n \"anchor\": \"What If the Nodes Are Far Away or in Different Hierarchies?\"\n }\n }\n}","project":"Superalgos","id":"f4a434bf-93ac-4aae-9b1a-a5f3e510ed57","savedPayload":{"position":{"x":25948.035337639947,"y":40917.07758560147},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Done?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Done?\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"6449893d-f990-47f3-97d1-089487e3c8b1","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"One Last Point!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Point!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"ae02f7ce-5dc4-4014-b385-5405e915c4c1","savedPayload":{"position":{"x":25726.249051271316,"y":40976.50504192625},"targetPosition":{"x":25765.40690893733,"y":40679.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}}],"tutorialTopics":[],"id":"e837dc7b-f8e0-4c01-b6f2-87898c505c30","savedPayload":{"position":{"x":25765.40690893733,"y":40679.0715835141},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Backups & Clones","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Backups!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Backups!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Backups\"\n }\n }\n}","project":"Superalgos","id":"49f383cc-5720-4f22-a444-6a12709be5da","savedPayload":{"position":{"x":25880.678459744897,"y":40858.00718906684},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Hammering Backups Home","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Hammering Backups Home\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"823bae09-4875-4b2c-b461-62b016247779","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}},{"type":"Tutorial Step","name":"Back It Up Again!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back It Up Again!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8737b5cf-02ec-46d6-b6a3-705da85b00ce","savedPayload":{"position":{"x":25765.87343003537,"y":41056.855333488194},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"One Last Backup!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Backup!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"41e890ee-f42a-4396-9493-8298445b94b6","savedPayload":{"position":{"x":25660.89071486351,"y":41108.627079287544},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Point","name":"End Upper Band","id":"ff8660a3-65b0-4df3-b823-f0656537ea30"}}},{"type":"Tutorial Step","name":"No Need to Memorize","config":"{\n \"icon\": {\n \"name\": \"docs-warning-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - No Need to Memorize\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d14e808a-d408-455b-be7b-0feb0c862662","savedPayload":{"position":{"x":25544.08714366674,"y":41116.28278981297},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What About Clones?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Clones?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Clones\"\n }\n }\n}","project":"Superalgos","id":"7942b504-e00b-4d78-b4a9-defd17ac6e08","savedPayload":{"position":{"x":25433.245001332754,"y":41078.656952536156},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Only Share Shares!","config":"{\n \"icon\": {\n \"name\": \"share-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Only Share Shares!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Shares\"\n }\n }\n}","project":"Superalgos","id":"39e09d3f-db3f-4961-9e32-915ba513a9a6","savedPayload":{"position":{"x":25345.238999245383,"y":41001.47776010344},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"974c84fb-0112-4a8b-9f53-6d057b22a073","savedPayload":{"position":{"x":25583.245001332754,"y":40818.84933140082},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"338435fb-8de8-47e5-a51c-891399879226","savedPayload":{"position":{"x":25505.599287801997,"y":40529.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"22c3e696-b371-48f9-814b-74a883ba6e7c","savedPayload":{"position":{"x":25245.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Workspaces","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Working with Workspaces","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working with Workspaces\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Workspaces\"\n }\n }\n}","project":"Superalgos","id":"cd7b285d-22bf-4b30-82c1-4aade52c9dfe","savedPayload":{"position":{"x":25385.569414553385,"y":40716.52491818019},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Your Workspace vs Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Workspace vs Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Plugin Workspaces\"\n }\n }\n}","project":"Superalgos","id":"fa5f23d3-3a4b-4b29-9e16-f9d251678272","savedPayload":{"position":{"x":25245.791666666664,"y":40898.68682578477},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Current Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - The Current Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"78deb6f1-5589-4b91-ad96-d4397fafd6fd","savedPayload":{"position":{"x":25018.145953135907,"y":40928.656952536156},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Workspace","name":"Basic Education","id":"979bbac5-358b-427c-95d6-2b1df435d74e"}}}],"tutorialTopics":[],"id":"ad149fde-4bf0-4b26-b4a5-809fc8ba62e1","savedPayload":{"position":{"x":25095.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Plugins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"366bcfde-71f9-4173-a80f-8fd4f5d7abcf","savedPayload":{"position":{"x":24978.42009536928,"y":40876.885206736806},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugins","name":"New Plugins","id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6"}}},{"type":"Tutorial Step","name":"How Plugins Work","config":"{\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How Plugins Work\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"3e106105-19ca-4a7d-8915-c2ea46d92cec","savedPayload":{"position":{"x":24873.43738019742,"y":40928.656952536156},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Positioning Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-file-position\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Positioning Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"298ab522-ebbc-4b94-8fca-bce27208f8a2","savedPayload":{"position":{"x":24756.63380900065,"y":40936.31266306158},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4"}}},{"type":"Tutorial Step","name":"Placing Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-trading-systems\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Placing Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"89958980-e536-414d-a55b-25149b6ebca2","savedPayload":{"position":{"x":24645.791666666664,"y":40898.68682578477},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","id":"3569d452-c593-4e54-a356-7ff8c6b519f3"}}},{"type":"Tutorial Step","name":"Non-Persistence of Changes","config":"{\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Non-Persistence of Changes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"2658f4f8-46df-4a83-9a39-6327553ba244","savedPayload":{"position":{"x":24557.785664579293,"y":40821.50763335205},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Starting From a Plugin","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Starting From a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"286d6e2a-0020-4461-98e4-974315326ddd","savedPayload":{"position":{"x":24506.013918779943,"y":40716.52491818019},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Improving a Plugin","config":"{\n \"icon\": {\n \"name\": \"sensor-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Improving a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4a1b74f7-8ed5-4771-b0e0-3d1427a5510a","savedPayload":{"position":{"x":24498.35820825452,"y":40599.72134698342},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"73a666a2-268d-42d1-ac73-e7ae316542e7","savedPayload":{"position":{"x":24795.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Exchanges","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Talking Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Talking Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Community Effort to Test Exchanges\"\n }\n }\n}","project":"Superalgos","id":"70ece243-3a2a-4b2a-9963-5044c11df654","savedPayload":{"position":{"x":24433.6596323107,"y":40591.203617870066},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Testing New Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Testing New Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Test New Exchanges\"\n }\n }\n}","project":"Superalgos","id":"11a7025e-6b0b-4ac3-9994-e014b1980b08","savedPayload":{"position":{"x":24345.791666666664,"y":40379.0715835141},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Clean Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Clean Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"57edeba5-84fb-4ae2-bbf8-c16f71c842c1","savedPayload":{"position":{"x":24433.6596323107,"y":40166.93954915814},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"3bba7ba9-7d4c-4d84-9c25-307f59bd7670","savedPayload":{"position":{"x":24645.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Data","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing With Data","config":"{\n \"icon\": {\n \"name\": \"dataset-definition\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing With Data\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"811af117-7a9f-4522-a391-f310fcab8167","savedPayload":{"position":{"x":24495.791666666664,"y":40119.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"About Other Markets","config":"{\n \"icon\": {\n \"name\": \"market\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Other Markets\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"7eb3bc72-7230-4c9a-bc7d-a568d3cc2465","savedPayload":{"position":{"x":24535.98404553133,"y":39969.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Markets","name":"New Exchange Markets","id":"2fd80894-900e-44ac-a1a7-56c14124f7a1"}}},{"type":"Tutorial Step","name":"Building Indicators","config":"{\n \"icon\": {\n \"name\": \"indicator-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Building Indicators\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Build an Indicator - Video Series\"\n }\n }\n}","project":"Superalgos","id":"bbdede43-5ebe-4438-969e-e56fb8d36af7","savedPayload":{"position":{"x":24645.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Indicators?","config":"{\n \"icon\": {\n \"name\": \"data-mine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More Indicators?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"Community Data Mines\"\n }\n }\n}","project":"Superalgos","id":"fd066dc6-57fb-4121-b8e7-1edc06bdf3a0","savedPayload":{"position":{"x":24795.791666666664,"y":39819.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About Strategies?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About Strategies?\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c18673fd-a8cf-4aba-b89b-d38d96991c82","savedPayload":{"position":{"x":24945.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"2c2b7b0c-de6e-480d-93d2-27bbb74b972b","savedPayload":{"position":{"x":24795.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your Graduation","config":"{\n \"icon\": {\n \"name\": \"trading-strategy\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Graduation\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2c47bc65-09a1-4576-a69c-990e47930ac5","savedPayload":{"position":{"x":25245.791666666664,"y":39859.456341243436},"targetPosition":{"x":25095.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"0f058d80-353d-4073-8b41-805938e1551e","savedPayload":{"position":{"x":25095.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8","savedPayload":{"position":{"x":24945.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Setting up a New Chart","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Introduction\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Getting Started","config":"{\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Before we begin","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Before We Begin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c8304d44-191c-49c8-a982-88a5ea42b395","savedPayload":{"position":{"x":19758.164424312257,"y":40103.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Charts without Tears","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Charts without Tears\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a2d5c58d-1aa9-4958-9aca-0e5fcc806e2f","savedPayload":{"position":{"x":20058.164424312257,"y":40403.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Looking for a quick fix?","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Looking for a quick fix?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"d9407975-f8f8-42fe-b4c4-f0589471cdf8","savedPayload":{"position":{"x":19758.164424312257,"y":40703.79490168751},"targetPosition":{"x":19758.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}}],"tutorialTopics":[],"id":"c30627fc-e01f-48bd-8347-99c1b13b0088","savedPayload":{"position":{"x":19758.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Dashboards and Time Machines","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dashing Dashboards","config":"{\n \"icon\": {\n \"name\": \"dashboard\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Dashing Dashboards\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e902be8c-fe3e-463a-b429-1dec70cb12b4","savedPayload":{"position":{"x":19906.52099292274,"y":40694.961061803144},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Dashboards in the Future","config":"{\n \"icon\": {\n \"name\": \"under-construction\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Dashboards in the Future\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"56913752-cbf6-4405-a889-1f9dc22f0f06","savedPayload":{"position":{"x":19831.107871955475,"y":40864.341704730505},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Time Machines hold it all together","config":"{\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Time Machines Hold It all Together\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Node\",\n \"type\": \"Time Machine\"\n }\n }\n}","project":"Superalgos","id":"fa55dca7-9a95-4e4c-a3c1-571d1aac5ebf","savedPayload":{"position":{"x":19670.537931557585,"y":40957.04680304299},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Keep it in one place","config":"{\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Keep It in One Place\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"da032cf6-441b-4a53-a968-49f97c0a1c5b","savedPayload":{"position":{"x":19486.14343138952,"y":40937.66616011563},"targetPosition":{"x":19608.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Dashboard","name":"Testing Environment My Computer","id":"885265c2-ebb1-4283-a617-34a88780276d"}}}],"tutorialTopics":[],"id":"c8d6c07d-70c6-4999-b77b-155f5bf07dac","savedPayload":{"position":{"x":19608.164424312257,"y":40663.60252282285},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Your first Custom Chart","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Add the Chart","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Without Further Ado","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Without Further Ado\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ea3312d6-88fc-4e7a-9ae5-9620e3bddfdd","savedPayload":{"position":{"x":19645.617758978347,"y":41103.38027070957},"targetPosition":{"x":19385.810137843015,"y":40953.38027070957},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Add a Timeline Chart","config":"{\n \"icon\": {\n \"name\": \"timeline-chart\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Add a Timeline Chart\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"db25291f-ef20-4cc9-8bfe-a477ad73d1d4","savedPayload":{"position":{"x":19463.455851373772,"y":41243.15801859629},"targetPosition":{"x":19385.810137843015,"y":40953.38027070957},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Why is it blank?","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Why is It Blank?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"a2131ede-c79b-4313-bd85-40fbd29287e7","savedPayload":{"position":{"x":19235.810137843015,"y":41213.1878918449},"targetPosition":{"x":19385.810137843015,"y":40953.38027070957},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}}],"tutorialTopics":[],"id":"f46dff3b-4bc8-46f0-a581-a8bf72c7f1e2","savedPayload":{"position":{"x":19385.810137843015,"y":40953.38027070957},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Managing Layers","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"The Chart of many talents","config":"{\n \"icon\": {\n \"name\": \"timeline-chart\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - The Chart of many Talents\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c0c76521-31f9-474a-862e-40afc6507f9d","savedPayload":{"position":{"x":19158.164424312257,"y":41223.41014395818},"targetPosition":{"x":19158.164424312257,"y":40923.41014395818},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Herding Layers","config":"{\n \"icon\": {\n \"name\": \"layer-manager\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Herding Layers\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"426ca9c5-6476-4c7f-bb34-af88b41de96e","savedPayload":{"position":{"x":18898.356803176925,"y":41073.41014395818},"targetPosition":{"x":19158.164424312257,"y":40923.41014395818},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}}],"tutorialTopics":[],"id":"875b6687-2c74-4dff-9f62-96c342298b59","savedPayload":{"position":{"x":19158.164424312257,"y":40923.41014395818},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Working with Data Storage","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your data treasure trove","config":"{\n \"icon\": {\n \"name\": \"data-storage\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Your Data Treasure Trove\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8ef69b83-1314-4f88-bfbb-fa4ae7aaf4c9","savedPayload":{"position":{"x":18868.386676425536,"y":41001.05585748894},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Data Storage","name":"New Data Storage","id":"e2697759-6038-4943-b90c-5a68651ff9a8"}}},{"type":"Tutorial Step","name":"Follow the Tree!","config":"{\n \"icon\": {\n \"name\": \"data-mines-data\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Follow the Tree!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"57ee6e8b-b8b4-4d79-b0b6-e80e9bbff001","savedPayload":{"position":{"x":18728.608928538815,"y":40818.89394988436},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Data Mines Data","name":"New Data Mines Data","id":"32e7c122-fa5a-4d00-9d71-d54e890e32de"}}},{"type":"Tutorial Step","name":"The data you want to see","config":"{\n \"icon\": {\n \"name\": \"data-storage\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - The Data You Want to See\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"b12414e1-02e3-4b84-abf1-c56eef5ccc3a","savedPayload":{"position":{"x":18758.579055290204,"y":40591.248236353604},"targetPosition":{"x":19018.386676425536,"y":40741.248236353604},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Market Data Products","name":"Binanceus BTC/USDT","id":"6d7273da-5366-4fe3-9749-e643038abd7a"}}}],"tutorialTopics":[],"id":"ca9d3427-37c7-4559-a1ac-6004aa913562","savedPayload":{"position":{"x":19018.386676425536,"y":40741.248236353604},"targetPosition":{"x":19308.164424312257,"y":40663.60252282285},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"1246dd21-45b1-4664-845f-ccea597a602e","savedPayload":{"position":{"x":19308.164424312257,"y":40663.60252282285},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Connecting to Data Mine Products","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Hooking up a Chart to Data Products","config":"{\n \"icon\": {\n \"name\": \"data-mine-products\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Hooking up a Chart to Data Products\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"cc2794e2-9140-4ca5-89d0-c812eee41f6d","savedPayload":{"position":{"x":18981.828848624515,"y":40646.5},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Dashboard","name":"Testing Environment My Computer","id":"885265c2-ebb1-4283-a617-34a88780276d"}}},{"type":"Tutorial Step","name":"Make the connection","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Make the Connection\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4b347096-6bcd-45f3-b40d-6fcd6b3837eb","savedPayload":{"position":{"x":18872.847469423712,"y":40496.5},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Add the Layers","config":"{\n \"icon\": {\n \"name\": \"layer\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Add the Layers\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"f0411061-33a3-4f21-ad4e-670f8381f209","savedPayload":{"position":{"x":18872.847469423712,"y":40311.08980337503},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"It's Alive!","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - It’s Alive!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"db11ee1d-bbf9-44e5-b99c-078510f6df25","savedPayload":{"position":{"x":18981.828848624515,"y":40161.08980337503},"targetPosition":{"x":19158.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"d4893496-189d-4fe8-a6b1-864dcd9a46b6","savedPayload":{"position":{"x":19158.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Connecting to Trading Mine Products","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Connection One","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Hooking up a Chart to a Trading System","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Hooking up a Chart to a Trading System\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cedbe86a-bf7b-4f1d-95dd-641198dc2146","savedPayload":{"position":{"x":18748.356803176925,"y":39993.98728055218},"targetPosition":{"x":19048.356803176925,"y":39993.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Connection one","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Connection One\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"68c45d99-618b-4371-8e93-b81d80d60dde","savedPayload":{"position":{"x":18898.356803176925,"y":39734.17965941685},"targetPosition":{"x":19048.356803176925,"y":39993.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}}],"tutorialTopics":[],"id":"eb345160-093b-471a-9ddf-a30308e949a0","savedPayload":{"position":{"x":19018.386676425536,"y":40066.34156702142},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Connection Two","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Data Storage","config":"{\n \"icon\": {\n \"name\": \"trading-mines-data\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Back to Data Storage\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"7b111d1d-1576-4438-abdd-bce97a4f2a47","savedPayload":{"position":{"x":18859.807855701776,"y":39852.82112043655},"targetPosition":{"x":19158.164424312257,"y":39884.17965941685},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Mines Data","name":"New Trading Mines Data","id":"e4e268f3-a677-4f90-90a1-d87244e647e5"}}},{"type":"Tutorial Step","name":"Another Timeline Chart","config":"{\n \"icon\": {\n \"name\": \"timeline-chart\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Another Timeline Chart\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"757c3d37-d943-4296-a0f2-2f3906d5bfc9","savedPayload":{"position":{"x":18935.22097666904,"y":39683.44047750919},"targetPosition":{"x":19158.164424312257,"y":39884.17965941685},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Connection two","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Connection Two\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"c7b0d632-79d4-4c8b-a991-67298d30016f","savedPayload":{"position":{"x":19095.79091706693,"y":39590.7353791967},"targetPosition":{"x":19158.164424312257,"y":39884.17965941685},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Trading Session Reference","name":"Lightning Strike Backtesting Session","id":"a5de30a4-022e-4f8a-afd0-3eb6d8600ae8"}}},{"type":"Tutorial Step","name":"Don't Forget the Layers","config":"{\n \"icon\": {\n \"name\": \"layer\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Don’t Forget the Layers!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d78552fc-e294-4488-8fc3-bb4d4ea433f9","savedPayload":{"position":{"x":19280.185417234996,"y":39610.116022124064},"targetPosition":{"x":19158.164424312257,"y":39884.17965941685},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"cc15cee8-bdd3-4dca-a8d8-4c245aaf9498","savedPayload":{"position":{"x":19158.164424312257,"y":39884.17965941685},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Check the Chart","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Check the Chart","config":"{\n \"icon\": {\n \"name\": \"chart-points\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Check the Chart\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c8bebdf9-b4b5-4737-aeff-4a578389c810","savedPayload":{"position":{"x":19308.164424312257,"y":39564.43178477874},"targetPosition":{"x":19385.810137843015,"y":39854.20953266546},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"},"referenceParent":{"type":"Tutorial","name":"Setting up a New Chart","id":"f87a4d66-cd01-4712-8ec6-c232677c5547"}}},{"type":"Tutorial Step","name":"Not Seeing Anything?","config":"{\n \"icon\": {\n \"name\": \"bot-data-dependencies\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Not Seeing Anything?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"80b65f5e-9b09-4427-b438-11bbc1afb412","savedPayload":{"position":{"x":19597.94217219898,"y":39642.077498309496},"targetPosition":{"x":19385.810137843015,"y":39854.20953266546},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"da19051b-3be2-492e-9733-4a21742d01bd","savedPayload":{"position":{"x":19385.810137843015,"y":39854.20953266546},"targetPosition":{"x":19308.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"ab24e3dc-c131-4a6d-a1a0-7df304237185","savedPayload":{"position":{"x":19308.164424312257,"y":40143.98728055218},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Topic","name":"Before I Go","config":"{\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Easy as 1,2,3","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Easy as 1, 2, 3\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"88edf6e9-f780-4e0f-b031-cbe2bc2cfdaf","savedPayload":{"position":{"x":19608.164424312257,"y":39843.98728055218},"targetPosition":{"x":19608.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial Step","name":"Before I Go","config":"{\n \"icon\": {\n \"name\": \"charting-space\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Center\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Adding Charts - Before I Go\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"72bd2fd9-4de6-4bd4-bc9d-a9fba53d9827","savedPayload":{"position":{"x":19867.97204544759,"y":39993.98728055218},"targetPosition":{"x":19608.164424312257,"y":40143.98728055218},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"tutorialTopics":[],"id":"0570a00c-734e-44fb-9761-44ccb63212ff","savedPayload":{"position":{"x":19608.164424312257,"y":40143.98728055218},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}],"id":"f87a4d66-cd01-4712-8ec6-c232677c5547","savedPayload":{"position":{"x":19458.164424312257,"y":40403.79490168751},"targetPosition":{"x":19458.164424312257,"y":40403.79490168751},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isPlaying":false,"isRunning":false},"tutorial":{"status":"Done"}}}]} \ No newline at end of file diff --git a/Projects/Superalgos/Plugins/Workspaces/Getting-Started.json b/Projects/Superalgos/Plugins/Workspaces/Getting-Started.json index e1e06170a..03fc2e66a 100644 --- a/Projects/Superalgos/Plugins/Workspaces/Getting-Started.json +++ b/Projects/Superalgos/Plugins/Workspaces/Getting-Started.json @@ -1 +1 @@ -{"type":"Workspace","name":"Getting Started","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":[{"type":"Project Data Tasks","name":"Superalgos","project":"Superalgos","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binance","project":"Superalgos","marketDataTasks":[{"type":"Market Data Tasks","name":"Binance BTC/USDT","project":"Superalgos","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Exchange Raw Data","project":"Superalgos","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","project":"Superalgos","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","project":"Superalgos","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":23490.023749611923,"y":29239.135911211026},"targetPosition":{"x":23779.801497498644,"y":29316.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":23779.801497498644,"y":29316.781624741783},"targetPosition":{"x":24069.579245385365,"y":29394.42733827254},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":24069.579245385365,"y":29394.42733827254},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":23799.549372136753,"y":28802.457809532632},"targetPosition":{"x":24059.356993272086,"y":28952.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":24059.356993272086,"y":28652.457809532632},"targetPosition":{"x":24059.356993272086,"y":28952.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":24059.356993272086,"y":28952.457809532632},"targetPosition":{"x":24209.356993272086,"y":29212.265430667965},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":24209.356993272086,"y":29212.265430667965},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","project":"Superalgos","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":24437.002706802843,"y":28602.739808143135},"targetPosition":{"x":24514.6484203336,"y":28892.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":24726.780454689564,"y":28680.385521673892},"targetPosition":{"x":24514.6484203336,"y":28892.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"be19d91b-9337-4f84-96b3-f4e54ea12df5"}}}],"id":"112be2cf-74ea-4272-9566-cf0cd24c111c","savedPayload":{"position":{"x":24514.6484203336,"y":28892.517556029856},"targetPosition":{"x":24437.002706802843,"y":29182.295303916577},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e74c3232-7b59-4006-87fa-b3b2a328a52b","savedPayload":{"position":{"x":24437.002706802843,"y":29182.295303916577},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea","savedPayload":{"position":{"x":24359.356993272086,"y":29472.073051803298},"targetPosition":{"x":24509.356993272086,"y":29731.88067293863},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33","savedPayload":{"position":{"x":24509.356993272086,"y":29731.88067293863},"targetPosition":{"x":24659.356993272086,"y":29991.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}}],"id":"70d459d6-d270-49e0-b70d-2053c65a40e2","savedPayload":{"position":{"x":24659.356993272086,"y":29991.688294073963},"targetPosition":{"x":24809.356993272086,"y":30251.495915209296},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"af949a76-a6f4-4ec6-869e-f240480eea81","savedPayload":{"position":{"x":24809.356993272086,"y":30251.495915209296},"targetPosition":{"x":24959.356993272086,"y":30511.30353634463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"9b93b56d-dccf-4a8c-bbd0-8c608c31363c","savedPayload":{"position":{"x":24959.356993272086,"y":30511.30353634463},"targetPosition":{"x":25109.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":25109.356993272086,"y":30771.11115747996},"targetPosition":{"x":25259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[{"type":"Project Learning Tasks","name":"Superalgos","project":"Superalgos","exchangeLearningTasks":[],"id":"ddd4bf4d-46fd-4c16-86d3-1785f5ad629e","savedPayload":{"position":{"x":25559.356993272086,"y":30511.30353634463},"targetPosition":{"x":25409.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":25409.356993272086,"y":30771.11115747996},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binance","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binance BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Backtesting Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b","savedPayload":{"position":{"x":28335.291877706186,"y":30551.48478700282},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 1000\n}","project":"Superalgos","id":"ed578090-732c-4e41-a4ae-9d4f34607170","savedPayload":{"position":{"x":28424.55868811598,"y":30522.48024208079},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeRange":{"type":"Time Range","name":"New Time Range","config":"{ \n\"initialDatetime\": \"2020-09-01\",\n\"finalDatetime\": \"2020-09-02\",\n \"allowStartingFromThePast\": false\n}","project":"Superalgos","id":"47fa4509-16f4-42b7-9453-fa3b3d2885b0","savedPayload":{"position":{"x":28518.41936714012,"y":30522.48024208079},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"dfe3514c-1aa9-4cea-bb2d-e6657037e69d","savedPayload":{"position":{"x":28607.686177549913,"y":30551.48478700282},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"c711e510-373f-468d-8ed9-1601da6a06f5","savedPayload":{"position":{"x":28683.621061984013,"y":30606.654709903367},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"fdc7c383-8301-4393-b415-8c2d542e05fe","savedPayload":{"position":{"x":28738.79098488456,"y":30682.589594337467},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"28db17c9-2703-430b-a162-5e04b68640a3","savedPayload":{"position":{"x":28767.79552980659,"y":30771.85640474726},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"78270062-7d10-4afa-baee-2bda8a4b4ed2","savedPayload":{"position":{"x":28767.79552980659,"y":30865.7170837714},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"4c9cdc50-70c0-43ee-ad54-052f8b7ecbc8","savedPayload":{"position":{"x":28738.79098488456,"y":30954.983894181194},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e79ab7df-ba40-46aa-abcd-63df8031a931","savedPayload":{"position":{"x":28471.48902762805,"y":30818.78674425933},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2","savedPayload":{"position":{"x":28559.356993272086,"y":31030.918778615294},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"720feaab-efc8-435a-bb3c-ab4e33ed1ca2","savedPayload":{"position":{"x":28471.48902762805,"y":31243.050812971258},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f","savedPayload":{"position":{"x":28259.356993272086,"y":31030.918778615294},"targetPosition":{"x":27959.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"60a5e5c0-cfb3-4488-b46c-55d637212aa5","savedPayload":{"position":{"x":27959.356993272086,"y":31030.918778615294},"targetPosition":{"x":27659.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"cbfbb9e7-9c30-4482-8a9f-4c90771feffc","savedPayload":{"position":{"x":27659.356993272086,"y":31030.918778615294},"targetPosition":{"x":27359.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08222935-2499-4a3e-a927-4f5dfbc392df","savedPayload":{"position":{"x":27359.356993272086,"y":31030.918778615294},"targetPosition":{"x":27059.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"56c5656b-a7e0-42ed-92d6-631e78ca99d0","savedPayload":{"position":{"x":27059.356993272086,"y":31030.918778615294},"targetPosition":{"x":26759.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ce02342-473e-4614-ac76-c7788f56ab8e","savedPayload":{"position":{"x":26759.356993272086,"y":31030.918778615294},"targetPosition":{"x":26459.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"2db856e0-4719-408c-88bc-5b47d412c066","savedPayload":{"position":{"x":26459.356993272086,"y":31030.918778615294},"targetPosition":{"x":26159.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"ba36975c-08d6-458d-b7c0-eb4684a85b5d","savedPayload":{"position":{"x":26159.356993272086,"y":31030.918778615294},"targetPosition":{"x":25859.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"55c01047-3fce-41b3-9214-2e885f28b987","savedPayload":{"position":{"x":25859.356993272086,"y":31030.918778615294},"targetPosition":{"x":25559.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":25559.356993272086,"y":31030.918778615294},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binance","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binance BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Live Trading Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"5db563b5-a8d6-48c6-a34e-bbca8825ce37","savedPayload":{"position":{"x":27214.318791376507,"y":32665.54775609566},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 100\n}","project":"Superalgos","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689","savedPayload":{"position":{"x":27314.957547074417,"y":32638.58168277913},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"727de4cc-40e6-4064-843c-8cb3a9f2fcdf","savedPayload":{"position":{"x":27418.749983429472,"y":32647.662344319935},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"598dc355-73c9-4e7f-a0e9-ee5fd7952825","savedPayload":{"position":{"x":27513.177200804028,"y":32691.69447891996},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"a3646bab-4d27-48a7-b17c-79d6da48f64d","savedPayload":{"position":{"x":27586.849883185412,"y":32765.367161301343},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"5021a926-442a-4341-8844-8a432293ecb1","savedPayload":{"position":{"x":27630.882017785436,"y":32859.7943786759},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"e8cedec0-1bc2-46ba-98de-b7ff746a74c8","savedPayload":{"position":{"x":27639.96267932624,"y":32963.586815030954},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"67da1d57-62ff-424c-ab2e-034e008fc079","savedPayload":{"position":{"x":27612.99660600971,"y":33064.225570728864},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"726c35b1-e30b-4620-819f-a88a955f1902","savedPayload":{"position":{"x":27341.104269898715,"y":32937.440092206656},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"ff1cd7c1-9415-4c49-8ecf-188fd0c60ea4","savedPayload":{"position":{"x":27428.97223554275,"y":33149.57212656262},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"5fd0a826-0819-4f19-a999-66cc64be0272","savedPayload":{"position":{"x":27341.104269898715,"y":33361.70416091858},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"1ce123af-467f-4295-b317-dba8729faf25","savedPayload":{"position":{"x":27128.97223554275,"y":33149.57212656262},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"0d54601b-fcac-42c9-8ce6-d532bfc81de5","savedPayload":{"position":{"x":26978.97223554275,"y":33409.37974769795},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"7e2fdde9-8b64-44a3-85f1-10c3935bd3e3"}}},"id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d","savedPayload":{"position":{"x":26828.97223554275,"y":33149.57212656262},"targetPosition":{"x":26569.16461440742,"y":32999.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"2451fc98-0396-44df-902c-a3eaa90f0618","savedPayload":{"position":{"x":26569.16461440742,"y":32999.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"keyReference":{"type":"Key Reference","name":"Key for Lighting Strike","project":"Superalgos","id":"a0622fc9-c4e3-44c3-963d-7ae5fa163e99","savedPayload":{"position":{"x":26309.356993272086,"y":33149.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},"id":"c8492c4a-a7a7-4a80-a25a-a610377e6180","savedPayload":{"position":{"x":26309.356993272086,"y":32849.57212656262},"targetPosition":{"x":26159.356993272086,"y":32589.76450542729},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dd73b670-11d7-4cdc-848b-c063fb7a3848","savedPayload":{"position":{"x":26159.356993272086,"y":32589.76450542729},"targetPosition":{"x":26009.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1e087225-153c-4c7e-b9ec-2a36f32ee511","savedPayload":{"position":{"x":26009.356993272086,"y":32329.956884291958},"targetPosition":{"x":25859.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"013985a8-7bf7-4b91-8e2d-f4e8bd81cb62","savedPayload":{"position":{"x":25859.356993272086,"y":32070.149263156625},"targetPosition":{"x":25709.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"d539c0ac-aaeb-4c44-9dba-ac26df819a8d","savedPayload":{"position":{"x":25709.356993272086,"y":31810.341642021293},"targetPosition":{"x":25559.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"f4fc305a-6764-427e-86a7-6557118a4b35","savedPayload":{"position":{"x":25559.356993272086,"y":31550.53402088596},"targetPosition":{"x":25409.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":25409.356993272086,"y":31290.726399750627},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Data Products","name":"Superalgos","project":"Superalgos","exchangeDataProducts":[{"type":"Exchange Data Products","name":"Binance","project":"Superalgos","marketDataProducts":[{"type":"Market Data Products","name":"Binance BTC/USDT","project":"Superalgos","dataProducts":[],"dataMineProducts":[{"type":"Data Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Candles Volumes","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Candles","project":"Superalgos","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab","savedPayload":{"position":{"x":25635.373168930517,"y":32126.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Candles","id":"fe6065ec-4d2d-47a0-bae0-8647f0e195d7"}}},{"type":"Data Product","name":"Volumes","project":"Superalgos","id":"07c11481-7dbd-477d-8bf7-79212542a6aa","savedPayload":{"position":{"x":25617.373168930517,"y":32183.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Volumes","id":"1a366aef-efef-470e-88e0-2a6fbe4dd91f"}}}],"dataProductFolders":[],"id":"73bb62ff-8212-4387-b160-40ee8de2a133","savedPayload":{"position":{"x":25028.372734651544,"y":33055.05755156473},"targetPosition":{"x":24913.567704942016,"y":32777.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Resistances and Supports","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Resistances","project":"Superalgos","id":"a1669770-1bbe-40f7-acb3-ded15272935f","savedPayload":{"position":{"x":25621.373168930517,"y":32076.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Resistances","id":"7a734501-a0fb-4305-803e-7e95d477c513"}}},{"type":"Data Product","name":"Supports","project":"Superalgos","id":"64899503-b618-493a-ba94-bfad2051a611","savedPayload":{"position":{"x":25644.373168930517,"y":32138.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Supports","id":"bc3c43de-6312-47d4-ae3d-0c95c1b039e0"}}}],"dataProductFolders":[],"id":"a1855a09-0948-43de-bba7-8900c5c161d8","savedPayload":{"position":{"x":24730.939276239398,"y":33015.89969389871},"targetPosition":{"x":24913.567704942016,"y":32777.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0","savedPayload":{"position":{"x":24913.567704942016,"y":32777.89369181134},"targetPosition":{"x":24952.72556260803,"y":32480.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}}],"id":"6d7273da-5366-4fe3-9749-e643038abd7a","savedPayload":{"position":{"x":24952.72556260803,"y":32480.460233399197},"targetPosition":{"x":24991.883420274044,"y":32183.026774987055},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"9bc0aea4-0596-449c-91bd-4fb4cb672aa8","savedPayload":{"position":{"x":24991.883420274044,"y":32183.026774987055},"targetPosition":{"x":25031.041277940058,"y":31885.593316574912},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"db554581-93fa-465d-89f7-50f026e839d8","savedPayload":{"position":{"x":25031.041277940058,"y":31885.593316574912},"targetPosition":{"x":25070.19913560607,"y":31588.15985816277},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":[{"type":"Project Trading Products","name":"Superalgos","project":"Superalgos","exchangeTradingProducts":[{"type":"Exchange Trading Products","name":"Binance","project":"Superalgos","marketTradingProducts":[{"type":"Market Trading Products","name":"Binance BTC/USDT","project":"Superalgos","tradingSessionReferences":[{"type":"Trading Session Reference","name":"Lightning Strike Backtesting Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631","savedPayload":{"position":{"x":24463.592002018682,"y":31980.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84","savedPayload":{"position":{"x":24313.592002018682,"y":31909.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960","savedPayload":{"position":{"x":24420.592002018682,"y":31952.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"7c580919-08ce-4aff-9e84-888fdf07caec","savedPayload":{"position":{"x":24281.592002018682,"y":31964.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"389797d4-8456-4258-9adf-246a6ba69016","savedPayload":{"position":{"x":24441.592002018682,"y":31984.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa","savedPayload":{"position":{"x":24417.592002018682,"y":31995.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe","savedPayload":{"position":{"x":24475.592002018682,"y":31901.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c","savedPayload":{"position":{"x":24306.592002018682,"y":32068.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"a606455e-f5ce-4535-b1af-6d9dd529f91c","savedPayload":{"position":{"x":24377.592002018682,"y":31972.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86","savedPayload":{"position":{"x":24475.592002018682,"y":31953.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"556e97e8-eba3-419d-869d-950cc99371da","savedPayload":{"position":{"x":24448.592002018682,"y":32071.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"3af0887b-ae23-4f57-b376-4a540fe13112","savedPayload":{"position":{"x":24454.592002018682,"y":32022.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a","savedPayload":{"position":{"x":24352.592002018682,"y":32024.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f","savedPayload":{"position":{"x":24398.592002018682,"y":32035.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"895feaf2-ae82-4b8e-ada6-780beab73ea9","savedPayload":{"position":{"x":24447.592002018682,"y":32101.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"b0961496-1af9-48cd-bbeb-ac5973192e78","savedPayload":{"position":{"x":24555.592002018682,"y":31897.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d","savedPayload":{"position":{"x":24541.592002018682,"y":31929.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"e298787f-b7f2-4334-931e-38b9441e43f9","savedPayload":{"position":{"x":24504.592002018682,"y":31961.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c","savedPayload":{"position":{"x":24444.592002018682,"y":31908.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"9fe11205-286a-4610-81ec-29cbc70d6075","savedPayload":{"position":{"x":24520.592002018682,"y":31974.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd","savedPayload":{"position":{"x":24483.592002018682,"y":31990.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77","savedPayload":{"position":{"x":24491.592002018682,"y":32003.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"e734b6be-ba40-468c-a94f-1153dc85e00c","savedPayload":{"position":{"x":24445.592002018682,"y":32089.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"9a973229-4d9d-45af-b5aa-64906a915f6e","savedPayload":{"position":{"x":24422.592002018682,"y":32032.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"56517fe9-64da-4404-83f3-005106bc1c0a","savedPayload":{"position":{"x":24412.592002018682,"y":32018.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"d00c76e7-4be0-4518-9892-a0f6df943951","savedPayload":{"position":{"x":24594.592002018682,"y":31949.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"b5154bc1-4311-4148-b396-5ebca1c62417","savedPayload":{"position":{"x":24511.592002018682,"y":32023.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"89edd698-1d64-4500-bcef-d13ea74bee1c","savedPayload":{"position":{"x":24421.592002018682,"y":32058.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"a0c29c57-0a20-4084-9697-142300f62f9c","savedPayload":{"position":{"x":24383.592002018682,"y":32063.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"aa0fe882-89a8-4811-8988-c589554afe9d","savedPayload":{"position":{"x":24294.592002018682,"y":32008.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"bbc65054-b22b-4cbb-816b-529672e2f498","savedPayload":{"position":{"x":24324.592002018682,"y":32032.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"776a3ece-8255-4e80-b60f-85bb818b561f","savedPayload":{"position":{"x":24340.592002018682,"y":32026.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"7593aaf9-0505-4b58-9920-235340ff2d2f","savedPayload":{"position":{"x":24325.592002018682,"y":32003.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd","savedPayload":{"position":{"x":24332.592002018682,"y":32039.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"faab4399-898b-4393-8c27-fa2f3109c60a","savedPayload":{"position":{"x":24307.592002018682,"y":32057.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157","savedPayload":{"position":{"x":24297.592002018682,"y":32133.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7","savedPayload":{"position":{"x":24389.592002018682,"y":31999.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"1a16bc12-581d-4626-846c-895f08e65fdf","savedPayload":{"position":{"x":24378.592002018682,"y":32060.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba","savedPayload":{"position":{"x":24433.592002018682,"y":31946.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049","savedPayload":{"position":{"x":24490.592002018682,"y":31966.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc","savedPayload":{"position":{"x":24570.592002018682,"y":32052.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed","savedPayload":{"position":{"x":24567.592002018682,"y":32057.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b","savedPayload":{"position":{"x":24545.592002018682,"y":31956.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642","savedPayload":{"position":{"x":24672.592002018682,"y":31889.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"97736b8e-761c-43f2-83bf-df8f5d41b963","savedPayload":{"position":{"x":24586.592002018682,"y":31971.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"9fc29be1-9393-4933-95d3-bebddd73c05e","savedPayload":{"position":{"x":24507.592002018682,"y":31875.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"b555388f-db93-4db1-91be-7772550afa70","savedPayload":{"position":{"x":24439.592002018682,"y":31926.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"41953904-e48c-4176-bf0f-09d133bc444c","savedPayload":{"position":{"x":24441.592002018682,"y":31883.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c","savedPayload":{"position":{"x":24463.592002018682,"y":31931.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"ac789224-64dc-4ff5-a316-2dfbb6347b8a","savedPayload":{"position":{"x":24487.592002018682,"y":31875.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"6e49b57f-8c94-410f-985b-82c126155b11","savedPayload":{"position":{"x":24693.592002018682,"y":31870.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba","savedPayload":{"position":{"x":24673.592002018682,"y":32018.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f","savedPayload":{"position":{"x":24656.592002018682,"y":31987.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"01491591-0462-453c-91e0-6da6f554a729","savedPayload":{"position":{"x":24536.592002018682,"y":31883.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2","savedPayload":{"position":{"x":24558.592002018682,"y":31830.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"2a4cb5a2-8e6a-4b14-816a-b8e0cce4dae5","savedPayload":{"position":{"x":24616.592002018682,"y":31921.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"39e122ca-cdc4-49a6-91a6-2f2c05f62ea0","savedPayload":{"position":{"x":24528.592002018682,"y":31946.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"363150a9-d4e7-4e2e-b327-89109935718c","savedPayload":{"position":{"x":24436.592002018682,"y":31978.531877463392},"targetPosition":{"x":24383.592002018682,"y":32012.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7","savedPayload":{"position":{"x":24383.592002018682,"y":32012.531877463392},"targetPosition":{"x":24343.592002018682,"y":31925.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"a5de30a4-022e-4f8a-afd0-3eb6d8600ae8","savedPayload":{"position":{"x":24509.356993272086,"y":32629.956884291958},"targetPosition":{"x":24509.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Trading Session Reference","name":"Lightning Strike Live Trading Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"dc6cc4ef-4bd7-4837-8442-919462314db3","savedPayload":{"position":{"x":24040.07658106541,"y":32774.458634291004},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"776ed571-8321-47aa-8cfb-c8ebf565dace","savedPayload":{"position":{"x":24033.260548494378,"y":32904.51628344689},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"ded93703-a48d-44be-9703-878c28f949cd","savedPayload":{"position":{"x":23982.373237179447,"y":33024.39927619857},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a","savedPayload":{"position":{"x":23893.552407881933,"y":33119.64795433567},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027","savedPayload":{"position":{"x":23777.51116347094,"y":33178.77392155408},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2","savedPayload":{"position":{"x":23521.347601016434,"y":33165.348958112605},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65","savedPayload":{"position":{"x":23412.122389176475,"y":33094.417276175125},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"6a331de0-7872-4f86-bea0-6dd802c97921","savedPayload":{"position":{"x":23667.871774199913,"y":32820.15963806794},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"88dd680c-a81b-48ae-96ba-838281abfa35","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"74c10f36-887b-4233-81e5-abe365511bfa","savedPayload":{"position":{"x":23477.99935320648,"y":32860.51826703026},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"7a95a249-132d-4e0f-9182-cc7af45cacea","savedPayload":{"position":{"x":22959.25825209631,"y":32970.78009187916},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"7eca88a8-3724-4ca1-aa30-9227727eb834","savedPayload":{"position":{"x":23293.38569866695,"y":32800.533654476836},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2","savedPayload":{"position":{"x":23104.83496583686,"y":33026.66175662281},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d","savedPayload":{"position":{"x":22898.332847281992,"y":32921.44367184458},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125","savedPayload":{"position":{"x":22793.11476250377,"y":32714.941553289715},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70","savedPayload":{"position":{"x":22829.37044365631,"y":32486.0321914973},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"7236bd16-a6e3-48ac-89bf-dc8674b7e812","savedPayload":{"position":{"x":23163.497890226947,"y":32656.27862889963},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e","savedPayload":{"position":{"x":22942.973442347367,"y":32795.291108279984},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6","savedPayload":{"position":{"x":22818.117657046547,"y":32684.55024509317},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"1c6eed42-23aa-4174-aade-be29222acb8c","savedPayload":{"position":{"x":22753.675141305597,"y":32530.603279980434},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85","savedPayload":{"position":{"x":22762.409525702606,"y":32363.941297417976},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6","savedPayload":{"position":{"x":22842.590858287545,"y":32217.573747027367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"c451c035-5ece-451f-836f-b5334cb3f967","savedPayload":{"position":{"x":22978.338242782465,"y":32120.49051724367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"ce9593a8-3e87-43bb-88c7-af50cf651806","savedPayload":{"position":{"x":23123.13926126462,"y":32466.406207906195},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8be94a26-6821-48bb-8169-3eae2a1131af","savedPayload":{"position":{"x":23497.625336797584,"y":32486.0321914973},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"ba606f99-2ae5-44dc-b7db-399e657830e1","savedPayload":{"position":{"x":23295.861450927674,"y":32622.443323337528},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee","savedPayload":{"position":{"x":23182.53338349962,"y":32592.0771591904},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8","savedPayload":{"position":{"x":23084.13564726847,"y":32528.17692212845},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"dcff6f56-7646-4505-aa93-6682a110f3f2","savedPayload":{"position":{"x":23010.300098233878,"y":32436.997612574425},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5","savedPayload":{"position":{"x":22968.25427437787,"y":32327.464496631084},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7","savedPayload":{"position":{"x":22962.11391388994,"y":32210.299438849055},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"e4811789-fd94-49b0-9917-8d9d434f997d","savedPayload":{"position":{"x":22992.480078037068,"y":32096.971371421},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"029ff3a7-9c65-425f-855a-882df68fa05b","savedPayload":{"position":{"x":23056.38031509902,"y":31998.573635189852},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38","savedPayload":{"position":{"x":23147.559624653044,"y":31924.73808615526},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"7096a712-deb7-4adb-86e0-d688f24d2832","savedPayload":{"position":{"x":23335.059624653044,"y":32249.497612574425},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"c6fd6067-4b57-4860-ae3b-5668e4444490","savedPayload":{"position":{"x":23053.23606537805,"y":32137.53752778946},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"60f88096-7343-42d1-afad-83fecd22fb44","savedPayload":{"position":{"x":23012.87743641572,"y":31947.665106796027},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"9f939086-c934-4924-8353-776707a7cf10","savedPayload":{"position":{"x":22722.769389032703,"y":31897.43943333598},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"da5f279e-d387-43cf-80f4-fc114b9ac906","savedPayload":{"position":{"x":22710.63986411075,"y":31665.99431034305},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"367646bb-839a-4071-8305-6d26a647585d","savedPayload":{"position":{"x":22836.866902325462,"y":31471.62171671013},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9","savedPayload":{"position":{"x":23053.23606537805,"y":31388.56537672353},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"88643ab2-7859-45d4-b967-8681cf970828","savedPayload":{"position":{"x":23072.862048969153,"y":31763.051452256495},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf","savedPayload":{"position":{"x":22846.73394682318,"y":31574.500719426407},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4","savedPayload":{"position":{"x":22951.952031601402,"y":31367.99860087154},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710","savedPayload":{"position":{"x":23158.45415015627,"y":31262.780516093317},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91","savedPayload":{"position":{"x":23387.363511948686,"y":31299.036197245856},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"869369c1-13de-4086-ad40-77b3d54cfc36","savedPayload":{"position":{"x":23217.117074546357,"y":31633.163643816493},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90","savedPayload":{"position":{"x":23092.488032560257,"y":31388.56537672353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"88997c97-e77f-490e-9eb5-c7531beec132","savedPayload":{"position":{"x":23236.74305813746,"y":31258.67756828353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4","savedPayload":{"position":{"x":23426.615479130895,"y":31218.3189393212},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"9b064960-3829-441f-b955-334fb8324a53","savedPayload":{"position":{"x":23611.229133670426,"y":31278.303551874633},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1","savedPayload":{"position":{"x":23741.116942110428,"y":31422.558577451837},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"7f74f2e1-91b6-4d7a-87cb-1d6232a41876","savedPayload":{"position":{"x":23406.98949553979,"y":31592.805014854166},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"291949a0-847b-4b18-b3b4-191496fc38a9","savedPayload":{"position":{"x":23387.363511948686,"y":31967.29109038713},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ae78f4fc-6ee5-4ae4-9847-3bab0e2e51a6","savedPayload":{"position":{"x":23701.86497492822,"y":32171.530728517766},"targetPosition":{"x":24068.670325203395,"y":32093.563844461107},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2b0766-a3d5-47e1-acd8-7345af564388","savedPayload":{"position":{"x":24068.670325203395,"y":32093.563844461107},"targetPosition":{"x":24313.207225386846,"y":32041.58592175667},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"9ef30086-0c9d-47c2-8983-db5fc9a99583","savedPayload":{"position":{"x":24249.549372136753,"y":32479.956884291958},"targetPosition":{"x":24509.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"026bab29-64d0-4d83-862c-446657efa101","savedPayload":{"position":{"x":24509.356993272086,"y":32329.956884291958},"targetPosition":{"x":24659.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"f601d2a7-fada-477f-9b63-3ef7ed42d44a","savedPayload":{"position":{"x":24659.356993272086,"y":32070.149263156625},"targetPosition":{"x":24809.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"691abc38-257f-462f-bee5-1cc51d77cea6","savedPayload":{"position":{"x":24809.356993272086,"y":31810.341642021293},"targetPosition":{"x":24959.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":[{"type":"Project Learning Products","name":"Superalgos","project":"Superalgos","exchangeLearningProducts":[],"id":"071c1c13-0e4c-4649-b2eb-7dc422278961","savedPayload":{"position":{"x":24633.344989097342,"y":31655.98325715586},"targetPosition":{"x":24871.350991184714,"y":31473.354828453244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":25109.356993272086,"y":31290.726399750627},"targetPosition":{"x":25259.356993272086,"y":31030.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":25259.356993272086,"y":31030.918778615294},"targetPosition":{"x":24959.356993272086,"y":31030.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":true,"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":[{"type":"Crypto Exchange","name":"Binance","config":"{\n \"codeName\": \"binance\",\n \"API\": [\n {\n \"method\": \"fetchTrades\",\n \"fetchType\": \"by Id\",\n \"fetchTradesMethod\": \"publicGetHistoricalTrades\",\n \"firstId\": \"f\"\n }\n ]\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"EUR\"} \n}","project":"Superalgos","assets":[{"type":"Asset","name":"Bitcoin","config":"{ \n\"codeName\": \"BTC\"\n}","project":"Superalgos","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa","savedPayload":{"position":{"x":19793.079365950267,"y":30513.325102172115},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Asset","name":"Tether","config":"{ \n\"codeName\": \"USDT\"\n}","project":"Superalgos","id":"f110bfa0-bd5b-469b-a940-4524c8688136","savedPayload":{"position":{"x":20005.21140030623,"y":30725.45713652808},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"95d2c30f-215b-486e-8119-f4eac0279575","savedPayload":{"position":{"x":19715.43365241951,"y":30803.102850058836},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"E"}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","code":"{ \n\"codeName\": \"Write here the code name of the Market here.\"\n}","project":"Superalgos","markets":[{"type":"Market","name":"BTC/USDT","config":"{ \n\"codeName\": \"BTC/USDT\"\n}","project":"Superalgos","baseAsset":{"type":"Market Base Asset","name":"Bitcoin","project":"Superalgos","id":"1017b30d-de1b-4212-991e-9fd0a5b6c814","savedPayload":{"position":{"x":20393.079365950267,"y":30937.589170884043},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},"quotedAsset":{"type":"Market Quoted Asset","name":"Tether","project":"Superalgos","id":"705c4a67-787a-48cd-a3dc-3a557438bf0b","savedPayload":{"position":{"x":20393.079365950267,"y":31092.880597945557},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}},"id":"9a867bf0-a71d-445c-b99a-75b60bbdce09","savedPayload":{"position":{"x":20103.301618063546,"y":31015.2348844148},"targetPosition":{"x":19803.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2fd80894-900e-44ac-a1a7-56c14124f7a1","savedPayload":{"position":{"x":19803.301618063546,"y":31015.2348844148},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[{"type":"Exchange Account Asset","name":"Bitcoin","project":"Superalgos","id":"ba6f3d5c-b36b-49d9-947f-392068109169","savedPayload":{"position":{"x":20507.121182548915,"y":31439.498953126727},"targetPosition":{"x":20217.343434662194,"y":31517.144666657485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},{"type":"Exchange Account Asset","name":"Tether","project":"Superalgos","id":"c90be267-90f9-45ae-b225-0578adb4aad9","savedPayload":{"position":{"x":20429.475469018158,"y":31729.27670101345},"targetPosition":{"x":20217.343434662194,"y":31517.144666657485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}}],"id":"8ac5c2a9-a238-48ae-ab43-0a0a95a37464","savedPayload":{"position":{"x":20217.343434662194,"y":31517.144666657485},"targetPosition":{"x":19927.565686775473,"y":31439.498953126727},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"Key for Lighting Strike","config":"{\n \"codeName\": \"DOUBLE_CLICK_ON_THIS_STRING_TO_SELECT_IT_XXX_DELETE_IT_AND_PASTE_YOUR_EXCHANGE_API_PUBLIC_KEY\",\n \"secret\": \"REPLACE_THIS_STRING_WITH_YOUR_API_KEY_SECRET\"\n}","project":"Superalgos","id":"e85bbbd6-aca8-450f-9237-788062de5761","savedPayload":{"position":{"x":20082.857113836988,"y":32019.05444890017},"targetPosition":{"x":20005.21140030623,"y":31729.27670101345},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"48925cc9-f3cd-4499-8466-1338fed28a0d","savedPayload":{"position":{"x":20005.21140030623,"y":31729.27670101345},"targetPosition":{"x":19927.565686775473,"y":31439.498953126727},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"63794496-c94b-42f9-81cc-c588708617a6","savedPayload":{"position":{"x":19927.565686775473,"y":31439.498953126727},"targetPosition":{"x":19715.43365241951,"y":31227.366918770764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4b0c1ac5-515f-44a9-b9b9-e698a9c51eac","savedPayload":{"position":{"x":19715.43365241951,"y":31227.366918770764},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b","savedPayload":{"position":{"x":19503.301618063546,"y":31015.2348844148},"targetPosition":{"x":19203.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""},"tutorial":{"status":"Done"}}}],"id":"e3879d63-6f8f-41a3-8ac3-0349c4361722","savedPayload":{"position":{"x":19203.301618063546,"y":31015.2348844148},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Untested","project":"Superalgos","exchanges":[{"type":"Crypto Exchange","name":"ACX","config":"{ \n\"codeName\": \"acx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ebcb522b-ae58-46d2-9d82-a9b0beec3976","savedPayload":{"position":{"x":17935.64382962515,"y":31014.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b2649588-27c6-442c-b179-f6d8817188b3","savedPayload":{"position":{"x":17954.64382962515,"y":31004.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9b2051d5-7ee7-4e94-8c8d-306674889339","savedPayload":{"position":{"x":17838.64382962515,"y":30896.23747069523},"targetPosition":{"x":17766.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"1d5461aa-d26c-4df5-b383-8c83e311b8ca","savedPayload":{"position":{"x":17643.64382962515,"y":30952.23747069523},"targetPosition":{"x":17698.64382962515,"y":30973.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c6372400-de52-4b63-97f3-f748aac9c63f","savedPayload":{"position":{"x":17698.64382962515,"y":30973.23747069523},"targetPosition":{"x":17766.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c948314e-2247-4234-b83d-cc2c1b152665","savedPayload":{"position":{"x":17766.64382962515,"y":30905.23747069523},"targetPosition":{"x":17837.64382962515,"y":30978.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"04ccb742-ef1b-4138-b38d-a6b0d92f2f8e","savedPayload":{"position":{"x":17837.64382962515,"y":30978.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9c21b2d-de21-43b5-8b48-51367a8c981c","savedPayload":{"position":{"x":19313.14497226101,"y":30565.583066825377},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"AOFEX","config":"{ \n\"codeName\": \"aofex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"623ef91b-04c0-4bd5-ac0d-b32c809be3ea","savedPayload":{"position":{"x":17973.64382962515,"y":30923.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"9d0b5855-59a6-4dda-9a4b-33d7a44d582e","savedPayload":{"position":{"x":17901.64382962515,"y":30994.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"e898e569-0dd3-4a22-baa5-caaace66d4ed","savedPayload":{"position":{"x":18062.64382962515,"y":30838.23747069523},"targetPosition":{"x":17982.64382962515,"y":30899.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"64a69d3d-15ff-41c3-a926-5ec93c932ab1","savedPayload":{"position":{"x":17822.64382962515,"y":31052.23747069523},"targetPosition":{"x":17893.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae2785c5-75a1-44fc-a71b-363d88cb5dac","savedPayload":{"position":{"x":17893.64382962515,"y":30981.23747069523},"targetPosition":{"x":17982.64382962515,"y":30899.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07ea69aa-7357-43b1-b548-a4c4fab70c55","savedPayload":{"position":{"x":17982.64382962515,"y":30899.23747069523},"targetPosition":{"x":17971.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2146b410-fc4e-452d-ae57-5d58c9a29706","savedPayload":{"position":{"x":17971.64382962515,"y":30962.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c2e9bb45-97c7-47e8-b13c-56946e673c53","savedPayload":{"position":{"x":19413.67778623216,"y":30647.89853748846},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bequant","config":"{ \n\"codeName\": \"bequant\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"b23c8adf-c880-48fd-b4af-4b4be86cf0e5","savedPayload":{"position":{"x":18059.64382962515,"y":31101.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"523bd94f-68f9-457e-91fd-806c1b95e98d","savedPayload":{"position":{"x":18006.64382962515,"y":31117.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9d914bb1-a68b-41ae-8666-0fcc755358c1","savedPayload":{"position":{"x":17859.64382962515,"y":30964.23747069523},"targetPosition":{"x":17936.64382962515,"y":31059.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"15d903b5-113c-465e-8120-7c46a9a85565","savedPayload":{"position":{"x":17976.64382962515,"y":31146.23747069523},"targetPosition":{"x":17943.64382962515,"y":31134.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2d1c0bc3-abe2-4340-91bf-2eef5b98a2f0","savedPayload":{"position":{"x":17943.64382962515,"y":31134.23747069523},"targetPosition":{"x":17936.64382962515,"y":31059.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a50d459-914c-4bfc-91e8-f15c383280eb","savedPayload":{"position":{"x":17936.64382962515,"y":31059.23747069523},"targetPosition":{"x":17931.64382962515,"y":31071.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b2f2b69f-3bef-4edc-9950-5261d9f36382","savedPayload":{"position":{"x":17931.64382962515,"y":31071.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e928d3e-a2c2-4341-aa2f-b753551c9479","savedPayload":{"position":{"x":19504.72140465123,"y":30740.600980501622},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bibox","config":"{ \n\"codeName\": \"bibox\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"13c1f22c-9a35-4d3f-b000-c96984fd6a2b","savedPayload":{"position":{"x":17995.64382962515,"y":31047.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3c6df49d-70c3-468a-bdd8-6768ce6d3a9d","savedPayload":{"position":{"x":17916.64382962515,"y":31018.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5a54ef39-8fba-4a5f-ac24-5f27e763e28f","savedPayload":{"position":{"x":18050.64382962515,"y":31174.23747069523},"targetPosition":{"x":17956.64382962515,"y":31128.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"08df1f45-dab0-463a-8758-359973f2620d","savedPayload":{"position":{"x":17899.64382962515,"y":31242.23747069523},"targetPosition":{"x":17959.64382962515,"y":31180.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"105b52c2-90ad-4fa1-b690-d8fab14209b4","savedPayload":{"position":{"x":17959.64382962515,"y":31180.23747069523},"targetPosition":{"x":17956.64382962515,"y":31128.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"68c1ef42-1b7b-4cc6-981f-80b20dabcd89","savedPayload":{"position":{"x":17956.64382962515,"y":31128.23747069523},"targetPosition":{"x":17907.64382962515,"y":31057.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"fc35e5d0-ea61-42b6-979a-859f19c5ac6c","savedPayload":{"position":{"x":17907.64382962515,"y":31057.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e5f9ee4d-77a3-48ae-b354-b2f6a97d5e47","savedPayload":{"position":{"x":19585.208424334218,"y":30842.603544479174},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BigONE","config":"{ \n\"codeName\": \"bigone\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"3f289513-c1c8-457c-b65a-8cf62b5f5eb5","savedPayload":{"position":{"x":17778.64382962515,"y":31071.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b365e73-1cee-496a-921f-121cb628a130","savedPayload":{"position":{"x":17798.64382962515,"y":31121.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"447a4f6f-cfa0-443e-9339-d7c1153ada31","savedPayload":{"position":{"x":17921.64382962515,"y":31046.23747069523},"targetPosition":{"x":17891.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0d234c53-c121-471e-bce1-a258c13cd148","savedPayload":{"position":{"x":17848.64382962515,"y":31175.23747069523},"targetPosition":{"x":17944.64382962515,"y":31086.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"816e1b6a-d790-4abd-9ae1-e203fa737af2","savedPayload":{"position":{"x":17944.64382962515,"y":31086.23747069523},"targetPosition":{"x":17891.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"561a57f7-8c22-4e50-840d-d983ed6bb864","savedPayload":{"position":{"x":17891.64382962515,"y":31102.23747069523},"targetPosition":{"x":17813.64382962515,"y":31064.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e243bd5d-ade7-46c8-876b-6ad8c6eb5e0a","savedPayload":{"position":{"x":17813.64382962515,"y":31064.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fb9ee540-bf12-4dda-bf87-cb6b58fce649","savedPayload":{"position":{"x":19654.195208565325,"y":30952.710342620318},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance Jersey","config":"{ \n\"codeName\": \"binanceje\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0b979ea9-7a2d-4744-9517-2dfa632dfafc","savedPayload":{"position":{"x":17852.64382962515,"y":30989.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b9a4497d-20f1-4c61-9a79-444e0fe0ddf4","savedPayload":{"position":{"x":17924.64382962515,"y":30952.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1b24d8a4-ec70-4501-838c-7633f6f7288e","savedPayload":{"position":{"x":17882.64382962515,"y":31051.23747069523},"targetPosition":{"x":17942.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"627472e3-638f-4d68-a917-d0844d6a227b","savedPayload":{"position":{"x":17991.64382962515,"y":31190.23747069523},"targetPosition":{"x":17986.64382962515,"y":31110.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"b8ce75fb-93c9-4ca2-9b2b-9f8ed8af34f3","savedPayload":{"position":{"x":17986.64382962515,"y":31110.23747069523},"targetPosition":{"x":17942.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08b226e4-14ee-4ad3-8d96-efe77cc38489","savedPayload":{"position":{"x":17942.64382962515,"y":31066.23747069523},"targetPosition":{"x":17949.64382962515,"y":31009.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2771eb11-bc72-4273-9e1b-9ac5410c6354","savedPayload":{"position":{"x":17949.64382962515,"y":31009.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2782350a-84a2-40ec-87c6-3c8043376a18","savedPayload":{"position":{"x":19710.872950374665,"y":31069.630473388454},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance US","config":"{ \n\"codeName\": \"binanceus\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"817ee1cf-b44c-4458-a9c4-a05a17ea0510","savedPayload":{"position":{"x":17943.64382962515,"y":30999.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c6694e9e-74dc-4c2e-9151-90f1d6631b45","savedPayload":{"position":{"x":17937.64382962515,"y":30989.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"00144904-5363-49eb-b445-8c8283d92b0d","savedPayload":{"position":{"x":17838.64382962515,"y":31193.23747069523},"targetPosition":{"x":17781.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2e71aa3c-03d4-4dbd-bc50-43b30f59e655","savedPayload":{"position":{"x":17783.64382962515,"y":31148.23747069523},"targetPosition":{"x":17703.64382962515,"y":31182.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"a4d0df32-c600-4421-b893-2a05f0442ed6","savedPayload":{"position":{"x":17703.64382962515,"y":31182.23747069523},"targetPosition":{"x":17781.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7a39543a-00e1-452b-8aba-36c2b240f9fc","savedPayload":{"position":{"x":17781.64382962515,"y":31156.23747069523},"targetPosition":{"x":17799.64382962515,"y":31119.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2543c4e5-8233-4348-b6dc-e47aed1ff381","savedPayload":{"position":{"x":17799.64382962515,"y":31119.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0b2b67d2-853b-470e-8b13-925956ad5621","savedPayload":{"position":{"x":19754.577155060477,"y":31191.993155151424},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitbank","config":"{ \n\"codeName\": \"bitbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eb6b6842-9bf7-450e-baa3-7a87541a1cf6","savedPayload":{"position":{"x":17955.64382962515,"y":31107.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6353ff56-759f-457d-81f3-fdb8ae5b3e83","savedPayload":{"position":{"x":17942.64382962515,"y":31183.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a2b297c7-f33b-48b9-98fa-d339c7b0ff67","savedPayload":{"position":{"x":17999.64382962515,"y":31016.23747069523},"targetPosition":{"x":17945.64382962515,"y":31116.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"9ce6c354-b294-4062-b763-421e5edb69de","savedPayload":{"position":{"x":17883.64382962515,"y":31186.23747069523},"targetPosition":{"x":17845.64382962515,"y":31202.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"547dbf6c-a292-46c0-a628-62856858121e","savedPayload":{"position":{"x":17845.64382962515,"y":31202.23747069523},"targetPosition":{"x":17945.64382962515,"y":31116.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"097055b3-37e5-4100-a24b-91e404fe49a6","savedPayload":{"position":{"x":17945.64382962515,"y":31116.23747069523},"targetPosition":{"x":17897.64382962515,"y":31142.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51aed4ce-0303-431e-a15f-e6f133f7a2cf","savedPayload":{"position":{"x":17897.64382962515,"y":31142.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c9a96a7-ed12-4b3e-bb51-306a8da131f5","savedPayload":{"position":{"x":19784.79543078195,"y":31318.363797342816},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitBay","config":"{ \n\"codeName\": \"bitbay\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83b4e523-72a7-41ce-9363-fe0c799dcac1","savedPayload":{"position":{"x":17861.64382962515,"y":30965.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"966698f7-8a28-42d7-bb80-f7cd0601e44f","savedPayload":{"position":{"x":17823.64382962515,"y":31026.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"554829eb-3d40-4b95-a1cd-9de943763e2c","savedPayload":{"position":{"x":17914.64382962515,"y":30924.23747069523},"targetPosition":{"x":17876.64382962515,"y":30921.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2f534989-7ca7-4c3d-b14a-3b1071543c8c","savedPayload":{"position":{"x":17845.64382962515,"y":30853.23747069523},"targetPosition":{"x":17832.64382962515,"y":30821.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2f6b76b4-51d4-434f-8aa1-ed86b0e26bd2","savedPayload":{"position":{"x":17832.64382962515,"y":30821.23747069523},"targetPosition":{"x":17876.64382962515,"y":30921.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cbcc3ab6-9758-4273-99d2-9d05fdd392b5","savedPayload":{"position":{"x":17876.64382962515,"y":30921.23747069523},"targetPosition":{"x":17805.64382962515,"y":31015.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dada6c12-7c41-4ab8-9922-908233829f58","savedPayload":{"position":{"x":17805.64382962515,"y":31015.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8778eee5-97a2-4f9d-bd25-cd5a64ec6663","savedPayload":{"position":{"x":19801.173495885087,"y":31447.26081972472},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"33508b53-2769-4f3d-8c98-9fa37e5cbf5b","savedPayload":{"position":{"x":17888.64382962515,"y":31043.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4d4ad5a1-81a7-4f92-83db-99f57ce261bb","savedPayload":{"position":{"x":17975.64382962515,"y":30868.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"29d52baf-645c-4d8f-9631-ebd391b4c815","savedPayload":{"position":{"x":18034.64382962515,"y":31066.23747069523},"targetPosition":{"x":18037.64382962515,"y":31012.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d615c33d-c6cf-4572-ac32-8e9ddeb5bb52","savedPayload":{"position":{"x":18023.64382962515,"y":30916.23747069523},"targetPosition":{"x":18106.64382962515,"y":30982.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"0c189040-6318-483c-b6d7-982370a3298d","savedPayload":{"position":{"x":18106.64382962515,"y":30982.23747069523},"targetPosition":{"x":18037.64382962515,"y":31012.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cd60de4a-d17c-4ba7-936a-cbf2305fe3bb","savedPayload":{"position":{"x":18037.64382962515,"y":31012.23747069523},"targetPosition":{"x":18039.64382962515,"y":30964.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d247f4f5-6f16-4a59-a4a5-6d1554b43562","savedPayload":{"position":{"x":18039.64382962515,"y":30964.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c076027-683d-4778-8a6a-e60984980fdf","savedPayload":{"position":{"x":19803.51933253116,"y":31577.173022561386},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8fc7f955-5c81-446c-bbeb-205988bf1fc0","savedPayload":{"position":{"x":17830.64382962515,"y":31051.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d5ba38e9-3282-4634-b922-16532c71f426","savedPayload":{"position":{"x":17819.64382962515,"y":31118.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1cebbed5-28f7-4ccd-afce-9e7634d90fb6","savedPayload":{"position":{"x":17892.64382962515,"y":30997.23747069523},"targetPosition":{"x":17855.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0d109aa9-c80c-4a64-96f0-1d8fda0a70a4","savedPayload":{"position":{"x":17888.64382962515,"y":30805.23747069523},"targetPosition":{"x":17942.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5459ab1e-a1ce-4dae-ae72-61c1f7f37ce0","savedPayload":{"position":{"x":17942.64382962515,"y":30905.23747069523},"targetPosition":{"x":17855.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a4615f7a-000d-4ff9-b5ac-109bc9a3a849","savedPayload":{"position":{"x":17855.64382962515,"y":30970.23747069523},"targetPosition":{"x":17919.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e10d303e-ea21-4625-bae1-c32ad7a44e8a","savedPayload":{"position":{"x":17919.64382962515,"y":31043.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f3114102-a73c-4086-9594-5888ef1ab4ec","savedPayload":{"position":{"x":19791.80543793031,"y":31706.577304054405},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitforex","config":"{ \n\"codeName\": \"bitforex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"698e5e38-ad73-4cb6-b7f6-2b69913faff9","savedPayload":{"position":{"x":17897.64382962515,"y":30956.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"f0142bd4-1b63-4d12-a4b7-e150d0da197f","savedPayload":{"position":{"x":18020.64382962515,"y":31021.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"7164fb28-405b-461a-a7d4-59d438ecf1ce","savedPayload":{"position":{"x":17821.64382962515,"y":30984.23747069523},"targetPosition":{"x":17901.64382962515,"y":30907.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"ce8a00c9-f090-4ec2-84ed-c6661f8bf7b0","savedPayload":{"position":{"x":17825.64382962515,"y":30965.23747069523},"targetPosition":{"x":17818.64382962515,"y":30913.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"579cd74b-98f6-4000-990b-25ae1456c94b","savedPayload":{"position":{"x":17818.64382962515,"y":30913.23747069523},"targetPosition":{"x":17901.64382962515,"y":30907.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"dbac6eef-25d2-4cda-86a6-59ce8a9a26bc","savedPayload":{"position":{"x":17901.64382962515,"y":30907.23747069523},"targetPosition":{"x":17909.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"a1da9dd3-22ec-4536-bb5a-4d0bb8a56b81","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"499a5a3b-7871-4c95-9b2e-d58d4d9e2392","savedPayload":{"position":{"x":19766.169146786622,"y":31833.956517318737},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitkk","config":"{ \n\"codeName\": \"bitkk\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"efbb916c-780b-447f-a4c2-df68570d4ee1","savedPayload":{"position":{"x":17931.64382962515,"y":30937.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0d829516-81d9-46a5-9861-7d94cc89455d","savedPayload":{"position":{"x":17951.64382962515,"y":30912.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"fc174aa3-c485-4b9b-ba19-444b0189ccb1","savedPayload":{"position":{"x":17788.64382962515,"y":30980.23747069523},"targetPosition":{"x":17834.64382962515,"y":30983.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"15921d8a-4b45-481c-9165-79969ed3fd27","savedPayload":{"position":{"x":17796.64382962515,"y":30936.23747069523},"targetPosition":{"x":17891.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"927d5c8a-85df-48bb-b097-c36abb76ca0e","savedPayload":{"position":{"x":17891.64382962515,"y":30922.23747069523},"targetPosition":{"x":17834.64382962515,"y":30983.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"43d218c2-e633-47d5-8dd8-60bc7f7c0b9e","savedPayload":{"position":{"x":17834.64382962515,"y":30983.23747069523},"targetPosition":{"x":17853.64382962515,"y":30925.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2d310d61-cbc7-4306-af02-be3888939545","savedPayload":{"position":{"x":17853.64382962515,"y":30925.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ded39740-3c93-4fda-bb9c-6ac75d2109f4","savedPayload":{"position":{"x":19726.911021174266,"y":31957.817257542785},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMart","config":"{ \n\"codeName\": \"bitmart\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"10374855-6b4a-460b-9c95-70072ac00315","savedPayload":{"position":{"x":17907.64382962515,"y":30901.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3aded60c-4061-48ff-ad33-212c965b5c43","savedPayload":{"position":{"x":17829.64382962515,"y":30925.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1789a3ca-d948-497d-8d1b-1eefd25d16a3","savedPayload":{"position":{"x":17886.64382962515,"y":30937.23747069523},"targetPosition":{"x":17895.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"038170bc-0ca7-4a92-8219-61b7bc8431b0","savedPayload":{"position":{"x":17893.64382962515,"y":31034.23747069523},"targetPosition":{"x":17835.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"55f79ede-ef02-405f-92bd-11902ab3cc7a","savedPayload":{"position":{"x":17835.64382962515,"y":30962.23747069523},"targetPosition":{"x":17895.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8185c660-4af3-4a62-bfa9-8922861101b5","savedPayload":{"position":{"x":17895.64382962515,"y":30988.23747069523},"targetPosition":{"x":17819.64382962515,"y":30909.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"546d48c3-df31-495c-b3b4-cb35109c5542","savedPayload":{"position":{"x":17819.64382962515,"y":30909.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c7ed52a7-895b-46f1-a745-35954d8bcfc6","savedPayload":{"position":{"x":19674.491326722004,"y":32076.707370794375},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMax","config":"{ \n\"codeName\": \"bitmax\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8a042d0d-7a7a-4a76-889e-42d8642404f4","savedPayload":{"position":{"x":17944.64382962515,"y":31046.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0c4fcc48-51e6-4ff2-925f-405cda6d1122","savedPayload":{"position":{"x":17898.64382962515,"y":31024.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"ef9d5381-d9e3-47f5-9069-6fc14eda0fa3","savedPayload":{"position":{"x":17879.64382962515,"y":31096.23747069523},"targetPosition":{"x":17977.64382962515,"y":31041.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c66fe606-9705-45b0-a196-7ea3efb0221e","savedPayload":{"position":{"x":17982.64382962515,"y":31053.23747069523},"targetPosition":{"x":17943.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"80a5f68e-776a-44de-8797-d2eb806c306e","savedPayload":{"position":{"x":17943.64382962515,"y":31083.23747069523},"targetPosition":{"x":17977.64382962515,"y":31041.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"011fcf1c-1c94-4c36-a246-d6c400aa39dc","savedPayload":{"position":{"x":17977.64382962515,"y":31041.23747069523},"targetPosition":{"x":17942.64382962515,"y":31103.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4a87b8c5-e009-427f-afb7-21afe5594b59","savedPayload":{"position":{"x":17942.64382962515,"y":31103.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fc6a9048-ab8c-48f9-91ae-6c95c28714b0","savedPayload":{"position":{"x":19609.524636419505,"y":32189.2329791979},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMEX","config":"{ \n\"codeName\": \"bitmex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f7636e2b-354a-4217-894b-5e26eddc0c2a","savedPayload":{"position":{"x":17894.64382962515,"y":30934.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6eb2ddd1-6d06-456c-b4e0-7df56ba182e6","savedPayload":{"position":{"x":17823.64382962515,"y":30834.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"b4a4b8fe-d923-4eb0-a066-171b83d1540d","savedPayload":{"position":{"x":17902.64382962515,"y":31064.23747069523},"targetPosition":{"x":17815.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"918ed585-ce46-4d51-a07a-9beee51f70eb","savedPayload":{"position":{"x":17711.64382962515,"y":31036.23747069523},"targetPosition":{"x":17805.64382962515,"y":31078.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"9efef4d8-5be3-4d17-a645-6edffd9535cf","savedPayload":{"position":{"x":17805.64382962515,"y":31078.23747069523},"targetPosition":{"x":17815.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ad31a6e-f27b-45c3-9996-a41fb39aa154","savedPayload":{"position":{"x":17815.64382962515,"y":30988.23747069523},"targetPosition":{"x":17844.64382962515,"y":30896.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"82887393-cb1c-4b01-8581-4b3dabc86584","savedPayload":{"position":{"x":17844.64382962515,"y":30896.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1e2f1dd0-ebf1-4485-83d8-7723a9e3e714","savedPayload":{"position":{"x":19532.77262531095,"y":32294.07482287797},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bittrex","config":"{ \n\"codeName\": \"bittrex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"88d4ef94-f030-42df-9115-69d9611317b1","savedPayload":{"position":{"x":17839.64382962515,"y":31009.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"7fe8234d-9a39-4b28-bf98-43b4fdb57ee5","savedPayload":{"position":{"x":17878.64382962515,"y":31045.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5ba7fe13-1e0f-403a-8f4b-8e3968d2e5e2","savedPayload":{"position":{"x":17841.64382962515,"y":30890.23747069523},"targetPosition":{"x":17742.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"e926fbb8-d2ac-4e3d-aa59-a0a828d202fd","savedPayload":{"position":{"x":17707.64382962515,"y":30983.23747069523},"targetPosition":{"x":17782.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"4fbe41e1-cb15-4bc2-a3de-681c5b22cc97","savedPayload":{"position":{"x":17782.64382962515,"y":31052.23747069523},"targetPosition":{"x":17742.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ab9fe180-1c07-44de-a0a1-863761ac52d6","savedPayload":{"position":{"x":17742.64382962515,"y":30961.23747069523},"targetPosition":{"x":17796.64382962515,"y":30903.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"584f29ca-9b3c-4b7f-a2b0-aab4180ecefd","savedPayload":{"position":{"x":17796.64382962515,"y":30903.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f598f002-8fc5-491f-888e-07d017ea83c6","savedPayload":{"position":{"x":19445.135140551556,"y":32390.003727075255},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bit-Z","config":"{ \n\"codeName\": \"bitz\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0a22e02b-7d2e-4955-9cfc-ed7d95f0c9a0","savedPayload":{"position":{"x":17751.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"298b45af-b73d-4cd5-848a-97de7b857569","savedPayload":{"position":{"x":17944.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6ede807b-b1ab-42b5-bfd7-3b12a942447e","savedPayload":{"position":{"x":17871.64382962515,"y":31049.23747069523},"targetPosition":{"x":17772.64382962515,"y":31098.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"dc172858-3241-4487-950a-e5cae03ac376","savedPayload":{"position":{"x":17751.64382962515,"y":31081.23747069523},"targetPosition":{"x":17753.64382962515,"y":31028.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"19c07cee-1fdf-4e02-ac9f-d110b64ee033","savedPayload":{"position":{"x":17753.64382962515,"y":31028.23747069523},"targetPosition":{"x":17772.64382962515,"y":31098.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b4ef5048-ac4c-410e-bd6d-3338e33ab108","savedPayload":{"position":{"x":17772.64382962515,"y":31098.23747069523},"targetPosition":{"x":17788.64382962515,"y":31134.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e7e96c41-c839-4eec-9bcf-1c60d60fa3f5","savedPayload":{"position":{"x":17788.64382962515,"y":31134.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6cc10926-fe41-43be-887b-fa8aba1c7377","savedPayload":{"position":{"x":19347.639651522415,"y":32475.89501309667},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC-Alpha","config":"{ \n\"codeName\": \"btcalpha\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"263e3b9c-8fdd-4376-b53b-87f32d0f5898","savedPayload":{"position":{"x":17904.64382962515,"y":30922.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"804603e1-3e0f-4219-a9b7-ee27810d4f07","savedPayload":{"position":{"x":17829.64382962515,"y":30977.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"83b25fff-e448-483f-9bee-cb85fa592c6e","savedPayload":{"position":{"x":17734.64382962515,"y":30862.23747069523},"targetPosition":{"x":17829.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"efcfa3ca-0f82-4eb7-9b04-ed5eb4e1c3cf","savedPayload":{"position":{"x":17799.64382962515,"y":30864.23747069523},"targetPosition":{"x":17837.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"9ca8d728-ee11-4905-9a3a-5ca4ed50f3df","savedPayload":{"position":{"x":17837.64382962515,"y":30919.23747069523},"targetPosition":{"x":17829.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2cfde277-afa6-4ad3-bb5b-8a32b89e2037","savedPayload":{"position":{"x":17829.64382962515,"y":30960.23747069523},"targetPosition":{"x":17903.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"297a0ea2-f6d7-47fd-9fb7-0d99d00a87d8","savedPayload":{"position":{"x":17903.64382962515,"y":30969.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"30e5485f-213b-435b-a670-07b76cfe5cae","savedPayload":{"position":{"x":19241.429203691412,"y":32550.741684144767},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC Markets","config":"{ \n\"codeName\": \"btcmarkets\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"fcb3b880-0852-4d93-8714-67373f9dca16","savedPayload":{"position":{"x":17911.64382962515,"y":31036.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"953d8eff-0b2e-4b07-8635-393fddae0c9d","savedPayload":{"position":{"x":18025.64382962515,"y":31127.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c08873f6-9120-4764-8b06-c8110468b423","savedPayload":{"position":{"x":17935.64382962515,"y":30927.23747069523},"targetPosition":{"x":18027.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"beaa2557-4976-4e53-8a24-7ea00fc3afd5","savedPayload":{"position":{"x":18054.64382962515,"y":30851.23747069523},"targetPosition":{"x":18125.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"445158a2-91b4-4ad8-8380-036cbba6ad7e","savedPayload":{"position":{"x":18125.64382962515,"y":30951.23747069523},"targetPosition":{"x":18027.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cd00e08c-a26d-4b11-93a3-b0e8f35bec4b","savedPayload":{"position":{"x":18027.64382962515,"y":31003.23747069523},"targetPosition":{"x":18016.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"35cb55c1-ceb3-4093-98af-8a1c2411fe0f","savedPayload":{"position":{"x":18016.64382962515,"y":31075.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ac2fda42-95ca-404a-8dd2-72bff0ff5a0f","savedPayload":{"position":{"x":19127.749017450227,"y":32613.66623143447},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Buda","config":"{ \n\"codeName\": \"buda\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"27f3573d-e1f0-473f-9bfd-f9198e7240a0","savedPayload":{"position":{"x":17945.64382962515,"y":30937.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ddc0981-4e45-42f3-ae11-f5b136b2bc3d","savedPayload":{"position":{"x":17783.64382962515,"y":31008.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5a325d59-e6a6-4f76-a311-5e67c5f5a8a2","savedPayload":{"position":{"x":17980.64382962515,"y":30843.23747069523},"targetPosition":{"x":17956.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"fb985ab9-7759-4780-a052-8ee9be0b712a","savedPayload":{"position":{"x":17907.64382962515,"y":30968.23747069523},"targetPosition":{"x":17958.64382962515,"y":30884.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fdf7665a-2974-467b-9280-4077a888733f","savedPayload":{"position":{"x":17958.64382962515,"y":30884.23747069523},"targetPosition":{"x":17956.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a3105cfc-f80e-4bcb-b399-6ea9c0f7edf0","savedPayload":{"position":{"x":17956.64382962515,"y":30936.23747069523},"targetPosition":{"x":17872.64382962515,"y":30941.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5d69a76f-e7bc-4538-950e-2e2353eccea3","savedPayload":{"position":{"x":17872.64382962515,"y":30941.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"90fe3d74-662e-4fac-aff3-f41990b61ccf","savedPayload":{"position":{"x":19007.931889043757,"y":32663.930922181273},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BW","config":"{ \n\"codeName\": \"bw\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"457616cd-25f9-4ad3-8c18-6331859dd42e","savedPayload":{"position":{"x":17890.64382962515,"y":31014.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8c1f9aa2-4253-4129-a533-e515644ddb38","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"24314a5b-85ca-4036-adc6-618120496f1d","savedPayload":{"position":{"x":17773.64382962515,"y":30945.23747069523},"targetPosition":{"x":17860.64382962515,"y":30865.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"f7c593f6-bd7a-41f7-a5e7-b2e1ea9a528f","savedPayload":{"position":{"x":17820.64382962515,"y":30885.23747069523},"targetPosition":{"x":17828.64382962515,"y":30802.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"60dfc799-f863-4895-8d17-568aa2303ef5","savedPayload":{"position":{"x":17828.64382962515,"y":30802.23747069523},"targetPosition":{"x":17860.64382962515,"y":30865.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"223e466d-d750-4e38-91ce-8a59c15242ba","savedPayload":{"position":{"x":17860.64382962515,"y":30865.23747069523},"targetPosition":{"x":17818.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cfff1310-5220-4978-9553-8514be141d14","savedPayload":{"position":{"x":17818.64382962515,"y":30919.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d72db90c-d572-4cbb-8348-e3cc485d8e86","savedPayload":{"position":{"x":18883.38256475272,"y":32700.94644884361},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bybit","config":"{ \n\"codeName\": \"bybit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"18fdf7c8-03c4-4f81-a88e-de97589765e1","savedPayload":{"position":{"x":17803.64382962515,"y":31059.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a62b2603-ac6f-4b6e-9541-86daf32027b1","savedPayload":{"position":{"x":17847.64382962515,"y":31104.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"66ecff99-7102-4f4a-9ce8-4d55fb22dfbc","savedPayload":{"position":{"x":17851.64382962515,"y":31165.23747069523},"targetPosition":{"x":17916.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"625e127c-0ebb-4f57-af9f-9dfb57b262a1","savedPayload":{"position":{"x":18004.64382962515,"y":31091.23747069523},"targetPosition":{"x":18008.64382962515,"y":31027.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"8174bb53-66b8-4575-b206-74f9b6352a80","savedPayload":{"position":{"x":18008.64382962515,"y":31027.23747069523},"targetPosition":{"x":17916.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ee16357e-abde-4800-b089-f43f4b696a35","savedPayload":{"position":{"x":17916.64382962515,"y":31077.23747069523},"targetPosition":{"x":17944.64382962515,"y":31101.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c9e9473b-aff9-43c8-a6be-5cd30330bee2","savedPayload":{"position":{"x":17944.64382962515,"y":31101.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"516c3831-456b-4d17-b0a0-6a363ba2ddb2","savedPayload":{"position":{"x":18755.561271527895,"y":32724.27883821499},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ByteTrade","config":"{ \n\"codeName\": \"bytetrade\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e7a1e531-5a9e-466e-b98d-672de39eed3a","savedPayload":{"position":{"x":18088.64382962515,"y":31024.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"edafaba7-fd82-4d9f-b3f7-5d1c01c56599","savedPayload":{"position":{"x":17941.64382962515,"y":30943.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"50fa78b8-3aea-4e43-adcf-1e31820bf97f","savedPayload":{"position":{"x":17886.64382962515,"y":31008.23747069523},"targetPosition":{"x":17858.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"b9c39b04-e86e-4ebb-9aba-39c375f2960c","savedPayload":{"position":{"x":17865.64382962515,"y":30941.23747069523},"targetPosition":{"x":17953.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5965d9cc-1d68-47a7-b838-e6dd81da6ea9","savedPayload":{"position":{"x":17953.64382962515,"y":31023.23747069523},"targetPosition":{"x":17858.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f51a08be-ee3f-4d3b-a75e-d783d63092a7","savedPayload":{"position":{"x":17858.64382962515,"y":30967.23747069523},"targetPosition":{"x":17898.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d395efd0-691b-4a68-a7f1-9bce95b2f687","savedPayload":{"position":{"x":17898.64382962515,"y":30965.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45e2306f-03e8-4d17-a73a-72c11dd14e78","savedPayload":{"position":{"x":18625.966597164217,"y":32733.65453936303},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CEX.IO","config":"{ \n\"codeName\": \"cex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9de19f0a-5824-4e42-af00-484b64421dc3","savedPayload":{"position":{"x":17890.64382962515,"y":31049.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"39db01bc-0cea-422f-b9e9-7d84e3f5446d","savedPayload":{"position":{"x":17918.64382962515,"y":31105.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"93833d3c-42c9-4e4d-bf0f-5b80a90d10c2","savedPayload":{"position":{"x":17978.64382962515,"y":31126.23747069523},"targetPosition":{"x":17953.64382962515,"y":31167.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"42863a52-30f4-4322-9c20-99a45d6dc3d6","savedPayload":{"position":{"x":17884.64382962515,"y":31149.23747069523},"targetPosition":{"x":17895.64382962515,"y":31148.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fcff471d-29be-4176-8ff8-12088361f9fc","savedPayload":{"position":{"x":17895.64382962515,"y":31148.23747069523},"targetPosition":{"x":17953.64382962515,"y":31167.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f7975a18-b3ab-49bc-ae45-eb02c99aff8c","savedPayload":{"position":{"x":17953.64382962515,"y":31167.23747069523},"targetPosition":{"x":17881.64382962515,"y":31096.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ec432123-43fe-4171-8c41-b797d3161edb","savedPayload":{"position":{"x":17881.64382962515,"y":31096.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"346bfc30-e32a-453a-bdc6-0ead48221581","savedPayload":{"position":{"x":18496.117920729066,"y":32728.96363076407},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Prime","config":"{ \n\"codeName\": \"coinbaseprime\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"73cabd8d-9308-49ed-b544-44f785ee7d38","savedPayload":{"position":{"x":17867.64382962515,"y":30962.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"31bd1360-f0c5-4d70-876a-b152f7cedfd7","savedPayload":{"position":{"x":17960.64382962515,"y":30864.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9b75fcfa-fe75-48a8-9d28-2ff19c58c041","savedPayload":{"position":{"x":17792.64382962515,"y":30841.23747069523},"targetPosition":{"x":17809.64382962515,"y":30934.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c900b14a-c728-45af-90f8-29b3e5f29f46","savedPayload":{"position":{"x":17801.64382962515,"y":30986.23747069523},"targetPosition":{"x":17793.64382962515,"y":31006.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"eaf72df3-b66f-4b83-83f9-91e22ec0c300","savedPayload":{"position":{"x":17793.64382962515,"y":31006.23747069523},"targetPosition":{"x":17809.64382962515,"y":30934.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"9da95675-2071-41bf-b5ac-4f2af602994f","savedPayload":{"position":{"x":17809.64382962515,"y":30934.23747069523},"targetPosition":{"x":17862.64382962515,"y":31021.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4fc49ad4-57cc-43b0-b14b-15f26af994aa","savedPayload":{"position":{"x":17862.64382962515,"y":31021.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a8281db-6ace-4186-8cfb-cd249c4af48b","savedPayload":{"position":{"x":18367.537599231866,"y":32710.26110903248},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Pro","config":"{ \n\"codeName\": \"coinbasepro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a29d6e1a-a94e-4b6b-8741-e9af6e4762f4","savedPayload":{"position":{"x":17788.64382962515,"y":30897.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"10cd9004-0088-4bc0-8fe6-b937f1bb311b","savedPayload":{"position":{"x":17865.64382962515,"y":30918.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"004397e6-ae73-46a6-9ed7-b4ba1930f77b","savedPayload":{"position":{"x":17945.64382962515,"y":30899.23747069523},"targetPosition":{"x":17850.64382962515,"y":30889.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"a81a7021-2228-4386-a773-9ac80c9e723a","savedPayload":{"position":{"x":17738.64382962515,"y":30761.23747069523},"targetPosition":{"x":17792.64382962515,"y":30789.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"482d82f2-364e-483c-b51a-a3fbe8a91577","savedPayload":{"position":{"x":17792.64382962515,"y":30789.23747069523},"targetPosition":{"x":17850.64382962515,"y":30889.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d823ad8e-0452-40f0-bad9-c2cb3ad29a21","savedPayload":{"position":{"x":17850.64382962515,"y":30889.23747069523},"targetPosition":{"x":17772.64382962515,"y":30894.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"0c965322-fdd2-4e67-aaf3-dfc4b9dffc59","savedPayload":{"position":{"x":17772.64382962515,"y":30894.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4242da4b-a67e-44d8-8a19-b1c2f078c94c","savedPayload":{"position":{"x":18241.733119380056,"y":32677.766244135688},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CoinEx","config":"{ \n\"codeName\": \"coinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"af78f796-60e5-4794-87b8-772c7bc74be1","savedPayload":{"position":{"x":18043.64382962515,"y":31069.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d351e6d9-36eb-4d0e-aca5-94429bbb23a3","savedPayload":{"position":{"x":18094.64382962515,"y":31090.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"438f74c6-15e0-4553-af2a-febd5290c269","savedPayload":{"position":{"x":17908.64382962515,"y":31088.23747069523},"targetPosition":{"x":17986.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"bfb22430-77c7-41a7-8083-771f7d7f3634","savedPayload":{"position":{"x":17927.64382962515,"y":30953.23747069523},"targetPosition":{"x":17947.64382962515,"y":30990.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"51daaa12-1c60-4cef-96d8-a445b4b32296","savedPayload":{"position":{"x":17947.64382962515,"y":30990.23747069523},"targetPosition":{"x":17986.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"726b8c33-9873-4be1-b9ef-d6b4483f23b1","savedPayload":{"position":{"x":17986.64382962515,"y":31075.23747069523},"targetPosition":{"x":17919.64382962515,"y":31016.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"30469514-b983-4f6f-9d74-6d6ceef25eb6","savedPayload":{"position":{"x":17919.64382962515,"y":31016.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"62ad0961-6bdf-4a4a-a340-610816742d0a","savedPayload":{"position":{"x":18120.179423675774,"y":32631.860008654276},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"COSS","config":"{ \n\"codeName\": \"coss\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e6315232-c6b1-4e25-aade-7bc7ba9ba6ac","savedPayload":{"position":{"x":17787.64382962515,"y":30984.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b1e8451f-09a2-47b0-add3-cf9c35c487bb","savedPayload":{"position":{"x":17829.64382962515,"y":31095.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d1c9b795-0434-4ce1-9cb7-cc61fac7396d","savedPayload":{"position":{"x":17950.64382962515,"y":31149.23747069523},"targetPosition":{"x":17882.64382962515,"y":31131.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"22be64f9-4b08-4ac3-ae89-6726743a7d5a","savedPayload":{"position":{"x":17890.64382962515,"y":31165.23747069523},"targetPosition":{"x":17956.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c7462500-ba74-4bf3-ad81-35fa232bede3","savedPayload":{"position":{"x":17956.64382962515,"y":31156.23747069523},"targetPosition":{"x":17882.64382962515,"y":31131.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5cd41ced-981a-4075-af43-3a0497eb0fcb","savedPayload":{"position":{"x":17882.64382962515,"y":31131.23747069523},"targetPosition":{"x":17856.64382962515,"y":31148.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b5937899-c6ee-4d7a-b259-1ee23d721f60","savedPayload":{"position":{"x":17856.64382962515,"y":31148.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"695029de-7f61-45bb-aa4c-c6d51e6369ed","savedPayload":{"position":{"x":18004.301618063546,"y":32573.08061122679},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CREX24","config":"{ \n\"codeName\": \"crex24\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c5e12f4a-fb26-40d3-9e70-751b55018e74","savedPayload":{"position":{"x":17910.64382962515,"y":31024.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"00cb629e-bad4-4c6e-8abb-499cad3992f4","savedPayload":{"position":{"x":17938.64382962515,"y":31054.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"4909d182-e0d5-49a9-8ad2-a553c8aaaf88","savedPayload":{"position":{"x":17912.64382962515,"y":31301.23747069523},"targetPosition":{"x":17920.64382962515,"y":31249.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"075eb2a2-299b-4a0f-9f6d-76c385521dc4","savedPayload":{"position":{"x":17800.64382962515,"y":31332.23747069523},"targetPosition":{"x":17883.64382962515,"y":31289.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"e062ef2e-b252-4a66-8f58-d9aa8031f526","savedPayload":{"position":{"x":17883.64382962515,"y":31289.23747069523},"targetPosition":{"x":17920.64382962515,"y":31249.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e75be98-f874-486d-b749-536e364934dc","savedPayload":{"position":{"x":17920.64382962515,"y":31249.23747069523},"targetPosition":{"x":17845.64382962515,"y":31164.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"052f73cd-7ed7-4537-8b01-840b5b892fea","savedPayload":{"position":{"x":17845.64382962515,"y":31164.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07a7ec7c-273e-4675-8d8d-21ab8514a1f0","savedPayload":{"position":{"x":17895.458263866083,"y":32502.117186545547},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Deribit","config":"{ \n\"codeName\": \"deribit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f0b2354b-89e3-4eca-b051-664a3b8283f6","savedPayload":{"position":{"x":17862.64382962515,"y":30844.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ae1f824-82a8-4796-a2d5-3d2358d8089f","savedPayload":{"position":{"x":17912.64382962515,"y":31024.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2013fe7a-d52c-4c9d-ba53-d281d014a8fc","savedPayload":{"position":{"x":17873.64382962515,"y":30926.23747069523},"targetPosition":{"x":17855.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"706d5778-ed21-49bd-9277-1840ec52708d","savedPayload":{"position":{"x":17729.64382962515,"y":31033.23747069523},"targetPosition":{"x":17813.64382962515,"y":31053.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2e76bc02-6e10-4f14-9bf1-a11dc4268466","savedPayload":{"position":{"x":17813.64382962515,"y":31053.23747069523},"targetPosition":{"x":17855.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"89a3ccc7-20ab-4e2d-929b-52d9286179b7","savedPayload":{"position":{"x":17855.64382962515,"y":30967.23747069523},"targetPosition":{"x":17818.64382962515,"y":30920.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5c8219e3-4509-4b8b-941b-b88ac2c12237","savedPayload":{"position":{"x":17818.64382962515,"y":30920.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"21971815-4248-45df-8e04-20b9a5a83f06","savedPayload":{"position":{"x":17794.92544989493,"y":32419.801715882462},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DigiFinex","config":"{ \n\"codeName\": \"digifinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e583c93e-9a44-4e0d-acb7-56d7e00a555a","savedPayload":{"position":{"x":17954.64382962515,"y":30992.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8917c7c0-b420-4d4f-a35a-c0fc6870f0de","savedPayload":{"position":{"x":18052.64382962515,"y":30972.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a00b5bb0-5ab9-42e2-91fe-b450c7eb66d2","savedPayload":{"position":{"x":18220.64382962515,"y":31090.23747069523},"targetPosition":{"x":18123.64382962515,"y":30998.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2aafc473-339b-4d23-9b74-06fa7574c293","savedPayload":{"position":{"x":18144.64382962515,"y":31123.23747069523},"targetPosition":{"x":18203.64382962515,"y":31084.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"99e9e136-1ac7-4400-a100-0a2d37f0882d","savedPayload":{"position":{"x":18203.64382962515,"y":31084.23747069523},"targetPosition":{"x":18123.64382962515,"y":30998.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7cee21b-ddcb-4fd7-b610-43aabb2d1766","savedPayload":{"position":{"x":18123.64382962515,"y":30998.23747069523},"targetPosition":{"x":18032.64382962515,"y":30976.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"08e84a25-4368-4ad6-939f-5a16cece62cc","savedPayload":{"position":{"x":18032.64382962515,"y":30976.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7d56781-0c51-4ec1-95fd-bf4dc8c00352","savedPayload":{"position":{"x":17703.88183147586,"y":32327.0992728693},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DSX","config":"{ \n\"codeName\": \"dsx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"d672ab56-cd32-4ff5-8fc5-3733262aeccb","savedPayload":{"position":{"x":17916.64382962515,"y":31106.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3731a7b5-ba9d-483e-bb41-abf3ae0232c6","savedPayload":{"position":{"x":17878.64382962515,"y":30946.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9ef7e0ac-dc27-4b47-a06e-0cb7e80ee3d7","savedPayload":{"position":{"x":18124.64382962515,"y":31136.23747069523},"targetPosition":{"x":18093.64382962515,"y":31072.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"77491a3c-3db7-446f-aa67-9b5a1a3be7b3","savedPayload":{"position":{"x":18109.64382962515,"y":31081.23747069523},"targetPosition":{"x":18188.64382962515,"y":31137.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"bd1bd0b7-4943-4aeb-bf90-d3192dcabbb1","savedPayload":{"position":{"x":18188.64382962515,"y":31137.23747069523},"targetPosition":{"x":18093.64382962515,"y":31072.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45747fef-f30e-4fae-b02d-5768ae7dbe68","savedPayload":{"position":{"x":18093.64382962515,"y":31072.23747069523},"targetPosition":{"x":18018.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2e1c9b-428c-4bb0-9e75-ceb8c9043d4b","savedPayload":{"position":{"x":18018.64382962515,"y":31005.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4c543abc-7372-4701-bc58-107578d45c25","savedPayload":{"position":{"x":17623.394811792878,"y":32225.09670889175},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoin","config":"{ \n\"codeName\": \"fcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a97d578c-6d7f-403c-8294-18aacf14abd8","savedPayload":{"position":{"x":17893.64382962515,"y":30953.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"442c3834-482e-4928-9255-8ac859ae012e","savedPayload":{"position":{"x":17905.64382962515,"y":30896.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"79754959-1219-4c4d-be63-22766158beb5","savedPayload":{"position":{"x":18106.64382962515,"y":30976.23747069523},"targetPosition":{"x":18069.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"1c3ae096-5024-43c3-abca-24498254e363","savedPayload":{"position":{"x":18112.64382962515,"y":30919.23747069523},"targetPosition":{"x":18126.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"59db5bfd-e413-48a7-af63-237ad56adc82","savedPayload":{"position":{"x":18126.64382962515,"y":30965.23747069523},"targetPosition":{"x":18069.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"833c4e54-08f4-48ec-b90a-2767eb55f244","savedPayload":{"position":{"x":18069.64382962515,"y":31056.23747069523},"targetPosition":{"x":17996.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"a8cf17b3-0ea7-4a14-8c76-f655344b58a3","savedPayload":{"position":{"x":17996.64382962515,"y":30970.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ddedcbd-07cb-4928-91b3-348f47118391","savedPayload":{"position":{"x":17554.408027561767,"y":32114.989910750606},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoinJP","config":"{ \n\"codeName\": \"fcoinjp\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"4a8a9810-6df6-451a-ab26-22bd7e7be85a","savedPayload":{"position":{"x":17930.64382962515,"y":31129.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"138ab40c-18ca-4a11-9709-0baa040873e6","savedPayload":{"position":{"x":18007.64382962515,"y":31122.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"258cdf92-8ed0-4133-ae2a-b9f086f56a13","savedPayload":{"position":{"x":17897.64382962515,"y":30887.23747069523},"targetPosition":{"x":17903.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"537e8f0c-05ca-4403-bc96-da6c2f4678ae","savedPayload":{"position":{"x":17825.64382962515,"y":30842.23747069523},"targetPosition":{"x":17836.64382962515,"y":30926.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"62519e63-8f4e-4b72-a341-0a6eea01ac3f","savedPayload":{"position":{"x":17836.64382962515,"y":30926.23747069523},"targetPosition":{"x":17903.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b4974cc1-f594-436b-8aa4-aff2733b8e3c","savedPayload":{"position":{"x":17903.64382962515,"y":30977.23747069523},"targetPosition":{"x":17873.64382962515,"y":31061.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d84b404f-75e2-4eb5-b34a-b45af8a57ca7","savedPayload":{"position":{"x":17873.64382962515,"y":31061.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"982627ea-df84-4ba9-9219-612fbe1e4276","savedPayload":{"position":{"x":17497.730285752426,"y":31998.069779982467},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FTX","config":"{ \n\"codeName\": \"ftx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"20c0a4f5-bdb9-46cc-af7e-2111964551e3","savedPayload":{"position":{"x":17886.64382962515,"y":30940.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"75c99a0b-d3c9-4073-9283-d33e539c36bb","savedPayload":{"position":{"x":17992.64382962515,"y":31061.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2e037470-549e-4aa8-bbe7-95cdeaef88ea","savedPayload":{"position":{"x":17964.64382962515,"y":31027.23747069523},"targetPosition":{"x":17970.64382962515,"y":31008.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"3b6f5b7b-9c61-4b71-b29a-ca1bc027e55f","savedPayload":{"position":{"x":17817.64382962515,"y":30943.23747069523},"targetPosition":{"x":17890.64382962515,"y":30978.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"a84010f0-04b5-4eab-a3a6-a5944b80a373","savedPayload":{"position":{"x":17890.64382962515,"y":30978.23747069523},"targetPosition":{"x":17970.64382962515,"y":31008.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5cdc51a3-6136-4e03-9e2c-26a752140d17","savedPayload":{"position":{"x":17970.64382962515,"y":31008.23747069523},"targetPosition":{"x":18010.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"55258a2b-3199-4070-beed-d34a8496870c","savedPayload":{"position":{"x":18010.64382962515,"y":30986.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0c0bcf5c-2774-423e-9fcf-c512b38dd06d","savedPayload":{"position":{"x":17454.026081066615,"y":31875.707098219504},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gate.io","config":"{ \n\"codeName\": \"gateio\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"71a15089-9d40-4726-9a41-37d406064164","savedPayload":{"position":{"x":17930.64382962515,"y":30993.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c025e976-c2c6-49de-81ec-48e2f737b412","savedPayload":{"position":{"x":17925.64382962515,"y":31053.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"876f964a-e12d-4438-87fb-a84be22f86d1","savedPayload":{"position":{"x":17914.64382962515,"y":30833.23747069523},"targetPosition":{"x":17827.64382962515,"y":30882.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0c5d34c4-467f-4e98-bd39-1b2d9afb834e","savedPayload":{"position":{"x":17852.64382962515,"y":30831.23747069523},"targetPosition":{"x":17870.64382962515,"y":30847.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"89316d8c-893a-46ae-b147-948b4b8a5292","savedPayload":{"position":{"x":17870.64382962515,"y":30847.23747069523},"targetPosition":{"x":17827.64382962515,"y":30882.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a2a5de53-bd45-4904-8bae-0cf5ed66d2af","savedPayload":{"position":{"x":17827.64382962515,"y":30882.23747069523},"targetPosition":{"x":17800.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f6f4072d-8cf6-4e47-8b4e-a21cd553348a","savedPayload":{"position":{"x":17800.64382962515,"y":30936.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4028289-4cdb-4da0-90e6-5f93328b8e03","savedPayload":{"position":{"x":17423.807805345143,"y":31749.336456028108},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gemini","config":"{ \n\"codeName\": \"gemini\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9eb15872-8d15-4086-9920-46909eb5f9e7","savedPayload":{"position":{"x":17951.64382962515,"y":30901.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a84dcf06-57c6-47d7-97a0-9f03f3af8b34","savedPayload":{"position":{"x":18045.64382962515,"y":30891.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5da1ba65-3839-4664-8105-2ccb11652767","savedPayload":{"position":{"x":18028.64382962515,"y":31112.23747069523},"targetPosition":{"x":17941.64382962515,"y":31044.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"337fe5e2-b9fd-40eb-9f42-44fc5057d981","savedPayload":{"position":{"x":17957.64382962515,"y":31129.23747069523},"targetPosition":{"x":17875.64382962515,"y":31086.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"17a3f4a3-8914-4995-afb0-7e8115791b17","savedPayload":{"position":{"x":17875.64382962515,"y":31086.23747069523},"targetPosition":{"x":17941.64382962515,"y":31044.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"32e4a3f1-40d8-421f-9634-7ab339858286","savedPayload":{"position":{"x":17941.64382962515,"y":31044.23747069523},"targetPosition":{"x":17877.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"365f6865-e707-415d-a168-b67c66ca9553","savedPayload":{"position":{"x":17877.64382962515,"y":30977.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"58bf8247-baef-4ea6-a483-7ed8f0ba5043","savedPayload":{"position":{"x":17407.429740242005,"y":31620.439433646203},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1632c520-fa79-442f-b33b-430cb1356de6","savedPayload":{"position":{"x":17809.64382962515,"y":31086.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"576d1666-dbd3-4914-9fe2-fa05bdf72eea","savedPayload":{"position":{"x":17840.64382962515,"y":31148.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"41317aae-08ce-48cf-a47b-c2d2cc3920ec","savedPayload":{"position":{"x":18096.64382962515,"y":30975.23747069523},"targetPosition":{"x":18026.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"23d7e4ba-8432-4214-bd94-0db5046e39cd","savedPayload":{"position":{"x":18039.64382962515,"y":31075.23747069523},"targetPosition":{"x":17981.64382962515,"y":31126.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ab200349-5ba5-44d2-ad5c-fa826303cfcd","savedPayload":{"position":{"x":17981.64382962515,"y":31126.23747069523},"targetPosition":{"x":18026.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a5f24785-5b2c-429b-a2e4-07063e2de904","savedPayload":{"position":{"x":18026.64382962515,"y":31066.23747069523},"targetPosition":{"x":17972.64382962515,"y":31093.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13f275ca-06a6-4a72-8b4d-a9c079b9cef4","savedPayload":{"position":{"x":17972.64382962515,"y":31093.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8384fa0b-854c-4c23-846e-a5da0179a738","savedPayload":{"position":{"x":17405.083903595932,"y":31490.527230809537},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9a29cb9e-ee8d-4315-8532-eef82224b84a","savedPayload":{"position":{"x":17838.64382962515,"y":30922.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"badd79e7-1e21-4dc3-bfa7-8dfb4a6c6267","savedPayload":{"position":{"x":17920.64382962515,"y":30944.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"ffdda0b7-af50-4010-84da-2bc0d562af2b","savedPayload":{"position":{"x":17887.64382962515,"y":30982.23747069523},"targetPosition":{"x":17836.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"24816eed-adf7-453e-9b38-42ea4758dbaa","savedPayload":{"position":{"x":18021.64382962515,"y":30979.23747069523},"targetPosition":{"x":17931.64382962515,"y":30923.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"1dd16858-5641-4454-88a3-e5d7446e12a3","savedPayload":{"position":{"x":17931.64382962515,"y":30923.23747069523},"targetPosition":{"x":17836.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"457d75ed-ad21-4ee5-b36b-88cdc444008e","savedPayload":{"position":{"x":17836.64382962515,"y":31023.23747069523},"targetPosition":{"x":17808.64382962515,"y":31039.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b29ded7e-e2d5-4c7f-89af-b0816c32c743","savedPayload":{"position":{"x":17808.64382962515,"y":31039.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"09c634c2-5aba-49c5-80bc-4fd4175e7f0c","savedPayload":{"position":{"x":17416.79779819678,"y":31361.12294931652},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Pro","config":"{ \n\"codeName\": \"huobipro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"86caa38c-5bdf-40e4-b27b-8d8b64319575","savedPayload":{"position":{"x":18071.64382962515,"y":31171.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"001225af-c715-4566-9502-f8f0ac1c4531","savedPayload":{"position":{"x":18040.64382962515,"y":31019.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"b4bf5ccb-b529-4500-a192-d9c3a0613389","savedPayload":{"position":{"x":18129.64382962515,"y":31073.23747069523},"targetPosition":{"x":18033.64382962515,"y":31090.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2e58c6d1-cfa7-4dc7-a322-e9356596ea1e","savedPayload":{"position":{"x":17976.64382962515,"y":31132.23747069523},"targetPosition":{"x":17953.64382962515,"y":31093.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae04ddf4-ae3e-4bdc-9393-41acc38ef818","savedPayload":{"position":{"x":17953.64382962515,"y":31093.23747069523},"targetPosition":{"x":18033.64382962515,"y":31090.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2428e8ef-6a09-48fa-8ae4-ebfb28420be8","savedPayload":{"position":{"x":18033.64382962515,"y":31090.23747069523},"targetPosition":{"x":18085.64382962515,"y":31157.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"55c71c8b-f21f-4d16-ae93-e29362c39bf5","savedPayload":{"position":{"x":18085.64382962515,"y":31157.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"967c3914-a76d-4389-9c7e-9c258ae683bd","savedPayload":{"position":{"x":17442.43408934047,"y":31233.743736052187},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Russia","config":"{ \n\"codeName\": \"huobiru\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9b7b32d6-a42e-44bb-8065-5aa32b1e844b","savedPayload":{"position":{"x":17980.64382962515,"y":31034.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8d74201c-33cd-4e12-8920-b08d0ef97572","savedPayload":{"position":{"x":17992.64382962515,"y":31105.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c6e289d7-074b-4837-96e3-687988886fcc","savedPayload":{"position":{"x":18078.64382962515,"y":30954.23747069523},"targetPosition":{"x":18008.64382962515,"y":31029.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d72f81ba-6b41-414d-9cf0-d5f9c0c25403","savedPayload":{"position":{"x":18026.64382962515,"y":31021.23747069523},"targetPosition":{"x":18083.64382962515,"y":31117.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5354f66c-6e73-4fe5-80ca-2c25b761ef51","savedPayload":{"position":{"x":18083.64382962515,"y":31117.23747069523},"targetPosition":{"x":18008.64382962515,"y":31029.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"81f5adbb-054c-47f2-b019-52585f5d7417","savedPayload":{"position":{"x":18008.64382962515,"y":31029.23747069523},"targetPosition":{"x":18018.64382962515,"y":31009.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ecd8645b-4bb6-4641-a20f-cee51bf33f1a","savedPayload":{"position":{"x":18018.64382962515,"y":31009.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6f97bb5c-8d85-43ee-86a1-33e22cdfbb5e","savedPayload":{"position":{"x":17481.692214952825,"y":31109.882995828142},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KKEX","config":"{ \n\"codeName\": \"kkex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"daa4e07a-1cd8-4d92-8004-2eabfaa62f77","savedPayload":{"position":{"x":17924.64382962515,"y":31038.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"cb64951f-d984-4f51-a751-166a316084f3","savedPayload":{"position":{"x":17945.64382962515,"y":31156.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6915bf12-9271-47e2-8b49-924ae9f5c65f","savedPayload":{"position":{"x":17958.64382962515,"y":31297.23747069523},"targetPosition":{"x":17875.64382962515,"y":31252.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"ff53381f-c6dd-4d17-a477-11396f60663f","savedPayload":{"position":{"x":17805.64382962515,"y":31141.23747069523},"targetPosition":{"x":17861.64382962515,"y":31223.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae05bfc4-6ac8-408c-a90b-263830b2a71e","savedPayload":{"position":{"x":17861.64382962515,"y":31223.23747069523},"targetPosition":{"x":17875.64382962515,"y":31252.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61c85f1a-a2a6-45c9-bb1e-3c76110f5d1e","savedPayload":{"position":{"x":17875.64382962515,"y":31252.23747069523},"targetPosition":{"x":17911.64382962515,"y":31154.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"9fafb114-37d2-4d04-9c42-83d04ff62fc7","savedPayload":{"position":{"x":17911.64382962515,"y":31154.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"16ae95ce-796f-4f2b-942c-f98dcbf9cf4b","savedPayload":{"position":{"x":17534.11190940509,"y":30990.99288257655},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Kraken","config":"{ \n\"codeName\": \"kraken\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"747af60f-c8b9-4377-aa6c-172d4137ea23","savedPayload":{"position":{"x":17854.64382962515,"y":31008.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c75f7d97-9dc2-4d3e-89eb-f8a3d5f16368","savedPayload":{"position":{"x":17916.64382962515,"y":30872.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"0093e946-03f4-4aec-942d-c76aed12ab1a","savedPayload":{"position":{"x":17780.64382962515,"y":31091.23747069523},"targetPosition":{"x":17836.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2a4235ac-e5ea-4484-bccd-f06c8a7275ec","savedPayload":{"position":{"x":17930.64382962515,"y":30869.23747069523},"targetPosition":{"x":17883.64382962515,"y":30953.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"737dec0a-23ab-4044-94ba-95c8bc50c0eb","savedPayload":{"position":{"x":17883.64382962515,"y":30953.23747069523},"targetPosition":{"x":17836.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"457b045e-dae5-4f53-a8b7-cab4757e5286","savedPayload":{"position":{"x":17836.64382962515,"y":31011.23747069523},"targetPosition":{"x":17926.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6eff12db-8e7c-402a-9e06-ae2618f506a0","savedPayload":{"position":{"x":17926.64382962515,"y":31005.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"644efe9c-597a-4ddf-9e28-b33fb3b62d3e","savedPayload":{"position":{"x":17599.078599707587,"y":30878.467274173025},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KuCoin","config":"{ \n\"codeName\": \"kucoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"01ca3037-4ed3-499e-ad6b-e14ca1d4a51f","savedPayload":{"position":{"x":17919.64382962515,"y":30949.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b3c4ce0-98b1-4d46-bd02-6cf44c3dd686","savedPayload":{"position":{"x":17998.64382962515,"y":30978.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d6c7c0ef-670d-4ed6-9246-6eb7d6bfc359","savedPayload":{"position":{"x":17927.64382962515,"y":30962.23747069523},"targetPosition":{"x":17953.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"e8c2c454-b246-4f63-b51b-74d9cbb01ac2","savedPayload":{"position":{"x":17927.64382962515,"y":30924.23747069523},"targetPosition":{"x":17912.64382962515,"y":30869.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"d2bb2603-3b52-443c-8923-86fefafc0b14","savedPayload":{"position":{"x":17912.64382962515,"y":30869.23747069523},"targetPosition":{"x":17953.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fa83b0b9-1039-4406-907c-f809a5af40f5","savedPayload":{"position":{"x":17953.64382962515,"y":30954.23747069523},"targetPosition":{"x":17966.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"471161d3-201e-40c6-b433-49643cf7e43b","savedPayload":{"position":{"x":17966.64382962515,"y":30962.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d79bc720-68e1-4771-a66a-bcffa30639d3","savedPayload":{"position":{"x":17675.830610816145,"y":30773.625430492953},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"LBank","config":"{ \n\"codeName\": \"lbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"def3f9d0-f09e-4e09-8b6d-a4c322a4384b","savedPayload":{"position":{"x":17877.64382962515,"y":31024.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"53eac3c1-96d6-4cb1-b54d-f3f174eaf733","savedPayload":{"position":{"x":17764.64382962515,"y":31036.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c6c00704-1357-4426-910e-8134d6f87017","savedPayload":{"position":{"x":18030.64382962515,"y":31212.23747069523},"targetPosition":{"x":17951.64382962515,"y":31172.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"13990604-2192-4be1-b21b-53cf2bafc002","savedPayload":{"position":{"x":17893.64382962515,"y":31189.23747069523},"targetPosition":{"x":17964.64382962515,"y":31122.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ed2c483e-d412-406d-b6f3-cfb1112a3a05","savedPayload":{"position":{"x":17964.64382962515,"y":31122.23747069523},"targetPosition":{"x":17951.64382962515,"y":31172.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6033b63c-c7fe-4a5d-8cf6-82128e2cfb41","savedPayload":{"position":{"x":17951.64382962515,"y":31172.23747069523},"targetPosition":{"x":17891.64382962515,"y":31096.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"20ece5c4-dbfa-4f4a-a9ee-8c8d9c38943b","savedPayload":{"position":{"x":17891.64382962515,"y":31096.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cb2558d6-dab0-4f35-b83f-7cfc161b3d4f","savedPayload":{"position":{"x":17763.468095575536,"y":30677.69652629567},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Mercado Bitcoin","config":"{ \n\"codeName\": \"mercado\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83ab2c39-e844-496f-bebb-7b8607428902","savedPayload":{"position":{"x":17849.64382962515,"y":31081.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d69e722e-c71a-462a-8bbd-d3482d0eab21","savedPayload":{"position":{"x":17771.64382962515,"y":30887.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"18438709-83cf-49a3-96b8-888ab5adbcc5","savedPayload":{"position":{"x":17937.64382962515,"y":31080.23747069523},"targetPosition":{"x":17866.64382962515,"y":31013.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"6b9d4ed4-af81-462a-aace-fac0afd4687a","savedPayload":{"position":{"x":17787.64382962515,"y":30841.23747069523},"targetPosition":{"x":17873.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"802a4c53-8617-4257-95a5-45bfaa60ad0e","savedPayload":{"position":{"x":17873.64382962515,"y":30935.23747069523},"targetPosition":{"x":17866.64382962515,"y":31013.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"87936a4a-aac5-4aca-8f3e-2051611932c4","savedPayload":{"position":{"x":17866.64382962515,"y":31013.23747069523},"targetPosition":{"x":17829.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"48f3a793-bb97-447b-8f1a-1d6965219747","savedPayload":{"position":{"x":17829.64382962515,"y":30919.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5002072e-145c-4aeb-a611-3e0e4c60ee5d","savedPayload":{"position":{"x":17860.963584604677,"y":30591.805240274254},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKCoin","config":"{ \n\"codeName\": \"okcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1e4dd5c8-0545-4698-8695-c985880243a3","savedPayload":{"position":{"x":17921.64382962515,"y":31043.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0e188cae-9764-4963-a78b-e5d7ef272522","savedPayload":{"position":{"x":18005.64382962515,"y":30891.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6d82bfd7-b4e1-4f93-a0f8-18f62cee944e","savedPayload":{"position":{"x":18047.64382962515,"y":30877.23747069523},"targetPosition":{"x":17963.64382962515,"y":30898.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d815409c-1dd4-4e89-b844-5b96104509b4","savedPayload":{"position":{"x":17958.64382962515,"y":30988.23747069523},"targetPosition":{"x":17945.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"238b9d2c-e2c0-4a77-945e-8e28604c0a2d","savedPayload":{"position":{"x":17945.64382962515,"y":30961.23747069523},"targetPosition":{"x":17963.64382962515,"y":30898.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8416c29a-5d73-4b2a-9463-511f400deafb","savedPayload":{"position":{"x":17963.64382962515,"y":30898.23747069523},"targetPosition":{"x":18047.64382962515,"y":30885.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"04abf32b-084e-4784-aa84-8c5612d3b7b9","savedPayload":{"position":{"x":18047.64382962515,"y":30885.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1f860b4b-2893-4a51-8649-19c47d494a37","savedPayload":{"position":{"x":17967.17403243568,"y":30516.958569226157},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKEX","config":"{ \n\"codeName\": \"okex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"7f618566-3d10-4c3c-90b2-7541a5146eeb","savedPayload":{"position":{"x":17770.64382962515,"y":31094.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"21205576-5d12-452c-814f-eb56182162ae","savedPayload":{"position":{"x":17794.64382962515,"y":31173.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"46456247-ae9c-41ea-8395-a5e4a78007d4","savedPayload":{"position":{"x":17724.64382962515,"y":31147.23747069523},"targetPosition":{"x":17795.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"706bf601-eaad-48bd-b0a7-8dad59066171","savedPayload":{"position":{"x":17715.64382962515,"y":31182.23747069523},"targetPosition":{"x":17706.64382962515,"y":31162.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"f9c7071c-2e5b-4c90-b482-dfc7ee001244","savedPayload":{"position":{"x":17706.64382962515,"y":31162.23747069523},"targetPosition":{"x":17795.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e87e1e10-3404-48b9-8629-5df92ffa1979","savedPayload":{"position":{"x":17795.64382962515,"y":31083.23747069523},"targetPosition":{"x":17789.64382962515,"y":31181.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"08e8fd6a-6b23-4d65-8b8e-d966f845c07f","savedPayload":{"position":{"x":17789.64382962515,"y":31181.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"aa0edec0-8b27-4f94-abce-1e437ce5aba6","savedPayload":{"position":{"x":18080.854218676865,"y":30454.034021936455},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"RightBTC","config":"{ \n\"codeName\": \"rightbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ade372e9-5070-4fa9-843e-57732c4106c3","savedPayload":{"position":{"x":17999.64382962515,"y":30964.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b63d440e-4501-475c-b8a6-2b9a144e32a1","savedPayload":{"position":{"x":17984.64382962515,"y":30901.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"81d77477-4f2e-43c0-b284-dde54f91c37f","savedPayload":{"position":{"x":17864.64382962515,"y":31036.23747069523},"targetPosition":{"x":17861.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"9ce3cc34-1ba4-4155-96a5-c946b1bcc5ab","savedPayload":{"position":{"x":17819.64382962515,"y":31127.23747069523},"targetPosition":{"x":17810.64382962515,"y":31080.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c7df4af7-37c1-403d-ada1-b6a527821bdd","savedPayload":{"position":{"x":17810.64382962515,"y":31080.23747069523},"targetPosition":{"x":17861.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6de19501-5ce7-4944-b9dd-25b149acbb38","savedPayload":{"position":{"x":17861.64382962515,"y":31043.23747069523},"targetPosition":{"x":17946.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa87ace4-a976-401c-93f9-24a498261742","savedPayload":{"position":{"x":17946.64382962515,"y":30988.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c20cd9e1-52a0-4d17-b90c-e9d5b63315ce","savedPayload":{"position":{"x":18200.67134708334,"y":30403.76933118965},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"STEX","config":"{ \n\"codeName\": \"stex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f1d65161-4922-4a1e-ac98-df1a842347a7","savedPayload":{"position":{"x":17872.64382962515,"y":31001.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c313b2c6-6154-4a9a-b826-fd99cc500cd9","savedPayload":{"position":{"x":17888.64382962515,"y":31186.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d0a1259b-1c37-4d39-836e-3c434c3b3687","savedPayload":{"position":{"x":17778.64382962515,"y":31076.23747069523},"targetPosition":{"x":17858.64382962515,"y":31091.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"4a1e5627-459c-4dec-be13-c20d4a9ea58f","savedPayload":{"position":{"x":17841.64382962515,"y":31179.23747069523},"targetPosition":{"x":17795.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"6981eb0d-0f0e-4f8e-9781-4a03e22e93fd","savedPayload":{"position":{"x":17795.64382962515,"y":31105.23747069523},"targetPosition":{"x":17858.64382962515,"y":31091.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7704478a-9717-43a8-bd2e-88daa6f84bd0","savedPayload":{"position":{"x":17858.64382962515,"y":31091.23747069523},"targetPosition":{"x":17941.64382962515,"y":31173.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"262aad86-f430-49ea-a636-e8bd816a9636","savedPayload":{"position":{"x":17941.64382962515,"y":31173.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0ea23137-3c65-4de1-9772-6ac1b65196e8","savedPayload":{"position":{"x":18325.220671374373,"y":30366.753804527314},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TideBit","config":"{ \n\"codeName\": \"tidebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c92318bd-8b2d-489b-b8e8-cf30fb63286e","savedPayload":{"position":{"x":17981.64382962515,"y":31021.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"83bca3ec-fc1c-435c-b5fe-b1cf92463fd1","savedPayload":{"position":{"x":18051.64382962515,"y":31072.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2f3ee9b2-cd41-458c-84da-edac3155028a","savedPayload":{"position":{"x":18075.64382962515,"y":31059.23747069523},"targetPosition":{"x":17987.64382962515,"y":31047.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"009ae4b6-adbc-4900-9fc0-f18936eeed9b","savedPayload":{"position":{"x":18030.64382962515,"y":31058.23747069523},"targetPosition":{"x":18009.64382962515,"y":31028.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"3ee88180-fe10-41df-8251-b1ed0a526e7a","savedPayload":{"position":{"x":18009.64382962515,"y":31028.23747069523},"targetPosition":{"x":17987.64382962515,"y":31047.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bb88e6e8-a99a-4c4e-9ca5-ffed49aa8b54","savedPayload":{"position":{"x":17987.64382962515,"y":31047.23747069523},"targetPosition":{"x":17925.64382962515,"y":31135.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a4a95e-4333-4455-9f7c-90bc839d174a","savedPayload":{"position":{"x":17925.64382962515,"y":31135.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5563c310-701a-4c1e-8155-87c08c927ce3","savedPayload":{"position":{"x":18453.041964599197,"y":30343.421415155935},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TimeX","config":"{ \n\"codeName\": \"timex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"5c004b5f-eec4-414f-8d01-d9b3fddeee9e","savedPayload":{"position":{"x":17892.64382962515,"y":30973.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"59a33add-d0e9-4ae1-8a01-f1e0ed09cb61","savedPayload":{"position":{"x":17911.64382962515,"y":30878.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a4189ba1-d1d4-4ff8-91dd-a8696ca493e3","savedPayload":{"position":{"x":17953.64382962515,"y":30880.23747069523},"targetPosition":{"x":17924.64382962515,"y":30871.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"3d34eb9d-e7cb-42fe-8785-c327b2bbc529","savedPayload":{"position":{"x":17839.64382962515,"y":30875.23747069523},"targetPosition":{"x":17930.64382962515,"y":30877.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"773de01f-0999-4a59-91f0-642148cd58d0","savedPayload":{"position":{"x":17930.64382962515,"y":30877.23747069523},"targetPosition":{"x":17924.64382962515,"y":30871.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fe33a596-4f98-4843-a5b1-26e7e0fcf1c8","savedPayload":{"position":{"x":17924.64382962515,"y":30871.23747069523},"targetPosition":{"x":18018.64382962515,"y":30832.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d078b9a3-cdc6-458e-a511-dc4f5bef38ba","savedPayload":{"position":{"x":18018.64382962515,"y":30832.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"27d69fa7-b561-4986-8c0d-1b374e7e1bf1","savedPayload":{"position":{"x":18582.63663896287,"y":30334.045714007894},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TOP.Q","config":"{ \n\"codeName\": \"topq\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eafef6a3-eed2-470e-a15c-aa4c10001cd2","savedPayload":{"position":{"x":17818.64382962515,"y":31115.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"2d5eb813-ceb6-40cd-8682-7205596bb8b5","savedPayload":{"position":{"x":17759.64382962515,"y":31188.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"61f7832c-c1f0-40bc-b1f2-ba947c58309d","savedPayload":{"position":{"x":17741.64382962515,"y":31288.23747069523},"targetPosition":{"x":17788.64382962515,"y":31228.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"63b973da-30a7-467a-b954-c57537aab18d","savedPayload":{"position":{"x":17677.64382962515,"y":31206.23747069523},"targetPosition":{"x":17756.64382962515,"y":31146.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"722dcf44-de3f-4d1a-8655-80561e1e4d55","savedPayload":{"position":{"x":17756.64382962515,"y":31146.23747069523},"targetPosition":{"x":17788.64382962515,"y":31228.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45d5e04a-4a53-4f32-b4c0-d882456cb263","savedPayload":{"position":{"x":17788.64382962515,"y":31228.23747069523},"targetPosition":{"x":17806.64382962515,"y":31163.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c66e8dfc-4847-4180-b82c-36458f9b405d","savedPayload":{"position":{"x":17806.64382962515,"y":31163.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8fdf13d8-e8d2-4ef4-8b34-f492a25d753a","savedPayload":{"position":{"x":18712.485315398026,"y":30338.736622606855},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Upbit","config":"{ \n\"codeName\": \"upbit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f456fec2-cee6-4f0c-b865-1188088879c9","savedPayload":{"position":{"x":17919.64382962515,"y":30973.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"947c1ca0-bff9-4372-b153-40054e29b705","savedPayload":{"position":{"x":17921.64382962515,"y":31014.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"34ffbe12-5a26-446a-8bf6-7395c0370ba2","savedPayload":{"position":{"x":17874.64382962515,"y":30900.23747069523},"targetPosition":{"x":17945.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"8f00f19d-74a8-48d8-b951-79f35e87b110","savedPayload":{"position":{"x":17906.64382962515,"y":30902.23747069523},"targetPosition":{"x":17896.64382962515,"y":30896.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"64e1bede-aabf-4831-83a6-fe1cea435613","savedPayload":{"position":{"x":17896.64382962515,"y":30896.23747069523},"targetPosition":{"x":17945.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7c80b956-f2ca-4a6f-a661-f17546288d3e","savedPayload":{"position":{"x":17945.64382962515,"y":30971.23747069523},"targetPosition":{"x":18027.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e3686b02-4ecc-4dcb-a311-b7ef542a3c37","savedPayload":{"position":{"x":18027.64382962515,"y":31048.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"74e57ecd-3394-42b4-b2c4-6f216f7e41db","savedPayload":{"position":{"x":18841.065636895226,"y":30357.439144338445},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"WhiteBit","config":"{ \n\"codeName\": \"whitebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c16eae45-a568-4b2e-b064-4431bdf34c24","savedPayload":{"position":{"x":17767.64382962515,"y":30899.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"dfdf793f-4ba6-4215-a325-323c0f223553","savedPayload":{"position":{"x":17920.64382962515,"y":31004.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"fd749d13-dbac-493f-9af6-c521eddf909f","savedPayload":{"position":{"x":17815.64382962515,"y":30973.23747069523},"targetPosition":{"x":17720.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"79f7d2d0-77a5-4f38-ac68-fd11f18e5e6b","savedPayload":{"position":{"x":17761.64382962515,"y":31182.23747069523},"targetPosition":{"x":17680.64382962515,"y":31153.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fd0506f4-58b7-431e-bc9d-69bce63c3379","savedPayload":{"position":{"x":17680.64382962515,"y":31153.23747069523},"targetPosition":{"x":17720.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"47e8a4b1-9a6c-4555-a881-f7524183d72e","savedPayload":{"position":{"x":17720.64382962515,"y":31056.23747069523},"targetPosition":{"x":17817.64382962515,"y":31010.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"7fa08b91-55ab-477d-a097-88ea7f25fb76","savedPayload":{"position":{"x":17817.64382962515,"y":31010.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"467ece1e-d1d0-4a11-ae7a-d0e22cd4eba5","savedPayload":{"position":{"x":18966.87011674703,"y":30389.934009235236},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ZB","config":"{ \n\"codeName\": \"zb\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"db206cbd-a587-4e8e-acbe-6581ad3b5cc4","savedPayload":{"position":{"x":17855.64382962515,"y":31027.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"1dd658c5-7755-44b7-85f0-9bcd787762a0","savedPayload":{"position":{"x":17789.64382962515,"y":31044.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"0de82bbe-7909-4b65-b304-f59b41f618ae","savedPayload":{"position":{"x":17830.64382962515,"y":30696.23747069523},"targetPosition":{"x":17846.64382962515,"y":30793.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c89819d0-8880-4b36-a9b3-0b284d266e3b","savedPayload":{"position":{"x":17891.64382962515,"y":30748.23747069523},"targetPosition":{"x":17865.64382962515,"y":30772.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"7a55f503-17fa-45c4-880b-1a9a11a0a555","savedPayload":{"position":{"x":17865.64382962515,"y":30772.23747069523},"targetPosition":{"x":17846.64382962515,"y":30793.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e640fca2-8bab-45ff-9a47-8e7b9650c277","savedPayload":{"position":{"x":17846.64382962515,"y":30793.23747069523},"targetPosition":{"x":17909.64382962515,"y":30886.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"421a99cd-3d9a-46a5-8654-08d6336e75be","savedPayload":{"position":{"x":17909.64382962515,"y":30886.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07df07e8-39a8-4fbc-a0c8-150f20b6ac59","savedPayload":{"position":{"x":19088.423812451314,"y":30435.840244716648},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51f64e29-e3ab-4683-a5de-f397fbf94260","savedPayload":{"position":{"x":18603.301618063546,"y":31534.850126685462},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Testing Queue","project":"Superalgos","exchanges":[],"id":"895ce4b1-4890-4216-89ba-a012181d2546","savedPayload":{"position":{"x":18753.301618063546,"y":30755.427263279467},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"signalsProviders":[],"id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d","savedPayload":{"position":{"x":18903.301618063546,"y":31015.2348844148},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}},{"type":"Charting Space","name":"New Charting Space","project":"Superalgos","viewport":{"type":"Viewport","name":"New Viewport","config":"{\"zoom\":\"0.00\"}","project":"Superalgos","id":"01713f1d-91b8-44f9-9c5d-a0c12fd09037","savedPayload":{"position":{"x":19200.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"frame":{"position":{"x":245.62500000000045,"y":440.12500000000006}}}},"projectDashboards":[{"type":"Project Dashboards","name":"Superalgos","project":"Superalgos","dashboards":[{"type":"Dashboard","name":"Testing Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-01-01T00:00:00.000Z\",\n \"toDate\": \"2021-01-23T23:59:59.999Z\"\n}","project":"Superalgos","id":"691e2b6e-6b13-4a94-a8cd-15bbad6e8d2b","savedPayload":{"position":{"x":18483.434665834,"y":25740.977644897117},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 3744.3087,\n \"maxValue\": 42369.5\n}","project":"Superalgos","id":"d1c91955-e558-4ffe-a349-895405dd7475","savedPayload":{"position":{"x":18378.45195066214,"y":25792.749390696466},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\"value\":\"24-hs\"}","project":"Superalgos","id":"69064a57-bfa3-4a7a-a597-55887057befb","savedPayload":{"position":{"x":18261.64837946537,"y":25800.405101221888},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"Indicators","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"550e7d96-2b55-4cb5-91d5-6fbceb32cbb8","savedPayload":{"position":{"x":18000.806237131383,"y":26622.58688508041},"targetPosition":{"x":18000.806237131383,"y":26322.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}}],"layerFolders":[],"id":"a9026e9d-f9c2-4509-9a75-862421b5c70b","savedPayload":{"position":{"x":18000.806237131383,"y":26322.58688508041},"targetPosition":{"x":18000.806237131383,"y":26022.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"ea7115b6-1324-43dc-8fa2-90c12c2c2c48","savedPayload":{"position":{"x":17590.99861599605,"y":26432.394506215744},"targetPosition":{"x":17740.99861599605,"y":26172.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d16e7e1-8676-4041-a1b1-0172e023558a","savedPayload":{"position":{"x":17440.99861599605,"y":26172.58688508041},"targetPosition":{"x":17740.99861599605,"y":26172.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"b7fed612-b218-4378-bb3f-6c90fb947449","savedPayload":{"position":{"x":17740.99861599605,"y":26172.58688508041},"targetPosition":{"x":18000.806237131383,"y":26022.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa6b9a8f-d5f4-4f60-b3fa-bdf957806bfb","savedPayload":{"position":{"x":18000.806237131383,"y":26022.58688508041},"targetPosition":{"x":18150.806237131383,"y":25762.779263945078},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"6a4b0ce0-7e88-4fe3-b9b5-2116d81b2da0","savedPayload":{"position":{"x":18150.806237131383,"y":25762.779263945078},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fbbb590b-c94d-4625-94e2-bc4bfa2ab6f9","savedPayload":{"position":{"x":17117.615314676776,"y":27603.533941128822},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab219d3d-1f44-4448-b5f9-f9f6ace6caea","savedPayload":{"position":{"x":17051.16747388602,"y":27764.15503654623},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"7dd6f9d6-3840-4a95-a9c9-9445a1335868","savedPayload":{"position":{"x":16933.846232243683,"y":27892.241373813282},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371bfe04-1b2d-4d60-ae70-03a2f7522466","savedPayload":{"position":{"x":16779.824555577114,"y":27972.466666709206},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"7c580919-08ce-4aff-9e84-888fdf07caec"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f1dea1ef-69f3-4b64-8586-ec43aa281cde","savedPayload":{"position":{"x":16607.980005705944,"y":27995.20904027392},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"389797d4-8456-4258-9adf-246a6ba69016"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eca94344-450b-4dc9-ad80-8e202b6e0517","savedPayload":{"position":{"x":16468.146686869968,"y":28016.33671006015},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4c54659-0b38-4faf-9827-47976eb9cca7","savedPayload":{"position":{"x":16286.534133073324,"y":27862.805158861436},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"e82d97df-5b25-4967-b2b4-da065c5d3ad9","savedPayload":{"position":{"x":16186.118842172375,"y":27726.349378357005},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c"}}}],"layerFolders":[],"id":"851d853d-e2d7-4138-b5fd-563f1f844f64","savedPayload":{"position":{"x":16629.455267522357,"y":27495.510435539556},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"dc84698a-bce4-4979-9aca-80661b054191","savedPayload":{"position":{"x":16413.05839477738,"y":27900.48601747122},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d3456e5b-0438-4273-a3ce-6b1d60573c33","savedPayload":{"position":{"x":15940.04282322282,"y":27710.982017672217},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"556e97e8-eba3-419d-869d-950cc99371da"}}}],"layerFolders":[],"id":"6ad8b449-785f-40cc-afc0-19c68b508c17","savedPayload":{"position":{"x":16372.806838862034,"y":27461.836330732353},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"4b8d055f-0c36-40a6-af78-5faf9b34b72c","savedPayload":{"position":{"x":16011.911411221576,"y":27821.709717793714},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac24a200-397f-4d7c-9916-581328c74f22","savedPayload":{"position":{"x":15678.683136179856,"y":27381.4342703589},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f"}}}],"layerFolders":[],"id":"acf27818-08f1-4c0d-9cc9-30c38ba892fb","savedPayload":{"position":{"x":16167.428268555628,"y":27304.34657839513},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b9eeeeb3-43db-4d4f-9f28-f42e947494f9","savedPayload":{"position":{"x":15829.8024827204,"y":27504.536838373795},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"b0961496-1af9-48cd-bbeb-ac5973192e78"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eda9462a-9688-42cf-ae97-b3dfd02c718c","savedPayload":{"position":{"x":15609.804663880679,"y":27268.796716857654},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"1481d280-6112-4d0d-8a48-3fe4e65efc9d","savedPayload":{"position":{"x":15542.751172927,"y":26994.51154740736},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"e298787f-b7f2-4334-931e-38b9441e43f9"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2f579332-aa55-4e51-bbf4-370614838fd3","savedPayload":{"position":{"x":15731.678465146957,"y":26701.21391555524},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c"}}}],"layerFolders":[],"id":"5b4e1c43-9fb7-439f-9ca9-e600bd41718d","savedPayload":{"position":{"x":16068.487948353533,"y":27065.178022212927},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be00b86a-5b53-4dbd-ab79-7d135115a05e","savedPayload":{"position":{"x":15729.681254722265,"y":27141.496363567436},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3870b052-156c-4f10-9658-3fe3df4baf10","savedPayload":{"position":{"x":15655.766921038878,"y":26926.520781829942},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"5fa754c9-ffc3-499c-b566-0031b276cb73","savedPayload":{"position":{"x":15602.003963464067,"y":26726.16283946371},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"e734b6be-ba40-468c-a94f-1153dc85e00c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"15ec260c-02f5-46e0-853b-6e751175dac7","savedPayload":{"position":{"x":15694.595933594896,"y":26519.078790508484},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"9a973229-4d9d-45af-b5aa-64906a915f6e"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be57de60-d843-4bc8-bcb8-d8be27ceffbb","savedPayload":{"position":{"x":15860.599521408476,"y":26370.959361875106},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"56517fe9-64da-4404-83f3-005106bc1c0a"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"407c7816-701b-43bf-92d8-cc728af78f0e","savedPayload":{"position":{"x":16074.514663407172,"y":26309.4257023683},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"d00c76e7-4be0-4518-9892-a0f6df943951"}}}],"layerFolders":[],"id":"ac1ed18a-243b-4211-bb24-83bbfc20cd0a","savedPayload":{"position":{"x":16102.435022890473,"y":26808.60560739891},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"41428787-ca89-4ab9-a5cc-29e66e7c486d","savedPayload":{"position":{"x":16563.94253388532,"y":27000.12691029475},"targetPosition":{"x":16959.887378913278,"y":26696.345955873618},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"153096ea-a48c-4ed5-9f8e-49eafa7a779c","savedPayload":{"position":{"x":16959.887378913278,"y":26696.345955873618},"targetPosition":{"x":17356.087169245202,"y":26392.358194020195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"918bdf6d-3cfe-4c8b-894d-320cc72aef70","savedPayload":{"position":{"x":17356.087169245202,"y":26392.358194020195},"targetPosition":{"x":17752.58716757543,"y":26088.09403049708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"f0cc2b79-bae6-4441-a456-9fda5962a74f","savedPayload":{"position":{"x":18062.80023504401,"y":25685.600071512363},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"49761e84-d6c2-4c25-9604-fb2ddf93e510","savedPayload":{"position":{"x":16656.868785422477,"y":26432.858992462687},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"a0c29c57-0a20-4084-9697-142300f62f9c"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"622a88bb-151c-48ef-bb99-e093498bf002","savedPayload":{"position":{"x":16532.079378960796,"y":26407.941535439437},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"aa0fe882-89a8-4811-8988-c589554afe9d"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fba6a9fb-5e9a-46dd-aa2b-33950f0ec9f1","savedPayload":{"position":{"x":16422.17772780151,"y":26345.322337891994},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"bbc65054-b22b-4cbb-816b-529672e2f498"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ec0d56a-b497-4d90-9157-094c08930962","savedPayload":{"position":{"x":16337.350686782229,"y":26251.937657405022},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"776a3ece-8255-4e80-b60f-85bb818b561f"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5db72b24-ad72-49dd-8a32-1256fb25d04a","savedPayload":{"position":{"x":16285.989038785094,"y":26136.930218774854},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"7593aaf9-0505-4b58-9920-235340ff2d2f"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"cbdfc3db-d5dd-476c-bf02-cf86d8a01300","savedPayload":{"position":{"x":16272.745363533515,"y":26011.773677977748},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"105a157c-b33a-40d0-9711-19526b04bfda","savedPayload":{"position":{"x":16299.015550574797,"y":25888.784732962406},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"faab4399-898b-4393-8c27-fa2f3109c60a"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab8b1fdc-4319-4b37-ae29-333912412215","savedPayload":{"position":{"x":16361.786293229427,"y":25778.482294029163},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"051bd185-3255-41a5-bf62-ea8b27b32ddf","savedPayload":{"position":{"x":16480.783502595135,"y":25721.83855865352},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7"}}}],"layerFolders":[],"id":"838dab4e-c0bf-47f3-ac6a-8f815e5e666b","savedPayload":{"position":{"x":16674.50340983706,"y":26032.473650601696},"targetPosition":{"x":17060.504725681127,"y":25928.810868229375},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"74e5c728-fd06-4e79-8ec1-32ab2720adf5","savedPayload":{"position":{"x":17060.504725681127,"y":25928.810868229375},"targetPosition":{"x":17476.621526107163,"y":25817.204586634994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8a7bce21-b09a-41e3-b9af-87f1939e9136","savedPayload":{"position":{"x":17183.249075924137,"y":26042.417976975546},"targetPosition":{"x":17666.14324924388,"y":25913.066804430764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"a514d9bb-8862-4c81-b82e-dbde66abeb77","savedPayload":{"position":{"x":18011.02848924466,"y":25580.617356340503},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"17c8f568-4716-4a19-a607-689b78a83ef9","savedPayload":{"position":{"x":15863.39648009967,"y":25920.19809968253},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba"}}},{"type":"Layer","name":"Strategies","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"86978570-76c1-4780-a91d-4e72e88ef817","savedPayload":{"position":{"x":15705.823183600161,"y":25714.050844388883},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"653e6b00-bda3-4662-a2bd-934212e884d1","savedPayload":{"position":{"x":15327.86442305616,"y":25820.329298596927},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc"}}},{"type":"Layer","name":"Market Sell Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2887f930-5d79-42ff-ab1d-7d5cdc6b47da","savedPayload":{"position":{"x":15180.506269267476,"y":25548.319695716105},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"3040a2f6-0b1c-4ed3-a816-39c916465c9a","savedPayload":{"position":{"x":15221.387997903394,"y":25243.251366030032},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a59ef70f-534f-410b-99ef-3a700d2ca82a","savedPayload":{"position":{"x":15398.72702979423,"y":25036.45705462772},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642"}}}],"layerFolders":[],"id":"334a2964-17df-4237-a302-962416655896","savedPayload":{"position":{"x":15672.454225865862,"y":25457.66729056814},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a6b1a2c5-ca70-42b9-932f-2ff00aff2524","savedPayload":{"position":{"x":15292.017678857432,"y":25360.154463716302},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"9fc29be1-9393-4933-95d3-bebddd73c05e"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"663ddaf7-784f-4baa-8f69-3ed0ef5cd685","savedPayload":{"position":{"x":15298.823311983959,"y":25050.998457959326},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"b555388f-db93-4db1-91be-7772550afa70"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a4be770-082c-4d0f-a747-0b74d792e76f","savedPayload":{"position":{"x":15476.277795953174,"y":24812.240105588095},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"41953904-e48c-4176-bf0f-09d133bc444c"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"efb9d388-a679-49b2-b792-1b8258a489d6","savedPayload":{"position":{"x":15784.125039599678,"y":24724.90131904347},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c"}}}],"layerFolders":[],"id":"eea75e9a-a735-4db8-9eea-cf2c4e4119e3","savedPayload":{"position":{"x":15771.52653783795,"y":25218.00065188687},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb0ea641-23a7-48d0-a70d-f3314722f129","savedPayload":{"position":{"x":15517.085211279895,"y":24978.036206455075},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"6e49b57f-8c94-410f-985b-82c126155b11"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"fa1cf76f-30a6-4cfd-ba4f-8511afca64b8","savedPayload":{"position":{"x":15592.85911518537,"y":24750.27204370447},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"bf7d5c92-8894-4040-8d2f-3f5cdec443af","savedPayload":{"position":{"x":15786.287615627753,"y":24593.84817912013},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"125c9155-a747-4ac4-9d9f-1b93a4ae8d17","savedPayload":{"position":{"x":16042.541437710524,"y":24564.41238111062},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"01491591-0462-453c-91e0-6da6f554a729"}}},{"type":"Layer","name":"Take Profit","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3745d5cd-a2be-43ed-b5df-d05c328f8665","savedPayload":{"position":{"x":16280.917386265202,"y":24663.928419862754},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2"}}}],"layerFolders":[],"id":"9854e8b2-d863-42f3-afd5-416d5e2c548e","savedPayload":{"position":{"x":15977.296572394282,"y":25060.75923245295},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6e31ae33-68d1-4dca-8b29-6e59a2a4448e","savedPayload":{"position":{"x":16168.303357177294,"y":25522.64736240649},"targetPosition":{"x":16663.0166511096,"y":25588.08600416838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8c851b59-3105-460c-bb4b-cb4944db1049","savedPayload":{"position":{"x":16663.0166511096,"y":25588.08600416838},"targetPosition":{"x":17157.9116821377,"y":25653.201834587282},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"be53f7bc-6c26-4fd7-a0d0-96b965bbf655","savedPayload":{"position":{"x":17157.9116821377,"y":25653.201834587282},"targetPosition":{"x":17653.521538239824,"y":25718.280363218284},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"43eeb152-b0b8-468d-84d1-7d03fd636387","savedPayload":{"position":{"x":18003.37277871924,"y":25463.81378514373},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"499eac86-6c40-4362-a36a-5f2002081866","savedPayload":{"position":{"x":18300.806237131383,"y":25502.971642809745},"targetPosition":{"x":18450.806237131383,"y":25243.164021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":-155},"width":240,"height":111.125,"radius":0},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}}],"id":"885265c2-ebb1-4283-a617-34a88780276d","savedPayload":{"position":{"x":18450.806237131383,"y":25243.164021674413},"targetPosition":{"x":18600.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Testing Environment","name":"New Testing Environment","id":"5882d8a8-345b-4188-b1c1-797e9ff805d9"}}},{"type":"Dashboard","name":"Production Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Live Trading Session My Computer","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-10-06T17:09:32.085Z\",\n \"toDate\": \"2020-10-06T21:09:32.085Z\"\n}","project":"Superalgos","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e","savedPayload":{"position":{"x":18003.37277871924,"y":24502.89901593443},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 10419.75,\n \"maxValue\": 10844.37\n}","project":"Superalgos","id":"ee3f6af0-8649-489b-9168-b4f16d2f5a78","savedPayload":{"position":{"x":18011.02848924466,"y":24386.095444737657},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\n \"value\": \"01-min\",\n \"autoMinScale\": false,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-10-05T09:53:58.939Z\",\n \"toDate\": \"2020-10-05T13:53:58.939Z\"\n}","project":"Superalgos","id":"480f9696-76df-4026-a435-7bf364c08056","savedPayload":{"position":{"x":18062.80023504401,"y":24281.112729565797},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"New Data Mine Products","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"e3cbbcbe-c938-4669-b670-c317476e0a3b","savedPayload":{"position":{"x":16992.282280946285,"y":23856.49271176323},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}},{"type":"Layer","name":"Volumes","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"385a5f98-118a-43fd-b019-54e825d1f4ae","savedPayload":{"position":{"x":17192.242023030805,"y":23510.135246216414},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Volumes","id":"07c11481-7dbd-477d-8bf7-79212542a6aa"}}}],"layerFolders":[],"id":"6848a114-9979-41dd-8d95-3a899679ba08","savedPayload":{"position":{"x":17392.615945713467,"y":23857.108132968406},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0cf13cfa-2a37-4691-902c-513ab5780da8","savedPayload":{"position":{"x":17538.760168957182,"y":23310.0159698544},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"d9245f0b-54e8-44b1-94bd-56c7048eb5c1","savedPayload":{"position":{"x":17938.505496583897,"y":23310.043709247824},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"20bd60bb-917b-4a0f-acc5-b019d1c3bd81","savedPayload":{"position":{"x":17738.97910230742,"y":23657.072015580987},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4cbbc012-c91e-4acd-a8d2-feb149e728a0","savedPayload":{"position":{"x":17738.764681458488,"y":24056.665358937673},"targetPosition":{"x":17963.331767523672,"y":24445.732145877373},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"bb7afb85-32ea-4471-8400-615a34fc126f","savedPayload":{"position":{"x":18150.806237131383,"y":24203.93353713308},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"05da2270-0016-4d22-89d8-b77cd14008a9","savedPayload":{"position":{"x":12224.806237131383,"y":25700.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"dc6cc4ef-4bd7-4837-8442-919462314db3"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4165460-e0a7-4a0d-b506-15e756dfac93","savedPayload":{"position":{"x":12219.806237131383,"y":25689.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"776ed571-8321-47aa-8cfb-c8ebf565dace"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371e0cd7-af57-4469-836d-45c4e6059760","savedPayload":{"position":{"x":12317.806237131383,"y":25717.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"ded93703-a48d-44be-9703-878c28f949cd"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5ed81442-77cc-4101-b1ff-8c7cbac57d4f","savedPayload":{"position":{"x":12245.806237131383,"y":25698.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5e046a6a-4f38-4b44-bae1-1aed6d4d3753","savedPayload":{"position":{"x":12313.806237131383,"y":25819.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b78a78ec-dca3-499b-881a-d2e3a82bf116","savedPayload":{"position":{"x":12330.806237131383,"y":25734.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb95c2a9-6f82-4a2a-9105-17b8f6c3c51a","savedPayload":{"position":{"x":12364.806237131383,"y":25720.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ad5b6f0-f4a9-4aab-aedf-9175647498b0","savedPayload":{"position":{"x":12321.806237131383,"y":25708.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65"}}}],"layerFolders":[],"id":"7216b7a3-1371-4f07-a395-74c547579ab4","savedPayload":{"position":{"x":12315.806237131383,"y":25752.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d2c0a1c8-70ef-4f7b-835a-a99ac6a5837a","savedPayload":{"position":{"x":12210.806237131383,"y":25770.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"88dd680c-a81b-48ae-96ba-838281abfa35"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"076af680-2114-480b-a979-f7eea4966d7b","savedPayload":{"position":{"x":12302.806237131383,"y":25739.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062"}}}],"layerFolders":[],"id":"56112c60-50dd-4d19-89aa-1d46005f194f","savedPayload":{"position":{"x":12305.806237131383,"y":25783.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb93ebef-f7ee-42c2-93b8-fe46eba0874a","savedPayload":{"position":{"x":12424.806237131383,"y":25721.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"595e7228-5676-4f5c-82bf-baa43e9325ab","savedPayload":{"position":{"x":12488.806237131383,"y":25680.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"7a95a249-132d-4e0f-9182-cc7af45cacea"}}}],"layerFolders":[],"id":"9f594c8a-87fe-4c4b-b550-493405fe0b2d","savedPayload":{"position":{"x":12427.806237131383,"y":25692.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3ce44f39-8ac9-4984-ad9d-daa53ed3f707","savedPayload":{"position":{"x":12377.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7d5f0aa-8259-4271-aa95-7b351aa9b9c0","savedPayload":{"position":{"x":12337.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a9f6580-ab06-4005-9274-98f7e9a491e5","savedPayload":{"position":{"x":12387.806237131383,"y":25625.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f60905ad-b491-45ee-9768-8087df9aef78","savedPayload":{"position":{"x":12466.806237131383,"y":25757.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70"}}}],"layerFolders":[],"id":"5389c77c-63a7-4495-9cc5-cdc0c70b76e6","savedPayload":{"position":{"x":12422.806237131383,"y":25658.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f602d8ef-b6a6-423f-a772-9a4b5d5b9c43","savedPayload":{"position":{"x":12422.806237131383,"y":25747.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0a0dd259-5704-46de-900f-5d1dc24af4f6","savedPayload":{"position":{"x":12488.806237131383,"y":25650.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de6f83f6-a6d9-45c7-93fd-e2c72238040e","savedPayload":{"position":{"x":12410.806237131383,"y":25733.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"1c6eed42-23aa-4174-aade-be29222acb8c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac0f1c2a-5eed-45ee-84da-3d24e455abd3","savedPayload":{"position":{"x":12379.806237131383,"y":25663.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"89def699-c33f-4344-a045-babca1f545ee","savedPayload":{"position":{"x":12478.806237131383,"y":25752.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7e04514-bf32-4021-822c-47af56c55a76","savedPayload":{"position":{"x":12504.806237131383,"y":25780.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"c451c035-5ece-451f-836f-b5334cb3f967"}}}],"layerFolders":[],"id":"a302255a-cf35-4801-ae3c-95cb47ae9613","savedPayload":{"position":{"x":12437.806237131383,"y":25742.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1857004e-2f12-4287-8847-173043d8d2ab","savedPayload":{"position":{"x":12363.806237131383,"y":25731.664021674413},"targetPosition":{"x":12380.806237131383,"y":25686.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"23ad1663-d4da-4ece-8964-30012894ae5b","savedPayload":{"position":{"x":12380.806237131383,"y":25686.664021674413},"targetPosition":{"x":12448.806237131383,"y":25597.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ddb3fafa-58f4-46c1-9b24-61efe3ec13a6","savedPayload":{"position":{"x":12448.806237131383,"y":25597.664021674413},"targetPosition":{"x":12446.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"788a0207-20ea-411c-862d-b1b13db4e09f","savedPayload":{"position":{"x":18261.64837946537,"y":24166.307699856272},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2a1db97f-553d-47ea-b452-c90ba9af9e79","savedPayload":{"position":{"x":12242.806237131383,"y":25582.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"ba606f99-2ae5-44dc-b7db-399e657830e1"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3c1c9d45-c482-4374-92ad-c3c28bfb7679","savedPayload":{"position":{"x":12270.806237131383,"y":25723.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a560c8af-91cd-4aea-ab9f-01ed60892abb","savedPayload":{"position":{"x":12340.806237131383,"y":25546.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"40debb84-1e2e-452b-99ff-95ff3994fb29","savedPayload":{"position":{"x":12322.806237131383,"y":25605.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"dcff6f56-7646-4505-aa93-6682a110f3f2"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5785c4fb-879d-4b89-aab8-9ec37d5f561b","savedPayload":{"position":{"x":12240.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74d8c1f7-8dd5-4e2c-b3cf-7f7bcfe7143c","savedPayload":{"position":{"x":12342.806237131383,"y":25543.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4476fcb1-3898-440f-b69e-afba06be912a","savedPayload":{"position":{"x":12402.806237131383,"y":25585.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"e4811789-fd94-49b0-9917-8d9d434f997d"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"43fe3418-9b3c-4cd9-b9a9-3994851e0b65","savedPayload":{"position":{"x":12310.806237131383,"y":25555.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"029ff3a7-9c65-425f-855a-882df68fa05b"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de34ba07-61b5-4785-bcf5-ff5b81d63e48","savedPayload":{"position":{"x":12227.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38"}}}],"layerFolders":[],"id":"36e02794-0943-4520-af39-2f274050610c","savedPayload":{"position":{"x":12310.806237131383,"y":25627.664021674413},"targetPosition":{"x":12365.806237131383,"y":25585.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ccfa34c-ca21-4ac3-be74-30f85549bf5e","savedPayload":{"position":{"x":12365.806237131383,"y":25585.664021674413},"targetPosition":{"x":12339.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c1c4bd7c-b755-461a-a5ed-b59804b4c280","savedPayload":{"position":{"x":12339.806237131383,"y":25637.664021674413},"targetPosition":{"x":12377.806237131383,"y":25540.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"ed6507e7-437f-4740-a897-11dc4da4d20a","savedPayload":{"position":{"x":18378.45195066214,"y":24173.963410381693},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"76852fcc-d524-43b8-a0b1-8645c2fed91e","savedPayload":{"position":{"x":12710.806237131383,"y":25614.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"c6fd6067-4b57-4860-ae3b-5668e4444490"}}},{"type":"Layer","name":"Strategies","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"43b43957-23d5-401b-b3e0-391c430b72c9","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"60f88096-7343-42d1-afad-83fecd22fb44"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"aaff7fb6-bd83-48f2-819a-a1dd674876a7","savedPayload":{"position":{"x":12579.806237131383,"y":25470.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"9f939086-c934-4924-8353-776707a7cf10"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bec241f4-5a8f-4fe7-9620-76d92f64da9c","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"da5f279e-d387-43cf-80f4-fc114b9ac906"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d03d083-7199-4bf2-8e8a-4c96f23a16a8","savedPayload":{"position":{"x":12735.806237131383,"y":25521.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"367646bb-839a-4071-8305-6d26a647585d"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"cb5de20d-e440-4bdb-a074-c408740e9022","savedPayload":{"position":{"x":12631.806237131383,"y":25476.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9"}}}],"layerFolders":[],"id":"a8409c29-905d-495f-bbca-3d0eef14f91c","savedPayload":{"position":{"x":12649.806237131383,"y":25488.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"04d1a0a8-1419-4fbd-9c28-eef6cfefd5d4","savedPayload":{"position":{"x":12584.806237131383,"y":25552.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74cda6e5-4fe2-41ef-a611-2c0374780ad5","savedPayload":{"position":{"x":12663.806237131383,"y":25503.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fb041378-9424-4709-a9ed-79426fcdfe68","savedPayload":{"position":{"x":12721.806237131383,"y":25661.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"6c4ac373-c5ff-4bfd-8047-4caaba6b7788","savedPayload":{"position":{"x":12659.806237131383,"y":25585.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91"}}}],"layerFolders":[],"id":"4b2ee5fd-d4f7-4a7c-bb6e-5e4c633b1b9f","savedPayload":{"position":{"x":12680.806237131383,"y":25593.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"4f77d851-9e93-4e85-9cfb-ec2ab200d79b","savedPayload":{"position":{"x":12581.806237131383,"y":25650.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"0213c668-a6d8-4737-ae57-d59d62b8f715","savedPayload":{"position":{"x":12767.806237131383,"y":25594.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"88997c97-e77f-490e-9eb5-c7531beec132"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f07986eb-010f-46cd-803d-dcac674adb80","savedPayload":{"position":{"x":12745.806237131383,"y":25673.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3f8f8fa3-2149-42d6-92e9-214354cfa186","savedPayload":{"position":{"x":12630.806237131383,"y":25581.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"9b064960-3829-441f-b955-334fb8324a53"}}},{"type":"Layer","name":"Take Profit","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"65ec58e6-2c00-41d4-a145-e6b7e7178bf0","savedPayload":{"position":{"x":12743.806237131383,"y":25590.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1"}}}],"layerFolders":[],"id":"66e5c011-9163-422d-863f-115135f832ad","savedPayload":{"position":{"x":12672.806237131383,"y":25618.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"91b8a8e8-823d-4746-967f-c8d85a1ad3ad","savedPayload":{"position":{"x":12687.806237131383,"y":25530.664021674413},"targetPosition":{"x":12591.806237131383,"y":25565.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dcaccce7-d98d-49b3-b3b6-e83495b688c3","savedPayload":{"position":{"x":12591.806237131383,"y":25565.664021674413},"targetPosition":{"x":12523.806237131383,"y":25633.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e328f755-80a6-4799-8f12-002a2ddb983d","savedPayload":{"position":{"x":12523.806237131383,"y":25633.664021674413},"targetPosition":{"x":12489.806237131383,"y":25562.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"93708a53-ad8d-48e0-9728-b87ea96d1545","savedPayload":{"position":{"x":18483.434665834,"y":24225.735156181043},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7","savedPayload":{"position":{"x":18300.806237131383,"y":24463.741158268414},"targetPosition":{"x":18450.806237131383,"y":24723.548779403747},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":65},"width":240,"height":113.625,"radius":0},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4","savedPayload":{"position":{"x":18450.806237131383,"y":24723.548779403747},"targetPosition":{"x":18600.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Production Environment","name":"New Production Environment","id":"65a40d20-837c-4652-8356-f8054b4e1346"}}}],"id":"84a1b1ba-4888-4eac-8762-7084f0ee5de7","savedPayload":{"position":{"x":18600.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"21d2ec55-9e56-4652-8e96-c7e451262c36","savedPayload":{"position":{"x":18900.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"c"}}},{"type":"Plugins","name":"New Plugins","project":"Superalgos","pluginProjects":[{"type":"Plugin Project","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","pluginDataMines":{"type":"Plugin Data Mines","name":"New Plugin Data Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"d5234bd2-ef4e-4856-a6a0-ce7659653a48","savedPayload":{"position":{"x":18879.35218735615,"y":18688.55301821844},"targetPosition":{"x":31820.67692045767,"y":18678.794324352373},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ecc1a524-de9b-4e73-8874-b99a7ea0402b","savedPayload":{"position":{"x":31820.67692045767,"y":18678.794324352373},"targetPosition":{"x":31320.502678827743,"y":18678.79704693609},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cbc3d9be-5e59-45d8-bb0f-4ec82763691d","savedPayload":{"position":{"x":31234.673182942548,"y":18370.4854210064},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingMines":{"type":"Plugin Trading Mines","name":"New Plugin Trading Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"ad1ce785-858f-4cfc-ba68-108b5e0c54d9","savedPayload":{"position":{"x":24941.217404066585,"y":18714.893045797242},"targetPosition":{"x":31320.45102232534,"y":19544.930491916948},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8a64c00e-4f8c-49bf-b57d-4e2e388bae41","savedPayload":{"position":{"x":31320.45102232534,"y":19544.930491916948},"targetPosition":{"x":31070.415084976332,"y":19111.835158656926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8d881813-3ab9-4e8b-ab5a-48dedab2dd19","savedPayload":{"position":{"x":31570.083379567513,"y":18479.466800207203},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingSystems":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters-Lightning-Strike","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","project":"Superalgos","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4","savedPayload":{"position":{"x":31050.365708673427,"y":31068.826468868458},"targetPosition":{"x":30320.47990890508,"y":19544.97425758733},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5fdcecee-8c8f-4e0f-b36b-81e9231970a6","savedPayload":{"position":{"x":30320.47990890508,"y":19544.97425758733},"targetPosition":{"x":30570.439042449398,"y":19111.851515318966},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3569d452-c593-4e54-a356-7ff8c6b519f3","savedPayload":{"position":{"x":31570.083379567513,"y":18832.13795158269},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingEngines":{"type":"Plugin Trading Engines","name":"New Plugin Trading Engines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Low-Frequency","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Low-Frequency","project":"Superalgos","id":"e117a2a4-09b3-4181-8455-e680de3bdeb3","savedPayload":{"position":{"x":30923.55093774257,"y":24967.049392142086},"targetPosition":{"x":29820.22642897682,"y":18678.80776835817},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9270d67-4630-4ac9-91ca-1dec4fb5aa38","savedPayload":{"position":{"x":29820.22642897682,"y":18678.80776835817},"targetPosition":{"x":30320.32799443869,"y":18678.805890109317},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"87a28762-63d0-45f7-bd39-9dea436d8244","savedPayload":{"position":{"x":31234.673182942548,"y":18941.11933078349},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4e402d7-5228-408c-9d67-379d6ef40bae","savedPayload":{"position":{"x":31327.37828125503,"y":18655.802375894946},"targetPosition":{"x":31027.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6","savedPayload":{"position":{"x":31046.37828125503,"y":18657.802375894946},"targetPosition":{"x":31046.37828125503,"y":18657.802375894946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Design Space","name":"My Design Space","project":"Superalgos","spaceStyle":{"type":"Space Style","name":"My Space Style","config":" {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"node\": {\n \"fontSize\": 16,\n \"imageSize\": 60,\n \"type\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"name\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"menuItem\": {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"fontColor\": \"UI_COLOR.WHITE\",\n \"fontSize\": 14,\n \"imageSize\": 14\n }\n }\n }","project":"Superalgos","id":"fad0e429-f7a7-4b62-a2a5-2ead29b8f695","savedPayload":{"position":{"x":25236.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaceSettings":{"type":"Space Settings","name":"New Space Settings","config":"{\n \"node\": {\n \"distancePercentage\": 60,\n \"radiusPercentage\": 85,\n \"massPercentage\": 100,\n \"animationSteps\": 2, \n \"menuItem\": {\n \"widthPercentage\": 100,\n \"heightPercentage\": 60,\n \"radiusPercentage\": 90\n }\n },\n \"physics\": false\n}","project":"Superalgos","id":"05c9d6d5-24c4-4eec-9aca-9668d6486fdd","savedPayload":{"position":{"x":24636.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"f8485ce5-67f3-4476-b9e2-80994e49c318","savedPayload":{"position":{"x":24940.875,"y":10717.347826086958},"targetPosition":{"x":24940.875,"y":10717.347826086958},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":255,"y":588.3125}}}},{"type":"Superalgos Project","name":"New Superalgos Project","project":"Superalgos","projectDefinition":{"type":"Project Definition","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb","savedPayload":{"position":{"x":19203,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaces":{"type":"Spaces","name":"New Spaces","project":"Superalgos","id":"4d0ee814-4e48-4688-9cc5-7ee03de5192b","savedPayload":{"position":{"x":18903,"y":11033.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"mines":{"type":"Mines","name":"New Mines","project":"Superalgos","id":"b979e3a3-9316-4e5a-831b-c503b4b0e507","savedPayload":{"position":{"x":18603,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"otherHierarchies":{"type":"Other Hierarchies","name":"New Other Hierarchies","project":"Superalgos","id":"0a1ff755-8e0b-4f62-976e-df76c8139c6f","savedPayload":{"position":{"x":18903,"y":10433.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cf9f8b3b-77c6-43c6-b01f-95cf366a91f6","savedPayload":{"position":{"x":18903,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"APIs","name":"New APIs","project":"Superalgos","githubAPI":{"type":"Github API","name":"New Github API","config":"{\n \"username\": \"\",\n \"token\": \"\"\n}","project":"Superalgos","id":"9ea7bee2-c4db-4cee-a05f-63fcf3a86a4a","savedPayload":{"position":{"x":31349.208333333332,"y":10755.819458631257},"targetPosition":{"x":31049.208333333332,"y":10755.819458631257},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"23021bb7-9997-4fe6-8199-71ebf70aef76","savedPayload":{"position":{"x":31049.208333333332,"y":10755.819458631257},"targetPosition":{"x":31049.208333333332,"y":10755.819458631257},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Tutorial","name":"Basic Education","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to School!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes Menu","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Arrangement Features","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Pins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Start With the Menu","config":"{\n \"icon\": {\n \"name\": \"unpinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Start With the Menu\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"117e0e8d-77c2-4ee9-b29f-d82f7b6f6995","savedPayload":{"position":{"x":25672.637627218,"y":40215.29235725245},"targetPosition":{"x":25565.127242354407,"y":40495.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Session Base Asset","name":"","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b"}}},{"type":"Tutorial Step","name":"Pinned Nodes Can't Dance","config":"{\n \"icon\": {\n \"name\": \"pinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Pinned Nodes Can't Dance\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"734c6647-9e74-4d72-a621-29e0ff3e0bd3","savedPayload":{"position":{"x":25771.633615062532,"y":40277.75417389793},"targetPosition":{"x":25565.127242354407,"y":40495.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"c69e3a63-8d67-4e41-b16e-39a88a9776e3","savedPayload":{"position":{"x":25536.957826782294,"y":39930.71501490362},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Angle to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Mary Go Round","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-360-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Mary Go Round\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"836a107b-368d-4ef0-8a43-5daeefcb0fe2","savedPayload":{"position":{"x":25886.240655911173,"y":40433.23445084565},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"180 Degrees","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-180-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - 180 Degrees\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d9f1b166-20de-4ee5-94f7-0f9f363a5a82","savedPayload":{"position":{"x":25941.41057881172,"y":40509.16933527975},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Node's Independence","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-90-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Node's Independence\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c941ec5d-dcf0-48d5-a67b-5ce312c70470","savedPayload":{"position":{"x":25970.41512373375,"y":40598.43614568955},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Free-range Nodes","config":"{\n \"icon\": {\n \"name\": \"remove-angle-to-parent-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free-range Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"1b8726e1-8fa5-4584-8906-5c084785f476","savedPayload":{"position":{"x":25970.41512373375,"y":40692.29682471368},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"0a6ecc28-5731-49a1-878d-c1d2656cbecc","savedPayload":{"position":{"x":25706.338469709655,"y":40006.12813587088},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Distance to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Controlling Distances","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Controlling Distances\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e1a511e3-e833-4dcb-882c-28517b6fbaa2","savedPayload":{"position":{"x":25973.18382167515,"y":40807.23895310824},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Play With The Tape!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Play With The Tape!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"9ea33644-954d-475a-b3a1-9bca07951e58","savedPayload":{"position":{"x":25959.425576443755,"y":40923.481780139075},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About The Hierarchy?","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one-and-a-half\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About The Hierarchy?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"88ef7405-4f63-42a7-b02c-19f52b8f7576","savedPayload":{"position":{"x":25902.230411235218,"y":41025.61109632564},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}}],"tutorialTopics":[],"id":"c02373f4-3bf5-4b99-8dce-a152af6ec770","savedPayload":{"position":{"x":25799.043568022138,"y":40166.698076268774},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Arrangement Style","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Arrangement Style","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Arrangement Style\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"b03d5c5f-0ee9-48bf-a164-ce60a23b163f","savedPayload":{"position":{"x":25922.560122587445,"y":40717.9456609292},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Shall We Improve This? ","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Shall We Improve This?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"90b822dd-2f06-4474-a728-3500f3a30af4","savedPayload":{"position":{"x":25896.726562387557,"y":40832.113569359586},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Freeze","config":"{\n \"icon\": {\n \"name\": \"freeze-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Freeze!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2e3e7d2f-35ba-4620-b62a-f18d55e30989","savedPayload":{"position":{"x":25829.169297802902,"y":40927.70488774053},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Design Space","name":"My Design Space","id":"f8485ce5-67f3-4476-b9e2-80994e49c318"}}}],"tutorialTopics":[],"id":"14dbd920-b2e0-4b8f-ae74-22d2a3077082","savedPayload":{"position":{"x":25779.662925094777,"y":40351.092576436844},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"3f1d0740-00c0-4818-b256-3280bd99ae74","savedPayload":{"position":{"x":25505.599287801997,"y":40229.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Productivity Tools","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Backups","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Backups\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"561b5fd8-43dd-42cf-9230-c098ebc7e176","savedPayload":{"position":{"x":25694.150517837592,"y":40515.65592801336},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"Working With Versions","config":"{\n \"icon\": {\n \"name\": \"hand-drag\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working With Versions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e60db488-cf9d-4bb0-b1a8-0d66ef657613","savedPayload":{"position":{"x":25816.52309136077,"y":40569.04653605334},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}},{"type":"Tutorial Step","name":"Detaching and Attaching","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Detaching and Attaching\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ae239506-f063-4e2f-8933-9f44dcc40fe2","savedPayload":{"position":{"x":25903.6116537401,"y":40670.245281501426},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Attaching The Backup","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Attaching The Backup\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cbdcbdcc-5f47-40a0-870c-ad71d0d12079","savedPayload":{"position":{"x":25938.16724712524,"y":40799.208511700446},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Detached Nodes Don't Count","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Irrelevant Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"60c572fe-8649-46eb-921e-4815fb9419b1","savedPayload":{"position":{"x":25913.34571244971,"y":40930.39347727926},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Nodes' Attaching Rules","config":"{\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Nodes' Attaching Rules\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"14d77d4f-ae2a-41ca-bcf1-d60044ac45a8","savedPayload":{"position":{"x":25834.063259072154,"y":41037.81738692698},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}}],"tutorialTopics":[],"id":"c63ac428-2adf-4189-8560-5129c15ea793","savedPayload":{"position":{"x":25795.377035688718,"y":40451.425869983344},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"References","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing with References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing with References\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"References\"\n }\n }\n}","project":"Superalgos","id":"2733bece-0fd3-4846-9f88-8a95bf4f96f8","savedPayload":{"position":{"x":25846.4129110247,"y":40855.44315481149},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's See Some References","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's See Some References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"775cc223-54d4-47e4-9863-a44e09dc2ff4","savedPayload":{"position":{"x":25898.18465682405,"y":40960.425869983344},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Visualizing References","config":"{\n \"icon\": {\n \"name\": \"key-r\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Visualizing References\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5b81ad17-e34c-4eed-98f5-d45a84d6f812","savedPayload":{"position":{"x":25905.840367349472,"y":41077.22944118012},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Establishing References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Establishing References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a5847b14-8e83-4f7f-bd1f-55c3ddc3a99b","savedPayload":{"position":{"x":25868.214530072662,"y":41188.0715835141},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}},{"type":"Tutorial Step","name":"Let's Get On With It!","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Get On With It!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Establish and Remove References\",\n \"anchor\": \"What If the Nodes Are Far Away or in Different Hierarchies?\"\n }\n }\n}","project":"Superalgos","id":"f4a434bf-93ac-4aae-9b1a-a5f3e510ed57","savedPayload":{"position":{"x":25791.035337639947,"y":41276.07758560147},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Done?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Done?\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"6449893d-f990-47f3-97d1-089487e3c8b1","savedPayload":{"position":{"x":25686.052622468087,"y":41327.84933140082},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"One Last Point!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Point!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"ae02f7ce-5dc4-4014-b385-5405e915c4c1","savedPayload":{"position":{"x":25569.249051271316,"y":41335.50504192625},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}}],"tutorialTopics":[],"id":"e837dc7b-f8e0-4c01-b6f2-87898c505c30","savedPayload":{"position":{"x":25765.40690893733,"y":40679.0715835141},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Backups & Clones","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Backups!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Backups!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Backups\"\n }\n }\n}","project":"Superalgos","id":"49f383cc-5720-4f22-a444-6a12709be5da","savedPayload":{"position":{"x":25880.678459744897,"y":40858.00718906684},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Hammering Backups Home","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Hammering Backups Home\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"823bae09-4875-4b2c-b461-62b016247779","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}},{"type":"Tutorial Step","name":"Back It Up Again!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back It Up Again!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8737b5cf-02ec-46d6-b6a3-705da85b00ce","savedPayload":{"position":{"x":25765.87343003537,"y":41056.855333488194},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"One Last Backup!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Backup!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"41e890ee-f42a-4396-9493-8298445b94b6","savedPayload":{"position":{"x":25660.89071486351,"y":41108.627079287544},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Point","name":"End Upper Band","id":"ff8660a3-65b0-4df3-b823-f0656537ea30"}}},{"type":"Tutorial Step","name":"No Need to Memorize","config":"{\n \"icon\": {\n \"name\": \"docs-warning-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - No Need to Memorize\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d14e808a-d408-455b-be7b-0feb0c862662","savedPayload":{"position":{"x":25544.08714366674,"y":41116.28278981297},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What About Clones?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Clones?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Clones\"\n }\n }\n}","project":"Superalgos","id":"7942b504-e00b-4d78-b4a9-defd17ac6e08","savedPayload":{"position":{"x":25433.245001332754,"y":41078.656952536156},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Only Share Shares!","config":"{\n \"icon\": {\n \"name\": \"share-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Only Share Shares!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Shares\"\n }\n }\n}","project":"Superalgos","id":"39e09d3f-db3f-4961-9e32-915ba513a9a6","savedPayload":{"position":{"x":25345.238999245383,"y":41001.47776010344},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"974c84fb-0112-4a8b-9f53-6d057b22a073","savedPayload":{"position":{"x":25583.245001332754,"y":40818.84933140082},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"338435fb-8de8-47e5-a51c-891399879226","savedPayload":{"position":{"x":25505.599287801997,"y":40529.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"22c3e696-b371-48f9-814b-74a883ba6e7c","savedPayload":{"position":{"x":25245.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Workspaces","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Working with Workspaces","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working with Workspaces\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Workspaces\"\n }\n }\n}","project":"Superalgos","id":"cd7b285d-22bf-4b30-82c1-4aade52c9dfe","savedPayload":{"position":{"x":25385.569414553385,"y":40716.52491818019},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Your Workspace vs Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Workspace vs Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Plugin Workspaces\"\n }\n }\n}","project":"Superalgos","id":"fa5f23d3-3a4b-4b29-9e16-f9d251678272","savedPayload":{"position":{"x":25245.791666666664,"y":40898.68682578477},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Current Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - The Current Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"78deb6f1-5589-4b91-ad96-d4397fafd6fd","savedPayload":{"position":{"x":25018.145953135907,"y":40928.656952536156},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Workspace","name":"Basic Education","id":"979bbac5-358b-427c-95d6-2b1df435d74e"}}}],"tutorialTopics":[],"id":"ad149fde-4bf0-4b26-b4a5-809fc8ba62e1","savedPayload":{"position":{"x":25095.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Plugins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"366bcfde-71f9-4173-a80f-8fd4f5d7abcf","savedPayload":{"position":{"x":24978.42009536928,"y":40876.885206736806},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugins","name":"New Plugins","id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6"}}},{"type":"Tutorial Step","name":"How Plugins Work","config":"{\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How Plugins Work\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"3e106105-19ca-4a7d-8915-c2ea46d92cec","savedPayload":{"position":{"x":24873.43738019742,"y":40928.656952536156},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Positioning Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-file-position\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Positioning Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"298ab522-ebbc-4b94-8fca-bce27208f8a2","savedPayload":{"position":{"x":24756.63380900065,"y":40936.31266306158},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4"}}},{"type":"Tutorial Step","name":"Placing Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-trading-systems\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Placing Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"89958980-e536-414d-a55b-25149b6ebca2","savedPayload":{"position":{"x":24645.791666666664,"y":40898.68682578477},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","id":"3569d452-c593-4e54-a356-7ff8c6b519f3"}}},{"type":"Tutorial Step","name":"Non-Persistence of Changes","config":"{\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Non-Persistence of Changes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"2658f4f8-46df-4a83-9a39-6327553ba244","savedPayload":{"position":{"x":24557.785664579293,"y":40821.50763335205},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Starting From a Plugin","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Starting From a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"286d6e2a-0020-4461-98e4-974315326ddd","savedPayload":{"position":{"x":24506.013918779943,"y":40716.52491818019},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Improving a Plugin","config":"{\n \"icon\": {\n \"name\": \"sensor-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Improving a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4a1b74f7-8ed5-4771-b0e0-3d1427a5510a","savedPayload":{"position":{"x":24498.35820825452,"y":40599.72134698342},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"73a666a2-268d-42d1-ac73-e7ae316542e7","savedPayload":{"position":{"x":24795.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Exchanges","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Talking Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Talking Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Community Effort to Test Exchanges\"\n }\n }\n}","project":"Superalgos","id":"70ece243-3a2a-4b2a-9963-5044c11df654","savedPayload":{"position":{"x":24433.6596323107,"y":40591.203617870066},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Testing New Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Testing New Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Test New Exchanges\"\n }\n }\n}","project":"Superalgos","id":"11a7025e-6b0b-4ac3-9994-e014b1980b08","savedPayload":{"position":{"x":24345.791666666664,"y":40379.0715835141},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Clean Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Clean Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"57edeba5-84fb-4ae2-bbf8-c16f71c842c1","savedPayload":{"position":{"x":24433.6596323107,"y":40166.93954915814},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"3bba7ba9-7d4c-4d84-9c25-307f59bd7670","savedPayload":{"position":{"x":24645.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Data","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing With Data","config":"{\n \"icon\": {\n \"name\": \"dataset-definition\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing With Data\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"811af117-7a9f-4522-a391-f310fcab8167","savedPayload":{"position":{"x":24495.791666666664,"y":40119.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"About Other Markets","config":"{\n \"icon\": {\n \"name\": \"market\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Other Markets\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"7eb3bc72-7230-4c9a-bc7d-a568d3cc2465","savedPayload":{"position":{"x":24535.98404553133,"y":39969.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Markets","name":"New Exchange Markets","id":"2fd80894-900e-44ac-a1a7-56c14124f7a1"}}},{"type":"Tutorial Step","name":"Building Indicators","config":"{\n \"icon\": {\n \"name\": \"indicator-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Building Indicators\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Build an Indicator - Video Series\"\n }\n }\n}","project":"Superalgos","id":"bbdede43-5ebe-4438-969e-e56fb8d36af7","savedPayload":{"position":{"x":24645.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Indicators?","config":"{\n \"icon\": {\n \"name\": \"data-mine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More Indicators?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"Community Data Mines\"\n }\n }\n}","project":"Superalgos","id":"fd066dc6-57fb-4121-b8e7-1edc06bdf3a0","savedPayload":{"position":{"x":24795.791666666664,"y":39819.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About Strategies?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About Strategies?\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c18673fd-a8cf-4aba-b89b-d38d96991c82","savedPayload":{"position":{"x":24945.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"2c2b7b0c-de6e-480d-93d2-27bbb74b972b","savedPayload":{"position":{"x":24795.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your Graduation","config":"{\n \"icon\": {\n \"name\": \"trading-strategy\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Graduation\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2c47bc65-09a1-4576-a69c-990e47930ac5","savedPayload":{"position":{"x":25245.791666666664,"y":39859.456341243436},"targetPosition":{"x":25095.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"0f058d80-353d-4073-8b41-805938e1551e","savedPayload":{"position":{"x":25095.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8","savedPayload":{"position":{"x":24945.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Welcome to Superalgos!","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial - Welcome to Superalgos!\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes & Hierarchies","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Chrome or Chrome","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Use Chrome or Safari!\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"842eafab-4163-42f8-a9fc-74ad48823fe8","savedPayload":{"position":{"x":19316.971696376197,"y":40087.81292043237},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"That's Me","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - That's Me On the Right!\"},\"icon\":{\"name\":\"tutorial\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"89c487cc-e92b-440f-83af-9af10005d607","savedPayload":{"position":{"x":19414.29870102263,"y":40152.844745829796},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Expand That Node!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Expand That Node!\"},\"icon\":{\"name\":\"expand-structure-of-nodes\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"304b92bf-75af-4b2e-a53f-b50b3d3679c2","savedPayload":{"position":{"x":19479.330526420054,"y":40250.171750476235},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Let's Go for a Ride!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Go for a Ride!\"},\"icon\":{\"name\":\"network\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8dc04176-c85f-44a5-a2b9-fff3158115d3","savedPayload":{"position":{"x":19502.166666666668,"y":40364.97678018576},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}},{"type":"Tutorial Step","name":"Remote access","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Remote Access!\"},\"icon\":{\"name\":\"network-node\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"a7451dda-ad2a-49f6-bb57-e48ffefc4925","savedPayload":{"position":{"x":19479.330526420054,"y":40479.781809895285},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}},{"type":"Tutorial Step","name":"About Small Hardware","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Small Hardware\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"9796fa82-0bce-4d43-a48c-cd9e712eabc8","savedPayload":{"position":{"x":19414.29870102263,"y":40577.10881454172},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Accessing remotely?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Accessing Remotely?\"\n },\n \"icon\": {\n \"name\": \"network-node\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4393cd69-8baf-4284-bf51-517d2f387e48","savedPayload":{"position":{"x":19316.971696376197,"y":40642.14063993915},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}}],"tutorialTopics":[],"id":"66a8b0d2-7555-49da-a61c-07c819f0dc92","savedPayload":{"position":{"x":19202.166666666668,"y":40364.97678018576},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Start Data Mining","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Ready to Rock?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ready to Rock?\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ae2d279e-47a0-4132-be92-de7098fad0b5","savedPayload":{"position":{"x":19398.083249555828,"y":40419.28847912121},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Binance.com Or Binance.us?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"workspaces\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Binance.com or Binance.us?\"},\"icon\":{\"name\":\"binance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e590835b-44c4-427f-a029-e11105707529","savedPayload":{"position":{"x":19430.838409029886,"y":40531.666340267424},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Binanceus\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1ace3c4c-73bc-4e82-a958-a48dabbad9e6","savedPayload":{"position":{"x":19418.09508482683,"y":40648.02480294301},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Let's Mine Some Data!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Mine Some Data!\"},\"icon\":{\"name\":\"run\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e3b6c510-3352-4ff3-9f2f-0f73b84b8d88","savedPayload":{"position":{"x":19361.793332538055,"y":40750.649345997685},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Start Data Mining Console\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c5a98f67-6263-40de-8223-f52e0565be21","savedPayload":{"position":{"x":19270.50458357287,"y":40823.916313045185},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How Are Things Going?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - How Are Things Going?\"},\"icon\":{\"name\":\"sensor-bot-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f912a325-59f3-4259-9d1e-2fbc86d03bf0","savedPayload":{"position":{"x":19158.12672242666,"y":40856.67147251924},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b"}}},{"type":"Tutorial Step","name":"Candles Volumes in Action","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Candles Volumes in Action\"},\"icon\":{\"name\":\"indicator-bot-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"08ff3a9c-19db-400b-b537-710544431bc8","savedPayload":{"position":{"x":19041.76825975108,"y":40843.92814831619},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f"}}}],"tutorialTopics":[],"id":"3ddc45b2-9a20-4169-bf81-cf380360bcff","savedPayload":{"position":{"x":19131.97999960236,"y":40557.81306309172},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Control Basics","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Moving Around","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Click & Drag Baby!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Click & Drag Baby!\"},\"icon\":{\"name\":\"hand-drag\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"2078acc5-d20e-4ee6-9dcb-1953fc09b2ba","savedPayload":{"position":{"x":19209.52323527715,"y":40912.14294030139},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Time to Take Control!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time to Take Control!\"},\"icon\":{\"name\":\"key-ctrl\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"51548c0a-5adf-44c4-a431-0d3d623d4cbf","savedPayload":{"position":{"x":19134.110114309886,"y":41081.52358322875},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Spacetime Teleportation!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Spacetime Teleportation!\"},\"icon\":{\"name\":\"mouse-right-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b266af08-c8dc-46e4-929d-fd453f444b5c","savedPayload":{"position":{"x":18973.540173911995,"y":41174.22868154124},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Warp-Speed Zooming!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Warp-Speed Zooming!\"},\"icon\":{\"name\":\"mouse-wheel-down\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4ed7c5e8-48f3-4a42-b3c6-c95d79e97756","savedPayload":{"position":{"x":18789.14567374393,"y":41154.848038613876},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b7fab540-23fd-498d-b3ba-0006f9769589","savedPayload":{"position":{"x":19147.09740287271,"y":40890.232439025116},"targetPosition":{"x":18954.261119966748,"y":40660.41910608942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Tutorials & Help","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"A Bit About Tutorials","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - A Bit About Tutorials...\"},\"icon\":{\"name\":\"tutorial\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"524f67bc-f5f1-42e2-acff-fa12917bfabe","savedPayload":{"position":{"x":19044.49135987501,"y":41172.14022526089},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Need a Quick Reminder?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Need a Quick Reminder?\"},\"icon\":{\"name\":\"key-left\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1b3d0bc9-19ea-4444-a142-0549aad4dbbb","savedPayload":{"position":{"x":18903.749530269128,"y":41237.76921822886},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Hungry For More Info?!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"workspaces\":\"Close\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Hungry For More Info?\"},\"icon\":{\"name\":\"help\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"542c7453-aefe-47f1-8349-27d6320873e9","savedPayload":{"position":{"x":18749.049033971347,"y":41224.23467856097},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Broke Something?","config":"{\"position\":\"\",\"slider\":\"toTop\",\"workspaces\":\"Open\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Broke Something?\"},\"icon\":{\"name\":\"workspace\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c23358ca-fbc9-4c9c-8bde-c1a41fdb508c","savedPayload":{"position":{"x":18621.841744033354,"y":41135.16317523116},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Workspaces?","config":"{\"position\":\"\",\"slider\":\"toTop\",\"workspaces\":\"Close\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - More Workspaces?\"},\"icon\":{\"name\":\"workspace\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"af391fa7-8ae8-4acd-a45b-a140887219cb","savedPayload":{"position":{"x":18556.212751065385,"y":40994.42134562528},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"96f94a0a-bf6b-4da1-8733-0d079ece2e7c","savedPayload":{"position":{"x":18851.655076969048,"y":40942.326892325196},"targetPosition":{"x":18954.261119966748,"y":40660.41910608942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"d7fb8e39-4f66-4078-9656-cd5ffd3d519c","savedPayload":{"position":{"x":18954.261119966748,"y":40660.41910608942},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Explore Data Mining","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Work!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ok... Back to Work!\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"d6a339ce-eeaa-409c-8b65-c6d5e8333d6b","savedPayload":{"position":{"x":18780.118350897254,"y":40823.27381363423},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"The Magic of Data Mines","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Magic of Data Mines\"},\"icon\":{\"name\":\"data-mine-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"78c7446b-f865-4100-8bc5-ebb2b3c6b302","savedPayload":{"position":{"x":18647.44528947971,"y":40838.2224775097},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Mine Tasks","name":"Masters","id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33"}}},{"type":"Tutorial Step","name":"The Core of Data Mining","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - At the Core of Data Mining\"},\"icon\":{\"name\":\"task\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"9c6c6c80-b31e-4bdc-8e4c-c2050190d9be","savedPayload":{"position":{"x":18521.425009356102,"y":40794.12607431021},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Exchange Raw Data","id":"a8f38508-1cac-4ab1-815f-d338fc813377"}}},{"type":"Tutorial Step","name":"Are We Up to Date?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Are We Up to Date?\"},\"icon\":{\"name\":\"indicator-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"706a4bf5-d0ab-4b50-8c73-3af8dffd438f","savedPayload":{"position":{"x":18427.017372542217,"y":40699.718437496325},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Time to Stop!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time to Stop!\"},\"icon\":{\"name\":\"stop\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c51b5d46-6996-462c-a791-1e250d64e608","savedPayload":{"position":{"x":18382.920969342733,"y":40573.69815737272},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task Manager","name":"Masters","id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea"}}},{"type":"Tutorial Step","name":"Careful With Your Data","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Careful With Your Data!\"},\"icon\":{\"name\":\"dataset-definition\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"0adc8eeb-082c-4f72-b1fb-66251ab517e9","savedPayload":{"position":{"x":18397.869633218193,"y":40441.02509595517},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"a81c2ab9-b244-496f-b917-6b1d630defbe","savedPayload":{"position":{"x":18752.166666666668,"y":40624.78440132109},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Charting Space","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"The Viewport","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"The Other Dimension","config":"{\"position\":\"Left\",\"slider\":\"toMiddle\",\"useReferenceParentTo\":\"Position at Node\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Bright Side\"},\"icon\":{\"name\":\"charting-space\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8287c4d6-c945-4eea-b0db-51220403eecd","savedPayload":{"position":{"x":18385.231782232568,"y":40800.41077179823},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Break On Through","config":"{\"position\":\"Left\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Break On Through!\"},\"icon\":{\"name\":\"full-board\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8ba926ed-a951-4ab9-8fdf-1e4e8ac883dc","savedPayload":{"position":{"x":18295.964971822774,"y":40829.41531672027},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Navigating the White Room","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Navigating the White Room\"},\"icon\":{\"name\":\"mouse-right-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1f58f993-0c6e-4947-a943-a7e53efd626c","savedPayload":{"position":{"x":18202.104292798635,"y":40829.41531672027},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Talkin Time Travel","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Talkin' Time Travel\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"baa1cbf2-4706-4d2d-ade7-0a74d35e09d8","savedPayload":{"position":{"x":18112.83748238884,"y":40800.41077179823},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Bending Time?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Bending time?\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f6b6c83a-0a74-4fae-8e64-b63e7ea965c0","savedPayload":{"position":{"x":18036.90259795474,"y":40745.24084889769},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Size Matters?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Size Matters?\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4912506e-68a1-40c5-af70-6d04b06491d7","savedPayload":{"position":{"x":17981.732675054194,"y":40669.30596446359},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Putting Things in Order","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Putting Things in Order\"},\"icon\":{\"name\":\"hand-drag\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e5372961-e5c3-4d19-bd41-7e07de37d2c3","savedPayload":{"position":{"x":17952.728130132164,"y":40580.03915405379},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Get In the Wormhole!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Get In the Wormhole!\"},\"icon\":{\"name\":\"mouse-wheel-up\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"393df4cc-4aac-4821-bd19-5cd8d1ce255d","savedPayload":{"position":{"x":17952.728130132164,"y":40486.17847502966},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Dashboard","name":"Production Environment My Computer","id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4"}}},{"type":"Tutorial Step","name":"The Elegant Way...","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"keyPressedTimeMachineReferenceParent\":{\"shiftKey\":true,\"ctrlKey\":true,\"metaKey\":true,\"code\":\"ArrowRight\",\"key\":\"A\"},\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Elegant Way...\"},\"icon\":{\"name\":\"mouse-pointer\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4af14266-6d19-4890-89b4-6fe0caf6debe","savedPayload":{"position":{"x":17981.732675054194,"y":40396.91166461986},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}}],"tutorialTopics":[],"id":"121d0c89-1269-49e4-9dd3-e56d1992cc24","savedPayload":{"position":{"x":18493.473401908686,"y":40739.47515929445},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"The Charts","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Navigation & Scales","config":"{ \n \"title\": \" \",\n \"summary\": \"\",\n \"gif\": \"\",\n \"image\": \"\",\n \"definition\": \"\",\n \"paragraph1\": \"\",\n \"callOut\": \"\",\n \"externalLink\": [\"\", \"\"],\n \"paragraph2\": \"\",\n \"note\": \"\",\n \"tip\": \"\",\n \"important\": \"\",\n \"warning\": \"\", \n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\" \n }","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Moving in Wonderland","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"keyPressedTimeMachineReferenceParent\":{\"shiftKey\":true,\"ctrlKey\":true,\"metaKey\":true,\"code\":\"ArrowRight\",\"key\":\"A\"},\"repositionAtTimeMachineReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Moving in Wonderland\"},\"icon\":{\"name\":\"mouse-left-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"58eed11d-e9f6-4443-8432-63d836bf87fc","savedPayload":{"position":{"x":18394.778840028906,"y":41174.6586337025},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Auto Locked\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"0fea09d5-5321-4163-a7ee-66a05bfee6fa","savedPayload":{"position":{"x":18234.59092388764,"y":41086.472871550075},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Unlocking Time!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Unlocking Time!\"},\"icon\":{\"name\":\"time-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"50d31351-7870-448e-bf34-3c16371649a7","savedPayload":{"position":{"x":18152.65449501482,"y":41249.9455565701},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Unlock Time Scale\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c18adec0-aae5-4a63-a85a-1afbee3e535c","savedPayload":{"position":{"x":18065.572667182147,"y":41089.15484668484},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Scaling Time!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Scaling Time!\"},\"icon\":{\"name\":\"time-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4c1b29d4-70c2-4d45-a960-8eb5b0906a7d","savedPayload":{"position":{"x":17908.263350864432,"y":41182.378642594136},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Playing With the Rate Scale!","config":"{\"position\":\"Left\",\"documentationURL\":\"\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Playing with the Rate Scale!\"},\"icon\":{\"name\":\"rate-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"041278c7-d564-4098-957c-9f1a445d3f5b","savedPayload":{"position":{"x":17921.935476386432,"y":41000.03289927174},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Unlock Rate Scale\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e43713a3-fa8f-4c2a-8454-9e8988a322ac","savedPayload":{"position":{"x":17739.19786906018,"y":40993.40990955698},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"No Lock on Time Frames!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time Frames Salad?\"},\"icon\":{\"name\":\"time-frame-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"41640302-1547-4236-8ece-074c65d48c37","savedPayload":{"position":{"x":17849.28314468624,"y":40847.40261790886},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Time Frame Scale\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b283b547-72c7-4a4c-9529-daaf1e4084cc","savedPayload":{"position":{"x":17699.1351455153,"y":40743.03559500867},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Scales' Best-Kept Secrets","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Scales' Best-Kept Secrets\"},\"controlDocs\":{\"panel\":\"Open\",\"page\":{\"project\":\"Superalgos\",\"category\":\"Topic\",\"type\":\"Scales\"}},\"icon\":{\"name\":\"balance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ea96bec1-6a6c-438a-9780-2e421d50bd2c","savedPayload":{"position":{"x":17870.682274059538,"y":40679.72303849487},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"42a0b960-9fbf-40e7-88c4-d49c696e223b","savedPayload":{"position":{"x":18145.51481128916,"y":40800.002199116854},"targetPosition":{"x":18338.35109419512,"y":40570.18886618116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Layers & Managers","config":"{ \n \"title\": \" \",\n \"summary\": \"\",\n \"gif\": \"\",\n \"image\": \"\",\n \"definition\": \"\",\n \"paragraph1\": \"\",\n \"callOut\": \"\",\n \"externalLink\": [\"\", \"\"],\n \"paragraph2\": \"\",\n \"note\": \"\",\n \"tip\": \"\",\n \"important\": \"\",\n \"warning\": \"\", \n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\" \n }","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Switching Gears","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Switching Gears...\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"layer-manager\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"479cafa3-e05c-43d8-8c94-e523b380435a","savedPayload":{"position":{"x":17785.487413236537,"y":40346.972797604845},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer Managers Scroll\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b8f7d08e-45bb-4288-b057-4e2b2e57d9fb","savedPayload":{"position":{"x":17736.709797663796,"y":40222.689460038615},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Layers on Top of Layers","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Layers on Top of Layers\"},\"icon\":{\"name\":\"layer\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4f762bd3-8817-424a-baec-252f405cedc0","savedPayload":{"position":{"x":17746.687203795493,"y":40089.55022786249},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer On\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c085f1ed-4c76-4b62-adf6-18c74881086e","savedPayload":{"position":{"x":17813.443483982388,"y":39973.924958854484},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Hard Data","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Hard Data\"},\"icon\":{\"name\":\"plotter-panel\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6e9f3842-76ed-4b8f-b6a7-0ec2128a0852","savedPayload":{"position":{"x":17923.756738221415,"y":39898.7146555925},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer Panels\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"15faeff4-22c7-4c49-bbdc-0179e0048f12","savedPayload":{"position":{"x":18055.778073607264,"y":39878.815641031404},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b62d3cbd-5239-43ea-85aa-a44db555dd91","savedPayload":{"position":{"x":18042.908768291458,"y":40518.09441288108},"targetPosition":{"x":18338.35109419512,"y":40570.18886618116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"cc2f4260-5e2e-4fd7-b978-8074859e5a4e","savedPayload":{"position":{"x":18338.35109419512,"y":40570.18886618116},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Setup Overview","config":"{\n \"position\": \"Right\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back in Time","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back in Time\"\n },\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"06dfeef4-b2ae-4cd9-b47b-366f9d9ee5ce","savedPayload":{"position":{"x":18081.034632310704,"y":40115.844745829796},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Visual Scripting on Steroids","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Visual Scripting on Steroids\"},\"icon\":{\"name\":\"indicator-bot\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fabeb9d0-a829-46e5-b2c0-21be5a9691f4","savedPayload":{"position":{"x":18168.90259795474,"y":39903.71271147383},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Tutorial Step","name":"Plotters Magic","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Plotters Magic!\"},\"icon\":{\"name\":\"plotter\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"889a301a-e67e-4c82-9a39-e67717190fa9","savedPayload":{"position":{"x":18381.034632310704,"y":39815.844745829796},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Polygon","name":"Resistance Zone 5","id":"550e31bb-a95f-4fad-bfbb-b42aae7dc5d3"}}}],"tutorialTopics":[],"id":"0688b8d6-4bc2-4d2e-a170-b9e95c2f72d6","savedPayload":{"position":{"x":18348.3665443199,"y":40340.79734466125},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"aa4fbbe2-c97b-4643-9205-c344c8a46377","savedPayload":{"position":{"x":18620.258880430894,"y":40467.58282318346},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Backtesting","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Network","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Do Some Testing!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Do Some Testing!\"},\"icon\":{\"name\":\"testing-trading-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6da2aeb2-5074-46cf-bbe2-d5bd3c9aa967","savedPayload":{"position":{"x":18431.35798898954,"y":40724.10601961554},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Testing Trading Tasks","name":"New Testing Trading Tasks","id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb"}}},{"type":"Tutorial Step","name":"Aim High, Trade Big!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Aim High, Trade Big!\"},\"icon\":{\"name\":\"network-node\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"484b6846-b8a7-4358-8bc8-90c458c7d773","savedPayload":{"position":{"x":18314.304910051418,"y":40724.616763263584},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}},{"type":"Tutorial Step","name":"Machines Learn Too!","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Machines Learn Too!\"\n },\n \"icon\": {\n \"name\": \"tensorflow-project\",\n \"project\": \"TensorFlow\"\n }\n}","project":"Superalgos","id":"673ebc4c-3021-4743-8af2-81d4d26dd5f9","savedPayload":{"position":{"x":18205.966513070765,"y":40680.29435484944},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Learning Tasks","name":"New Learning Tasks","id":"0818dfbe-61ea-40b8-8544-bee25d7f45be"}}},{"type":"Tutorial Step","name":"Civil Works Ahead!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Civil Works Ahead!\"},\"icon\":{\"name\":\"under-construction\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"36b1efb4-d3db-4a01-9e58-17af3da9fa59","savedPayload":{"position":{"x":18122.83633689787,"y":40597.88647927051},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Enough Digressing!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enough Digressing!\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"backtesting-session\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"29e34206-930a-4c5e-a945-c5dd9c786e78","savedPayload":{"position":{"x":18077.570197278135,"y":40489.938988554444},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"What? When? How?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - What? When? How?\"},\"controlDocs\":{\"panel\":\"Open\",\"page\":{\"project\":\"Superalgos\",\"category\":\"Topic\",\"type\":\"Trading Session Parameters\"}},\"icon\":{\"name\":\"trading-parameters\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"5777f75b-6b41-470e-85a8-75887715be9d","savedPayload":{"position":{"x":18077.059453630085,"y":40372.88590961632},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Ready. Set. Go!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ready. Set. Go!\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"task\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"70f84f2d-d298-4001-8696-467060ef51e9","savedPayload":{"position":{"x":18121.381862044233,"y":40264.54751263567},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}}],"tutorialTopics":[],"id":"3ef3e1ab-2bbb-4f80-bc6f-44042b8fc1c1","savedPayload":{"position":{"x":18371.547608664383,"y":40430.128608229286},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"On the Charts","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Trading System & Orders","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Getting to the Fun Bits","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineReferenceParent\":true,\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Getting to the Fun Bits!\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"5f771ec1-9e6d-47bc-83af-6bbf90dfa4b2","savedPayload":{"position":{"x":18013.805424179467,"y":40689.82277763555},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"What Is It We Are Testing?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toBottom\",\n \"batchConfigChangesReferenceParent\": [\n {\n \"nodePath\": \"referenceParent.timeScale\",\n \"properties\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-08-31T23:40:00.000Z\",\n \"toDate\": \"2020-09-01T01:00:00.000Z\"\n }\n },\n {\n \"nodePath\": \"referenceParent.rateScale\",\n \"properties\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"minValue\": 11400,\n \"maxValue\": 11800\n }\n },\n {\n \"nodePath\": \"referenceParent.timeFrameScale\",\n \"properties\": {\n \"value\": \"01-min\"\n }\n }\n ],\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What Is It We Are Testing?\"\n },\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"52ee03e8-b4c7-4a75-bd44-54846b994ab9","savedPayload":{"position":{"x":17847.159843329788,"y":40608.54429711467},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Green Silver Bullets","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Green Silver Bullets\"},\"icon\":{\"name\":\"bullet-limit-buy-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"536849b8-c58e-4339-87bd-f831c3276441","savedPayload":{"position":{"x":17760.115028563825,"y":40444.83681031316},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Sell It Quick!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Sell It Quick!\"},\"icon\":{\"name\":\"bullet-limit-sell-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8c582cfc-6760-4be7-a998-b33a486b25e7","savedPayload":{"position":{"x":17785.91914057774,"y":40261.23101297636},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}}],"tutorialTopics":[],"id":"913e262b-39d9-4fbb-8445-520c3819ea4b","savedPayload":{"position":{"x":18055.557354467488,"y":40392.74235701308},"targetPosition":{"x":18320.441632325164,"y":40251.90088817731},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Support","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Shall We Dig Deeper?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:00:00.000Z\",\"toDate\":\"2020-09-01T02:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}},{\"nodePath\":\"referenceParent.timelineCharts[0].layerManager\",\"properties\":{\"visibleLayers\":3,\"panelLocation\":{\"upOrDown\":\"up\",\"leftOrRight\":\"left\"}}},{\"nodePath\":\"referenceParent.timelineCharts[0].layerManager.botLayers[1].layers[1]\",\"properties\":{\"status\":\"on\",\"showPanels\":false}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Shall We Dig Deeper?\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"2ad6e893-9b64-4ce2-a807-d70c06c125e7","savedPayload":{"position":{"x":17823.752104123316,"y":39709.74721239719},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Who's Keeping Score?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Who's Keeping Score?\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"923246a4-0bd0-49b1-a4fa-b57a4c5939e1","savedPayload":{"position":{"x":17856.039007293177,"y":39557.84927560244},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Power of Data Mining","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Power of Data Mining\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b5c35544-147d-4576-b698-9e1559a256f2","savedPayload":{"position":{"x":17959.94925404518,"y":39442.44525514068},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Find the Logic Challenge","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Find the Logic Challenge!\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c718f88f-3e69-45a6-816b-203a064a4c21","savedPayload":{"position":{"x":18107.640177676803,"y":39394.45756509793},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Here's How It Works","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Here's How it Works...\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ad9b32fe-d173-4688-b6fd-6142d88c0a80","savedPayload":{"position":{"x":18259.53811447155,"y":39426.744468267796},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"56dc3db6-054a-41cd-9e8c-44eb45570604","savedPayload":{"position":{"x":18066.027203478236,"y":40092.92510890735},"targetPosition":{"x":18320.441632325164,"y":40251.90088817731},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"9a1a33d4-9e9a-47dc-b227-4efaaeda6776","savedPayload":{"position":{"x":18320.441632325164,"y":40251.90088817731},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Trading System","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Come Meet Someone","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Come Meet Someone!\"},\"icon\":{\"name\":\"execution-algorithm\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f9565d69-3116-448f-bb41-434e10ca8c45","savedPayload":{"position":{"x":18113.24862196247,"y":39825.8420017004},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Execution Algorithm","name":"Buy Orders","id":"e635ed9f-3c8c-45bf-8be0-e3836fa0844e"}}},{"type":"Tutorial Step","name":"Formulations","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Formulations...\"},\"icon\":{\"name\":\"formula\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"54f4b77c-d700-4ea3-9e88-ef2f4f9ac138","savedPayload":{"position":{"x":18161.236312005214,"y":39678.151078068775},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Order Rate","name":"New Order Rate","id":"3ff96eb6-5965-4f82-98d4-cd23bf8d0369"}}},{"type":"Tutorial Step","name":"The Seller","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Seller\"},\"icon\":{\"name\":\"execution-algorithm\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f7ed3408-7732-46b7-813e-886f7d271185","savedPayload":{"position":{"x":18276.640332466977,"y":39574.240831316776},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Execution Algorithm","name":"Race to Break Even","id":"0fe764ce-3312-4964-9841-b55500e3f80a"}}},{"type":"Tutorial Step","name":"Simplifying Complexity","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Simplifying Complexity\"},\"icon\":{\"name\":\"trading-system\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fa4d056c-7dcf-4e65-ae05-2f06c5cdd50a","savedPayload":{"position":{"x":18428.538269261724,"y":39541.95392814691},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Strategy","name":"My Trading Strategy","id":"711041eb-3055-4611-b64f-570363bae854"}}},{"type":"Tutorial Step","name":"Let's Take a Peek","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Take a Peek...\"},\"icon\":{\"name\":\"limit-sell-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"84c7e6a3-60e1-4f8d-baaa-82c5e4e3606e","savedPayload":{"position":{"x":18576.22919289335,"y":39589.94161818966},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Limit Sell Order","name":"Profit 0.6","id":"b80fe127-d306-4fc1-a3a8-95bf88de046f"}}}],"tutorialTopics":[],"id":"0ab40ba6-687e-49cc-a238-06fded8c08c5","savedPayload":{"position":{"x":18383.855654348878,"y":40077.67229459036},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Trading Engine","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Find the Node Challenge","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Find the Node Challenge\"},\"icon\":{\"name\":\"trading-engine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fb2ec352-5769-4cfa-b7f6-3b8a35540b1d","savedPayload":{"position":{"x":18354.3643491884,"y":39614.69289570072},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},{"type":"Tutorial Step","name":"Found It?","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Found It?\"},\"icon\":{\"name\":\"copy-path\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"7b584461-edd8-4fe7-8dca-aaaf45ddde61","savedPayload":{"position":{"x":18452.91250640347,"y":39524.61590370454},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Entry Target Rate","name":"New Entry Target Rate","id":"71b3e7d9-80d0-422d-999e-99549f5ab59d"}}},{"type":"Tutorial Step","name":"The Coolest Trick!","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"repositionAtTimeMachineReferenceParent\":true,\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11000,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}},{\"nodePath\":\"referenceParent.timelineCharts[1].layerManager\",\"properties\":{\"visibleLayers\":3,\"panelLocation\":{\"upOrDown\":\"up\",\"leftOrRight\":\"left\"}}},{\"nodePath\":\"referenceParent.timelineCharts[1].layerManager.botLayers[0].layerFolders[0].layerFolders[2].layers[0]\",\"properties\":{\"status\":\"on\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Coolest Trick!\"},\"icon\":{\"name\":\"exit-target-rate\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fc86c980-84b3-4769-bc8c-6c387d6557cd","savedPayload":{"position":{"x":18580.78427013916,"y":39486.21778113732},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Backtesting Trading Engine Visualization 01\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8fdfd1bd-1411-4372-9c5a-e40a2170fa8f","savedPayload":{"position":{"x":18712.653069343356,"y":39507.10374709554},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exit Target Rate","name":"New Exit Target Rate","id":"bc637b55-04bd-4701-9683-78593832cb09"}}},{"type":"Tutorial Step","name":"Feedback Loops","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Feedback Loops\"},\"icon\":{\"name\":\"limit-buy-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"72d776e0-6984-4da4-8781-9499ab47a503","savedPayload":{"position":{"x":18822.400671068975,"y":39583.13707987163},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Rate","name":"New Rate","id":"1c848292-d64a-456f-b1b9-b9e4a387436e"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Backtesting Trading Engine Visualization 02\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"d3650fde-e76a-4f08-8ebc-0a4ff85ff671","savedPayload":{"position":{"x":18888.290216828253,"y":39699.25844542165},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"5d5bad8a-4dd9-4ec7-85b1-39e7a05f68ae","savedPayload":{"position":{"x":18537.567673685793,"y":39973.99222840656},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"4d1dd5e9-9076-42a8-b85a-deadab0d8845","savedPayload":{"position":{"x":18620.258880430894,"y":40262.37073718806},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Live Trading","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Set Up & Run","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Enough Chit Chat","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enough Chit Chat!\"},\"icon\":{\"name\":\"production-trading-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"42d95de3-1a3e-43dc-b075-994bf30c8a97","savedPayload":{"position":{"x":18266.238834099815,"y":40125.19286249506},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Production Trading Tasks","name":"New Production Trading Tasks","id":"673caa5f-511d-4688-9305-e5f0f0f780cd"}}},{"type":"Tutorial Step","name":"Warning!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Disclaimer\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ac4949b3-f1ee-4113-917d-7d5c13891598","savedPayload":{"position":{"x":18216.708410934858,"y":40055.63711556865},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Start With 100 Bucks!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Start With 100 Bucks!\"},\"icon\":{\"name\":\"session-quoted-asset\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8f64bf00-d829-4bdf-bc83-7c32916f51c4","savedPayload":{"position":{"x":18188.780436352525,"y":39974.94453235855},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Session Quoted Asset","name":"","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689"}}},{"type":"Tutorial Step","name":"Check your spot balance!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Check Your Spot Balance!\"},\"icon\":{\"name\":\"binance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"7d6448bf-eb35-45d0-ab93-744f3cb3b406","savedPayload":{"position":{"x":18184.71746875941,"y":39889.65234605917},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Enjoy the Outdoors!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enjoy the Outdoors!\"},\"icon\":{\"name\":\"crypto-ecosystem\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"40cd9486-d751-4aed-8fbc-ba23a2789eb5","savedPayload":{"position":{"x":18204.848665626512,"y":39806.67042235233},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Crypto Ecosystem","name":"My Crypto Ecosystem","id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d"}}},{"type":"Tutorial Step","name":"Your Keys, Your Coins!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Your Keys, Your Coins!\"},\"icon\":{\"name\":\"exchange-account-key\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"3acced8f-fde1-4549-865d-dd59902d804f","savedPayload":{"position":{"x":18247.5431171085,"y":39732.72146318424},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},{"type":"Tutorial Step","name":"Fire Up the Machine!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Fire Up the Machine!\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"178a3937-072f-475c-ba56-f56b60c6487d","savedPayload":{"position":{"x":18309.341972659975,"y":39673.796373435325},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Are We Ready Yet?","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Are We Ready Yet?\"},\"icon\":{\"name\":\"indicator-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"a2834a77-a3ed-4101-aebd-f066b7f48a04","savedPayload":{"position":{"x":18385.23865653611,"y":39634.66891343603},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27"}}},{"type":"Tutorial Step","name":"Let's Do this!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Do This!\"},\"icon\":{\"name\":\"live-trading-session\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"9b362b6b-389e-42e3-b4ad-6fc8bfa07e34","savedPayload":{"position":{"x":18469.08447078421,"y":39618.508957295526},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"c8492c4a-a7a7-4a80-a25a-a610377e6180"}}},{"type":"Tutorial Step","name":"GIF","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"slider\": \"toTop\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Live Trading Process Progress\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"6a610041-5a2d-4040-9226-968d9eb6f23f","savedPayload":{"position":{"x":18554.086726184163,"y":39626.625688553366},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Process Instance","name":"Low Frequency Trading","id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d"}}}],"tutorialTopics":[],"id":"8f40aff2-5148-4e29-a366-0b5baba107a9","savedPayload":{"position":{"x":18492.359045531335,"y":39955.16915905043},"targetPosition":{"x":18752.166666666668,"y":40105.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Monitoring","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Check Your Console!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Check Your Console!\"},\"icon\":{\"name\":\"trading-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ecd04d8a-2fcd-4369-96c8-23d3eb830e30","savedPayload":{"position":{"x":18481.87600629594,"y":39675.00403731516},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Live Trading Console\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6aac1ef5-fb87-4569-85e1-aa330eef9fbf","savedPayload":{"position":{"x":18565.11972610905,"y":39570.61971431002},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Working?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Working?\"\n },\n \"icon\": {\n \"name\": \"binance\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4fad500a-616e-47cc-94ce-f3d61de18d1d","savedPayload":{"position":{"x":18685.410386479773,"y":39512.69078539588},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"changeNodeConfigWithEvalReferenceParent\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"(new Date((new Date()).valueOf() - 60000 * 120)).toISOString()\",\n \"toDate\": \"(new Date((new Date()).valueOf() + 60000 * 120)).toISOString()\"\n },\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Live Trading Binance Orders\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4a628f64-79d1-4dc4-b908-cc93a06289a3","savedPayload":{"position":{"x":18818.922946853563,"y":39512.69078539588},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Scale","name":"New Time Scale","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e"}}},{"type":"Tutorial Step","name":"Monitor the Fun Way","config":"{\n \"position\": \"Left\",\n \"slider\": \"toBottom\",\n \"documentationURL\": \"\",\n \"repositionAtTimeMachineReferenceParent\": true,\n \"batchConfigChangesReferenceParent\": [\n {\n \"nodePath\": \"referenceParent.rateScale\",\n \"properties\": {\n \"autoMinScale\": true,\n \"autoMaxScale\": true\n }\n },\n {\n \"nodePath\": \"referenceParent.timeFrameScale\",\n \"properties\": {\n \"value\": \"01-min\"\n }\n }\n ],\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Monitoring the Fun Way!\"\n },\n \"icon\": {\n \"name\": \"bullet-limit-buy-order\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"37d42cdc-08b2-4eee-9c76-b06b1bcd239f","savedPayload":{"position":{"x":18939.213607224287,"y":39570.619714310014},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Live Trading Session My Computer","id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7"}}},{"type":"Tutorial Step","name":"Three Minutes to Play","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Three Minutes to Play\"\n },\n \"icon\": {\n \"name\": \"live-trading-session\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"2a1b57cb-cca4-457a-a37d-c3643f9376f9","savedPayload":{"position":{"x":19022.457327037395,"y":39675.00403731516},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"f7f3ae31-9b14-4e81-b0f2-e131afee1361","savedPayload":{"position":{"x":18752.166666666668,"y":39805.16915905043},"targetPosition":{"x":18752.166666666668,"y":40105.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"c8276738-7275-4f32-9200-7ca81a2f98b1","savedPayload":{"position":{"x":18752.166666666668,"y":40105.16915905043},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"What Else?","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"What's Next?","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What's Next?\"\n },\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"d0971551-1077-4d2f-b51f-194031e6a33a","savedPayload":{"position":{"x":18701.243686222882,"y":39908.34457177805},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Back to work","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Work!\"\n },\n \"icon\": {\n \"name\": \"status-dependency\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"searchPage\": true\n }\n}","project":"Superalgos","id":"43cfe24a-01d4-4924-90d3-eb5aa3650e0a","savedPayload":{"position":{"x":18782.188189061435,"y":39823.788840995396},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Tabbed Search Results","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Tabbed Search Results\"\n },\n \"icon\": {\n \"name\": \"dataset\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"a5949f55-dc76-4c61-888b-45bc1e7c6ef1","savedPayload":{"position":{"x":18889.329235785317,"y":39776.645652146115},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"A Couple More Things!","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Couple More Things!\"\n },\n \"icon\": {\n \"name\": \"strategy-counters\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true,\n \"panel\": \"Close\"\n }\n}","project":"Superalgos","id":"192af355-57c9-4c62-a79d-245a0705c180","savedPayload":{"position":{"x":19006.35557326683,"y":39774.092128378434},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What Else Is Cooking?","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What Else Is Cooking?\"\n },\n \"icon\": {\n \"name\": \"ethereum\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"a40f204e-469b-4d14-a4cf-e3d1eea8fd72","savedPayload":{"position":{"x":19115.451002470796,"y":39816.51702053823},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Help us with a star","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Help Us With a Star!\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"45549599-0051-46be-9847-495c856dd182","savedPayload":{"position":{"x":19200.006733253445,"y":39897.46152337678},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Tweet It!","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Spread the Word on Twitter!\"\n },\n \"icon\": {\n \"name\": \"twitter\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"bc08da7d-e803-458d-99fa-8aae1f64d929","savedPayload":{"position":{"x":19247.14992210273,"y":40004.602570100666},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}}],"tutorialTopics":[],"id":"c4cf3c55-832d-40ac-ae37-5735ecfc4b92","savedPayload":{"position":{"x":18954.261119966748,"y":40069.5344542821},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"The End","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Contacts","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"pressButton\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Get In Touch!\"\n },\n \"icon\": {\n \"name\": \"telegram-bot\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7abb039d-4c70-40a1-bcd1-84f23cfc2041","savedPayload":{"position":{"x":19111.053057479123,"y":39872.87128220185},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Beware of Impersonators!","config":"{\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Beware of Impersonators!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5237c645-3e66-41fe-8e63-2f10e1793ea4","savedPayload":{"position":{"x":19290.95577887232,"y":39917.72606843287},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Ready for More?","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Ready for More Tutorials?\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"First Steps Tutorials\"\n },\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"96e240f1-4e57-451f-81eb-f79b41ac2d38","savedPayload":{"position":{"x":19410.1351559724,"y":40059.758519255025},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"This Is The End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - My Only Friend, The End!\"\n },\n \"icon\": {\n \"name\": \"close-stage-event\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7fd54288-564a-414f-9b50-a9ade7243f3d","savedPayload":{"position":{"x":19423.06871748516,"y":40244.717065959696},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Basic Education","id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8"}}}],"tutorialTopics":[],"id":"7bba071a-bda3-4ac5-9cea-57bd2f6778c6","savedPayload":{"position":{"x":19131.97999960236,"y":40172.1404972798},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e","savedPayload":{"position":{"x":18902.166666666668,"y":40364.97678018576},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isPlaying":true,"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Contribute to Superalgos","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial - Wanna Help? Come On In!\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"You are in command","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - You Are In Command\"\n },\n \"icon\": {\n \"name\": \"strategy-manage-stage\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"cf295c5b-14f3-4440-b684-c9a429110269","savedPayload":{"position":{"x":31497,"y":40092.69237886467},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Free For Everyone?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free For Everyone?\"\n },\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"64170c58-8848-453c-8bb9-ea8483476b6d","savedPayload":{"position":{"x":31606.807621135333,"y":40202.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"A Brilliant Idea","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Brilliant Idea\"\n },\n \"icon\": {\n \"name\": \"nodes-highlights\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4a969dfa-6c68-4eb5-98c3-c20f2b9bebbc","savedPayload":{"position":{"x":31647,"y":40352.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What is a Contribution?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What is a Contribution?\"\n },\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"556f8af1-63ae-423a-a5fe-5720e7b4ae96","savedPayload":{"position":{"x":31606.807621135333,"y":40502.5},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What About Free Riders?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Free Riders?\"\n },\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ca46f639-4472-420d-a647-2c3be58a6f4b","savedPayload":{"position":{"x":31497,"y":40612.30762113533},"targetPosition":{"x":31347,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"2fefbfbf-c5e3-4da4-82b6-a36e5fb1edcd","savedPayload":{"position":{"x":31347,"y":40352.5},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Branches","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Switching Branches","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Switching Branches\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c3dc484a-9bf2-47f2-aafe-56abd3dbe8ea","savedPayload":{"position":{"x":31438.780298432423,"y":40661.3546836069},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Now the Current Branch","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Now the Current Branch\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c755cfee-f1b5-47a1-8c72-f7bd1285ed5d","savedPayload":{"position":{"x":31407.007055568993,"y":40774.01410481041},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Before You Switch","config":"{\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Before You Switch\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c5186485-0efc-4ced-b670-a012564ffe0d","savedPayload":{"position":{"x":31334.539512811538,"y":40865.93874456856},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Double Trouble?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Double Trouble?\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": false\n }\n}","project":"Superalgos","id":"b9110aee-2bb4-4930-a6b3-d3b14d4d62d3","savedPayload":{"position":{"x":31232.410196624965,"y":40923.1339097771},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Switch Already!","config":"{\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Switch Already!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"searchPage\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"014163bf-692e-40dc-be33-8bbba811310d","savedPayload":{"position":{"x":31116.167369594128,"y":40936.892155008485},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Welcome Back!","config":"{\n \"icon\": {\n \"name\": \"hits\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Back!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"7cfebeab-bd19-4caf-af9c-60eda4325bc7","savedPayload":{"position":{"x":31003.50794839062,"y":40905.11891214506},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Update the App!","config":"{\n \"icon\": {\n \"name\": \"indicator-process-instance\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Update the App!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"08e24e17-777d-45bc-887d-e68d734ef751","savedPayload":{"position":{"x":30911.583308632475,"y":40832.651369387604},"targetPosition":{"x":31139.705098312483,"y":40637.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"65f4de98-58c6-44b1-9c61-46aa0a45a71c","savedPayload":{"position":{"x":31139.705098312483,"y":40637.81695488855},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Editing","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Add Your Review!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Add Your Review!\"\n },\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"a49ea1fc-8cfe-41a1-a781-860e294cf1f6","savedPayload":{"position":{"x":30857.86197012711,"y":40824.01445226733},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Did It Work?","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Did It Work?\"\n },\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"3803ec52-574c-4961-8366-551ed8abd757","savedPayload":{"position":{"x":30724.483848017513,"y":40818.0244338965},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Breaking Up The Command","config":"{\n \"icon\": {\n \"name\": \"copy-path\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Breaking Up The Command\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c23381c5-d2e3-4b19-9065-8401c0e024d6","savedPayload":{"position":{"x":30606.913283905604,"y":40754.75701548882},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Editing Crash Course","config":"{\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Editing Crash Course\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"686bdf5e-b7a5-4237-9779-f806c0d93065","savedPayload":{"position":{"x":30528.436569922083,"y":40646.743085183916},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Sign!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Sign!\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ef70642b-3699-4101-bb45-7c76cf125af3","savedPayload":{"position":{"x":30504.596981725124,"y":40515.37612658259},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Save!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Save!\"\n },\n \"icon\": {\n \"name\": \"under-construction\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"d61352ca-f701-4403-af3f-dcbfcd05b402","savedPayload":{"position":{"x":30540.116242130494,"y":40386.67497694584},"targetPosition":{"x":30804.294901687517,"y":40528.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"8bd606bc-a0bd-47e3-99df-a53bf79e0bb9","savedPayload":{"position":{"x":30804.294901687517,"y":40528.83557568774},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"GitHub","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Get Ready to Push!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Get Ready to Push!\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7859f5c1-bba6-405a-9b62-ec086b59be27","savedPayload":{"position":{"x":30561.589803375035,"y":40352.5},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Translation for Mere Mortals","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Translation for Mere Mortals\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c35d39f0-5c90-48fd-badc-592be51a8605","savedPayload":{"position":{"x":30518.977946798972,"y":40268.869522624744},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Contributable files?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Contributable files?\"\n },\n \"icon\": {\n \"name\": \"dataset\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"a2846838-6234-4fb1-8f28-2ce5a69607d4","savedPayload":{"position":{"x":30504.294901687517,"y":40176.16442431226},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Authentication","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"5934eb7c-d208-498e-9bce-fca825fa129c","savedPayload":{"position":{"x":30518.977946798972,"y":40083.45932599977},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Auth Clip","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Auth Clip\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"ec8aca7b-50a2-4635-b0db-f3ed2c2796e3","savedPayload":{"position":{"x":30561.589803375035,"y":39999.828848624515},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Set Up the Token!","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Set Up the Token!\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"f7b3489d-a282-4e12-a28d-6300619713f5","savedPayload":{"position":{"x":30627.959325999775,"y":39933.45932599977},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Github API","name":"New Github API","id":"9ea7bee2-c4db-4cee-a05f-63fcf3a86a4a"}}},{"type":"Tutorial Step","name":"A Note On Keys and Tokens!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Note On Keys and Tokens!\"\n },\n \"icon\": {\n \"name\": \"exchange-account-key\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"f7cd63ca-f5bd-4f92-ad8b-ec65ee5efe44","savedPayload":{"position":{"x":30711.589803375035,"y":39890.84746942371},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Run the Command!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Run the Command!\"\n },\n \"icon\": {\n \"name\": \"docs-json-code-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"79cc032d-7cdc-4b3a-ac77-7ed2d2bbed06","savedPayload":{"position":{"x":30804.294901687517,"y":39876.16442431226},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Congrats and Thank You!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Congrats and Thank You!\"\n },\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7793d0b5-b468-4e4f-aff0-e4b43cf01925","savedPayload":{"position":{"x":30897,"y":39890.84746942371},"targetPosition":{"x":30804.294901687517,"y":40176.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"924146dc-0d92-41ad-9de8-8b341e379fb2","savedPayload":{"position":{"x":30804.294901687517,"y":40176.16442431226},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"More on Contributions","config":"{\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More on Contributions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"af57eaca-ba68-4f71-9bb0-b5f825de2e49","savedPayload":{"position":{"x":31077.331591067155,"y":39773.738764891306},"targetPosition":{"x":31139.705098312483,"y":40067.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"A Book on Tutorials","config":"{\n \"icon\": {\n \"name\": \"scripts-library\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Book on Tutorials\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"First Steps Tutorials\"\n }\n }\n}","project":"Superalgos","id":"440515fe-9612-4c12-9180-638cc37b75bb","savedPayload":{"position":{"x":31362.6485459557,"y":39866.44386320379},"targetPosition":{"x":31139.705098312483,"y":40067.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b34d468c-ec85-489c-b6a7-28862c0956c6","savedPayload":{"position":{"x":31139.705098312483,"y":40067.18304511145},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"a8711464-9e92-4e16-9622-a1b499a856ca","savedPayload":{"position":{"x":31047,"y":40352.5},"targetPosition":{"x":31047,"y":40352.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}]} \ No newline at end of file +{"type":"Workspace","name":"Getting Started","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":[{"type":"Project Data Tasks","name":"Superalgos","project":"Superalgos","exchangeDataTasks":[{"type":"Exchange Data Tasks","name":"Binance","project":"Superalgos","marketDataTasks":[{"type":"Market Data Tasks","name":"Binance BTC/USDT","project":"Superalgos","dataMineTasks":[{"type":"Data Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Exchange Raw Data","project":"Superalgos","bot":{"type":"Sensor Bot Instance","name":"Exchange Raw Data","config":"{ \n\"startDate\": \"2020-01-01\"\n}","project":"Superalgos","processes":[{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","project":"Superalgos","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b","savedPayload":{"position":{"x":23490.023749611923,"y":29239.135911211026},"targetPosition":{"x":23779.801497498644,"y":29316.781624741783},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Historic-OHLCVs","id":"5eb11d6a-022e-4f60-97c4-d6cf90b249dc"}}}],"id":"343313ae-5705-484d-8bf8-aed25ba61cfa","savedPayload":{"position":{"x":23779.801497498644,"y":29316.781624741783},"targetPosition":{"x":24069.579245385365,"y":29394.42733827254},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a8f38508-1cac-4ab1-815f-d338fc813377","savedPayload":{"position":{"x":24069.579245385365,"y":29394.42733827254},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Candles Volumes","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Candles Volumes","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","project":"Superalgos","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f","savedPayload":{"position":{"x":23799.549372136753,"y":28802.457809532632},"targetPosition":{"x":24059.356993272086,"y":28952.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"9f683143-a33f-42c1-9fa8-c601f01ee4e1"}}},{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Daily","project":"Superalgos","id":"7c8b312c-09bf-4c59-853f-1592391a9c57","savedPayload":{"position":{"x":24059.356993272086,"y":28652.457809532632},"targetPosition":{"x":24059.356993272086,"y":28952.457809532632},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"980ceb1d-7be6-454f-90d9-01ba1fd4a65d"}}}],"id":"8d58e84b-d7ef-464f-8079-0ec0887e3da3","savedPayload":{"position":{"x":24059.356993272086,"y":28952.457809532632},"targetPosition":{"x":24209.356993272086,"y":29212.265430667965},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bf29e3bd-9386-408b-9091-042da0c53e81","savedPayload":{"position":{"x":24209.356993272086,"y":29212.265430667965},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Task","name":"Resistances and Supports","project":"Superalgos","bot":{"type":"Indicator Bot Instance","name":"Resistances and Supports","config":"{}","project":"Superalgos","processes":[{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Market","project":"Superalgos","id":"a707814e-b81b-4102-9b5b-4e2fe969324f","savedPayload":{"position":{"x":24437.002706802843,"y":28602.739808143135},"targetPosition":{"x":24514.6484203336,"y":28892.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27","savedPayload":{"position":{"x":24726.780454689564,"y":28680.385521673892},"targetPosition":{"x":24514.6484203336,"y":28892.517556029856},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Daily","id":"be19d91b-9337-4f84-96b3-f4e54ea12df5"}}}],"id":"112be2cf-74ea-4272-9566-cf0cd24c111c","savedPayload":{"position":{"x":24514.6484203336,"y":28892.517556029856},"targetPosition":{"x":24437.002706802843,"y":29182.295303916577},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e74c3232-7b59-4006-87fa-b3b2a328a52b","savedPayload":{"position":{"x":24437.002706802843,"y":29182.295303916577},"targetPosition":{"x":24359.356993272086,"y":29472.073051803298},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea","savedPayload":{"position":{"x":24359.356993272086,"y":29472.073051803298},"targetPosition":{"x":24509.356993272086,"y":29731.88067293863},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33","savedPayload":{"position":{"x":24509.356993272086,"y":29731.88067293863},"targetPosition":{"x":24659.356993272086,"y":29991.688294073963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}}],"id":"70d459d6-d270-49e0-b70d-2053c65a40e2","savedPayload":{"position":{"x":24659.356993272086,"y":29991.688294073963},"targetPosition":{"x":24809.356993272086,"y":30251.495915209296},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"af949a76-a6f4-4ec6-869e-f240480eea81","savedPayload":{"position":{"x":24809.356993272086,"y":30251.495915209296},"targetPosition":{"x":24959.356993272086,"y":30511.30353634463},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"9b93b56d-dccf-4a8c-bbd0-8c608c31363c","savedPayload":{"position":{"x":24959.356993272086,"y":30511.30353634463},"targetPosition":{"x":25109.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe","savedPayload":{"position":{"x":25109.356993272086,"y":30771.11115747996},"targetPosition":{"x":25259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"learningTasks":{"type":"Learning Tasks","name":"New Learning Tasks","project":"Superalgos","projectLearningTasks":[{"type":"Project Learning Tasks","name":"Superalgos","project":"Superalgos","exchangeLearningTasks":[],"id":"ddd4bf4d-46fd-4c16-86d3-1785f5ad629e","savedPayload":{"position":{"x":25559.356993272086,"y":30511.30353634463},"targetPosition":{"x":25409.356993272086,"y":30771.11115747996},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"0818dfbe-61ea-40b8-8544-bee25d7f45be","savedPayload":{"position":{"x":25409.356993272086,"y":30771.11115747996},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binance","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binance BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Backtesting Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b","savedPayload":{"position":{"x":28335.291877706186,"y":30551.48478700282},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 1000\n}","project":"Superalgos","id":"ed578090-732c-4e41-a4ae-9d4f34607170","savedPayload":{"position":{"x":28424.55868811598,"y":30522.48024208079},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeRange":{"type":"Time Range","name":"New Time Range","config":"{ \n\"initialDatetime\": \"2020-09-01\",\n\"finalDatetime\": \"2020-09-02\",\n \"allowStartingFromThePast\": false\n}","project":"Superalgos","id":"47fa4509-16f4-42b7-9453-fa3b3d2885b0","savedPayload":{"position":{"x":28518.41936714012,"y":30522.48024208079},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"dfe3514c-1aa9-4cea-bb2d-e6657037e69d","savedPayload":{"position":{"x":28607.686177549913,"y":30551.48478700282},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"c711e510-373f-468d-8ed9-1601da6a06f5","savedPayload":{"position":{"x":28683.621061984013,"y":30606.654709903367},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"fdc7c383-8301-4393-b415-8c2d542e05fe","savedPayload":{"position":{"x":28738.79098488456,"y":30682.589594337467},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"28db17c9-2703-430b-a162-5e04b68640a3","savedPayload":{"position":{"x":28767.79552980659,"y":30771.85640474726},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"78270062-7d10-4afa-baee-2bda8a4b4ed2","savedPayload":{"position":{"x":28767.79552980659,"y":30865.7170837714},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"4c9cdc50-70c0-43ee-ad54-052f8b7ecbc8","savedPayload":{"position":{"x":28738.79098488456,"y":30954.983894181194},"targetPosition":{"x":28471.48902762805,"y":30818.78674425933},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"e79ab7df-ba40-46aa-abcd-63df8031a931","savedPayload":{"position":{"x":28471.48902762805,"y":30818.78674425933},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2","savedPayload":{"position":{"x":28559.356993272086,"y":31030.918778615294},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"720feaab-efc8-435a-bb3c-ab4e33ed1ca2","savedPayload":{"position":{"x":28471.48902762805,"y":31243.050812971258},"targetPosition":{"x":28259.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f","savedPayload":{"position":{"x":28259.356993272086,"y":31030.918778615294},"targetPosition":{"x":27959.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"60a5e5c0-cfb3-4488-b46c-55d637212aa5","savedPayload":{"position":{"x":27959.356993272086,"y":31030.918778615294},"targetPosition":{"x":27659.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"cbfbb9e7-9c30-4482-8a9f-4c90771feffc","savedPayload":{"position":{"x":27659.356993272086,"y":31030.918778615294},"targetPosition":{"x":27359.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08222935-2499-4a3e-a927-4f5dfbc392df","savedPayload":{"position":{"x":27359.356993272086,"y":31030.918778615294},"targetPosition":{"x":27059.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"56c5656b-a7e0-42ed-92d6-631e78ca99d0","savedPayload":{"position":{"x":27059.356993272086,"y":31030.918778615294},"targetPosition":{"x":26759.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ce02342-473e-4614-ac76-c7788f56ab8e","savedPayload":{"position":{"x":26759.356993272086,"y":31030.918778615294},"targetPosition":{"x":26459.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"2db856e0-4719-408c-88bc-5b47d412c066","savedPayload":{"position":{"x":26459.356993272086,"y":31030.918778615294},"targetPosition":{"x":26159.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"ba36975c-08d6-458d-b7c0-eb4684a85b5d","savedPayload":{"position":{"x":26159.356993272086,"y":31030.918778615294},"targetPosition":{"x":25859.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"55c01047-3fce-41b3-9214-2e885f28b987","savedPayload":{"position":{"x":25859.356993272086,"y":31030.918778615294},"targetPosition":{"x":25559.356993272086,"y":31030.918778615294},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb","savedPayload":{"position":{"x":25559.356993272086,"y":31030.918778615294},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Trading Tasks","name":"Superalgos","project":"Superalgos","exchangeTradingTasks":[{"type":"Exchange Trading Tasks","name":"Binance","project":"Superalgos","marketTradingTasks":[{"type":"Market Trading Tasks","name":"Binance BTC/USDT","project":"Superalgos","tradingMineTasks":[{"type":"Trading Mine Tasks","name":"Masters","project":"Superalgos","taskManagers":[{"type":"Task Manager","name":"Masters","project":"Superalgos","tasks":[{"type":"Task","name":"Lightning Strike","project":"Superalgos","bot":{"type":"Trading Bot Instance","name":"Low Frequency","config":"{}","project":"Superalgos","processes":[{"type":"Trading Process Instance","name":"Low Frequency Trading","project":"Superalgos","session":{"type":"Live Trading Session","name":"Lightning Strike","config":"{\"folderName\":\"Lightning-Strike\"}","project":"Superalgos","tradingParameters":{"type":"Trading Parameters","name":"New Parameters","project":"Superalgos","sessionBaseAsset":{"type":"Session Base Asset","name":"","config":"{\n\"initialBalance\": 0,\n\"minimumBalance\": 0\n}","project":"Superalgos","id":"5db563b5-a8d6-48c6-a34e-bbca8825ce37","savedPayload":{"position":{"x":27214.318791376507,"y":32665.54775609566},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"sessionQuotedAsset":{"type":"Session Quoted Asset","name":"","config":"{\n\"initialBalance\": 100\n}","project":"Superalgos","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689","savedPayload":{"position":{"x":27314.957547074417,"y":32638.58168277913},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrame":{"type":"Time Frame","name":"New Time Frame","config":"{ \n\"label\": \"01-min\"\n}","project":"Superalgos","id":"727de4cc-40e6-4064-843c-8cb3a9f2fcdf","savedPayload":{"position":{"x":27418.749983429472,"y":32647.662344319935},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"slippage":{"type":"Slippage","name":"New Slippage","config":"{ \n\"marketOrderRate\": 0.1,\n\"stopLoss\": 0.2,\n\"takeProfit\": 0.3\n}","project":"Superalgos","id":"598dc355-73c9-4e7f-a0e9-ee5fd7952825","savedPayload":{"position":{"x":27513.177200804028,"y":32691.69447891996},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"feeStructure":{"type":"Fee Structure","name":"New Fee Structure","config":"{ \n\"maker\": 0.1,\n\"taker\": 0.1\n}","project":"Superalgos","id":"a3646bab-4d27-48a7-b17c-79d6da48f64d","savedPayload":{"position":{"x":27586.849883185412,"y":32765.367161301343},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"snapshots":{"type":"Snapshots","name":"New Snapshots","config":"{ \n\"strategy\": true,\n\"position\": true\n}","project":"Superalgos","id":"5021a926-442a-4341-8844-8a432293ecb1","savedPayload":{"position":{"x":27630.882017785436,"y":32859.7943786759},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"heartbeats":{"type":"Heartbeats","name":"New Heartbeats","config":"{ \n\"date\": true,\n\"candleIndex\": false\n}","project":"Superalgos","id":"e8cedec0-1bc2-46ba-98de-b7ff746a74c8","savedPayload":{"position":{"x":27639.96267932624,"y":32963.586815030954},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"userDefinedParameters":{"type":"User Defined Parameters","name":"New User Defined Parameters","config":"{ \n\"param1Name\": \"A text string value example\",\n\"param2Name\": 0\n}","project":"Superalgos","id":"67da1d57-62ff-424c-ab2e-034e008fc079","savedPayload":{"position":{"x":27612.99660600971,"y":33064.225570728864},"targetPosition":{"x":27341.104269898715,"y":32937.440092206656},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"726c35b1-e30b-4620-819f-a88a955f1902","savedPayload":{"position":{"x":27341.104269898715,"y":32937.440092206656},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"tradingSystemReference":{"type":"Trading System Reference","name":"Lightning Strike","project":"Superalgos","id":"ff1cd7c1-9415-4c49-8ecf-188fd0c60ea4","savedPayload":{"position":{"x":27428.97223554275,"y":33149.57212656262},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},"tradingEngineReference":{"type":"Trading Engine Reference","name":"Low-Frequency","project":"Superalgos","id":"5fd0a826-0819-4f19-a999-66cc64be0272","savedPayload":{"position":{"x":27341.104269898715,"y":33361.70416091858},"targetPosition":{"x":27128.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},"id":"1ce123af-467f-4295-b317-dba8729faf25","savedPayload":{"position":{"x":27128.97223554275,"y":33149.57212656262},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"executionStartedEvent":{"type":"Execution Started Event","name":"Resistances and Supports Multi-Period-Daily","project":"Superalgos","id":"0d54601b-fcac-42c9-8ce6-d532bfc81de5","savedPayload":{"position":{"x":26978.97223554275,"y":33409.37974769795},"targetPosition":{"x":26828.97223554275,"y":33149.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Execution Finished Event","name":"New Execution Finished Event","id":"7e2fdde9-8b64-44a3-85f1-10c3935bd3e3"}}},"id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d","savedPayload":{"position":{"x":26828.97223554275,"y":33149.57212656262},"targetPosition":{"x":26569.16461440742,"y":32999.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Process Definition","name":"Trading","id":"a8c8d761-96e5-4a86-9285-6c3881d61442"}}}],"id":"2451fc98-0396-44df-902c-a3eaa90f0618","savedPayload":{"position":{"x":26569.16461440742,"y":32999.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"keyReference":{"type":"Key Reference","name":"Key for Lighting Strike","project":"Superalgos","id":"a0622fc9-c4e3-44c3-963d-7ae5fa163e99","savedPayload":{"position":{"x":26309.356993272086,"y":33149.57212656262},"targetPosition":{"x":26309.356993272086,"y":32849.57212656262},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},"id":"c8492c4a-a7a7-4a80-a25a-a610377e6180","savedPayload":{"position":{"x":26309.356993272086,"y":32849.57212656262},"targetPosition":{"x":26159.356993272086,"y":32589.76450542729},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dd73b670-11d7-4cdc-848b-c063fb7a3848","savedPayload":{"position":{"x":26159.356993272086,"y":32589.76450542729},"targetPosition":{"x":26009.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1e087225-153c-4c7e-b9ec-2a36f32ee511","savedPayload":{"position":{"x":26009.356993272086,"y":32329.956884291958},"targetPosition":{"x":25859.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"013985a8-7bf7-4b91-8e2d-f4e8bd81cb62","savedPayload":{"position":{"x":25859.356993272086,"y":32070.149263156625},"targetPosition":{"x":25709.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"d539c0ac-aaeb-4c44-9dba-ac26df819a8d","savedPayload":{"position":{"x":25709.356993272086,"y":31810.341642021293},"targetPosition":{"x":25559.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"f4fc305a-6764-427e-86a7-6557118a4b35","savedPayload":{"position":{"x":25559.356993272086,"y":31550.53402088596},"targetPosition":{"x":25409.356993272086,"y":31290.726399750627},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"673caa5f-511d-4688-9305-e5f0f0f780cd","savedPayload":{"position":{"x":25409.356993272086,"y":31290.726399750627},"targetPosition":{"x":25259.356993272086,"y":31030.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":[{"type":"Project Data Products","name":"Superalgos","project":"Superalgos","exchangeDataProducts":[{"type":"Exchange Data Products","name":"Binance","project":"Superalgos","marketDataProducts":[{"type":"Market Data Products","name":"Binance BTC/USDT","project":"Superalgos","dataProducts":[],"dataMineProducts":[{"type":"Data Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Candles Volumes","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Candles","project":"Superalgos","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab","savedPayload":{"position":{"x":25635.373168930517,"y":32126.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Candles","id":"fe6065ec-4d2d-47a0-bae0-8647f0e195d7"}}},{"type":"Data Product","name":"Volumes","project":"Superalgos","id":"07c11481-7dbd-477d-8bf7-79212542a6aa","savedPayload":{"position":{"x":25617.373168930517,"y":32183.257878002114},"targetPosition":{"x":25538.373168930517,"y":32224.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Volumes","id":"1a366aef-efef-470e-88e0-2a6fbe4dd91f"}}}],"dataProductFolders":[],"id":"73bb62ff-8212-4387-b160-40ee8de2a133","savedPayload":{"position":{"x":25028.372734651544,"y":33055.05755156473},"targetPosition":{"x":24913.567704942016,"y":32777.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Products","name":"Resistances and Supports","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Resistances","project":"Superalgos","id":"a1669770-1bbe-40f7-acb3-ded15272935f","savedPayload":{"position":{"x":25621.373168930517,"y":32076.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Resistances","id":"7a734501-a0fb-4305-803e-7e95d477c513"}}},{"type":"Data Product","name":"Supports","project":"Superalgos","id":"64899503-b618-493a-ba94-bfad2051a611","savedPayload":{"position":{"x":25644.373168930517,"y":32138.257878002114},"targetPosition":{"x":25592.373168930517,"y":32158.257878002114},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Supports","id":"bc3c43de-6312-47d4-ae3d-0c95c1b039e0"}}}],"dataProductFolders":[],"id":"a1855a09-0948-43de-bba7-8900c5c161d8","savedPayload":{"position":{"x":24730.939276239398,"y":33015.89969389871},"targetPosition":{"x":24913.567704942016,"y":32777.89369181134},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0","savedPayload":{"position":{"x":24913.567704942016,"y":32777.89369181134},"targetPosition":{"x":24952.72556260803,"y":32480.460233399197},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Mine","name":"Masters","id":"35be7b1c-a0f7-4b5f-9ee1-8fb51595e959"}}}],"id":"6d7273da-5366-4fe3-9749-e643038abd7a","savedPayload":{"position":{"x":24952.72556260803,"y":32480.460233399197},"targetPosition":{"x":24991.883420274044,"y":32183.026774987055},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"9bc0aea4-0596-449c-91bd-4fb4cb672aa8","savedPayload":{"position":{"x":24991.883420274044,"y":32183.026774987055},"targetPosition":{"x":25031.041277940058,"y":31885.593316574912},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"db554581-93fa-465d-89f7-50f026e839d8","savedPayload":{"position":{"x":25031.041277940058,"y":31885.593316574912},"targetPosition":{"x":25070.19913560607,"y":31588.15985816277},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":[{"type":"Project Trading Products","name":"Superalgos","project":"Superalgos","exchangeTradingProducts":[{"type":"Exchange Trading Products","name":"Binance","project":"Superalgos","marketTradingProducts":[{"type":"Market Trading Products","name":"Binance BTC/USDT","project":"Superalgos","tradingSessionReferences":[{"type":"Trading Session Reference","name":"Lightning Strike Backtesting Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631","savedPayload":{"position":{"x":24463.592002018682,"y":31980.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84","savedPayload":{"position":{"x":24313.592002018682,"y":31909.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960","savedPayload":{"position":{"x":24420.592002018682,"y":31952.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"7c580919-08ce-4aff-9e84-888fdf07caec","savedPayload":{"position":{"x":24281.592002018682,"y":31964.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"389797d4-8456-4258-9adf-246a6ba69016","savedPayload":{"position":{"x":24441.592002018682,"y":31984.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa","savedPayload":{"position":{"x":24417.592002018682,"y":31995.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe","savedPayload":{"position":{"x":24475.592002018682,"y":31901.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c","savedPayload":{"position":{"x":24306.592002018682,"y":32068.531877463392},"targetPosition":{"x":24377.592002018682,"y":31972.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"a606455e-f5ce-4535-b1af-6d9dd529f91c","savedPayload":{"position":{"x":24377.592002018682,"y":31972.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86","savedPayload":{"position":{"x":24475.592002018682,"y":31953.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"556e97e8-eba3-419d-869d-950cc99371da","savedPayload":{"position":{"x":24448.592002018682,"y":32071.531877463392},"targetPosition":{"x":24454.592002018682,"y":32022.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"3af0887b-ae23-4f57-b376-4a540fe13112","savedPayload":{"position":{"x":24454.592002018682,"y":32022.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a","savedPayload":{"position":{"x":24352.592002018682,"y":32024.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f","savedPayload":{"position":{"x":24398.592002018682,"y":32035.531877463392},"targetPosition":{"x":24447.592002018682,"y":32101.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"895feaf2-ae82-4b8e-ada6-780beab73ea9","savedPayload":{"position":{"x":24447.592002018682,"y":32101.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"b0961496-1af9-48cd-bbeb-ac5973192e78","savedPayload":{"position":{"x":24555.592002018682,"y":31897.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d","savedPayload":{"position":{"x":24541.592002018682,"y":31929.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"e298787f-b7f2-4334-931e-38b9441e43f9","savedPayload":{"position":{"x":24504.592002018682,"y":31961.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c","savedPayload":{"position":{"x":24444.592002018682,"y":31908.531877463392},"targetPosition":{"x":24520.592002018682,"y":31974.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"9fe11205-286a-4610-81ec-29cbc70d6075","savedPayload":{"position":{"x":24520.592002018682,"y":31974.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd","savedPayload":{"position":{"x":24483.592002018682,"y":31990.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77","savedPayload":{"position":{"x":24491.592002018682,"y":32003.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"e734b6be-ba40-468c-a94f-1153dc85e00c","savedPayload":{"position":{"x":24445.592002018682,"y":32089.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"9a973229-4d9d-45af-b5aa-64906a915f6e","savedPayload":{"position":{"x":24422.592002018682,"y":32032.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"56517fe9-64da-4404-83f3-005106bc1c0a","savedPayload":{"position":{"x":24412.592002018682,"y":32018.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"d00c76e7-4be0-4518-9892-a0f6df943951","savedPayload":{"position":{"x":24594.592002018682,"y":31949.531877463392},"targetPosition":{"x":24511.592002018682,"y":32023.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"b5154bc1-4311-4148-b396-5ebca1c62417","savedPayload":{"position":{"x":24511.592002018682,"y":32023.531877463392},"targetPosition":{"x":24421.592002018682,"y":32058.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"89edd698-1d64-4500-bcef-d13ea74bee1c","savedPayload":{"position":{"x":24421.592002018682,"y":32058.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"a0c29c57-0a20-4084-9697-142300f62f9c","savedPayload":{"position":{"x":24383.592002018682,"y":32063.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"aa0fe882-89a8-4811-8988-c589554afe9d","savedPayload":{"position":{"x":24294.592002018682,"y":32008.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"bbc65054-b22b-4cbb-816b-529672e2f498","savedPayload":{"position":{"x":24324.592002018682,"y":32032.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"776a3ece-8255-4e80-b60f-85bb818b561f","savedPayload":{"position":{"x":24340.592002018682,"y":32026.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"7593aaf9-0505-4b58-9920-235340ff2d2f","savedPayload":{"position":{"x":24325.592002018682,"y":32003.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd","savedPayload":{"position":{"x":24332.592002018682,"y":32039.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"faab4399-898b-4393-8c27-fa2f3109c60a","savedPayload":{"position":{"x":24307.592002018682,"y":32057.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157","savedPayload":{"position":{"x":24297.592002018682,"y":32133.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7","savedPayload":{"position":{"x":24389.592002018682,"y":31999.531877463392},"targetPosition":{"x":24378.592002018682,"y":32060.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"1a16bc12-581d-4626-846c-895f08e65fdf","savedPayload":{"position":{"x":24378.592002018682,"y":32060.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba","savedPayload":{"position":{"x":24433.592002018682,"y":31946.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049","savedPayload":{"position":{"x":24490.592002018682,"y":31966.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc","savedPayload":{"position":{"x":24570.592002018682,"y":32052.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed","savedPayload":{"position":{"x":24567.592002018682,"y":32057.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b","savedPayload":{"position":{"x":24545.592002018682,"y":31956.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642","savedPayload":{"position":{"x":24672.592002018682,"y":31889.531877463392},"targetPosition":{"x":24586.592002018682,"y":31971.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"97736b8e-761c-43f2-83bf-df8f5d41b963","savedPayload":{"position":{"x":24586.592002018682,"y":31971.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"9fc29be1-9393-4933-95d3-bebddd73c05e","savedPayload":{"position":{"x":24507.592002018682,"y":31875.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"b555388f-db93-4db1-91be-7772550afa70","savedPayload":{"position":{"x":24439.592002018682,"y":31926.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"41953904-e48c-4176-bf0f-09d133bc444c","savedPayload":{"position":{"x":24441.592002018682,"y":31883.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c","savedPayload":{"position":{"x":24463.592002018682,"y":31931.531877463392},"targetPosition":{"x":24487.592002018682,"y":31875.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"ac789224-64dc-4ff5-a316-2dfbb6347b8a","savedPayload":{"position":{"x":24487.592002018682,"y":31875.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"6e49b57f-8c94-410f-985b-82c126155b11","savedPayload":{"position":{"x":24693.592002018682,"y":31870.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba","savedPayload":{"position":{"x":24673.592002018682,"y":32018.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f","savedPayload":{"position":{"x":24656.592002018682,"y":31987.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"01491591-0462-453c-91e0-6da6f554a729","savedPayload":{"position":{"x":24536.592002018682,"y":31883.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2","savedPayload":{"position":{"x":24558.592002018682,"y":31830.531877463392},"targetPosition":{"x":24616.592002018682,"y":31921.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"2a4cb5a2-8e6a-4b14-816a-b8e0cce4dae5","savedPayload":{"position":{"x":24616.592002018682,"y":31921.531877463392},"targetPosition":{"x":24528.592002018682,"y":31946.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"39e122ca-cdc4-49a6-91a6-2f2c05f62ea0","savedPayload":{"position":{"x":24528.592002018682,"y":31946.531877463392},"targetPosition":{"x":24436.592002018682,"y":31978.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"363150a9-d4e7-4e2e-b327-89109935718c","savedPayload":{"position":{"x":24436.592002018682,"y":31978.531877463392},"targetPosition":{"x":24383.592002018682,"y":32012.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7","savedPayload":{"position":{"x":24383.592002018682,"y":32012.531877463392},"targetPosition":{"x":24343.592002018682,"y":31925.531877463392},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"a5de30a4-022e-4f8a-afd0-3eb6d8600ae8","savedPayload":{"position":{"x":24509.356993272086,"y":32629.956884291958},"targetPosition":{"x":24509.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Trading Session Reference","name":"Lightning Strike Live Trading Session","project":"Superalgos","dataProducts":[],"tradingMineProducts":[{"type":"Trading Mine Products","name":"Masters","project":"Superalgos","botProducts":[{"type":"Bot Products","name":"Low Frequency","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Engine","project":"Superalgos","dataProducts":[],"dataProductFolders":[{"type":"Data Product Folder","name":"Trading Episode","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading Episode Counters","project":"Superalgos","id":"dc6cc4ef-4bd7-4837-8442-919462314db3","savedPayload":{"position":{"x":24040.07658106541,"y":32774.458634291004},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Counters","id":"d81c6019-864e-42f5-94ba-2f249b865f85"}}},{"type":"Data Product","name":"Trading Episode Statistics","project":"Superalgos","id":"776ed571-8321-47aa-8cfb-c8ebf565dace","savedPayload":{"position":{"x":24033.260548494378,"y":32904.51628344689},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading Episode Statistics","id":"400c7f49-37da-41fb-b83d-879960aa74ff"}}},{"type":"Data Product","name":"Episode Candle","project":"Superalgos","id":"ded93703-a48d-44be-9703-878c28f949cd","savedPayload":{"position":{"x":23982.373237179447,"y":33024.39927619857},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Candle","id":"b9a58113-cf27-4d57-9810-87a2cc158804"}}},{"type":"Data Product","name":"Episode Balances","project":"Superalgos","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a","savedPayload":{"position":{"x":23893.552407881933,"y":33119.64795433567},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Balances","id":"a9a53d82-133b-4417-b639-f9a56d338233"}}},{"type":"Data Product","name":"Distance To Trading Event","project":"Superalgos","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027","savedPayload":{"position":{"x":23777.51116347094,"y":33178.77392155408},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Distance To Trading Event","id":"8ea88d6c-7d7f-4152-b781-ea108df52c63"}}},{"type":"Data Product","name":"Episode Base Asset","project":"Superalgos","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Base Asset","id":"234969ff-eab1-4d59-b6fa-79433c9a20e9"}}},{"type":"Data Product","name":"Episode Quoted Asset","project":"Superalgos","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2","savedPayload":{"position":{"x":23521.347601016434,"y":33165.348958112605},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episode Quoted Asset","id":"ae525e31-d6a8-47d2-9021-3f2ddb9615b0"}}},{"type":"Data Product","name":"Current Episode","project":"Superalgos","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65","savedPayload":{"position":{"x":23412.122389176475,"y":33094.417276175125},"targetPosition":{"x":23667.871774199913,"y":32820.15963806794},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Episode","id":"b8da0132-ba28-46ec-aa54-eb9eaac56ce7"}}}],"dataProductFolders":[],"id":"6a331de0-7872-4f86-bea0-6dd802c97921","savedPayload":{"position":{"x":23667.871774199913,"y":32820.15963806794},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Strategy","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Strategy","project":"Superalgos","id":"88dd680c-a81b-48ae-96ba-838281abfa35","savedPayload":{"position":{"x":23648.24579060881,"y":33194.6457136009},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Strategy","id":"895d8a04-ef45-41a7-909a-ba31013ffb90"}}},{"type":"Data Product","name":"Last Strategy","project":"Superalgos","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23477.99935320648,"y":32860.51826703026},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Strategy","id":"0625f524-2b97-4b4d-8a90-590ffc62ecd3"}}}],"dataProductFolders":[],"id":"74c10f36-887b-4233-81e5-abe365511bfa","savedPayload":{"position":{"x":23477.99935320648,"y":32860.51826703026},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Current Position","project":"Superalgos","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3","savedPayload":{"position":{"x":23273.759715075845,"y":33175.01973000979},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Current Position","id":"832ecada-8da3-4ba6-b6e9-be34dd5f7ce9"}}},{"type":"Data Product","name":"Last Position","project":"Superalgos","id":"7a95a249-132d-4e0f-9182-cc7af45cacea","savedPayload":{"position":{"x":22959.25825209631,"y":32970.78009187916},"targetPosition":{"x":23293.38569866695,"y":32800.533654476836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Position","id":"477cd6d5-862a-44d0-9313-786a4e63a602"}}}],"dataProductFolders":[],"id":"7eca88a8-3724-4ca1-aa30-9227727eb834","savedPayload":{"position":{"x":23293.38569866695,"y":32800.533654476836},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Open Stage","project":"Superalgos","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2","savedPayload":{"position":{"x":23104.83496583686,"y":33026.66175662281},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stage","id":"73c3c041-ba2a-4798-a362-a453409b518a"}}},{"type":"Data Product","name":"Close Stage","project":"Superalgos","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d","savedPayload":{"position":{"x":22898.332847281992,"y":32921.44367184458},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stage","id":"2bb9bb41-1ff5-4f83-aa5b-bfc4c9f06a9a"}}},{"type":"Data Product","name":"Trigger Stage","project":"Superalgos","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125","savedPayload":{"position":{"x":22793.11476250377,"y":32714.941553289715},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stage","id":"b6cff826-9056-4fbd-8eca-cbd6cceec962"}}},{"type":"Data Product","name":"Manage Stage","project":"Superalgos","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70","savedPayload":{"position":{"x":22829.37044365631,"y":32486.0321914973},"targetPosition":{"x":23163.497890226947,"y":32656.27862889963},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stage","id":"bd691611-e7a6-49a8-b07d-c15360b55e40"}}}],"dataProductFolders":[],"id":"7236bd16-a6e3-48ac-89bf-dc8674b7e812","savedPayload":{"position":{"x":23163.497890226947,"y":32656.27862889963},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e","savedPayload":{"position":{"x":22942.973442347367,"y":32795.291108279984},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"7c769317-2639-4460-8b88-9dc92f7b0585"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6","savedPayload":{"position":{"x":22818.117657046547,"y":32684.55024509317},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"9cc7645a-54fe-40d6-9896-9278167011fb"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"1c6eed42-23aa-4174-aade-be29222acb8c","savedPayload":{"position":{"x":22753.675141305597,"y":32530.603279980434},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"4c827ee0-a29b-4b65-8438-03e2ea98b410"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85","savedPayload":{"position":{"x":22762.409525702606,"y":32363.941297417976},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2c753cd8-36d8-466c-bd80-1ebfa8e314dc"}}},{"type":"Data Product","name":"Last Market Order","project":"Superalgos","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6","savedPayload":{"position":{"x":22842.590858287545,"y":32217.573747027367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Market Order","id":"6df1ac87-92d5-4788-b0bc-f3543b283ef0"}}},{"type":"Data Product","name":"Last Limit Order","project":"Superalgos","id":"c451c035-5ece-451f-836f-b5334cb3f967","savedPayload":{"position":{"x":22978.338242782465,"y":32120.49051724367},"targetPosition":{"x":23123.13926126462,"y":32466.406207906195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Last Limit Order","id":"c24ec6a1-e937-4d20-93eb-4faf2a0becc3"}}}],"dataProductFolders":[],"id":"ce9593a8-3e87-43bb-88c7-af50cf651806","savedPayload":{"position":{"x":23123.13926126462,"y":32466.406207906195},"targetPosition":{"x":23497.625336797584,"y":32486.0321914973},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8be94a26-6821-48bb-8169-3eae2a1131af","savedPayload":{"position":{"x":23497.625336797584,"y":32486.0321914973},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Trading System","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trading System Errors","project":"Superalgos","id":"ba606f99-2ae5-44dc-b7db-399e657830e1","savedPayload":{"position":{"x":23295.861450927674,"y":32622.443323337528},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Errors","id":"1d9c570d-77c7-40ac-a61e-c5a57a411de8"}}},{"type":"Data Product","name":"Trading System Highlights","project":"Superalgos","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee","savedPayload":{"position":{"x":23182.53338349962,"y":32592.0771591904},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Highlights","id":"319f660a-78be-4cf4-8052-877837cad806"}}},{"type":"Data Product","name":"Trading System Values","project":"Superalgos","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8","savedPayload":{"position":{"x":23084.13564726847,"y":32528.17692212845},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Values","id":"c90c009b-588d-45d4-aff1-05e375181dfa"}}},{"type":"Data Product","name":"Trading System Status","project":"Superalgos","id":"dcff6f56-7646-4505-aa93-6682a110f3f2","savedPayload":{"position":{"x":23010.300098233878,"y":32436.997612574425},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Status","id":"eed48c80-35c5-49fa-b12d-18e7280ffb8f"}}},{"type":"Data Product","name":"Trading System Progress","project":"Superalgos","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5","savedPayload":{"position":{"x":22968.25427437787,"y":32327.464496631084},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Progress","id":"04c8606b-5e59-4e7d-b3ac-387bfffcd300"}}},{"type":"Data Product","name":"Trading System Running","project":"Superalgos","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7","savedPayload":{"position":{"x":22962.11391388994,"y":32210.299438849055},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Running","id":"17236f59-6ef2-4cc3-913c-1ff6db052236"}}},{"type":"Data Product","name":"Trading System Announcements","project":"Superalgos","id":"e4811789-fd94-49b0-9917-8d9d434f997d","savedPayload":{"position":{"x":22992.480078037068,"y":32096.971371421},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Announcements","id":"4a6f828a-9671-431e-8257-fc920943581e"}}},{"type":"Data Product","name":"Trading System Warnings","project":"Superalgos","id":"029ff3a7-9c65-425f-855a-882df68fa05b","savedPayload":{"position":{"x":23056.38031509902,"y":31998.573635189852},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Warnings","id":"34310596-466a-4e9a-a5a2-256b0fe3e339"}}},{"type":"Data Product","name":"Trading System Infos","project":"Superalgos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38","savedPayload":{"position":{"x":23147.559624653044,"y":31924.73808615526},"targetPosition":{"x":23335.059624653044,"y":32249.497612574425},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trading System Infos","id":"020ad519-0fc6-4f2f-9f26-b2c7de118fb8"}}}],"dataProductFolders":[],"id":"7096a712-deb7-4adb-86e0-d688f24d2832","savedPayload":{"position":{"x":23335.059624653044,"y":32249.497612574425},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Objects","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Episodes","project":"Superalgos","id":"c6fd6067-4b57-4860-ae3b-5668e4444490","savedPayload":{"position":{"x":23053.23606537805,"y":32137.53752778946},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Episodes","id":"aeec080e-8caf-4976-8187-ba4e725b73b0"}}},{"type":"Data Product","name":"Strategies","project":"Superalgos","id":"60f88096-7343-42d1-afad-83fecd22fb44","savedPayload":{"position":{"x":23012.87743641572,"y":31947.665106796027},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Strategies","id":"21db6fce-8450-4b07-9015-d81a339fd030"}}}],"dataProductFolders":[{"type":"Data Product Folder","name":"Orders","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Market Buy Orders","project":"Superalgos","id":"9f939086-c934-4924-8353-776707a7cf10","savedPayload":{"position":{"x":22722.769389032703,"y":31897.43943333598},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Buy Orders","id":"db256083-9aa2-48e1-8fd6-3425a5085302"}}},{"type":"Data Product","name":"Market Sell Orders","project":"Superalgos","id":"da5f279e-d387-43cf-80f4-fc114b9ac906","savedPayload":{"position":{"x":22710.63986411075,"y":31665.99431034305},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Market Sell Orders","id":"1958f79b-5c6c-4874-9154-98c314822ed7"}}},{"type":"Data Product","name":"Limit Buy Orders","project":"Superalgos","id":"367646bb-839a-4071-8305-6d26a647585d","savedPayload":{"position":{"x":22836.866902325462,"y":31471.62171671013},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Buy Orders","id":"5deceb32-c7ab-4560-818a-0f0b9d6632fb"}}},{"type":"Data Product","name":"Limit Sell Orders","project":"Superalgos","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9","savedPayload":{"position":{"x":23053.23606537805,"y":31388.56537672353},"targetPosition":{"x":23072.862048969153,"y":31763.051452256495},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Limit Sell Orders","id":"2a1d405b-2fbe-4ed4-a76a-d2c7be59d20e"}}}],"dataProductFolders":[],"id":"88643ab2-7859-45d4-b967-8681cf970828","savedPayload":{"position":{"x":23072.862048969153,"y":31763.051452256495},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Stages","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Trigger Stages","project":"Superalgos","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf","savedPayload":{"position":{"x":22846.73394682318,"y":31574.500719426407},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Trigger Stages","id":"18cc2e79-7e57-418c-b635-6c68fc11d681"}}},{"type":"Data Product","name":"Open Stages","project":"Superalgos","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4","savedPayload":{"position":{"x":22951.952031601402,"y":31367.99860087154},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Open Stages","id":"d5938c00-0849-466d-ae14-4ea91b571678"}}},{"type":"Data Product","name":"Manage Stages","project":"Superalgos","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710","savedPayload":{"position":{"x":23158.45415015627,"y":31262.780516093317},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Manage Stages","id":"8fab86b3-db8d-4113-8418-1d256bd98cf2"}}},{"type":"Data Product","name":"Close Stages","project":"Superalgos","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91","savedPayload":{"position":{"x":23387.363511948686,"y":31299.036197245856},"targetPosition":{"x":23217.117074546357,"y":31633.163643816493},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Close Stages","id":"ba911e61-f951-48cd-b547-9a70aa211100"}}}],"dataProductFolders":[],"id":"869369c1-13de-4086-ad40-77b3d54cfc36","savedPayload":{"position":{"x":23217.117074546357,"y":31633.163643816493},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Data Product Folder","name":"Position","project":"Superalgos","dataProducts":[{"type":"Data Product","name":"Positions","project":"Superalgos","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90","savedPayload":{"position":{"x":23092.488032560257,"y":31388.56537672353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Positions","id":"1eabba24-cbd4-4cbf-95e0-c5135349d41d"}}},{"type":"Data Product","name":"Position Base Asset","project":"Superalgos","id":"88997c97-e77f-490e-9eb5-c7531beec132","savedPayload":{"position":{"x":23236.74305813746,"y":31258.67756828353},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Base Asset","id":"b371b039-f6c8-4f60-84cb-52f55c96c84d"}}},{"type":"Data Product","name":"Position Quoted Asset","project":"Superalgos","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4","savedPayload":{"position":{"x":23426.615479130895,"y":31218.3189393212},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Position Quoted Asset","id":"a376f02b-a5d2-4079-b5cd-ab7dc894b909"}}},{"type":"Data Product","name":"Stop Loss","project":"Superalgos","id":"9b064960-3829-441f-b955-334fb8324a53","savedPayload":{"position":{"x":23611.229133670426,"y":31278.303551874633},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Stop Loss","id":"c18bdc82-216a-4b1d-8850-5c3c9dc2000b"}}},{"type":"Data Product","name":"Take Profit","project":"Superalgos","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1","savedPayload":{"position":{"x":23741.116942110428,"y":31422.558577451837},"targetPosition":{"x":23406.98949553979,"y":31592.805014854166},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Product Definition","name":"Take Profit","id":"2542c7d0-fa26-4b52-a59a-a3630e52eb89"}}}],"dataProductFolders":[],"id":"7f74f2e1-91b6-4d7a-87cb-1d6232a41876","savedPayload":{"position":{"x":23406.98949553979,"y":31592.805014854166},"targetPosition":{"x":23387.363511948686,"y":31967.29109038713},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"291949a0-847b-4b18-b3b4-191496fc38a9","savedPayload":{"position":{"x":23387.363511948686,"y":31967.29109038713},"targetPosition":{"x":23701.86497492822,"y":32171.530728517766},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ae78f4fc-6ee5-4ae4-9847-3bab0e2e51a6","savedPayload":{"position":{"x":23701.86497492822,"y":32171.530728517766},"targetPosition":{"x":24068.670325203395,"y":32093.563844461107},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2b0766-a3d5-47e1-acd8-7345af564388","savedPayload":{"position":{"x":24068.670325203395,"y":32093.563844461107},"targetPosition":{"x":24313.207225386846,"y":32041.58592175667},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Trading Mine","name":"Masters","id":"6a54eece-4582-4cda-a854-1cd805e00fed"}}}],"id":"9ef30086-0c9d-47c2-8983-db5fc9a99583","savedPayload":{"position":{"x":24249.549372136753,"y":32479.956884291958},"targetPosition":{"x":24509.356993272086,"y":32329.956884291958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"026bab29-64d0-4d83-862c-446657efa101","savedPayload":{"position":{"x":24509.356993272086,"y":32329.956884291958},"targetPosition":{"x":24659.356993272086,"y":32070.149263156625},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Market","name":"BTC/USDT","id":"9a867bf0-a71d-445c-b99a-75b60bbdce09"}}}],"id":"f601d2a7-fada-477f-9b63-3ef7ed42d44a","savedPayload":{"position":{"x":24659.356993272086,"y":32070.149263156625},"targetPosition":{"x":24809.356993272086,"y":31810.341642021293},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}}],"id":"691abc38-257f-462f-bee5-1cc51d77cea6","savedPayload":{"position":{"x":24809.356993272086,"y":31810.341642021293},"targetPosition":{"x":24959.356993272086,"y":31550.53402088596},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":[{"type":"Project Learning Products","name":"Superalgos","project":"Superalgos","exchangeLearningProducts":[],"id":"071c1c13-0e4c-4649-b2eb-7dc422278961","savedPayload":{"position":{"x":24633.344989097342,"y":31655.98325715586},"targetPosition":{"x":24871.350991184714,"y":31473.354828453244},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"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":25109.356993272086,"y":31290.726399750627},"targetPosition":{"x":25259.356993272086,"y":31030.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":25259.356993272086,"y":31030.918778615294},"targetPosition":{"x":24959.356993272086,"y":31030.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":true,"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":[{"type":"Crypto Exchange","name":"Binance","config":"{\n \"codeName\": \"binance\",\n \"API\": [\n {\n \"method\": \"fetchTrades\",\n \"fetchType\": \"by Id\",\n \"fetchTradesMethod\": \"publicGetHistoricalTrades\",\n \"firstId\": \"f\"\n }\n ]\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"EUR\"} \n}","project":"Superalgos","assets":[{"type":"Asset","name":"Bitcoin","config":"{ \n\"codeName\": \"BTC\"\n}","project":"Superalgos","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa","savedPayload":{"position":{"x":19793.079365950267,"y":30513.325102172115},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},{"type":"Asset","name":"Tether","config":"{ \n\"codeName\": \"USDT\"\n}","project":"Superalgos","id":"f110bfa0-bd5b-469b-a940-4524c8688136","savedPayload":{"position":{"x":20005.21140030623,"y":30725.45713652808},"targetPosition":{"x":19715.43365241951,"y":30803.102850058836},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"95d2c30f-215b-486e-8119-f4eac0279575","savedPayload":{"position":{"x":19715.43365241951,"y":30803.102850058836},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"E"}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","code":"{ \n\"codeName\": \"Write here the code name of the Market here.\"\n}","project":"Superalgos","markets":[{"type":"Market","name":"BTC/USDT","config":"{ \n\"codeName\": \"BTC/USDT\"\n}","project":"Superalgos","baseAsset":{"type":"Market Base Asset","name":"Bitcoin","project":"Superalgos","id":"1017b30d-de1b-4212-991e-9fd0a5b6c814","savedPayload":{"position":{"x":20393.079365950267,"y":30937.589170884043},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},"quotedAsset":{"type":"Market Quoted Asset","name":"Tether","project":"Superalgos","id":"705c4a67-787a-48cd-a3dc-3a557438bf0b","savedPayload":{"position":{"x":20393.079365950267,"y":31092.880597945557},"targetPosition":{"x":20103.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}},"id":"9a867bf0-a71d-445c-b99a-75b60bbdce09","savedPayload":{"position":{"x":20103.301618063546,"y":31015.2348844148},"targetPosition":{"x":19803.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2fd80894-900e-44ac-a1a7-56c14124f7a1","savedPayload":{"position":{"x":19803.301618063546,"y":31015.2348844148},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[{"type":"Exchange Account Asset","name":"Bitcoin","project":"Superalgos","id":"ba6f3d5c-b36b-49d9-947f-392068109169","savedPayload":{"position":{"x":20507.121182548915,"y":31439.498953126727},"targetPosition":{"x":20217.343434662194,"y":31517.144666657485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Bitcoin","id":"5f5e4a94-5090-47d4-8883-cc2325d20bfa"}}},{"type":"Exchange Account Asset","name":"Tether","project":"Superalgos","id":"c90be267-90f9-45ae-b225-0578adb4aad9","savedPayload":{"position":{"x":20429.475469018158,"y":31729.27670101345},"targetPosition":{"x":20217.343434662194,"y":31517.144666657485},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"referenceParent":{"type":"Asset","name":"Tether","id":"f110bfa0-bd5b-469b-a940-4524c8688136"}}}],"id":"8ac5c2a9-a238-48ae-ab43-0a0a95a37464","savedPayload":{"position":{"x":20217.343434662194,"y":31517.144666657485},"targetPosition":{"x":19927.565686775473,"y":31439.498953126727},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"Key for Lighting Strike","config":"{\n \"codeName\": \"DOUBLE_CLICK_ON_THIS_STRING_TO_SELECT_IT_XXX_DELETE_IT_AND_PASTE_YOUR_EXCHANGE_API_PUBLIC_KEY\",\n \"secret\": \"REPLACE_THIS_STRING_WITH_YOUR_API_KEY_SECRET\"\n}","project":"Superalgos","id":"e85bbbd6-aca8-450f-9237-788062de5761","savedPayload":{"position":{"x":20082.857113836988,"y":32019.05444890017},"targetPosition":{"x":20005.21140030623,"y":31729.27670101345},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}}],"id":"48925cc9-f3cd-4499-8466-1338fed28a0d","savedPayload":{"position":{"x":20005.21140030623,"y":31729.27670101345},"targetPosition":{"x":19927.565686775473,"y":31439.498953126727},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"63794496-c94b-42f9-81cc-c588708617a6","savedPayload":{"position":{"x":19927.565686775473,"y":31439.498953126727},"targetPosition":{"x":19715.43365241951,"y":31227.366918770764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4b0c1ac5-515f-44a9-b9b9-e698a9c51eac","savedPayload":{"position":{"x":19715.43365241951,"y":31227.366918770764},"targetPosition":{"x":19503.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b","savedPayload":{"position":{"x":19503.301618063546,"y":31015.2348844148},"targetPosition":{"x":19203.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""},"tutorial":{"status":"Done"}}}],"id":"e3879d63-6f8f-41a3-8ac3-0349c4361722","savedPayload":{"position":{"x":19203.301618063546,"y":31015.2348844148},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Untested","project":"Superalgos","exchanges":[{"type":"Crypto Exchange","name":"ACX","config":"{ \n\"codeName\": \"acx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ebcb522b-ae58-46d2-9d82-a9b0beec3976","savedPayload":{"position":{"x":17935.64382962515,"y":31014.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b2649588-27c6-442c-b179-f6d8817188b3","savedPayload":{"position":{"x":17954.64382962515,"y":31004.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9b2051d5-7ee7-4e94-8c8d-306674889339","savedPayload":{"position":{"x":17838.64382962515,"y":30896.23747069523},"targetPosition":{"x":17766.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"1d5461aa-d26c-4df5-b383-8c83e311b8ca","savedPayload":{"position":{"x":17643.64382962515,"y":30952.23747069523},"targetPosition":{"x":17698.64382962515,"y":30973.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c6372400-de52-4b63-97f3-f748aac9c63f","savedPayload":{"position":{"x":17698.64382962515,"y":30973.23747069523},"targetPosition":{"x":17766.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c948314e-2247-4234-b83d-cc2c1b152665","savedPayload":{"position":{"x":17766.64382962515,"y":30905.23747069523},"targetPosition":{"x":17837.64382962515,"y":30978.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"04ccb742-ef1b-4138-b38d-a6b0d92f2f8e","savedPayload":{"position":{"x":17837.64382962515,"y":30978.23747069523},"targetPosition":{"x":17912.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9c21b2d-de21-43b5-8b48-51367a8c981c","savedPayload":{"position":{"x":19313.14497226101,"y":30565.583066825377},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"AOFEX","config":"{ \n\"codeName\": \"aofex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"623ef91b-04c0-4bd5-ac0d-b32c809be3ea","savedPayload":{"position":{"x":17973.64382962515,"y":30923.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"9d0b5855-59a6-4dda-9a4b-33d7a44d582e","savedPayload":{"position":{"x":17901.64382962515,"y":30994.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"e898e569-0dd3-4a22-baa5-caaace66d4ed","savedPayload":{"position":{"x":18062.64382962515,"y":30838.23747069523},"targetPosition":{"x":17982.64382962515,"y":30899.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"64a69d3d-15ff-41c3-a926-5ec93c932ab1","savedPayload":{"position":{"x":17822.64382962515,"y":31052.23747069523},"targetPosition":{"x":17893.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae2785c5-75a1-44fc-a71b-363d88cb5dac","savedPayload":{"position":{"x":17893.64382962515,"y":30981.23747069523},"targetPosition":{"x":17982.64382962515,"y":30899.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07ea69aa-7357-43b1-b548-a4c4fab70c55","savedPayload":{"position":{"x":17982.64382962515,"y":30899.23747069523},"targetPosition":{"x":17971.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2146b410-fc4e-452d-ae57-5d58c9a29706","savedPayload":{"position":{"x":17971.64382962515,"y":30962.23747069523},"targetPosition":{"x":17950.64382962515,"y":30994.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c2e9bb45-97c7-47e8-b13c-56946e673c53","savedPayload":{"position":{"x":19413.67778623216,"y":30647.89853748846},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bequant","config":"{ \n\"codeName\": \"bequant\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"b23c8adf-c880-48fd-b4af-4b4be86cf0e5","savedPayload":{"position":{"x":18059.64382962515,"y":31101.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"523bd94f-68f9-457e-91fd-806c1b95e98d","savedPayload":{"position":{"x":18006.64382962515,"y":31117.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9d914bb1-a68b-41ae-8666-0fcc755358c1","savedPayload":{"position":{"x":17859.64382962515,"y":30964.23747069523},"targetPosition":{"x":17936.64382962515,"y":31059.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"15d903b5-113c-465e-8120-7c46a9a85565","savedPayload":{"position":{"x":17976.64382962515,"y":31146.23747069523},"targetPosition":{"x":17943.64382962515,"y":31134.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2d1c0bc3-abe2-4340-91bf-2eef5b98a2f0","savedPayload":{"position":{"x":17943.64382962515,"y":31134.23747069523},"targetPosition":{"x":17936.64382962515,"y":31059.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a50d459-914c-4bfc-91e8-f15c383280eb","savedPayload":{"position":{"x":17936.64382962515,"y":31059.23747069523},"targetPosition":{"x":17931.64382962515,"y":31071.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b2f2b69f-3bef-4edc-9950-5261d9f36382","savedPayload":{"position":{"x":17931.64382962515,"y":31071.23747069523},"targetPosition":{"x":17960.64382962515,"y":31060.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e928d3e-a2c2-4341-aa2f-b753551c9479","savedPayload":{"position":{"x":19504.72140465123,"y":30740.600980501622},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bibox","config":"{ \n\"codeName\": \"bibox\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"13c1f22c-9a35-4d3f-b000-c96984fd6a2b","savedPayload":{"position":{"x":17995.64382962515,"y":31047.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3c6df49d-70c3-468a-bdd8-6768ce6d3a9d","savedPayload":{"position":{"x":17916.64382962515,"y":31018.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5a54ef39-8fba-4a5f-ac24-5f27e763e28f","savedPayload":{"position":{"x":18050.64382962515,"y":31174.23747069523},"targetPosition":{"x":17956.64382962515,"y":31128.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"08df1f45-dab0-463a-8758-359973f2620d","savedPayload":{"position":{"x":17899.64382962515,"y":31242.23747069523},"targetPosition":{"x":17959.64382962515,"y":31180.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"105b52c2-90ad-4fa1-b690-d8fab14209b4","savedPayload":{"position":{"x":17959.64382962515,"y":31180.23747069523},"targetPosition":{"x":17956.64382962515,"y":31128.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"68c1ef42-1b7b-4cc6-981f-80b20dabcd89","savedPayload":{"position":{"x":17956.64382962515,"y":31128.23747069523},"targetPosition":{"x":17907.64382962515,"y":31057.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"fc35e5d0-ea61-42b6-979a-859f19c5ac6c","savedPayload":{"position":{"x":17907.64382962515,"y":31057.23747069523},"targetPosition":{"x":17929.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e5f9ee4d-77a3-48ae-b354-b2f6a97d5e47","savedPayload":{"position":{"x":19585.208424334218,"y":30842.603544479174},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BigONE","config":"{ \n\"codeName\": \"bigone\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"3f289513-c1c8-457c-b65a-8cf62b5f5eb5","savedPayload":{"position":{"x":17778.64382962515,"y":31071.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b365e73-1cee-496a-921f-121cb628a130","savedPayload":{"position":{"x":17798.64382962515,"y":31121.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"447a4f6f-cfa0-443e-9339-d7c1153ada31","savedPayload":{"position":{"x":17921.64382962515,"y":31046.23747069523},"targetPosition":{"x":17891.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0d234c53-c121-471e-bce1-a258c13cd148","savedPayload":{"position":{"x":17848.64382962515,"y":31175.23747069523},"targetPosition":{"x":17944.64382962515,"y":31086.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"816e1b6a-d790-4abd-9ae1-e203fa737af2","savedPayload":{"position":{"x":17944.64382962515,"y":31086.23747069523},"targetPosition":{"x":17891.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"561a57f7-8c22-4e50-840d-d983ed6bb864","savedPayload":{"position":{"x":17891.64382962515,"y":31102.23747069523},"targetPosition":{"x":17813.64382962515,"y":31064.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e243bd5d-ade7-46c8-876b-6ad8c6eb5e0a","savedPayload":{"position":{"x":17813.64382962515,"y":31064.23747069523},"targetPosition":{"x":17839.64382962515,"y":31063.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fb9ee540-bf12-4dda-bf87-cb6b58fce649","savedPayload":{"position":{"x":19654.195208565325,"y":30952.710342620318},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance Jersey","config":"{ \n\"codeName\": \"binanceje\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0b979ea9-7a2d-4744-9517-2dfa632dfafc","savedPayload":{"position":{"x":17852.64382962515,"y":30989.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b9a4497d-20f1-4c61-9a79-444e0fe0ddf4","savedPayload":{"position":{"x":17924.64382962515,"y":30952.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1b24d8a4-ec70-4501-838c-7633f6f7288e","savedPayload":{"position":{"x":17882.64382962515,"y":31051.23747069523},"targetPosition":{"x":17942.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"627472e3-638f-4d68-a917-d0844d6a227b","savedPayload":{"position":{"x":17991.64382962515,"y":31190.23747069523},"targetPosition":{"x":17986.64382962515,"y":31110.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"b8ce75fb-93c9-4ca2-9b2b-9f8ed8af34f3","savedPayload":{"position":{"x":17986.64382962515,"y":31110.23747069523},"targetPosition":{"x":17942.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"08b226e4-14ee-4ad3-8d96-efe77cc38489","savedPayload":{"position":{"x":17942.64382962515,"y":31066.23747069523},"targetPosition":{"x":17949.64382962515,"y":31009.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2771eb11-bc72-4273-9e1b-9ac5410c6354","savedPayload":{"position":{"x":17949.64382962515,"y":31009.23747069523},"targetPosition":{"x":17933.64382962515,"y":30992.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2782350a-84a2-40ec-87c6-3c8043376a18","savedPayload":{"position":{"x":19710.872950374665,"y":31069.630473388454},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Binance US","config":"{ \n\"codeName\": \"binanceus\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"817ee1cf-b44c-4458-a9c4-a05a17ea0510","savedPayload":{"position":{"x":17943.64382962515,"y":30999.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c6694e9e-74dc-4c2e-9151-90f1d6631b45","savedPayload":{"position":{"x":17937.64382962515,"y":30989.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"00144904-5363-49eb-b445-8c8283d92b0d","savedPayload":{"position":{"x":17838.64382962515,"y":31193.23747069523},"targetPosition":{"x":17781.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2e71aa3c-03d4-4dbd-bc50-43b30f59e655","savedPayload":{"position":{"x":17783.64382962515,"y":31148.23747069523},"targetPosition":{"x":17703.64382962515,"y":31182.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"a4d0df32-c600-4421-b893-2a05f0442ed6","savedPayload":{"position":{"x":17703.64382962515,"y":31182.23747069523},"targetPosition":{"x":17781.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7a39543a-00e1-452b-8aba-36c2b240f9fc","savedPayload":{"position":{"x":17781.64382962515,"y":31156.23747069523},"targetPosition":{"x":17799.64382962515,"y":31119.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2543c4e5-8233-4348-b6dc-e47aed1ff381","savedPayload":{"position":{"x":17799.64382962515,"y":31119.23747069523},"targetPosition":{"x":17898.64382962515,"y":31020.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0b2b67d2-853b-470e-8b13-925956ad5621","savedPayload":{"position":{"x":19754.577155060477,"y":31191.993155151424},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitbank","config":"{ \n\"codeName\": \"bitbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eb6b6842-9bf7-450e-baa3-7a87541a1cf6","savedPayload":{"position":{"x":17955.64382962515,"y":31107.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6353ff56-759f-457d-81f3-fdb8ae5b3e83","savedPayload":{"position":{"x":17942.64382962515,"y":31183.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a2b297c7-f33b-48b9-98fa-d339c7b0ff67","savedPayload":{"position":{"x":17999.64382962515,"y":31016.23747069523},"targetPosition":{"x":17945.64382962515,"y":31116.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"9ce6c354-b294-4062-b763-421e5edb69de","savedPayload":{"position":{"x":17883.64382962515,"y":31186.23747069523},"targetPosition":{"x":17845.64382962515,"y":31202.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"547dbf6c-a292-46c0-a628-62856858121e","savedPayload":{"position":{"x":17845.64382962515,"y":31202.23747069523},"targetPosition":{"x":17945.64382962515,"y":31116.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"097055b3-37e5-4100-a24b-91e404fe49a6","savedPayload":{"position":{"x":17945.64382962515,"y":31116.23747069523},"targetPosition":{"x":17897.64382962515,"y":31142.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51aed4ce-0303-431e-a15f-e6f133f7a2cf","savedPayload":{"position":{"x":17897.64382962515,"y":31142.23747069523},"targetPosition":{"x":17941.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c9a96a7-ed12-4b3e-bb51-306a8da131f5","savedPayload":{"position":{"x":19784.79543078195,"y":31318.363797342816},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitBay","config":"{ \n\"codeName\": \"bitbay\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83b4e523-72a7-41ce-9363-fe0c799dcac1","savedPayload":{"position":{"x":17861.64382962515,"y":30965.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"966698f7-8a28-42d7-bb80-f7cd0601e44f","savedPayload":{"position":{"x":17823.64382962515,"y":31026.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"554829eb-3d40-4b95-a1cd-9de943763e2c","savedPayload":{"position":{"x":17914.64382962515,"y":30924.23747069523},"targetPosition":{"x":17876.64382962515,"y":30921.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2f534989-7ca7-4c3d-b14a-3b1071543c8c","savedPayload":{"position":{"x":17845.64382962515,"y":30853.23747069523},"targetPosition":{"x":17832.64382962515,"y":30821.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2f6b76b4-51d4-434f-8aa1-ed86b0e26bd2","savedPayload":{"position":{"x":17832.64382962515,"y":30821.23747069523},"targetPosition":{"x":17876.64382962515,"y":30921.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cbcc3ab6-9758-4273-99d2-9d05fdd392b5","savedPayload":{"position":{"x":17876.64382962515,"y":30921.23747069523},"targetPosition":{"x":17805.64382962515,"y":31015.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dada6c12-7c41-4ab8-9922-908233829f58","savedPayload":{"position":{"x":17805.64382962515,"y":31015.23747069523},"targetPosition":{"x":17855.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8778eee5-97a2-4f9d-bd25-cd5a64ec6663","savedPayload":{"position":{"x":19801.173495885087,"y":31447.26081972472},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"33508b53-2769-4f3d-8c98-9fa37e5cbf5b","savedPayload":{"position":{"x":17888.64382962515,"y":31043.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4d4ad5a1-81a7-4f92-83db-99f57ce261bb","savedPayload":{"position":{"x":17975.64382962515,"y":30868.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"29d52baf-645c-4d8f-9631-ebd391b4c815","savedPayload":{"position":{"x":18034.64382962515,"y":31066.23747069523},"targetPosition":{"x":18037.64382962515,"y":31012.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d615c33d-c6cf-4572-ac32-8e9ddeb5bb52","savedPayload":{"position":{"x":18023.64382962515,"y":30916.23747069523},"targetPosition":{"x":18106.64382962515,"y":30982.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"0c189040-6318-483c-b6d7-982370a3298d","savedPayload":{"position":{"x":18106.64382962515,"y":30982.23747069523},"targetPosition":{"x":18037.64382962515,"y":31012.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cd60de4a-d17c-4ba7-936a-cbf2305fe3bb","savedPayload":{"position":{"x":18037.64382962515,"y":31012.23747069523},"targetPosition":{"x":18039.64382962515,"y":30964.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d247f4f5-6f16-4a59-a4a5-6d1554b43562","savedPayload":{"position":{"x":18039.64382962515,"y":30964.23747069523},"targetPosition":{"x":17965.64382962515,"y":30956.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6c076027-683d-4778-8a6a-e60984980fdf","savedPayload":{"position":{"x":19803.51933253116,"y":31577.173022561386},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitfinex","config":"{ \n\"codeName\": \"bitfinex2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8fc7f955-5c81-446c-bbeb-205988bf1fc0","savedPayload":{"position":{"x":17830.64382962515,"y":31051.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d5ba38e9-3282-4634-b922-16532c71f426","savedPayload":{"position":{"x":17819.64382962515,"y":31118.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1cebbed5-28f7-4ccd-afce-9e7634d90fb6","savedPayload":{"position":{"x":17892.64382962515,"y":30997.23747069523},"targetPosition":{"x":17855.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0d109aa9-c80c-4a64-96f0-1d8fda0a70a4","savedPayload":{"position":{"x":17888.64382962515,"y":30805.23747069523},"targetPosition":{"x":17942.64382962515,"y":30905.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5459ab1e-a1ce-4dae-ae72-61c1f7f37ce0","savedPayload":{"position":{"x":17942.64382962515,"y":30905.23747069523},"targetPosition":{"x":17855.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a4615f7a-000d-4ff9-b5ac-109bc9a3a849","savedPayload":{"position":{"x":17855.64382962515,"y":30970.23747069523},"targetPosition":{"x":17919.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e10d303e-ea21-4625-bae1-c32ad7a44e8a","savedPayload":{"position":{"x":17919.64382962515,"y":31043.23747069523},"targetPosition":{"x":17863.64382962515,"y":31062.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f3114102-a73c-4086-9594-5888ef1ab4ec","savedPayload":{"position":{"x":19791.80543793031,"y":31706.577304054405},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bitforex","config":"{ \n\"codeName\": \"bitforex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"698e5e38-ad73-4cb6-b7f6-2b69913faff9","savedPayload":{"position":{"x":17897.64382962515,"y":30956.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"f0142bd4-1b63-4d12-a4b7-e150d0da197f","savedPayload":{"position":{"x":18020.64382962515,"y":31021.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"7164fb28-405b-461a-a7d4-59d438ecf1ce","savedPayload":{"position":{"x":17821.64382962515,"y":30984.23747069523},"targetPosition":{"x":17901.64382962515,"y":30907.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"ce8a00c9-f090-4ec2-84ed-c6661f8bf7b0","savedPayload":{"position":{"x":17825.64382962515,"y":30965.23747069523},"targetPosition":{"x":17818.64382962515,"y":30913.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"579cd74b-98f6-4000-990b-25ae1456c94b","savedPayload":{"position":{"x":17818.64382962515,"y":30913.23747069523},"targetPosition":{"x":17901.64382962515,"y":30907.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"dbac6eef-25d2-4cda-86a6-59ce8a9a26bc","savedPayload":{"position":{"x":17901.64382962515,"y":30907.23747069523},"targetPosition":{"x":17909.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"a1da9dd3-22ec-4536-bb5a-4d0bb8a56b81","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17937.64382962515,"y":30945.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"499a5a3b-7871-4c95-9b2e-d58d4d9e2392","savedPayload":{"position":{"x":19766.169146786622,"y":31833.956517318737},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"bitkk","config":"{ \n\"codeName\": \"bitkk\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"efbb916c-780b-447f-a4c2-df68570d4ee1","savedPayload":{"position":{"x":17931.64382962515,"y":30937.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0d829516-81d9-46a5-9861-7d94cc89455d","savedPayload":{"position":{"x":17951.64382962515,"y":30912.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"fc174aa3-c485-4b9b-ba19-444b0189ccb1","savedPayload":{"position":{"x":17788.64382962515,"y":30980.23747069523},"targetPosition":{"x":17834.64382962515,"y":30983.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"15921d8a-4b45-481c-9165-79969ed3fd27","savedPayload":{"position":{"x":17796.64382962515,"y":30936.23747069523},"targetPosition":{"x":17891.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"927d5c8a-85df-48bb-b097-c36abb76ca0e","savedPayload":{"position":{"x":17891.64382962515,"y":30922.23747069523},"targetPosition":{"x":17834.64382962515,"y":30983.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"43d218c2-e633-47d5-8dd8-60bc7f7c0b9e","savedPayload":{"position":{"x":17834.64382962515,"y":30983.23747069523},"targetPosition":{"x":17853.64382962515,"y":30925.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"2d310d61-cbc7-4306-af02-be3888939545","savedPayload":{"position":{"x":17853.64382962515,"y":30925.23747069523},"targetPosition":{"x":17951.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ded39740-3c93-4fda-bb9c-6ac75d2109f4","savedPayload":{"position":{"x":19726.911021174266,"y":31957.817257542785},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMart","config":"{ \n\"codeName\": \"bitmart\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"10374855-6b4a-460b-9c95-70072ac00315","savedPayload":{"position":{"x":17907.64382962515,"y":30901.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3aded60c-4061-48ff-ad33-212c965b5c43","savedPayload":{"position":{"x":17829.64382962515,"y":30925.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"1789a3ca-d948-497d-8d1b-1eefd25d16a3","savedPayload":{"position":{"x":17886.64382962515,"y":30937.23747069523},"targetPosition":{"x":17895.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"038170bc-0ca7-4a92-8219-61b7bc8431b0","savedPayload":{"position":{"x":17893.64382962515,"y":31034.23747069523},"targetPosition":{"x":17835.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"55f79ede-ef02-405f-92bd-11902ab3cc7a","savedPayload":{"position":{"x":17835.64382962515,"y":30962.23747069523},"targetPosition":{"x":17895.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8185c660-4af3-4a62-bfa9-8922861101b5","savedPayload":{"position":{"x":17895.64382962515,"y":30988.23747069523},"targetPosition":{"x":17819.64382962515,"y":30909.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"546d48c3-df31-495c-b3b4-cb35109c5542","savedPayload":{"position":{"x":17819.64382962515,"y":30909.23747069523},"targetPosition":{"x":17834.64382962515,"y":30915.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c7ed52a7-895b-46f1-a745-35954d8bcfc6","savedPayload":{"position":{"x":19674.491326722004,"y":32076.707370794375},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMax","config":"{ \n\"codeName\": \"bitmax\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"8a042d0d-7a7a-4a76-889e-42d8642404f4","savedPayload":{"position":{"x":17944.64382962515,"y":31046.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0c4fcc48-51e6-4ff2-925f-405cda6d1122","savedPayload":{"position":{"x":17898.64382962515,"y":31024.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"ef9d5381-d9e3-47f5-9069-6fc14eda0fa3","savedPayload":{"position":{"x":17879.64382962515,"y":31096.23747069523},"targetPosition":{"x":17977.64382962515,"y":31041.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c66fe606-9705-45b0-a196-7ea3efb0221e","savedPayload":{"position":{"x":17982.64382962515,"y":31053.23747069523},"targetPosition":{"x":17943.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"80a5f68e-776a-44de-8797-d2eb806c306e","savedPayload":{"position":{"x":17943.64382962515,"y":31083.23747069523},"targetPosition":{"x":17977.64382962515,"y":31041.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"011fcf1c-1c94-4c36-a246-d6c400aa39dc","savedPayload":{"position":{"x":17977.64382962515,"y":31041.23747069523},"targetPosition":{"x":17942.64382962515,"y":31103.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4a87b8c5-e009-427f-afb7-21afe5594b59","savedPayload":{"position":{"x":17942.64382962515,"y":31103.23747069523},"targetPosition":{"x":17944.64382962515,"y":31109.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fc6a9048-ab8c-48f9-91ae-6c95c28714b0","savedPayload":{"position":{"x":19609.524636419505,"y":32189.2329791979},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BitMEX","config":"{ \n\"codeName\": \"bitmex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f7636e2b-354a-4217-894b-5e26eddc0c2a","savedPayload":{"position":{"x":17894.64382962515,"y":30934.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"6eb2ddd1-6d06-456c-b4e0-7df56ba182e6","savedPayload":{"position":{"x":17823.64382962515,"y":30834.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"b4a4b8fe-d923-4eb0-a066-171b83d1540d","savedPayload":{"position":{"x":17902.64382962515,"y":31064.23747069523},"targetPosition":{"x":17815.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"918ed585-ce46-4d51-a07a-9beee51f70eb","savedPayload":{"position":{"x":17711.64382962515,"y":31036.23747069523},"targetPosition":{"x":17805.64382962515,"y":31078.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"9efef4d8-5be3-4d17-a645-6edffd9535cf","savedPayload":{"position":{"x":17805.64382962515,"y":31078.23747069523},"targetPosition":{"x":17815.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ad31a6e-f27b-45c3-9996-a41fb39aa154","savedPayload":{"position":{"x":17815.64382962515,"y":30988.23747069523},"targetPosition":{"x":17844.64382962515,"y":30896.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"82887393-cb1c-4b01-8581-4b3dabc86584","savedPayload":{"position":{"x":17844.64382962515,"y":30896.23747069523},"targetPosition":{"x":17910.64382962515,"y":30922.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1e2f1dd0-ebf1-4485-83d8-7723a9e3e714","savedPayload":{"position":{"x":19532.77262531095,"y":32294.07482287797},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bittrex","config":"{ \n\"codeName\": \"bittrex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"88d4ef94-f030-42df-9115-69d9611317b1","savedPayload":{"position":{"x":17839.64382962515,"y":31009.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"7fe8234d-9a39-4b28-bf98-43b4fdb57ee5","savedPayload":{"position":{"x":17878.64382962515,"y":31045.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5ba7fe13-1e0f-403a-8f4b-8e3968d2e5e2","savedPayload":{"position":{"x":17841.64382962515,"y":30890.23747069523},"targetPosition":{"x":17742.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"e926fbb8-d2ac-4e3d-aa59-a0a828d202fd","savedPayload":{"position":{"x":17707.64382962515,"y":30983.23747069523},"targetPosition":{"x":17782.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"4fbe41e1-cb15-4bc2-a3de-681c5b22cc97","savedPayload":{"position":{"x":17782.64382962515,"y":31052.23747069523},"targetPosition":{"x":17742.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ab9fe180-1c07-44de-a0a1-863761ac52d6","savedPayload":{"position":{"x":17742.64382962515,"y":30961.23747069523},"targetPosition":{"x":17796.64382962515,"y":30903.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"584f29ca-9b3c-4b7f-a2b0-aab4180ecefd","savedPayload":{"position":{"x":17796.64382962515,"y":30903.23747069523},"targetPosition":{"x":17893.64382962515,"y":30968.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f598f002-8fc5-491f-888e-07d017ea83c6","savedPayload":{"position":{"x":19445.135140551556,"y":32390.003727075255},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bit-Z","config":"{ \n\"codeName\": \"bitz\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"0a22e02b-7d2e-4955-9cfc-ed7d95f0c9a0","savedPayload":{"position":{"x":17751.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"298b45af-b73d-4cd5-848a-97de7b857569","savedPayload":{"position":{"x":17944.64382962515,"y":31083.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6ede807b-b1ab-42b5-bfd7-3b12a942447e","savedPayload":{"position":{"x":17871.64382962515,"y":31049.23747069523},"targetPosition":{"x":17772.64382962515,"y":31098.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"dc172858-3241-4487-950a-e5cae03ac376","savedPayload":{"position":{"x":17751.64382962515,"y":31081.23747069523},"targetPosition":{"x":17753.64382962515,"y":31028.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"19c07cee-1fdf-4e02-ac9f-d110b64ee033","savedPayload":{"position":{"x":17753.64382962515,"y":31028.23747069523},"targetPosition":{"x":17772.64382962515,"y":31098.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b4ef5048-ac4c-410e-bd6d-3338e33ab108","savedPayload":{"position":{"x":17772.64382962515,"y":31098.23747069523},"targetPosition":{"x":17788.64382962515,"y":31134.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e7e96c41-c839-4eec-9bcf-1c60d60fa3f5","savedPayload":{"position":{"x":17788.64382962515,"y":31134.23747069523},"targetPosition":{"x":17850.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6cc10926-fe41-43be-887b-fa8aba1c7377","savedPayload":{"position":{"x":19347.639651522415,"y":32475.89501309667},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC-Alpha","config":"{ \n\"codeName\": \"btcalpha\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"263e3b9c-8fdd-4376-b53b-87f32d0f5898","savedPayload":{"position":{"x":17904.64382962515,"y":30922.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"804603e1-3e0f-4219-a9b7-ee27810d4f07","savedPayload":{"position":{"x":17829.64382962515,"y":30977.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"83b25fff-e448-483f-9bee-cb85fa592c6e","savedPayload":{"position":{"x":17734.64382962515,"y":30862.23747069523},"targetPosition":{"x":17829.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"efcfa3ca-0f82-4eb7-9b04-ed5eb4e1c3cf","savedPayload":{"position":{"x":17799.64382962515,"y":30864.23747069523},"targetPosition":{"x":17837.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"9ca8d728-ee11-4905-9a3a-5ca4ed50f3df","savedPayload":{"position":{"x":17837.64382962515,"y":30919.23747069523},"targetPosition":{"x":17829.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2cfde277-afa6-4ad3-bb5b-8a32b89e2037","savedPayload":{"position":{"x":17829.64382962515,"y":30960.23747069523},"targetPosition":{"x":17903.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"297a0ea2-f6d7-47fd-9fb7-0d99d00a87d8","savedPayload":{"position":{"x":17903.64382962515,"y":30969.23747069523},"targetPosition":{"x":17883.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"30e5485f-213b-435b-a670-07b76cfe5cae","savedPayload":{"position":{"x":19241.429203691412,"y":32550.741684144767},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BTC Markets","config":"{ \n\"codeName\": \"btcmarkets\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"fcb3b880-0852-4d93-8714-67373f9dca16","savedPayload":{"position":{"x":17911.64382962515,"y":31036.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"953d8eff-0b2e-4b07-8635-393fddae0c9d","savedPayload":{"position":{"x":18025.64382962515,"y":31127.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c08873f6-9120-4764-8b06-c8110468b423","savedPayload":{"position":{"x":17935.64382962515,"y":30927.23747069523},"targetPosition":{"x":18027.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"beaa2557-4976-4e53-8a24-7ea00fc3afd5","savedPayload":{"position":{"x":18054.64382962515,"y":30851.23747069523},"targetPosition":{"x":18125.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"445158a2-91b4-4ad8-8380-036cbba6ad7e","savedPayload":{"position":{"x":18125.64382962515,"y":30951.23747069523},"targetPosition":{"x":18027.64382962515,"y":31003.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cd00e08c-a26d-4b11-93a3-b0e8f35bec4b","savedPayload":{"position":{"x":18027.64382962515,"y":31003.23747069523},"targetPosition":{"x":18016.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"35cb55c1-ceb3-4093-98af-8a1c2411fe0f","savedPayload":{"position":{"x":18016.64382962515,"y":31075.23747069523},"targetPosition":{"x":17994.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ac2fda42-95ca-404a-8dd2-72bff0ff5a0f","savedPayload":{"position":{"x":19127.749017450227,"y":32613.66623143447},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Buda","config":"{ \n\"codeName\": \"buda\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"27f3573d-e1f0-473f-9bfd-f9198e7240a0","savedPayload":{"position":{"x":17945.64382962515,"y":30937.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ddc0981-4e45-42f3-ae11-f5b136b2bc3d","savedPayload":{"position":{"x":17783.64382962515,"y":31008.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5a325d59-e6a6-4f76-a311-5e67c5f5a8a2","savedPayload":{"position":{"x":17980.64382962515,"y":30843.23747069523},"targetPosition":{"x":17956.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"fb985ab9-7759-4780-a052-8ee9be0b712a","savedPayload":{"position":{"x":17907.64382962515,"y":30968.23747069523},"targetPosition":{"x":17958.64382962515,"y":30884.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fdf7665a-2974-467b-9280-4077a888733f","savedPayload":{"position":{"x":17958.64382962515,"y":30884.23747069523},"targetPosition":{"x":17956.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a3105cfc-f80e-4bcb-b399-6ea9c0f7edf0","savedPayload":{"position":{"x":17956.64382962515,"y":30936.23747069523},"targetPosition":{"x":17872.64382962515,"y":30941.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5d69a76f-e7bc-4538-950e-2e2353eccea3","savedPayload":{"position":{"x":17872.64382962515,"y":30941.23747069523},"targetPosition":{"x":17853.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"90fe3d74-662e-4fac-aff3-f41990b61ccf","savedPayload":{"position":{"x":19007.931889043757,"y":32663.930922181273},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"BW","config":"{ \n\"codeName\": \"bw\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"457616cd-25f9-4ad3-8c18-6331859dd42e","savedPayload":{"position":{"x":17890.64382962515,"y":31014.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8c1f9aa2-4253-4129-a533-e515644ddb38","savedPayload":{"position":{"x":17909.64382962515,"y":30970.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"24314a5b-85ca-4036-adc6-618120496f1d","savedPayload":{"position":{"x":17773.64382962515,"y":30945.23747069523},"targetPosition":{"x":17860.64382962515,"y":30865.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"f7c593f6-bd7a-41f7-a5e7-b2e1ea9a528f","savedPayload":{"position":{"x":17820.64382962515,"y":30885.23747069523},"targetPosition":{"x":17828.64382962515,"y":30802.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"60dfc799-f863-4895-8d17-568aa2303ef5","savedPayload":{"position":{"x":17828.64382962515,"y":30802.23747069523},"targetPosition":{"x":17860.64382962515,"y":30865.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"223e466d-d750-4e38-91ce-8a59c15242ba","savedPayload":{"position":{"x":17860.64382962515,"y":30865.23747069523},"targetPosition":{"x":17818.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cfff1310-5220-4978-9553-8514be141d14","savedPayload":{"position":{"x":17818.64382962515,"y":30919.23747069523},"targetPosition":{"x":17900.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d72db90c-d572-4cbb-8348-e3cc485d8e86","savedPayload":{"position":{"x":18883.38256475272,"y":32700.94644884361},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Bybit","config":"{ \n\"codeName\": \"bybit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"18fdf7c8-03c4-4f81-a88e-de97589765e1","savedPayload":{"position":{"x":17803.64382962515,"y":31059.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a62b2603-ac6f-4b6e-9541-86daf32027b1","savedPayload":{"position":{"x":17847.64382962515,"y":31104.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"66ecff99-7102-4f4a-9ce8-4d55fb22dfbc","savedPayload":{"position":{"x":17851.64382962515,"y":31165.23747069523},"targetPosition":{"x":17916.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"625e127c-0ebb-4f57-af9f-9dfb57b262a1","savedPayload":{"position":{"x":18004.64382962515,"y":31091.23747069523},"targetPosition":{"x":18008.64382962515,"y":31027.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"8174bb53-66b8-4575-b206-74f9b6352a80","savedPayload":{"position":{"x":18008.64382962515,"y":31027.23747069523},"targetPosition":{"x":17916.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ee16357e-abde-4800-b089-f43f4b696a35","savedPayload":{"position":{"x":17916.64382962515,"y":31077.23747069523},"targetPosition":{"x":17944.64382962515,"y":31101.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c9e9473b-aff9-43c8-a6be-5cd30330bee2","savedPayload":{"position":{"x":17944.64382962515,"y":31101.23747069523},"targetPosition":{"x":17855.64382962515,"y":31007.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"516c3831-456b-4d17-b0a0-6a363ba2ddb2","savedPayload":{"position":{"x":18755.561271527895,"y":32724.27883821499},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ByteTrade","config":"{ \n\"codeName\": \"bytetrade\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e7a1e531-5a9e-466e-b98d-672de39eed3a","savedPayload":{"position":{"x":18088.64382962515,"y":31024.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"edafaba7-fd82-4d9f-b3f7-5d1c01c56599","savedPayload":{"position":{"x":17941.64382962515,"y":30943.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"50fa78b8-3aea-4e43-adcf-1e31820bf97f","savedPayload":{"position":{"x":17886.64382962515,"y":31008.23747069523},"targetPosition":{"x":17858.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"b9c39b04-e86e-4ebb-9aba-39c375f2960c","savedPayload":{"position":{"x":17865.64382962515,"y":30941.23747069523},"targetPosition":{"x":17953.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5965d9cc-1d68-47a7-b838-e6dd81da6ea9","savedPayload":{"position":{"x":17953.64382962515,"y":31023.23747069523},"targetPosition":{"x":17858.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f51a08be-ee3f-4d3b-a75e-d783d63092a7","savedPayload":{"position":{"x":17858.64382962515,"y":30967.23747069523},"targetPosition":{"x":17898.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d395efd0-691b-4a68-a7f1-9bce95b2f687","savedPayload":{"position":{"x":17898.64382962515,"y":30965.23747069523},"targetPosition":{"x":17991.64382962515,"y":30981.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45e2306f-03e8-4d17-a73a-72c11dd14e78","savedPayload":{"position":{"x":18625.966597164217,"y":32733.65453936303},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CEX.IO","config":"{ \n\"codeName\": \"cex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9de19f0a-5824-4e42-af00-484b64421dc3","savedPayload":{"position":{"x":17890.64382962515,"y":31049.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"39db01bc-0cea-422f-b9e9-7d84e3f5446d","savedPayload":{"position":{"x":17918.64382962515,"y":31105.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"93833d3c-42c9-4e4d-bf0f-5b80a90d10c2","savedPayload":{"position":{"x":17978.64382962515,"y":31126.23747069523},"targetPosition":{"x":17953.64382962515,"y":31167.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"42863a52-30f4-4322-9c20-99a45d6dc3d6","savedPayload":{"position":{"x":17884.64382962515,"y":31149.23747069523},"targetPosition":{"x":17895.64382962515,"y":31148.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fcff471d-29be-4176-8ff8-12088361f9fc","savedPayload":{"position":{"x":17895.64382962515,"y":31148.23747069523},"targetPosition":{"x":17953.64382962515,"y":31167.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"f7975a18-b3ab-49bc-ae45-eb02c99aff8c","savedPayload":{"position":{"x":17953.64382962515,"y":31167.23747069523},"targetPosition":{"x":17881.64382962515,"y":31096.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ec432123-43fe-4171-8c41-b797d3161edb","savedPayload":{"position":{"x":17881.64382962515,"y":31096.23747069523},"targetPosition":{"x":17896.64382962515,"y":31076.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"346bfc30-e32a-453a-bdc6-0ead48221581","savedPayload":{"position":{"x":18496.117920729066,"y":32728.96363076407},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Prime","config":"{ \n\"codeName\": \"coinbaseprime\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"73cabd8d-9308-49ed-b544-44f785ee7d38","savedPayload":{"position":{"x":17867.64382962515,"y":30962.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"31bd1360-f0c5-4d70-876a-b152f7cedfd7","savedPayload":{"position":{"x":17960.64382962515,"y":30864.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9b75fcfa-fe75-48a8-9d28-2ff19c58c041","savedPayload":{"position":{"x":17792.64382962515,"y":30841.23747069523},"targetPosition":{"x":17809.64382962515,"y":30934.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c900b14a-c728-45af-90f8-29b3e5f29f46","savedPayload":{"position":{"x":17801.64382962515,"y":30986.23747069523},"targetPosition":{"x":17793.64382962515,"y":31006.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"eaf72df3-b66f-4b83-83f9-91e22ec0c300","savedPayload":{"position":{"x":17793.64382962515,"y":31006.23747069523},"targetPosition":{"x":17809.64382962515,"y":30934.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"9da95675-2071-41bf-b5ac-4f2af602994f","savedPayload":{"position":{"x":17809.64382962515,"y":30934.23747069523},"targetPosition":{"x":17862.64382962515,"y":31021.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4fc49ad4-57cc-43b0-b14b-15f26af994aa","savedPayload":{"position":{"x":17862.64382962515,"y":31021.23747069523},"targetPosition":{"x":17922.64382962515,"y":30960.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5a8281db-6ace-4186-8cfb-cd249c4af48b","savedPayload":{"position":{"x":18367.537599231866,"y":32710.26110903248},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Coinbase Pro","config":"{ \n\"codeName\": \"coinbasepro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a29d6e1a-a94e-4b6b-8741-e9af6e4762f4","savedPayload":{"position":{"x":17788.64382962515,"y":30897.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"10cd9004-0088-4bc0-8fe6-b937f1bb311b","savedPayload":{"position":{"x":17865.64382962515,"y":30918.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"004397e6-ae73-46a6-9ed7-b4ba1930f77b","savedPayload":{"position":{"x":17945.64382962515,"y":30899.23747069523},"targetPosition":{"x":17850.64382962515,"y":30889.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"a81a7021-2228-4386-a773-9ac80c9e723a","savedPayload":{"position":{"x":17738.64382962515,"y":30761.23747069523},"targetPosition":{"x":17792.64382962515,"y":30789.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"482d82f2-364e-483c-b51a-a3fbe8a91577","savedPayload":{"position":{"x":17792.64382962515,"y":30789.23747069523},"targetPosition":{"x":17850.64382962515,"y":30889.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d823ad8e-0452-40f0-bad9-c2cb3ad29a21","savedPayload":{"position":{"x":17850.64382962515,"y":30889.23747069523},"targetPosition":{"x":17772.64382962515,"y":30894.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"0c965322-fdd2-4e67-aaf3-dfc4b9dffc59","savedPayload":{"position":{"x":17772.64382962515,"y":30894.23747069523},"targetPosition":{"x":17841.64382962515,"y":30932.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4242da4b-a67e-44d8-8a19-b1c2f078c94c","savedPayload":{"position":{"x":18241.733119380056,"y":32677.766244135688},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CoinEx","config":"{ \n\"codeName\": \"coinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"af78f796-60e5-4794-87b8-772c7bc74be1","savedPayload":{"position":{"x":18043.64382962515,"y":31069.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d351e6d9-36eb-4d0e-aca5-94429bbb23a3","savedPayload":{"position":{"x":18094.64382962515,"y":31090.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"438f74c6-15e0-4553-af2a-febd5290c269","savedPayload":{"position":{"x":17908.64382962515,"y":31088.23747069523},"targetPosition":{"x":17986.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"bfb22430-77c7-41a7-8083-771f7d7f3634","savedPayload":{"position":{"x":17927.64382962515,"y":30953.23747069523},"targetPosition":{"x":17947.64382962515,"y":30990.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"51daaa12-1c60-4cef-96d8-a445b4b32296","savedPayload":{"position":{"x":17947.64382962515,"y":30990.23747069523},"targetPosition":{"x":17986.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"726b8c33-9873-4be1-b9ef-d6b4483f23b1","savedPayload":{"position":{"x":17986.64382962515,"y":31075.23747069523},"targetPosition":{"x":17919.64382962515,"y":31016.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"30469514-b983-4f6f-9d74-6d6ceef25eb6","savedPayload":{"position":{"x":17919.64382962515,"y":31016.23747069523},"targetPosition":{"x":18000.64382962515,"y":31106.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"62ad0961-6bdf-4a4a-a340-610816742d0a","savedPayload":{"position":{"x":18120.179423675774,"y":32631.860008654276},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"COSS","config":"{ \n\"codeName\": \"coss\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e6315232-c6b1-4e25-aade-7bc7ba9ba6ac","savedPayload":{"position":{"x":17787.64382962515,"y":30984.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b1e8451f-09a2-47b0-add3-cf9c35c487bb","savedPayload":{"position":{"x":17829.64382962515,"y":31095.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d1c9b795-0434-4ce1-9cb7-cc61fac7396d","savedPayload":{"position":{"x":17950.64382962515,"y":31149.23747069523},"targetPosition":{"x":17882.64382962515,"y":31131.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"22be64f9-4b08-4ac3-ae89-6726743a7d5a","savedPayload":{"position":{"x":17890.64382962515,"y":31165.23747069523},"targetPosition":{"x":17956.64382962515,"y":31156.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c7462500-ba74-4bf3-ad81-35fa232bede3","savedPayload":{"position":{"x":17956.64382962515,"y":31156.23747069523},"targetPosition":{"x":17882.64382962515,"y":31131.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5cd41ced-981a-4075-af43-3a0497eb0fcb","savedPayload":{"position":{"x":17882.64382962515,"y":31131.23747069523},"targetPosition":{"x":17856.64382962515,"y":31148.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b5937899-c6ee-4d7a-b259-1ee23d721f60","savedPayload":{"position":{"x":17856.64382962515,"y":31148.23747069523},"targetPosition":{"x":17874.64382962515,"y":31049.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"695029de-7f61-45bb-aa4c-c6d51e6369ed","savedPayload":{"position":{"x":18004.301618063546,"y":32573.08061122679},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"CREX24","config":"{ \n\"codeName\": \"crex24\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c5e12f4a-fb26-40d3-9e70-751b55018e74","savedPayload":{"position":{"x":17910.64382962515,"y":31024.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"00cb629e-bad4-4c6e-8abb-499cad3992f4","savedPayload":{"position":{"x":17938.64382962515,"y":31054.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"4909d182-e0d5-49a9-8ad2-a553c8aaaf88","savedPayload":{"position":{"x":17912.64382962515,"y":31301.23747069523},"targetPosition":{"x":17920.64382962515,"y":31249.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"075eb2a2-299b-4a0f-9f6d-76c385521dc4","savedPayload":{"position":{"x":17800.64382962515,"y":31332.23747069523},"targetPosition":{"x":17883.64382962515,"y":31289.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"e062ef2e-b252-4a66-8f58-d9aa8031f526","savedPayload":{"position":{"x":17883.64382962515,"y":31289.23747069523},"targetPosition":{"x":17920.64382962515,"y":31249.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8e75be98-f874-486d-b749-536e364934dc","savedPayload":{"position":{"x":17920.64382962515,"y":31249.23747069523},"targetPosition":{"x":17845.64382962515,"y":31164.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"052f73cd-7ed7-4537-8b01-840b5b892fea","savedPayload":{"position":{"x":17845.64382962515,"y":31164.23747069523},"targetPosition":{"x":17860.64382962515,"y":31075.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07a7ec7c-273e-4675-8d8d-21ab8514a1f0","savedPayload":{"position":{"x":17895.458263866083,"y":32502.117186545547},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Deribit","config":"{ \n\"codeName\": \"deribit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f0b2354b-89e3-4eca-b051-664a3b8283f6","savedPayload":{"position":{"x":17862.64382962515,"y":30844.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"4ae1f824-82a8-4796-a2d5-3d2358d8089f","savedPayload":{"position":{"x":17912.64382962515,"y":31024.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2013fe7a-d52c-4c9d-ba53-d281d014a8fc","savedPayload":{"position":{"x":17873.64382962515,"y":30926.23747069523},"targetPosition":{"x":17855.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"706d5778-ed21-49bd-9277-1840ec52708d","savedPayload":{"position":{"x":17729.64382962515,"y":31033.23747069523},"targetPosition":{"x":17813.64382962515,"y":31053.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"2e76bc02-6e10-4f14-9bf1-a11dc4268466","savedPayload":{"position":{"x":17813.64382962515,"y":31053.23747069523},"targetPosition":{"x":17855.64382962515,"y":30967.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"89a3ccc7-20ab-4e2d-929b-52d9286179b7","savedPayload":{"position":{"x":17855.64382962515,"y":30967.23747069523},"targetPosition":{"x":17818.64382962515,"y":30920.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"5c8219e3-4509-4b8b-941b-b88ac2c12237","savedPayload":{"position":{"x":17818.64382962515,"y":30920.23747069523},"targetPosition":{"x":17906.64382962515,"y":30929.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"21971815-4248-45df-8e04-20b9a5a83f06","savedPayload":{"position":{"x":17794.92544989493,"y":32419.801715882462},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DigiFinex","config":"{ \n\"codeName\": \"digifinex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"e583c93e-9a44-4e0d-acb7-56d7e00a555a","savedPayload":{"position":{"x":17954.64382962515,"y":30992.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8917c7c0-b420-4d4f-a35a-c0fc6870f0de","savedPayload":{"position":{"x":18052.64382962515,"y":30972.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a00b5bb0-5ab9-42e2-91fe-b450c7eb66d2","savedPayload":{"position":{"x":18220.64382962515,"y":31090.23747069523},"targetPosition":{"x":18123.64382962515,"y":30998.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2aafc473-339b-4d23-9b74-06fa7574c293","savedPayload":{"position":{"x":18144.64382962515,"y":31123.23747069523},"targetPosition":{"x":18203.64382962515,"y":31084.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"99e9e136-1ac7-4400-a100-0a2d37f0882d","savedPayload":{"position":{"x":18203.64382962515,"y":31084.23747069523},"targetPosition":{"x":18123.64382962515,"y":30998.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7cee21b-ddcb-4fd7-b610-43aabb2d1766","savedPayload":{"position":{"x":18123.64382962515,"y":30998.23747069523},"targetPosition":{"x":18032.64382962515,"y":30976.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"08e84a25-4368-4ad6-939f-5a16cece62cc","savedPayload":{"position":{"x":18032.64382962515,"y":30976.23747069523},"targetPosition":{"x":17996.64382962515,"y":31033.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b7d56781-0c51-4ec1-95fd-bf4dc8c00352","savedPayload":{"position":{"x":17703.88183147586,"y":32327.0992728693},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"DSX","config":"{ \n\"codeName\": \"dsx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"d672ab56-cd32-4ff5-8fc5-3733262aeccb","savedPayload":{"position":{"x":17916.64382962515,"y":31106.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"3731a7b5-ba9d-483e-bb41-abf3ae0232c6","savedPayload":{"position":{"x":17878.64382962515,"y":30946.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"9ef7e0ac-dc27-4b47-a06e-0cb7e80ee3d7","savedPayload":{"position":{"x":18124.64382962515,"y":31136.23747069523},"targetPosition":{"x":18093.64382962515,"y":31072.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"77491a3c-3db7-446f-aa67-9b5a1a3be7b3","savedPayload":{"position":{"x":18109.64382962515,"y":31081.23747069523},"targetPosition":{"x":18188.64382962515,"y":31137.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"bd1bd0b7-4943-4aeb-bf90-d3192dcabbb1","savedPayload":{"position":{"x":18188.64382962515,"y":31137.23747069523},"targetPosition":{"x":18093.64382962515,"y":31072.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45747fef-f30e-4fae-b02d-5768ae7dbe68","savedPayload":{"position":{"x":18093.64382962515,"y":31072.23747069523},"targetPosition":{"x":18018.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa2e1c9b-428c-4bb0-9e75-ceb8c9043d4b","savedPayload":{"position":{"x":18018.64382962515,"y":31005.23747069523},"targetPosition":{"x":17955.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"4c543abc-7372-4701-bc58-107578d45c25","savedPayload":{"position":{"x":17623.394811792878,"y":32225.09670889175},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoin","config":"{ \n\"codeName\": \"fcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"a97d578c-6d7f-403c-8294-18aacf14abd8","savedPayload":{"position":{"x":17893.64382962515,"y":30953.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"442c3834-482e-4928-9255-8ac859ae012e","savedPayload":{"position":{"x":17905.64382962515,"y":30896.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"79754959-1219-4c4d-be63-22766158beb5","savedPayload":{"position":{"x":18106.64382962515,"y":30976.23747069523},"targetPosition":{"x":18069.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"1c3ae096-5024-43c3-abca-24498254e363","savedPayload":{"position":{"x":18112.64382962515,"y":30919.23747069523},"targetPosition":{"x":18126.64382962515,"y":30965.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"59db5bfd-e413-48a7-af63-237ad56adc82","savedPayload":{"position":{"x":18126.64382962515,"y":30965.23747069523},"targetPosition":{"x":18069.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"833c4e54-08f4-48ec-b90a-2767eb55f244","savedPayload":{"position":{"x":18069.64382962515,"y":31056.23747069523},"targetPosition":{"x":17996.64382962515,"y":30970.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"a8cf17b3-0ea7-4a14-8c76-f655344b58a3","savedPayload":{"position":{"x":17996.64382962515,"y":30970.23747069523},"targetPosition":{"x":17919.64382962515,"y":30948.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6ddedcbd-07cb-4928-91b3-348f47118391","savedPayload":{"position":{"x":17554.408027561767,"y":32114.989910750606},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FCoinJP","config":"{ \n\"codeName\": \"fcoinjp\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"4a8a9810-6df6-451a-ab26-22bd7e7be85a","savedPayload":{"position":{"x":17930.64382962515,"y":31129.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"138ab40c-18ca-4a11-9709-0baa040873e6","savedPayload":{"position":{"x":18007.64382962515,"y":31122.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"258cdf92-8ed0-4133-ae2a-b9f086f56a13","savedPayload":{"position":{"x":17897.64382962515,"y":30887.23747069523},"targetPosition":{"x":17903.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"537e8f0c-05ca-4403-bc96-da6c2f4678ae","savedPayload":{"position":{"x":17825.64382962515,"y":30842.23747069523},"targetPosition":{"x":17836.64382962515,"y":30926.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"62519e63-8f4e-4b72-a341-0a6eea01ac3f","savedPayload":{"position":{"x":17836.64382962515,"y":30926.23747069523},"targetPosition":{"x":17903.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"b4974cc1-f594-436b-8aa4-aff2733b8e3c","savedPayload":{"position":{"x":17903.64382962515,"y":30977.23747069523},"targetPosition":{"x":17873.64382962515,"y":31061.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d84b404f-75e2-4eb5-b34a-b45af8a57ca7","savedPayload":{"position":{"x":17873.64382962515,"y":31061.23747069523},"targetPosition":{"x":17942.64382962515,"y":31052.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"982627ea-df84-4ba9-9219-612fbe1e4276","savedPayload":{"position":{"x":17497.730285752426,"y":31998.069779982467},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"FTX","config":"{ \n\"codeName\": \"ftx\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"20c0a4f5-bdb9-46cc-af7e-2111964551e3","savedPayload":{"position":{"x":17886.64382962515,"y":30940.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"75c99a0b-d3c9-4073-9283-d33e539c36bb","savedPayload":{"position":{"x":17992.64382962515,"y":31061.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2e037470-549e-4aa8-bbe7-95cdeaef88ea","savedPayload":{"position":{"x":17964.64382962515,"y":31027.23747069523},"targetPosition":{"x":17970.64382962515,"y":31008.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"3b6f5b7b-9c61-4b71-b29a-ca1bc027e55f","savedPayload":{"position":{"x":17817.64382962515,"y":30943.23747069523},"targetPosition":{"x":17890.64382962515,"y":30978.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"a84010f0-04b5-4eab-a3a6-a5944b80a373","savedPayload":{"position":{"x":17890.64382962515,"y":30978.23747069523},"targetPosition":{"x":17970.64382962515,"y":31008.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5cdc51a3-6136-4e03-9e2c-26a752140d17","savedPayload":{"position":{"x":17970.64382962515,"y":31008.23747069523},"targetPosition":{"x":18010.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"55258a2b-3199-4070-beed-d34a8496870c","savedPayload":{"position":{"x":18010.64382962515,"y":30986.23747069523},"targetPosition":{"x":17960.64382962515,"y":31019.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0c0bcf5c-2774-423e-9fcf-c512b38dd06d","savedPayload":{"position":{"x":17454.026081066615,"y":31875.707098219504},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gate.io","config":"{ \n\"codeName\": \"gateio\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"71a15089-9d40-4726-9a41-37d406064164","savedPayload":{"position":{"x":17930.64382962515,"y":30993.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c025e976-c2c6-49de-81ec-48e2f737b412","savedPayload":{"position":{"x":17925.64382962515,"y":31053.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"876f964a-e12d-4438-87fb-a84be22f86d1","savedPayload":{"position":{"x":17914.64382962515,"y":30833.23747069523},"targetPosition":{"x":17827.64382962515,"y":30882.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"0c5d34c4-467f-4e98-bd39-1b2d9afb834e","savedPayload":{"position":{"x":17852.64382962515,"y":30831.23747069523},"targetPosition":{"x":17870.64382962515,"y":30847.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"89316d8c-893a-46ae-b147-948b4b8a5292","savedPayload":{"position":{"x":17870.64382962515,"y":30847.23747069523},"targetPosition":{"x":17827.64382962515,"y":30882.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a2a5de53-bd45-4904-8bae-0cf5ed66d2af","savedPayload":{"position":{"x":17827.64382962515,"y":30882.23747069523},"targetPosition":{"x":17800.64382962515,"y":30936.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"f6f4072d-8cf6-4e47-8b4e-a21cd553348a","savedPayload":{"position":{"x":17800.64382962515,"y":30936.23747069523},"targetPosition":{"x":17880.64382962515,"y":31031.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4028289-4cdb-4da0-90e6-5f93328b8e03","savedPayload":{"position":{"x":17423.807805345143,"y":31749.336456028108},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Gemini","config":"{ \n\"codeName\": \"gemini\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9eb15872-8d15-4086-9920-46909eb5f9e7","savedPayload":{"position":{"x":17951.64382962515,"y":30901.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"a84dcf06-57c6-47d7-97a0-9f03f3af8b34","savedPayload":{"position":{"x":18045.64382962515,"y":30891.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"5da1ba65-3839-4664-8105-2ccb11652767","savedPayload":{"position":{"x":18028.64382962515,"y":31112.23747069523},"targetPosition":{"x":17941.64382962515,"y":31044.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"337fe5e2-b9fd-40eb-9f42-44fc5057d981","savedPayload":{"position":{"x":17957.64382962515,"y":31129.23747069523},"targetPosition":{"x":17875.64382962515,"y":31086.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"17a3f4a3-8914-4995-afb0-7e8115791b17","savedPayload":{"position":{"x":17875.64382962515,"y":31086.23747069523},"targetPosition":{"x":17941.64382962515,"y":31044.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"32e4a3f1-40d8-421f-9634-7ab339858286","savedPayload":{"position":{"x":17941.64382962515,"y":31044.23747069523},"targetPosition":{"x":17877.64382962515,"y":30977.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"365f6865-e707-415d-a168-b67c66ca9553","savedPayload":{"position":{"x":17877.64382962515,"y":30977.23747069523},"targetPosition":{"x":17971.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"58bf8247-baef-4ea6-a483-7ed8f0ba5043","savedPayload":{"position":{"x":17407.429740242005,"y":31620.439433646203},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1632c520-fa79-442f-b33b-430cb1356de6","savedPayload":{"position":{"x":17809.64382962515,"y":31086.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"576d1666-dbd3-4914-9fe2-fa05bdf72eea","savedPayload":{"position":{"x":17840.64382962515,"y":31148.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"41317aae-08ce-48cf-a47b-c2d2cc3920ec","savedPayload":{"position":{"x":18096.64382962515,"y":30975.23747069523},"targetPosition":{"x":18026.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"23d7e4ba-8432-4214-bd94-0db5046e39cd","savedPayload":{"position":{"x":18039.64382962515,"y":31075.23747069523},"targetPosition":{"x":17981.64382962515,"y":31126.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ab200349-5ba5-44d2-ad5c-fa826303cfcd","savedPayload":{"position":{"x":17981.64382962515,"y":31126.23747069523},"targetPosition":{"x":18026.64382962515,"y":31066.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"a5f24785-5b2c-429b-a2e4-07063e2de904","savedPayload":{"position":{"x":18026.64382962515,"y":31066.23747069523},"targetPosition":{"x":17972.64382962515,"y":31093.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13f275ca-06a6-4a72-8b4d-a9c079b9cef4","savedPayload":{"position":{"x":17972.64382962515,"y":31093.23747069523},"targetPosition":{"x":17880.64382962515,"y":31069.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8384fa0b-854c-4c23-846e-a5da0179a738","savedPayload":{"position":{"x":17405.083903595932,"y":31490.527230809537},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"HitBTC","config":"{ \n\"codeName\": \"hitbtc2\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9a29cb9e-ee8d-4315-8532-eef82224b84a","savedPayload":{"position":{"x":17838.64382962515,"y":30922.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"badd79e7-1e21-4dc3-bfa7-8dfb4a6c6267","savedPayload":{"position":{"x":17920.64382962515,"y":30944.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"ffdda0b7-af50-4010-84da-2bc0d562af2b","savedPayload":{"position":{"x":17887.64382962515,"y":30982.23747069523},"targetPosition":{"x":17836.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"24816eed-adf7-453e-9b38-42ea4758dbaa","savedPayload":{"position":{"x":18021.64382962515,"y":30979.23747069523},"targetPosition":{"x":17931.64382962515,"y":30923.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"1dd16858-5641-4454-88a3-e5d7446e12a3","savedPayload":{"position":{"x":17931.64382962515,"y":30923.23747069523},"targetPosition":{"x":17836.64382962515,"y":31023.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"457d75ed-ad21-4ee5-b36b-88cdc444008e","savedPayload":{"position":{"x":17836.64382962515,"y":31023.23747069523},"targetPosition":{"x":17808.64382962515,"y":31039.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"b29ded7e-e2d5-4c7f-89af-b0816c32c743","savedPayload":{"position":{"x":17808.64382962515,"y":31039.23747069523},"targetPosition":{"x":17829.64382962515,"y":30949.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"09c634c2-5aba-49c5-80bc-4fd4175e7f0c","savedPayload":{"position":{"x":17416.79779819678,"y":31361.12294931652},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Pro","config":"{ \n\"codeName\": \"huobipro\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"86caa38c-5bdf-40e4-b27b-8d8b64319575","savedPayload":{"position":{"x":18071.64382962515,"y":31171.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"001225af-c715-4566-9502-f8f0ac1c4531","savedPayload":{"position":{"x":18040.64382962515,"y":31019.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"b4bf5ccb-b529-4500-a192-d9c3a0613389","savedPayload":{"position":{"x":18129.64382962515,"y":31073.23747069523},"targetPosition":{"x":18033.64382962515,"y":31090.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2e58c6d1-cfa7-4dc7-a322-e9356596ea1e","savedPayload":{"position":{"x":17976.64382962515,"y":31132.23747069523},"targetPosition":{"x":17953.64382962515,"y":31093.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae04ddf4-ae3e-4bdc-9393-41acc38ef818","savedPayload":{"position":{"x":17953.64382962515,"y":31093.23747069523},"targetPosition":{"x":18033.64382962515,"y":31090.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"2428e8ef-6a09-48fa-8ae4-ebfb28420be8","savedPayload":{"position":{"x":18033.64382962515,"y":31090.23747069523},"targetPosition":{"x":18085.64382962515,"y":31157.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"55c71c8b-f21f-4d16-ae93-e29362c39bf5","savedPayload":{"position":{"x":18085.64382962515,"y":31157.23747069523},"targetPosition":{"x":17996.64382962515,"y":31077.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"967c3914-a76d-4389-9c7e-9c258ae683bd","savedPayload":{"position":{"x":17442.43408934047,"y":31233.743736052187},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Huobi Russia","config":"{ \n\"codeName\": \"huobiru\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"9b7b32d6-a42e-44bb-8065-5aa32b1e844b","savedPayload":{"position":{"x":17980.64382962515,"y":31034.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8d74201c-33cd-4e12-8920-b08d0ef97572","savedPayload":{"position":{"x":17992.64382962515,"y":31105.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c6e289d7-074b-4837-96e3-687988886fcc","savedPayload":{"position":{"x":18078.64382962515,"y":30954.23747069523},"targetPosition":{"x":18008.64382962515,"y":31029.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d72f81ba-6b41-414d-9cf0-d5f9c0c25403","savedPayload":{"position":{"x":18026.64382962515,"y":31021.23747069523},"targetPosition":{"x":18083.64382962515,"y":31117.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"5354f66c-6e73-4fe5-80ca-2c25b761ef51","savedPayload":{"position":{"x":18083.64382962515,"y":31117.23747069523},"targetPosition":{"x":18008.64382962515,"y":31029.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"81f5adbb-054c-47f2-b019-52585f5d7417","savedPayload":{"position":{"x":18008.64382962515,"y":31029.23747069523},"targetPosition":{"x":18018.64382962515,"y":31009.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ecd8645b-4bb6-4641-a20f-cee51bf33f1a","savedPayload":{"position":{"x":18018.64382962515,"y":31009.23747069523},"targetPosition":{"x":17957.64382962515,"y":31088.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6f97bb5c-8d85-43ee-86a1-33e22cdfbb5e","savedPayload":{"position":{"x":17481.692214952825,"y":31109.882995828142},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KKEX","config":"{ \n\"codeName\": \"kkex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"daa4e07a-1cd8-4d92-8004-2eabfaa62f77","savedPayload":{"position":{"x":17924.64382962515,"y":31038.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"cb64951f-d984-4f51-a751-166a316084f3","savedPayload":{"position":{"x":17945.64382962515,"y":31156.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6915bf12-9271-47e2-8b49-924ae9f5c65f","savedPayload":{"position":{"x":17958.64382962515,"y":31297.23747069523},"targetPosition":{"x":17875.64382962515,"y":31252.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"ff53381f-c6dd-4d17-a477-11396f60663f","savedPayload":{"position":{"x":17805.64382962515,"y":31141.23747069523},"targetPosition":{"x":17861.64382962515,"y":31223.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ae05bfc4-6ac8-408c-a90b-263830b2a71e","savedPayload":{"position":{"x":17861.64382962515,"y":31223.23747069523},"targetPosition":{"x":17875.64382962515,"y":31252.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"61c85f1a-a2a6-45c9-bb1e-3c76110f5d1e","savedPayload":{"position":{"x":17875.64382962515,"y":31252.23747069523},"targetPosition":{"x":17911.64382962515,"y":31154.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"9fafb114-37d2-4d04-9c42-83d04ff62fc7","savedPayload":{"position":{"x":17911.64382962515,"y":31154.23747069523},"targetPosition":{"x":17987.64382962515,"y":31073.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"16ae95ce-796f-4f2b-942c-f98dcbf9cf4b","savedPayload":{"position":{"x":17534.11190940509,"y":30990.99288257655},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Kraken","config":"{ \n\"codeName\": \"kraken\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"747af60f-c8b9-4377-aa6c-172d4137ea23","savedPayload":{"position":{"x":17854.64382962515,"y":31008.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c75f7d97-9dc2-4d3e-89eb-f8a3d5f16368","savedPayload":{"position":{"x":17916.64382962515,"y":30872.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"0093e946-03f4-4aec-942d-c76aed12ab1a","savedPayload":{"position":{"x":17780.64382962515,"y":31091.23747069523},"targetPosition":{"x":17836.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"2a4235ac-e5ea-4484-bccd-f06c8a7275ec","savedPayload":{"position":{"x":17930.64382962515,"y":30869.23747069523},"targetPosition":{"x":17883.64382962515,"y":30953.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"737dec0a-23ab-4044-94ba-95c8bc50c0eb","savedPayload":{"position":{"x":17883.64382962515,"y":30953.23747069523},"targetPosition":{"x":17836.64382962515,"y":31011.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"457b045e-dae5-4f53-a8b7-cab4757e5286","savedPayload":{"position":{"x":17836.64382962515,"y":31011.23747069523},"targetPosition":{"x":17926.64382962515,"y":31005.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6eff12db-8e7c-402a-9e06-ae2618f506a0","savedPayload":{"position":{"x":17926.64382962515,"y":31005.23747069523},"targetPosition":{"x":17946.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"644efe9c-597a-4ddf-9e28-b33fb3b62d3e","savedPayload":{"position":{"x":17599.078599707587,"y":30878.467274173025},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"KuCoin","config":"{ \n\"codeName\": \"kucoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"01ca3037-4ed3-499e-ad6b-e14ca1d4a51f","savedPayload":{"position":{"x":17919.64382962515,"y":30949.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"8b3c4ce0-98b1-4d46-bd02-6cf44c3dd686","savedPayload":{"position":{"x":17998.64382962515,"y":30978.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d6c7c0ef-670d-4ed6-9246-6eb7d6bfc359","savedPayload":{"position":{"x":17927.64382962515,"y":30962.23747069523},"targetPosition":{"x":17953.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"e8c2c454-b246-4f63-b51b-74d9cbb01ac2","savedPayload":{"position":{"x":17927.64382962515,"y":30924.23747069523},"targetPosition":{"x":17912.64382962515,"y":30869.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"d2bb2603-3b52-443c-8923-86fefafc0b14","savedPayload":{"position":{"x":17912.64382962515,"y":30869.23747069523},"targetPosition":{"x":17953.64382962515,"y":30954.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fa83b0b9-1039-4406-907c-f809a5af40f5","savedPayload":{"position":{"x":17953.64382962515,"y":30954.23747069523},"targetPosition":{"x":17966.64382962515,"y":30962.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"471161d3-201e-40c6-b433-49643cf7e43b","savedPayload":{"position":{"x":17966.64382962515,"y":30962.23747069523},"targetPosition":{"x":17920.64382962515,"y":30924.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"d79bc720-68e1-4771-a66a-bcffa30639d3","savedPayload":{"position":{"x":17675.830610816145,"y":30773.625430492953},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"LBank","config":"{ \n\"codeName\": \"lbank\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"def3f9d0-f09e-4e09-8b6d-a4c322a4384b","savedPayload":{"position":{"x":17877.64382962515,"y":31024.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"53eac3c1-96d6-4cb1-b54d-f3f174eaf733","savedPayload":{"position":{"x":17764.64382962515,"y":31036.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"c6c00704-1357-4426-910e-8134d6f87017","savedPayload":{"position":{"x":18030.64382962515,"y":31212.23747069523},"targetPosition":{"x":17951.64382962515,"y":31172.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"13990604-2192-4be1-b21b-53cf2bafc002","savedPayload":{"position":{"x":17893.64382962515,"y":31189.23747069523},"targetPosition":{"x":17964.64382962515,"y":31122.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"ed2c483e-d412-406d-b6f3-cfb1112a3a05","savedPayload":{"position":{"x":17964.64382962515,"y":31122.23747069523},"targetPosition":{"x":17951.64382962515,"y":31172.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6033b63c-c7fe-4a5d-8cf6-82128e2cfb41","savedPayload":{"position":{"x":17951.64382962515,"y":31172.23747069523},"targetPosition":{"x":17891.64382962515,"y":31096.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"20ece5c4-dbfa-4f4a-a9ee-8c8d9c38943b","savedPayload":{"position":{"x":17891.64382962515,"y":31096.23747069523},"targetPosition":{"x":17838.64382962515,"y":31032.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"cb2558d6-dab0-4f35-b83f-7cfc161b3d4f","savedPayload":{"position":{"x":17763.468095575536,"y":30677.69652629567},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Mercado Bitcoin","config":"{ \n\"codeName\": \"mercado\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"83ab2c39-e844-496f-bebb-7b8607428902","savedPayload":{"position":{"x":17849.64382962515,"y":31081.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"d69e722e-c71a-462a-8bbd-d3482d0eab21","savedPayload":{"position":{"x":17771.64382962515,"y":30887.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"18438709-83cf-49a3-96b8-888ab5adbcc5","savedPayload":{"position":{"x":17937.64382962515,"y":31080.23747069523},"targetPosition":{"x":17866.64382962515,"y":31013.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"6b9d4ed4-af81-462a-aace-fac0afd4687a","savedPayload":{"position":{"x":17787.64382962515,"y":30841.23747069523},"targetPosition":{"x":17873.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"802a4c53-8617-4257-95a5-45bfaa60ad0e","savedPayload":{"position":{"x":17873.64382962515,"y":30935.23747069523},"targetPosition":{"x":17866.64382962515,"y":31013.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"87936a4a-aac5-4aca-8f3e-2051611932c4","savedPayload":{"position":{"x":17866.64382962515,"y":31013.23747069523},"targetPosition":{"x":17829.64382962515,"y":30919.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"48f3a793-bb97-447b-8f1a-1d6965219747","savedPayload":{"position":{"x":17829.64382962515,"y":30919.23747069523},"targetPosition":{"x":17849.64382962515,"y":30986.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5002072e-145c-4aeb-a611-3e0e4c60ee5d","savedPayload":{"position":{"x":17860.963584604677,"y":30591.805240274254},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKCoin","config":"{ \n\"codeName\": \"okcoin\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"1e4dd5c8-0545-4698-8695-c985880243a3","savedPayload":{"position":{"x":17921.64382962515,"y":31043.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"0e188cae-9764-4963-a78b-e5d7ef272522","savedPayload":{"position":{"x":18005.64382962515,"y":30891.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"6d82bfd7-b4e1-4f93-a0f8-18f62cee944e","savedPayload":{"position":{"x":18047.64382962515,"y":30877.23747069523},"targetPosition":{"x":17963.64382962515,"y":30898.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"d815409c-1dd4-4e89-b844-5b96104509b4","savedPayload":{"position":{"x":17958.64382962515,"y":30988.23747069523},"targetPosition":{"x":17945.64382962515,"y":30961.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"238b9d2c-e2c0-4a77-945e-8e28604c0a2d","savedPayload":{"position":{"x":17945.64382962515,"y":30961.23747069523},"targetPosition":{"x":17963.64382962515,"y":30898.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8416c29a-5d73-4b2a-9463-511f400deafb","savedPayload":{"position":{"x":17963.64382962515,"y":30898.23747069523},"targetPosition":{"x":18047.64382962515,"y":30885.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"04abf32b-084e-4784-aa84-8c5612d3b7b9","savedPayload":{"position":{"x":18047.64382962515,"y":30885.23747069523},"targetPosition":{"x":17967.64382962515,"y":30969.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"1f860b4b-2893-4a51-8649-19c47d494a37","savedPayload":{"position":{"x":17967.17403243568,"y":30516.958569226157},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"OKEX","config":"{ \n\"codeName\": \"okex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"7f618566-3d10-4c3c-90b2-7541a5146eeb","savedPayload":{"position":{"x":17770.64382962515,"y":31094.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"21205576-5d12-452c-814f-eb56182162ae","savedPayload":{"position":{"x":17794.64382962515,"y":31173.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"46456247-ae9c-41ea-8395-a5e4a78007d4","savedPayload":{"position":{"x":17724.64382962515,"y":31147.23747069523},"targetPosition":{"x":17795.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"706bf601-eaad-48bd-b0a7-8dad59066171","savedPayload":{"position":{"x":17715.64382962515,"y":31182.23747069523},"targetPosition":{"x":17706.64382962515,"y":31162.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"f9c7071c-2e5b-4c90-b482-dfc7ee001244","savedPayload":{"position":{"x":17706.64382962515,"y":31162.23747069523},"targetPosition":{"x":17795.64382962515,"y":31083.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e87e1e10-3404-48b9-8629-5df92ffa1979","savedPayload":{"position":{"x":17795.64382962515,"y":31083.23747069523},"targetPosition":{"x":17789.64382962515,"y":31181.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"08e8fd6a-6b23-4d65-8b8e-d966f845c07f","savedPayload":{"position":{"x":17789.64382962515,"y":31181.23747069523},"targetPosition":{"x":17847.64382962515,"y":31102.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"aa0edec0-8b27-4f94-abce-1e437ce5aba6","savedPayload":{"position":{"x":18080.854218676865,"y":30454.034021936455},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"RightBTC","config":"{ \n\"codeName\": \"rightbtc\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"ade372e9-5070-4fa9-843e-57732c4106c3","savedPayload":{"position":{"x":17999.64382962515,"y":30964.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"b63d440e-4501-475c-b8a6-2b9a144e32a1","savedPayload":{"position":{"x":17984.64382962515,"y":30901.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"81d77477-4f2e-43c0-b284-dde54f91c37f","savedPayload":{"position":{"x":17864.64382962515,"y":31036.23747069523},"targetPosition":{"x":17861.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"9ce3cc34-1ba4-4155-96a5-c946b1bcc5ab","savedPayload":{"position":{"x":17819.64382962515,"y":31127.23747069523},"targetPosition":{"x":17810.64382962515,"y":31080.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"c7df4af7-37c1-403d-ada1-b6a527821bdd","savedPayload":{"position":{"x":17810.64382962515,"y":31080.23747069523},"targetPosition":{"x":17861.64382962515,"y":31043.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"6de19501-5ce7-4944-b9dd-25b149acbb38","savedPayload":{"position":{"x":17861.64382962515,"y":31043.23747069523},"targetPosition":{"x":17946.64382962515,"y":30988.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa87ace4-a976-401c-93f9-24a498261742","savedPayload":{"position":{"x":17946.64382962515,"y":30988.23747069523},"targetPosition":{"x":17991.64382962515,"y":30935.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c20cd9e1-52a0-4d17-b90c-e9d5b63315ce","savedPayload":{"position":{"x":18200.67134708334,"y":30403.76933118965},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"STEX","config":"{ \n\"codeName\": \"stex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f1d65161-4922-4a1e-ac98-df1a842347a7","savedPayload":{"position":{"x":17872.64382962515,"y":31001.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"c313b2c6-6154-4a9a-b826-fd99cc500cd9","savedPayload":{"position":{"x":17888.64382962515,"y":31186.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"d0a1259b-1c37-4d39-836e-3c434c3b3687","savedPayload":{"position":{"x":17778.64382962515,"y":31076.23747069523},"targetPosition":{"x":17858.64382962515,"y":31091.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"4a1e5627-459c-4dec-be13-c20d4a9ea58f","savedPayload":{"position":{"x":17841.64382962515,"y":31179.23747069523},"targetPosition":{"x":17795.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"6981eb0d-0f0e-4f8e-9781-4a03e22e93fd","savedPayload":{"position":{"x":17795.64382962515,"y":31105.23747069523},"targetPosition":{"x":17858.64382962515,"y":31091.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7704478a-9717-43a8-bd2e-88daa6f84bd0","savedPayload":{"position":{"x":17858.64382962515,"y":31091.23747069523},"targetPosition":{"x":17941.64382962515,"y":31173.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"262aad86-f430-49ea-a636-e8bd816a9636","savedPayload":{"position":{"x":17941.64382962515,"y":31173.23747069523},"targetPosition":{"x":17892.64382962515,"y":31092.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"0ea23137-3c65-4de1-9772-6ac1b65196e8","savedPayload":{"position":{"x":18325.220671374373,"y":30366.753804527314},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TideBit","config":"{ \n\"codeName\": \"tidebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c92318bd-8b2d-489b-b8e8-cf30fb63286e","savedPayload":{"position":{"x":17981.64382962515,"y":31021.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"83bca3ec-fc1c-435c-b5fe-b1cf92463fd1","savedPayload":{"position":{"x":18051.64382962515,"y":31072.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"2f3ee9b2-cd41-458c-84da-edac3155028a","savedPayload":{"position":{"x":18075.64382962515,"y":31059.23747069523},"targetPosition":{"x":17987.64382962515,"y":31047.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"009ae4b6-adbc-4900-9fc0-f18936eeed9b","savedPayload":{"position":{"x":18030.64382962515,"y":31058.23747069523},"targetPosition":{"x":18009.64382962515,"y":31028.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"3ee88180-fe10-41df-8251-b1ed0a526e7a","savedPayload":{"position":{"x":18009.64382962515,"y":31028.23747069523},"targetPosition":{"x":17987.64382962515,"y":31047.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"bb88e6e8-a99a-4c4e-9ca5-ffed49aa8b54","savedPayload":{"position":{"x":17987.64382962515,"y":31047.23747069523},"targetPosition":{"x":17925.64382962515,"y":31135.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"13a4a95e-4333-4455-9f7c-90bc839d174a","savedPayload":{"position":{"x":17925.64382962515,"y":31135.23747069523},"targetPosition":{"x":17978.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5563c310-701a-4c1e-8155-87c08c927ce3","savedPayload":{"position":{"x":18453.041964599197,"y":30343.421415155935},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TimeX","config":"{ \n\"codeName\": \"timex\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"5c004b5f-eec4-414f-8d01-d9b3fddeee9e","savedPayload":{"position":{"x":17892.64382962515,"y":30973.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"59a33add-d0e9-4ae1-8a01-f1e0ed09cb61","savedPayload":{"position":{"x":17911.64382962515,"y":30878.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"a4189ba1-d1d4-4ff8-91dd-a8696ca493e3","savedPayload":{"position":{"x":17953.64382962515,"y":30880.23747069523},"targetPosition":{"x":17924.64382962515,"y":30871.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"3d34eb9d-e7cb-42fe-8785-c327b2bbc529","savedPayload":{"position":{"x":17839.64382962515,"y":30875.23747069523},"targetPosition":{"x":17930.64382962515,"y":30877.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"773de01f-0999-4a59-91f0-642148cd58d0","savedPayload":{"position":{"x":17930.64382962515,"y":30877.23747069523},"targetPosition":{"x":17924.64382962515,"y":30871.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"fe33a596-4f98-4843-a5b1-26e7e0fcf1c8","savedPayload":{"position":{"x":17924.64382962515,"y":30871.23747069523},"targetPosition":{"x":18018.64382962515,"y":30832.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"d078b9a3-cdc6-458e-a511-dc4f5bef38ba","savedPayload":{"position":{"x":18018.64382962515,"y":30832.23747069523},"targetPosition":{"x":17949.64382962515,"y":30914.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"27d69fa7-b561-4986-8c0d-1b374e7e1bf1","savedPayload":{"position":{"x":18582.63663896287,"y":30334.045714007894},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"TOP.Q","config":"{ \n\"codeName\": \"topq\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"eafef6a3-eed2-470e-a15c-aa4c10001cd2","savedPayload":{"position":{"x":17818.64382962515,"y":31115.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"2d5eb813-ceb6-40cd-8682-7205596bb8b5","savedPayload":{"position":{"x":17759.64382962515,"y":31188.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"61f7832c-c1f0-40bc-b1f2-ba947c58309d","savedPayload":{"position":{"x":17741.64382962515,"y":31288.23747069523},"targetPosition":{"x":17788.64382962515,"y":31228.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"63b973da-30a7-467a-b954-c57537aab18d","savedPayload":{"position":{"x":17677.64382962515,"y":31206.23747069523},"targetPosition":{"x":17756.64382962515,"y":31146.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"722dcf44-de3f-4d1a-8655-80561e1e4d55","savedPayload":{"position":{"x":17756.64382962515,"y":31146.23747069523},"targetPosition":{"x":17788.64382962515,"y":31228.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"45d5e04a-4a53-4f32-b4c0-d882456cb263","savedPayload":{"position":{"x":17788.64382962515,"y":31228.23747069523},"targetPosition":{"x":17806.64382962515,"y":31163.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c66e8dfc-4847-4180-b82c-36458f9b405d","savedPayload":{"position":{"x":17806.64382962515,"y":31163.23747069523},"targetPosition":{"x":17847.64382962515,"y":31105.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8fdf13d8-e8d2-4ef4-8b34-f492a25d753a","savedPayload":{"position":{"x":18712.485315398026,"y":30338.736622606855},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"Upbit","config":"{ \n\"codeName\": \"upbit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"f456fec2-cee6-4f0c-b865-1188088879c9","savedPayload":{"position":{"x":17919.64382962515,"y":30973.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"947c1ca0-bff9-4372-b153-40054e29b705","savedPayload":{"position":{"x":17921.64382962515,"y":31014.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"34ffbe12-5a26-446a-8bf6-7395c0370ba2","savedPayload":{"position":{"x":17874.64382962515,"y":30900.23747069523},"targetPosition":{"x":17945.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"8f00f19d-74a8-48d8-b951-79f35e87b110","savedPayload":{"position":{"x":17906.64382962515,"y":30902.23747069523},"targetPosition":{"x":17896.64382962515,"y":30896.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"64e1bede-aabf-4831-83a6-fe1cea435613","savedPayload":{"position":{"x":17896.64382962515,"y":30896.23747069523},"targetPosition":{"x":17945.64382962515,"y":30971.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"7c80b956-f2ca-4a6f-a661-f17546288d3e","savedPayload":{"position":{"x":17945.64382962515,"y":30971.23747069523},"targetPosition":{"x":18027.64382962515,"y":31048.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e3686b02-4ecc-4dcb-a311-b7ef542a3c37","savedPayload":{"position":{"x":18027.64382962515,"y":31048.23747069523},"targetPosition":{"x":17991.64382962515,"y":30980.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"74e57ecd-3394-42b4-b2c4-6f216f7e41db","savedPayload":{"position":{"x":18841.065636895226,"y":30357.439144338445},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"WhiteBit","config":"{ \n\"codeName\": \"whitebit\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"c16eae45-a568-4b2e-b064-4431bdf34c24","savedPayload":{"position":{"x":17767.64382962515,"y":30899.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"dfdf793f-4ba6-4215-a325-323c0f223553","savedPayload":{"position":{"x":17920.64382962515,"y":31004.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"fd749d13-dbac-493f-9af6-c521eddf909f","savedPayload":{"position":{"x":17815.64382962515,"y":30973.23747069523},"targetPosition":{"x":17720.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"79f7d2d0-77a5-4f38-ac68-fd11f18e5e6b","savedPayload":{"position":{"x":17761.64382962515,"y":31182.23747069523},"targetPosition":{"x":17680.64382962515,"y":31153.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"fd0506f4-58b7-431e-bc9d-69bce63c3379","savedPayload":{"position":{"x":17680.64382962515,"y":31153.23747069523},"targetPosition":{"x":17720.64382962515,"y":31056.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"47e8a4b1-9a6c-4555-a881-f7524183d72e","savedPayload":{"position":{"x":17720.64382962515,"y":31056.23747069523},"targetPosition":{"x":17817.64382962515,"y":31010.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"7fa08b91-55ab-477d-a097-88ea7f25fb76","savedPayload":{"position":{"x":17817.64382962515,"y":31010.23747069523},"targetPosition":{"x":17834.64382962515,"y":30950.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"467ece1e-d1d0-4a11-ae7a-d0e22cd4eba5","savedPayload":{"position":{"x":18966.87011674703,"y":30389.934009235236},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchange","name":"ZB","config":"{ \n\"codeName\": \"zb\"\n}","project":"Superalgos","exchangeAssets":{"type":"Exchange Assets","name":"New Exchange Assets","config":"{ \n\"addMissingAssetsFilter\": { \"quotedAsset\": \"USDT\"} \n}","project":"Superalgos","assets":[],"id":"db206cbd-a587-4e8e-acbe-6581ad3b5cc4","savedPayload":{"position":{"x":17855.64382962515,"y":31027.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":2,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeMarkets":{"type":"Exchange Markets","name":"New Exchange Markets","project":"Superalgos","markets":[],"id":"1dd658c5-7755-44b7-85f0-9bcd787762a0","savedPayload":{"position":{"x":17789.64382962515,"y":31044.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"exchangeAccounts":{"type":"Exchange Accounts","name":"New Exchange Accounts","project":"Superalgos","userAccounts":[{"type":"User Account","name":"New User Account","project":"Superalgos","userAssets":{"type":"User Assets","name":"New User Assets","project":"Superalgos","assets":[],"id":"0de82bbe-7909-4b65-b304-f59b41f618ae","savedPayload":{"position":{"x":17830.64382962515,"y":30696.23747069523},"targetPosition":{"x":17846.64382962515,"y":30793.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"userKeys":{"type":"User Keys","name":"New User Keys","project":"Superalgos","keys":[{"type":"Exchange Account Key","name":"New Exchange Account Key","config":"{ \n\"codeName\": \"Paste your exchange API Key\",\n\"secret\": \"Paste your exchange API secret key\"\n}","project":"Superalgos","id":"c89819d0-8880-4b36-a9b3-0b284d266e3b","savedPayload":{"position":{"x":17891.64382962515,"y":30748.23747069523},"targetPosition":{"x":17865.64382962515,"y":30772.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{}}}],"id":"7a55f503-17fa-45c4-880b-1a9a11a0a555","savedPayload":{"position":{"x":17865.64382962515,"y":30772.23747069523},"targetPosition":{"x":17846.64382962515,"y":30793.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e640fca2-8bab-45ff-9a47-8e7b9650c277","savedPayload":{"position":{"x":17846.64382962515,"y":30793.23747069523},"targetPosition":{"x":17909.64382962515,"y":30886.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"421a99cd-3d9a-46a5-8654-08d6336e75be","savedPayload":{"position":{"x":17909.64382962515,"y":30886.23747069523},"targetPosition":{"x":17861.64382962515,"y":30951.23747069523},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":1,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"07df07e8-39a8-4fbc-a0c8-150f20b6ac59","savedPayload":{"position":{"x":19088.423812451314,"y":30435.840244716648},"targetPosition":{"x":18604.301618063546,"y":31533.850126685462},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"51f64e29-e3ab-4683-a5de-f397fbf94260","savedPayload":{"position":{"x":18603.301618063546,"y":31534.850126685462},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":5,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Crypto Exchanges","name":"Testing Queue","project":"Superalgos","exchanges":[],"id":"895ce4b1-4890-4216-89ba-a012181d2546","savedPayload":{"position":{"x":18753.301618063546,"y":30755.427263279467},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"signalsProviders":[],"id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d","savedPayload":{"position":{"x":18903.301618063546,"y":31015.2348844148},"targetPosition":{"x":18903.301618063546,"y":31015.2348844148},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":""}}},{"type":"Charting Space","name":"New Charting Space","project":"Superalgos","viewport":{"type":"Viewport","name":"New Viewport","config":"{\"zoom\":\"0.00\"}","project":"Superalgos","id":"01713f1d-91b8-44f9-9c5d-a0c12fd09037","savedPayload":{"position":{"x":19200.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{},"frame":{"position":{"x":245.62500000000045,"y":440.12500000000006}}}},"projectDashboards":[{"type":"Project Dashboards","name":"Superalgos","project":"Superalgos","dashboards":[{"type":"Dashboard","name":"Testing Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-01-01T00:00:00.000Z\",\n \"toDate\": \"2021-01-23T23:59:59.999Z\"\n}","project":"Superalgos","id":"691e2b6e-6b13-4a94-a8cd-15bbad6e8d2b","savedPayload":{"position":{"x":18483.434665834,"y":25740.977644897117},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 3744.3087,\n \"maxValue\": 42369.5\n}","project":"Superalgos","id":"d1c91955-e558-4ffe-a349-895405dd7475","savedPayload":{"position":{"x":18378.45195066214,"y":25792.749390696466},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\"value\":\"24-hs\"}","project":"Superalgos","id":"69064a57-bfa3-4a7a-a597-55887057befb","savedPayload":{"position":{"x":18261.64837946537,"y":25800.405101221888},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"Indicators","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"550e7d96-2b55-4cb5-91d5-6fbceb32cbb8","savedPayload":{"position":{"x":18000.806237131383,"y":26622.58688508041},"targetPosition":{"x":18000.806237131383,"y":26322.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}}],"layerFolders":[],"id":"a9026e9d-f9c2-4509-9a75-862421b5c70b","savedPayload":{"position":{"x":18000.806237131383,"y":26322.58688508041},"targetPosition":{"x":18000.806237131383,"y":26022.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"ea7115b6-1324-43dc-8fa2-90c12c2c2c48","savedPayload":{"position":{"x":17590.99861599605,"y":26432.394506215744},"targetPosition":{"x":17740.99861599605,"y":26172.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d16e7e1-8676-4041-a1b1-0172e023558a","savedPayload":{"position":{"x":17440.99861599605,"y":26172.58688508041},"targetPosition":{"x":17740.99861599605,"y":26172.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"b7fed612-b218-4378-bb3f-6c90fb947449","savedPayload":{"position":{"x":17740.99861599605,"y":26172.58688508041},"targetPosition":{"x":18000.806237131383,"y":26022.58688508041},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"aa6b9a8f-d5f4-4f60-b3fa-bdf957806bfb","savedPayload":{"position":{"x":18000.806237131383,"y":26022.58688508041},"targetPosition":{"x":18150.806237131383,"y":25762.779263945078},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"6a4b0ce0-7e88-4fe3-b9b5-2116d81b2da0","savedPayload":{"position":{"x":18150.806237131383,"y":25762.779263945078},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fbbb590b-c94d-4625-94e2-bc4bfa2ab6f9","savedPayload":{"position":{"x":17117.615314676776,"y":27603.533941128822},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"a01b42b0-ea87-47ab-b0e9-52d4b10cb631"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab219d3d-1f44-4448-b5f9-f9f6ace6caea","savedPayload":{"position":{"x":17051.16747388602,"y":27764.15503654623},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"559a20a7-6697-4245-9d6c-ad7c0e31ff84"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"7dd6f9d6-3840-4a95-a9c9-9445a1335868","savedPayload":{"position":{"x":16933.846232243683,"y":27892.241373813282},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"24fab05f-ff78-4cca-af61-d4d0bb2f2960"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371bfe04-1b2d-4d60-ae70-03a2f7522466","savedPayload":{"position":{"x":16779.824555577114,"y":27972.466666709206},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"7c580919-08ce-4aff-9e84-888fdf07caec"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f1dea1ef-69f3-4b64-8586-ec43aa281cde","savedPayload":{"position":{"x":16607.980005705944,"y":27995.20904027392},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"389797d4-8456-4258-9adf-246a6ba69016"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eca94344-450b-4dc9-ad80-8e202b6e0517","savedPayload":{"position":{"x":16468.146686869968,"y":28016.33671006015},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"323c7b0b-42b1-4ff0-9d4b-36c2fd605caa"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4c54659-0b38-4faf-9827-47976eb9cca7","savedPayload":{"position":{"x":16286.534133073324,"y":27862.805158861436},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"63594fc6-3b89-4507-bca8-2d43ef618cbe"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"e82d97df-5b25-4967-b2b4-da065c5d3ad9","savedPayload":{"position":{"x":16186.118842172375,"y":27726.349378357005},"targetPosition":{"x":16629.455267522357,"y":27495.510435539556},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"73bb3f9e-b112-4e5a-bce9-6d4bec41cc6c"}}}],"layerFolders":[],"id":"851d853d-e2d7-4138-b5fd-563f1f844f64","savedPayload":{"position":{"x":16629.455267522357,"y":27495.510435539556},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"dc84698a-bce4-4979-9aca-80661b054191","savedPayload":{"position":{"x":16413.05839477738,"y":27900.48601747122},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"515f5fd6-d860-44d4-b5d6-a19acd9c5c86"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d3456e5b-0438-4273-a3ce-6b1d60573c33","savedPayload":{"position":{"x":15940.04282322282,"y":27710.982017672217},"targetPosition":{"x":16372.806838862034,"y":27461.836330732353},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"556e97e8-eba3-419d-869d-950cc99371da"}}}],"layerFolders":[],"id":"6ad8b449-785f-40cc-afc0-19c68b508c17","savedPayload":{"position":{"x":16372.806838862034,"y":27461.836330732353},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"4b8d055f-0c36-40a6-af78-5faf9b34b72c","savedPayload":{"position":{"x":16011.911411221576,"y":27821.709717793714},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"d33abc39-702b-4d7a-8435-43d90e0f2c3a"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac24a200-397f-4d7c-9916-581328c74f22","savedPayload":{"position":{"x":15678.683136179856,"y":27381.4342703589},"targetPosition":{"x":16167.428268555628,"y":27304.34657839513},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"d681fd5f-64af-4f39-9f6d-a767bef7692f"}}}],"layerFolders":[],"id":"acf27818-08f1-4c0d-9cc9-30c38ba892fb","savedPayload":{"position":{"x":16167.428268555628,"y":27304.34657839513},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b9eeeeb3-43db-4d4f-9f28-f42e947494f9","savedPayload":{"position":{"x":15829.8024827204,"y":27504.536838373795},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"b0961496-1af9-48cd-bbeb-ac5973192e78"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"eda9462a-9688-42cf-ae97-b3dfd02c718c","savedPayload":{"position":{"x":15609.804663880679,"y":27268.796716857654},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"0c9cf78d-ce6e-4318-811d-e748ca72845d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"1481d280-6112-4d0d-8a48-3fe4e65efc9d","savedPayload":{"position":{"x":15542.751172927,"y":26994.51154740736},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"e298787f-b7f2-4334-931e-38b9441e43f9"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2f579332-aa55-4e51-bbf4-370614838fd3","savedPayload":{"position":{"x":15731.678465146957,"y":26701.21391555524},"targetPosition":{"x":16068.487948353533,"y":27065.178022212927},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"4719b69d-b23e-4037-8c0a-b641fd8ab14c"}}}],"layerFolders":[],"id":"5b4e1c43-9fb7-439f-9ca9-e600bd41718d","savedPayload":{"position":{"x":16068.487948353533,"y":27065.178022212927},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be00b86a-5b53-4dbd-ab79-7d135115a05e","savedPayload":{"position":{"x":15729.681254722265,"y":27141.496363567436},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"90834a1b-cc7e-48a9-be5c-0e30380af4bd"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3870b052-156c-4f10-9658-3fe3df4baf10","savedPayload":{"position":{"x":15655.766921038878,"y":26926.520781829942},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"e2112d60-5fc2-4e67-befe-d4fbd6c1de77"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"5fa754c9-ffc3-499c-b566-0031b276cb73","savedPayload":{"position":{"x":15602.003963464067,"y":26726.16283946371},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"e734b6be-ba40-468c-a94f-1153dc85e00c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"off\"\n}","project":"Superalgos","id":"15ec260c-02f5-46e0-853b-6e751175dac7","savedPayload":{"position":{"x":15694.595933594896,"y":26519.078790508484},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"9a973229-4d9d-45af-b5aa-64906a915f6e"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"be57de60-d843-4bc8-bcb8-d8be27ceffbb","savedPayload":{"position":{"x":15860.599521408476,"y":26370.959361875106},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"56517fe9-64da-4404-83f3-005106bc1c0a"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"407c7816-701b-43bf-92d8-cc728af78f0e","savedPayload":{"position":{"x":16074.514663407172,"y":26309.4257023683},"targetPosition":{"x":16102.435022890473,"y":26808.60560739891},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"d00c76e7-4be0-4518-9892-a0f6df943951"}}}],"layerFolders":[],"id":"ac1ed18a-243b-4211-bb24-83bbfc20cd0a","savedPayload":{"position":{"x":16102.435022890473,"y":26808.60560739891},"targetPosition":{"x":16563.94253388532,"y":27000.12691029475},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"41428787-ca89-4ab9-a5cc-29e66e7c486d","savedPayload":{"position":{"x":16563.94253388532,"y":27000.12691029475},"targetPosition":{"x":16959.887378913278,"y":26696.345955873618},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"153096ea-a48c-4ed5-9f8e-49eafa7a779c","savedPayload":{"position":{"x":16959.887378913278,"y":26696.345955873618},"targetPosition":{"x":17356.087169245202,"y":26392.358194020195},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"918bdf6d-3cfe-4c8b-894d-320cc72aef70","savedPayload":{"position":{"x":17356.087169245202,"y":26392.358194020195},"targetPosition":{"x":17752.58716757543,"y":26088.09403049708},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"f0cc2b79-bae6-4441-a456-9fda5962a74f","savedPayload":{"position":{"x":18062.80023504401,"y":25685.600071512363},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"49761e84-d6c2-4c25-9604-fb2ddf93e510","savedPayload":{"position":{"x":16656.868785422477,"y":26432.858992462687},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"a0c29c57-0a20-4084-9697-142300f62f9c"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"622a88bb-151c-48ef-bb99-e093498bf002","savedPayload":{"position":{"x":16532.079378960796,"y":26407.941535439437},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"aa0fe882-89a8-4811-8988-c589554afe9d"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fba6a9fb-5e9a-46dd-aa2b-33950f0ec9f1","savedPayload":{"position":{"x":16422.17772780151,"y":26345.322337891994},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"bbc65054-b22b-4cbb-816b-529672e2f498"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ec0d56a-b497-4d90-9157-094c08930962","savedPayload":{"position":{"x":16337.350686782229,"y":26251.937657405022},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"776a3ece-8255-4e80-b60f-85bb818b561f"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5db72b24-ad72-49dd-8a32-1256fb25d04a","savedPayload":{"position":{"x":16285.989038785094,"y":26136.930218774854},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"7593aaf9-0505-4b58-9920-235340ff2d2f"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"cbdfc3db-d5dd-476c-bf02-cf86d8a01300","savedPayload":{"position":{"x":16272.745363533515,"y":26011.773677977748},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"3e2e6105-f41f-42e2-bce5-74ebb3b81cbd"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"105a157c-b33a-40d0-9711-19526b04bfda","savedPayload":{"position":{"x":16299.015550574797,"y":25888.784732962406},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"faab4399-898b-4393-8c27-fa2f3109c60a"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ab8b1fdc-4319-4b37-ae29-333912412215","savedPayload":{"position":{"x":16361.786293229427,"y":25778.482294029163},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"9ff0f035-ca7f-4e65-a82c-186fa7f09157"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"051bd185-3255-41a5-bf62-ea8b27b32ddf","savedPayload":{"position":{"x":16480.783502595135,"y":25721.83855865352},"targetPosition":{"x":16674.50340983706,"y":26032.473650601696},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"04210a59-070a-45f1-a2a0-cf50bd4879f7"}}}],"layerFolders":[],"id":"838dab4e-c0bf-47f3-ac6a-8f815e5e666b","savedPayload":{"position":{"x":16674.50340983706,"y":26032.473650601696},"targetPosition":{"x":17060.504725681127,"y":25928.810868229375},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"74e5c728-fd06-4e79-8ec1-32ab2720adf5","savedPayload":{"position":{"x":17060.504725681127,"y":25928.810868229375},"targetPosition":{"x":17476.621526107163,"y":25817.204586634994},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8a7bce21-b09a-41e3-b9af-87f1939e9136","savedPayload":{"position":{"x":17183.249075924137,"y":26042.417976975546},"targetPosition":{"x":17666.14324924388,"y":25913.066804430764},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"a514d9bb-8862-4c81-b82e-dbde66abeb77","savedPayload":{"position":{"x":18011.02848924466,"y":25580.617356340503},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 0,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"17c8f568-4716-4a19-a607-689b78a83ef9","savedPayload":{"position":{"x":15863.39648009967,"y":25920.19809968253},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"73dff61a-7b05-4ca6-b963-99d6c578e9ba"}}},{"type":"Layer","name":"Strategies","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"86978570-76c1-4780-a91d-4e72e88ef817","savedPayload":{"position":{"x":15705.823183600161,"y":25714.050844388883},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"a9c454c8-9075-4dcf-bfe9-ebd0c1658049"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"653e6b00-bda3-4662-a2bd-934212e884d1","savedPayload":{"position":{"x":15327.86442305616,"y":25820.329298596927},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"cad1eecc-e897-4086-b42c-fcfd843c04cc"}}},{"type":"Layer","name":"Market Sell Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2887f930-5d79-42ff-ab1d-7d5cdc6b47da","savedPayload":{"position":{"x":15180.506269267476,"y":25548.319695716105},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"fdf22e85-7071-4847-bdba-e3fb43a616ed"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"3040a2f6-0b1c-4ed3-a816-39c916465c9a","savedPayload":{"position":{"x":15221.387997903394,"y":25243.251366030032},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"d2b1ab31-d8a1-422b-a717-33ee7df9b07b"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a59ef70f-534f-410b-99ef-3a700d2ca82a","savedPayload":{"position":{"x":15398.72702979423,"y":25036.45705462772},"targetPosition":{"x":15672.454225865862,"y":25457.66729056814},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"3b5a12db-b969-4400-8b9d-afb9b7b81642"}}}],"layerFolders":[],"id":"334a2964-17df-4237-a302-962416655896","savedPayload":{"position":{"x":15672.454225865862,"y":25457.66729056814},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"a6b1a2c5-ca70-42b9-932f-2ff00aff2524","savedPayload":{"position":{"x":15292.017678857432,"y":25360.154463716302},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"9fc29be1-9393-4933-95d3-bebddd73c05e"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"663ddaf7-784f-4baa-8f69-3ed0ef5cd685","savedPayload":{"position":{"x":15298.823311983959,"y":25050.998457959326},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"b555388f-db93-4db1-91be-7772550afa70"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a4be770-082c-4d0f-a747-0b74d792e76f","savedPayload":{"position":{"x":15476.277795953174,"y":24812.240105588095},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"41953904-e48c-4176-bf0f-09d133bc444c"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"efb9d388-a679-49b2-b792-1b8258a489d6","savedPayload":{"position":{"x":15784.125039599678,"y":24724.90131904347},"targetPosition":{"x":15771.52653783795,"y":25218.00065188687},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"47b4553c-7f2e-438c-9f4b-9ba30e943a6c"}}}],"layerFolders":[],"id":"eea75e9a-a735-4db8-9eea-cf2c4e4119e3","savedPayload":{"position":{"x":15771.52653783795,"y":25218.00065188687},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb0ea641-23a7-48d0-a70d-f3314722f129","savedPayload":{"position":{"x":15517.085211279895,"y":24978.036206455075},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"6e49b57f-8c94-410f-985b-82c126155b11"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"fa1cf76f-30a6-4cfd-ba4f-8511afca64b8","savedPayload":{"position":{"x":15592.85911518537,"y":24750.27204370447},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"ae8fa9a5-95b6-4769-8ade-f9854e6855ba"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"bf7d5c92-8894-4040-8d2f-3f5cdec443af","savedPayload":{"position":{"x":15786.287615627753,"y":24593.84817912013},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"9e9b19ee-9c51-4586-b74d-d2880f13f71f"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"125c9155-a747-4ac4-9d9f-1b93a4ae8d17","savedPayload":{"position":{"x":16042.541437710524,"y":24564.41238111062},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"01491591-0462-453c-91e0-6da6f554a729"}}},{"type":"Layer","name":"Take Profit","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3745d5cd-a2be-43ed-b5df-d05c328f8665","savedPayload":{"position":{"x":16280.917386265202,"y":24663.928419862754},"targetPosition":{"x":15977.296572394282,"y":25060.75923245295},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"719dd8a6-58ab-41c6-9693-9b67c12232d2"}}}],"layerFolders":[],"id":"9854e8b2-d863-42f3-afd5-416d5e2c548e","savedPayload":{"position":{"x":15977.296572394282,"y":25060.75923245295},"targetPosition":{"x":16168.303357177294,"y":25522.64736240649},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"6e31ae33-68d1-4dca-8b29-6e59a2a4448e","savedPayload":{"position":{"x":16168.303357177294,"y":25522.64736240649},"targetPosition":{"x":16663.0166511096,"y":25588.08600416838},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8c851b59-3105-460c-bb4b-cb4944db1049","savedPayload":{"position":{"x":16663.0166511096,"y":25588.08600416838},"targetPosition":{"x":17157.9116821377,"y":25653.201834587282},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"be53f7bc-6c26-4fd7-a0d0-96b965bbf655","savedPayload":{"position":{"x":17157.9116821377,"y":25653.201834587282},"targetPosition":{"x":17653.521538239824,"y":25718.280363218284},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":40,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"13a2b4f9-2c05-49b2-b42c-32ffa71ae0b7"}}},"id":"43eeb152-b0b8-468d-84d1-7d03fd636387","savedPayload":{"position":{"x":18003.37277871924,"y":25463.81378514373},"targetPosition":{"x":18300.806237131383,"y":25502.971642809745},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"499eac86-6c40-4362-a36a-5f2002081866","savedPayload":{"position":{"x":18300.806237131383,"y":25502.971642809745},"targetPosition":{"x":18450.806237131383,"y":25243.164021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":-155},"width":240,"height":111.125,"radius":0},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}}],"id":"885265c2-ebb1-4283-a617-34a88780276d","savedPayload":{"position":{"x":18450.806237131383,"y":25243.164021674413},"targetPosition":{"x":18600.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Testing Environment","name":"New Testing Environment","id":"5882d8a8-345b-4188-b1c1-797e9ff805d9"}}},{"type":"Dashboard","name":"Production Environment My Computer","project":"Superalgos","timeMachines":[{"type":"Time Machine","name":"Lightning Strike Live Trading Session My Computer","config":"{}","project":"Superalgos","timeScale":{"type":"Time Scale","name":"New Time Scale","config":"{\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-10-06T17:09:32.085Z\",\n \"toDate\": \"2020-10-06T21:09:32.085Z\"\n}","project":"Superalgos","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e","savedPayload":{"position":{"x":18003.37277871924,"y":24502.89901593443},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"rateScale":{"type":"Rate Scale","name":"New Rate Scale","config":"{\n \"autoMinScale\": true,\n \"autoMaxScale\": true,\n \"minValue\": 10419.75,\n \"maxValue\": 10844.37\n}","project":"Superalgos","id":"ee3f6af0-8649-489b-9168-b4f16d2f5a78","savedPayload":{"position":{"x":18011.02848924466,"y":24386.095444737657},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timeFrameScale":{"type":"Time Frame Scale","name":"New Time Frame Scale","config":"{\n \"value\": \"01-min\",\n \"autoMinScale\": false,\n \"autoMaxScale\": true,\n \"fromDate\": \"2020-10-05T09:53:58.939Z\",\n \"toDate\": \"2020-10-05T13:53:58.939Z\"\n}","project":"Superalgos","id":"480f9696-76df-4026-a435-7bf364c08056","savedPayload":{"position":{"x":18062.80023504401,"y":24281.112729565797},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"timelineCharts":[{"type":"Timeline Chart","name":"New Data Mine Products","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Candles Volumes","project":"Superalgos","layers":[{"type":"Layer","name":"Candles","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"e3cbbcbe-c938-4669-b670-c317476e0a3b","savedPayload":{"position":{"x":16992.282280946285,"y":23856.49271176323},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Candles","id":"b9c30464-73e5-4f5c-b422-9ba1a02b78ab"}}},{"type":"Layer","name":"Volumes","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"385a5f98-118a-43fd-b019-54e825d1f4ae","savedPayload":{"position":{"x":17192.242023030805,"y":23510.135246216414},"targetPosition":{"x":17392.615945713467,"y":23857.108132968406},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Volumes","id":"07c11481-7dbd-477d-8bf7-79212542a6aa"}}}],"layerFolders":[],"id":"6848a114-9979-41dd-8d95-3a899679ba08","savedPayload":{"position":{"x":17392.615945713467,"y":23857.108132968406},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Bot Layers","name":"Resistances and Supports","project":"Superalgos","layers":[{"type":"Layer","name":"Resistances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0cf13cfa-2a37-4691-902c-513ab5780da8","savedPayload":{"position":{"x":17538.760168957182,"y":23310.0159698544},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Resistances","id":"a1669770-1bbe-40f7-acb3-ded15272935f"}}},{"type":"Layer","name":"Supports","config":"{\n \"status\": \"off\",\n \"showPanels\": false\n}","project":"Superalgos","id":"d9245f0b-54e8-44b1-94bd-56c7048eb5c1","savedPayload":{"position":{"x":17938.505496583897,"y":23310.043709247824},"targetPosition":{"x":17738.97910230742,"y":23657.072015580987},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Supports","id":"64899503-b618-493a-ba94-bfad2051a611"}}}],"layerFolders":[],"id":"20bd60bb-917b-4a0f-acc5-b019d1c3bd81","savedPayload":{"position":{"x":17738.97910230742,"y":23657.072015580987},"targetPosition":{"x":17738.764681458488,"y":24056.665358937673},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"4cbbc012-c91e-4acd-a8d2-feb149e728a0","savedPayload":{"position":{"x":17738.764681458488,"y":24056.665358937673},"targetPosition":{"x":17963.331767523672,"y":24445.732145877373},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":0,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Data Mine Products","name":"Masters","id":"d37d8bf1-be3b-49ac-805b-0ddb3944e6a0"}}},"id":"bb7afb85-32ea-4471-8400-615a34fc126f","savedPayload":{"position":{"x":18150.806237131383,"y":24203.93353713308},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading Engine","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Engine","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading Episode","project":"Superalgos","layers":[{"type":"Layer","name":"Trading Episode Counters","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"05da2270-0016-4d22-89d8-b77cd14008a9","savedPayload":{"position":{"x":12224.806237131383,"y":25700.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Counters","id":"dc6cc4ef-4bd7-4837-8442-919462314db3"}}},{"type":"Layer","name":"Trading Episode Statistics","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a4165460-e0a7-4a0d-b506-15e756dfac93","savedPayload":{"position":{"x":12219.806237131383,"y":25689.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading Episode Statistics","id":"776ed571-8321-47aa-8cfb-c8ebf565dace"}}},{"type":"Layer","name":"Episode Candle","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"371e0cd7-af57-4469-836d-45c4e6059760","savedPayload":{"position":{"x":12317.806237131383,"y":25717.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Candle","id":"ded93703-a48d-44be-9703-878c28f949cd"}}},{"type":"Layer","name":"Episode Balances","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5ed81442-77cc-4101-b1ff-8c7cbac57d4f","savedPayload":{"position":{"x":12245.806237131383,"y":25698.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Balances","id":"e702f1dd-1c91-4d05-ac55-19db363f5f3a"}}},{"type":"Layer","name":"Distance To Trading Event","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5e046a6a-4f38-4b44-bae1-1aed6d4d3753","savedPayload":{"position":{"x":12313.806237131383,"y":25819.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Distance To Trading Event","id":"b8abea53-8221-47bd-91a2-cdcdd2ad1027"}}},{"type":"Layer","name":"Episode Base Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"b78a78ec-dca3-499b-881a-d2e3a82bf116","savedPayload":{"position":{"x":12330.806237131383,"y":25734.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Base Asset","id":"18bcbd26-c237-4acb-96f4-d9c95d833a42"}}},{"type":"Layer","name":"Episode Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb95c2a9-6f82-4a2a-9105-17b8f6c3c51a","savedPayload":{"position":{"x":12364.806237131383,"y":25720.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episode Quoted Asset","id":"c444f4b5-fa67-4c21-afa8-1f998da7a2a2"}}},{"type":"Layer","name":"Current Episode","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4ad5b6f0-f4a9-4aab-aedf-9175647498b0","savedPayload":{"position":{"x":12321.806237131383,"y":25708.664021674413},"targetPosition":{"x":12315.806237131383,"y":25752.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Episode","id":"057570bd-69d4-4f3c-b0d4-94ee32f61e65"}}}],"layerFolders":[],"id":"7216b7a3-1371-4f07-a395-74c547579ab4","savedPayload":{"position":{"x":12315.806237131383,"y":25752.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Strategy","project":"Superalgos","layers":[{"type":"Layer","name":"Current Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"d2c0a1c8-70ef-4f7b-835a-a99ac6a5837a","savedPayload":{"position":{"x":12210.806237131383,"y":25770.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Strategy","id":"88dd680c-a81b-48ae-96ba-838281abfa35"}}},{"type":"Layer","name":"Last Strategy","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"076af680-2114-480b-a979-f7eea4966d7b","savedPayload":{"position":{"x":12302.806237131383,"y":25739.664021674413},"targetPosition":{"x":12305.806237131383,"y":25783.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Strategy","id":"24af3ffc-6a52-4ee3-a30b-f068aa5b2062"}}}],"layerFolders":[],"id":"56112c60-50dd-4d19-89aa-1d46005f194f","savedPayload":{"position":{"x":12305.806237131383,"y":25783.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Current Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bb93ebef-f7ee-42c2-93b8-fe46eba0874a","savedPayload":{"position":{"x":12424.806237131383,"y":25721.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Current Position","id":"25280962-e4e5-40df-9e42-9edfbad6f6d3"}}},{"type":"Layer","name":"Last Position","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"595e7228-5676-4f5c-82bf-baa43e9325ab","savedPayload":{"position":{"x":12488.806237131383,"y":25680.664021674413},"targetPosition":{"x":12427.806237131383,"y":25692.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Position","id":"7a95a249-132d-4e0f-9182-cc7af45cacea"}}}],"layerFolders":[],"id":"9f594c8a-87fe-4c4b-b550-493405fe0b2d","savedPayload":{"position":{"x":12427.806237131383,"y":25692.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Open Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3ce44f39-8ac9-4984-ad9d-daa53ed3f707","savedPayload":{"position":{"x":12377.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stage","id":"c9c4bca7-f918-4aa8-b538-ffe8aa31d5c2"}}},{"type":"Layer","name":"Close Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7d5f0aa-8259-4271-aa95-7b351aa9b9c0","savedPayload":{"position":{"x":12337.806237131383,"y":25588.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stage","id":"4201d7c0-43aa-4ac0-bd7e-ab26b688aa2d"}}},{"type":"Layer","name":"Trigger Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"9a9f6580-ab06-4005-9274-98f7e9a491e5","savedPayload":{"position":{"x":12387.806237131383,"y":25625.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stage","id":"4fe24ddc-973f-4a5d-bf8a-d77090486125"}}},{"type":"Layer","name":"Manage Stage","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f60905ad-b491-45ee-9768-8087df9aef78","savedPayload":{"position":{"x":12466.806237131383,"y":25757.664021674413},"targetPosition":{"x":12422.806237131383,"y":25658.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stage","id":"e2f3d69e-2f0a-4463-8e74-4f0768c4fb70"}}}],"layerFolders":[],"id":"5389c77c-63a7-4495-9cc5-cdc0c70b76e6","savedPayload":{"position":{"x":12422.806237131383,"y":25658.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f602d8ef-b6a6-423f-a772-9a4b5d5b9c43","savedPayload":{"position":{"x":12422.806237131383,"y":25747.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"0e0b284a-5014-4ab0-ada0-4322c14a099e"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"0a0dd259-5704-46de-900f-5d1dc24af4f6","savedPayload":{"position":{"x":12488.806237131383,"y":25650.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"95b3db7a-9b62-4eab-a76b-4af8794da5a6"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de6f83f6-a6d9-45c7-93fd-e2c72238040e","savedPayload":{"position":{"x":12410.806237131383,"y":25733.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"1c6eed42-23aa-4174-aade-be29222acb8c"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"ac0f1c2a-5eed-45ee-84da-3d24e455abd3","savedPayload":{"position":{"x":12379.806237131383,"y":25663.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"a2f44cd5-090d-42e5-9eb7-73e732310e85"}}},{"type":"Layer","name":"Last Market Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"89def699-c33f-4344-a045-babca1f545ee","savedPayload":{"position":{"x":12478.806237131383,"y":25752.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Market Order","id":"8c24d559-ba52-46fe-81b4-8a6bf50c74b6"}}},{"type":"Layer","name":"Last Limit Order","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a7e04514-bf32-4021-822c-47af56c55a76","savedPayload":{"position":{"x":12504.806237131383,"y":25780.664021674413},"targetPosition":{"x":12437.806237131383,"y":25742.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Last Limit Order","id":"c451c035-5ece-451f-836f-b5334cb3f967"}}}],"layerFolders":[],"id":"a302255a-cf35-4801-ae3c-95cb47ae9613","savedPayload":{"position":{"x":12437.806237131383,"y":25742.664021674413},"targetPosition":{"x":12363.806237131383,"y":25731.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1857004e-2f12-4287-8847-173043d8d2ab","savedPayload":{"position":{"x":12363.806237131383,"y":25731.664021674413},"targetPosition":{"x":12380.806237131383,"y":25686.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"23ad1663-d4da-4ece-8964-30012894ae5b","savedPayload":{"position":{"x":12380.806237131383,"y":25686.664021674413},"targetPosition":{"x":12448.806237131383,"y":25597.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"ddb3fafa-58f4-46c1-9b24-61efe3ec13a6","savedPayload":{"position":{"x":12448.806237131383,"y":25597.664021674413},"targetPosition":{"x":12446.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":150,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"788a0207-20ea-411c-862d-b1b13db4e09f","savedPayload":{"position":{"x":18261.64837946537,"y":24166.307699856272},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Trading System","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Trading System","project":"Superalgos","layers":[{"type":"Layer","name":"Trading System Errors","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"2a1db97f-553d-47ea-b452-c90ba9af9e79","savedPayload":{"position":{"x":12242.806237131383,"y":25582.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Errors","id":"ba606f99-2ae5-44dc-b7db-399e657830e1"}}},{"type":"Layer","name":"Trading System Highlights","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"3c1c9d45-c482-4374-92ad-c3c28bfb7679","savedPayload":{"position":{"x":12270.806237131383,"y":25723.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Highlights","id":"2d20d8ae-4afa-4e92-8de2-89e66e5efdee"}}},{"type":"Layer","name":"Trading System Values","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"a560c8af-91cd-4aea-ab9f-01ed60892abb","savedPayload":{"position":{"x":12340.806237131383,"y":25546.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Values","id":"f8a6219c-c7b4-410a-8aa4-1910583f51c8"}}},{"type":"Layer","name":"Trading System Status","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"40debb84-1e2e-452b-99ff-95ff3994fb29","savedPayload":{"position":{"x":12322.806237131383,"y":25605.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Status","id":"dcff6f56-7646-4505-aa93-6682a110f3f2"}}},{"type":"Layer","name":"Trading System Progress","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"5785c4fb-879d-4b89-aab8-9ec37d5f561b","savedPayload":{"position":{"x":12240.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Progress","id":"0a9dff80-e462-4110-b988-11ce57bbbcd5"}}},{"type":"Layer","name":"Trading System Running","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74d8c1f7-8dd5-4e2c-b3cf-7f7bcfe7143c","savedPayload":{"position":{"x":12342.806237131383,"y":25543.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Running","id":"c7e05ad0-7d4a-4ffb-9aee-191511f85ee7"}}},{"type":"Layer","name":"Trading System Announcements","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"4476fcb1-3898-440f-b69e-afba06be912a","savedPayload":{"position":{"x":12402.806237131383,"y":25585.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Announcements","id":"e4811789-fd94-49b0-9917-8d9d434f997d"}}},{"type":"Layer","name":"Trading System Warnings","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"43fe3418-9b3c-4cd9-b9a9-3994851e0b65","savedPayload":{"position":{"x":12310.806237131383,"y":25555.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Warnings","id":"029ff3a7-9c65-425f-855a-882df68fa05b"}}},{"type":"Layer","name":"Trading System Infos","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"de34ba07-61b5-4785-bcf5-ff5b81d63e48","savedPayload":{"position":{"x":12227.806237131383,"y":25559.664021674413},"targetPosition":{"x":12310.806237131383,"y":25627.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trading System Infos","id":"0f47adaf-25a0-431f-b15b-0fbf44069b38"}}}],"layerFolders":[],"id":"36e02794-0943-4520-af39-2f274050610c","savedPayload":{"position":{"x":12310.806237131383,"y":25627.664021674413},"targetPosition":{"x":12365.806237131383,"y":25585.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"1ccfa34c-ca21-4ac3-be74-30f85549bf5e","savedPayload":{"position":{"x":12365.806237131383,"y":25585.664021674413},"targetPosition":{"x":12339.806237131383,"y":25637.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"c1c4bd7c-b755-461a-a5ed-b59804b4c280","savedPayload":{"position":{"x":12339.806237131383,"y":25637.664021674413},"targetPosition":{"x":12377.806237131383,"y":25540.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":300,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"ed6507e7-437f-4740-a897-11dc4da4d20a","savedPayload":{"position":{"x":18378.45195066214,"y":24173.963410381693},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Timeline Chart","name":"Objects","project":"Superalgos","layerManager":{"type":"Layer Manager","name":"Masters","config":"{\n \"visibleLayers\": 4,\n \"panelLocation\": {\n \"upOrDown\": \"up\",\n \"leftOrRight\": \"left\"\n }\n}","project":"Superalgos","layers":[],"botLayers":[{"type":"Bot Layers","name":"Low Frequency","project":"Superalgos","layers":[],"layerFolders":[{"type":"Layer Folder","name":"Objects","project":"Superalgos","layers":[{"type":"Layer","name":"Episodes","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"76852fcc-d524-43b8-a0b1-8645c2fed91e","savedPayload":{"position":{"x":12710.806237131383,"y":25614.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Episodes","id":"c6fd6067-4b57-4860-ae3b-5668e4444490"}}},{"type":"Layer","name":"Strategies","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"43b43957-23d5-401b-b3e0-391c430b72c9","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Strategies","id":"60f88096-7343-42d1-afad-83fecd22fb44"}}}],"layerFolders":[{"type":"Layer Folder","name":"Orders","project":"Superalgos","layers":[{"type":"Layer","name":"Market Buy Orders","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"aaff7fb6-bd83-48f2-819a-a1dd674876a7","savedPayload":{"position":{"x":12579.806237131383,"y":25470.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Buy Orders","id":"9f939086-c934-4924-8353-776707a7cf10"}}},{"type":"Layer","name":"Market Sell Orders","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"bec241f4-5a8f-4fe7-9620-76d92f64da9c","savedPayload":{"position":{"x":12705.806237131383,"y":25579.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Market Sell Orders","id":"da5f279e-d387-43cf-80f4-fc114b9ac906"}}},{"type":"Layer","name":"Limit Buy Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"2d03d083-7199-4bf2-8e8a-4c96f23a16a8","savedPayload":{"position":{"x":12735.806237131383,"y":25521.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Buy Orders","id":"367646bb-839a-4071-8305-6d26a647585d"}}},{"type":"Layer","name":"Limit Sell Orders","config":"{\n \"status\": \"on\",\n \"showPanels\": false\n}","project":"Superalgos","id":"cb5de20d-e440-4bdb-a074-c408740e9022","savedPayload":{"position":{"x":12631.806237131383,"y":25476.664021674413},"targetPosition":{"x":12649.806237131383,"y":25488.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Limit Sell Orders","id":"0b2fc73a-9635-40b2-98d8-0c79c69175a9"}}}],"layerFolders":[],"id":"a8409c29-905d-495f-bbca-3d0eef14f91c","savedPayload":{"position":{"x":12649.806237131383,"y":25488.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Stages","project":"Superalgos","layers":[{"type":"Layer","name":"Trigger Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"04d1a0a8-1419-4fbd-9c28-eef6cfefd5d4","savedPayload":{"position":{"x":12584.806237131383,"y":25552.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Trigger Stages","id":"7fe8c58f-9cad-47c9-ba4e-d66bff094dcf"}}},{"type":"Layer","name":"Open Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"74cda6e5-4fe2-41ef-a611-2c0374780ad5","savedPayload":{"position":{"x":12663.806237131383,"y":25503.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Open Stages","id":"41f17745-1819-4681-8a2b-9bdda3cd67c4"}}},{"type":"Layer","name":"Manage Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"fb041378-9424-4709-a9ed-79426fcdfe68","savedPayload":{"position":{"x":12721.806237131383,"y":25661.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Manage Stages","id":"e89c8bfd-fac9-4aff-afc0-3a89c1dc2710"}}},{"type":"Layer","name":"Close Stages","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"6c4ac373-c5ff-4bfd-8047-4caaba6b7788","savedPayload":{"position":{"x":12659.806237131383,"y":25585.664021674413},"targetPosition":{"x":12680.806237131383,"y":25593.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Close Stages","id":"bc2c6503-e935-4ad7-a76a-89b062d41e91"}}}],"layerFolders":[],"id":"4b2ee5fd-d4f7-4a7c-bb6e-5e4c633b1b9f","savedPayload":{"position":{"x":12680.806237131383,"y":25593.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Layer Folder","name":"Position","project":"Superalgos","layers":[{"type":"Layer","name":"Positions","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"4f77d851-9e93-4e85-9cfb-ec2ab200d79b","savedPayload":{"position":{"x":12581.806237131383,"y":25650.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Positions","id":"3ed594a0-8452-4bd8-9eaa-37cd83a45b90"}}},{"type":"Layer","name":"Position Base Asset","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"0213c668-a6d8-4737-ae57-d59d62b8f715","savedPayload":{"position":{"x":12767.806237131383,"y":25594.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Base Asset","id":"88997c97-e77f-490e-9eb5-c7531beec132"}}},{"type":"Layer","name":"Position Quoted Asset","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"f07986eb-010f-46cd-803d-dcac674adb80","savedPayload":{"position":{"x":12745.806237131383,"y":25673.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Position Quoted Asset","id":"b4772611-d5d0-4fbd-b689-d42de3c045d4"}}},{"type":"Layer","name":"Stop Loss","config":"{\n \"status\": \"off\",\n \"showPanels\": true\n}","project":"Superalgos","id":"3f8f8fa3-2149-42d6-92e9-214354cfa186","savedPayload":{"position":{"x":12630.806237131383,"y":25581.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Stop Loss","id":"9b064960-3829-441f-b955-334fb8324a53"}}},{"type":"Layer","name":"Take Profit","config":"{ \n\"status\": \"off\"\n}","project":"Superalgos","id":"65ec58e6-2c00-41d4-a145-e6b7e7178bf0","savedPayload":{"position":{"x":12743.806237131383,"y":25590.664021674413},"targetPosition":{"x":12672.806237131383,"y":25618.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Data Product","name":"Take Profit","id":"cbcc817b-4333-4c80-addc-e2a0ee0845c1"}}}],"layerFolders":[],"id":"66e5c011-9163-422d-863f-115135f832ad","savedPayload":{"position":{"x":12672.806237131383,"y":25618.664021674413},"targetPosition":{"x":12687.806237131383,"y":25530.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"91b8a8e8-823d-4746-967f-c8d85a1ad3ad","savedPayload":{"position":{"x":12687.806237131383,"y":25530.664021674413},"targetPosition":{"x":12591.806237131383,"y":25565.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"dcaccce7-d98d-49b3-b3b6-e83495b688c3","savedPayload":{"position":{"x":12591.806237131383,"y":25565.664021674413},"targetPosition":{"x":12523.806237131383,"y":25633.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"e328f755-80a6-4799-8f12-002a2ddb983d","savedPayload":{"position":{"x":12523.806237131383,"y":25633.664021674413},"targetPosition":{"x":12489.806237131383,"y":25562.664021674413},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":450,"y":80},"width":150,"height":330,"radius":0},"referenceParent":{"type":"Trading Mine Products","name":"Masters","id":"aa2b0766-a3d5-47e1-acd8-7345af564388"}}},"id":"93708a53-ad8d-48e0-9728-b87ea96d1545","savedPayload":{"position":{"x":18483.434665834,"y":24225.735156181043},"targetPosition":{"x":18300.806237131383,"y":24463.741158268414},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7","savedPayload":{"position":{"x":18300.806237131383,"y":24463.741158268414},"targetPosition":{"x":18450.806237131383,"y":24723.548779403747},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":585,"y":65},"width":240,"height":113.625,"radius":0},"referenceParent":{"type":"Live Trading Session","name":"Lightning Strike","id":"1ce123af-467f-4295-b317-dba8729faf25"}}}],"id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4","savedPayload":{"position":{"x":18450.806237131383,"y":24723.548779403747},"targetPosition":{"x":18600.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Production Environment","name":"New Production Environment","id":"65a40d20-837c-4652-8356-f8054b4e1346"}}}],"id":"84a1b1ba-4888-4eac-8762-7084f0ee5de7","savedPayload":{"position":{"x":18600.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"referenceParent":{"type":"Project Definition","name":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb"}}}],"id":"21d2ec55-9e56-4652-8e96-c7e451262c36","savedPayload":{"position":{"x":18900.806237131383,"y":24983.35640053908},"targetPosition":{"x":18900.806237131383,"y":24983.35640053908},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false,"shortcutKey":"c"}}},{"type":"Plugins","name":"New Plugins","project":"Superalgos","pluginProjects":[{"type":"Plugin Project","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","pluginDataMines":{"type":"Plugin Data Mines","name":"New Plugin Data Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"d5234bd2-ef4e-4856-a6a0-ce7659653a48","savedPayload":{"position":{"x":18879.35218735615,"y":18688.55301821844},"targetPosition":{"x":31820.67692045767,"y":18678.794324352373},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"ecc1a524-de9b-4e73-8874-b99a7ea0402b","savedPayload":{"position":{"x":31820.67692045767,"y":18678.794324352373},"targetPosition":{"x":31320.502678827743,"y":18678.79704693609},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"cbc3d9be-5e59-45d8-bb0f-4ec82763691d","savedPayload":{"position":{"x":31234.673182942548,"y":18370.4854210064},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingMines":{"type":"Plugin Trading Mines","name":"New Plugin Trading Mines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters","project":"Superalgos","id":"ad1ce785-858f-4cfc-ba68-108b5e0c54d9","savedPayload":{"position":{"x":24941.217404066585,"y":18714.893045797242},"targetPosition":{"x":31320.45102232534,"y":19544.930491916948},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"8a64c00e-4f8c-49bf-b57d-4e2e388bae41","savedPayload":{"position":{"x":31320.45102232534,"y":19544.930491916948},"targetPosition":{"x":31070.415084976332,"y":19111.835158656926},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"8d881813-3ab9-4e8b-ab5a-48dedab2dd19","savedPayload":{"position":{"x":31570.083379567513,"y":18479.466800207203},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingSystems":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Masters-Lightning-Strike","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","project":"Superalgos","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4","savedPayload":{"position":{"x":31050.365708673427,"y":31068.826468868458},"targetPosition":{"x":30320.47990890508,"y":19544.97425758733},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"5fdcecee-8c8f-4e0f-b36b-81e9231970a6","savedPayload":{"position":{"x":30320.47990890508,"y":19544.97425758733},"targetPosition":{"x":30570.439042449398,"y":19111.851515318966},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"3569d452-c593-4e54-a356-7ff8c6b519f3","savedPayload":{"position":{"x":31570.083379567513,"y":18832.13795158269},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"pluginTradingEngines":{"type":"Plugin Trading Engines","name":"New Plugin Trading Engines","project":"Superalgos","pluginFiles":[{"type":"Plugin File","name":"Low-Frequency","project":"Superalgos","pluginFilePosition":{"type":"Plugin File Position","name":"Low-Frequency","project":"Superalgos","id":"e117a2a4-09b3-4181-8455-e680de3bdeb3","savedPayload":{"position":{"x":30923.55093774257,"y":24967.049392142086},"targetPosition":{"x":29820.22642897682,"y":18678.80776835817},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"e9270d67-4630-4ac9-91ca-1dec4fb5aa38","savedPayload":{"position":{"x":29820.22642897682,"y":18678.80776835817},"targetPosition":{"x":30320.32799443869,"y":18678.805890109317},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"87a28762-63d0-45f7-bd39-9dea436d8244","savedPayload":{"position":{"x":31234.673182942548,"y":18941.11933078349},"targetPosition":{"x":31327.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},"id":"c4e402d7-5228-408c-9d67-379d6ef40bae","savedPayload":{"position":{"x":31327.37828125503,"y":18655.802375894946},"targetPosition":{"x":31027.37828125503,"y":18655.802375894946},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}}],"id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6","savedPayload":{"position":{"x":31046.37828125503,"y":18657.802375894946},"targetPosition":{"x":31046.37828125503,"y":18657.802375894946},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Design Space","name":"My Design Space","project":"Superalgos","spaceStyle":{"type":"Space Style","name":"My Space Style","config":" {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"node\": {\n \"fontSize\": 16,\n \"imageSize\": 60,\n \"type\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"name\": {\n \"fontColor\": \"UI_COLOR.WHITE\"\n },\n \"menuItem\": {\n \"backgroundColor\": \"UI_COLOR.BLACK\",\n \"fontColor\": \"UI_COLOR.WHITE\",\n \"fontSize\": 14,\n \"imageSize\": 14\n }\n }\n }","project":"Superalgos","id":"fad0e429-f7a7-4b62-a2a5-2ead29b8f695","savedPayload":{"position":{"x":25236.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaceSettings":{"type":"Space Settings","name":"New Space Settings","config":"{\n \"node\": {\n \"distancePercentage\": 60,\n \"radiusPercentage\": 85,\n \"massPercentage\": 100,\n \"animationSteps\": 2, \n \"menuItem\": {\n \"widthPercentage\": 100,\n \"heightPercentage\": 60,\n \"radiusPercentage\": 90\n }\n },\n \"physics\": false\n}","project":"Superalgos","id":"05c9d6d5-24c4-4eec-9aca-9668d6486fdd","savedPayload":{"position":{"x":24636.875,"y":8701.347826086958},"targetPosition":{"x":24936.875,"y":8701.347826086958},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"f8485ce5-67f3-4476-b9e2-80994e49c318","savedPayload":{"position":{"x":24940.875,"y":10717.347826086958},"targetPosition":{"x":24940.875,"y":10717.347826086958},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"frame":{"position":{"x":255,"y":588.3125}}}},{"type":"Superalgos Project","name":"New Superalgos Project","project":"Superalgos","projectDefinition":{"type":"Project Definition","name":"Superalgos","config":"{ \n \"codeName\": \"Superalgos\"\n}","project":"Superalgos","id":"a2a04e12-604e-43f8-a986-1b8ca3b043cb","savedPayload":{"position":{"x":19203,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"spaces":{"type":"Spaces","name":"New Spaces","project":"Superalgos","id":"4d0ee814-4e48-4688-9cc5-7ee03de5192b","savedPayload":{"position":{"x":18903,"y":11033.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"mines":{"type":"Mines","name":"New Mines","project":"Superalgos","id":"b979e3a3-9316-4e5a-831b-c503b4b0e507","savedPayload":{"position":{"x":18603,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"otherHierarchies":{"type":"Other Hierarchies","name":"New Other Hierarchies","project":"Superalgos","id":"0a1ff755-8e0b-4f62-976e-df76c8139c6f","savedPayload":{"position":{"x":18903,"y":10433.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"cf9f8b3b-77c6-43c6-b01f-95cf366a91f6","savedPayload":{"position":{"x":18903,"y":10733.5},"targetPosition":{"x":18903,"y":10733.5},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"APIs","name":"New APIs","project":"Superalgos","githubAPI":{"type":"Github API","name":"New Github API","config":"{\n \"username\": \"\",\n \"token\": \"\"\n}","project":"Superalgos","id":"9ea7bee2-c4db-4cee-a05f-63fcf3a86a4a","savedPayload":{"position":{"x":31349.208333333332,"y":10755.819458631257},"targetPosition":{"x":31049.208333333332,"y":10755.819458631257},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{}}},"id":"23021bb7-9997-4fe6-8199-71ebf70aef76","savedPayload":{"position":{"x":31049.208333333332,"y":10755.819458631257},"targetPosition":{"x":31049.208333333332,"y":10755.819458631257},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false}}},{"type":"Tutorial","name":"Basic Education","config":"{\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to School!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes Menu","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Arrangement Features","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Pins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Start With the Menu","config":"{\n \"icon\": {\n \"name\": \"unpinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Start With the Menu\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"117e0e8d-77c2-4ee9-b29f-d82f7b6f6995","savedPayload":{"position":{"x":25672.637627218,"y":40215.29235725245},"targetPosition":{"x":25565.127242354407,"y":40495.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Session Base Asset","name":"","id":"fb252bd6-3e7d-49a0-9fc6-be392be5db5b"}}},{"type":"Tutorial Step","name":"Pinned Nodes Can't Dance","config":"{\n \"icon\": {\n \"name\": \"pinned-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Pinned Nodes Can't Dance\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"734c6647-9e74-4d72-a621-29e0ff3e0bd3","savedPayload":{"position":{"x":25771.633615062532,"y":40277.75417389793},"targetPosition":{"x":25565.127242354407,"y":40495.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":4,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"c69e3a63-8d67-4e41-b16e-39a88a9776e3","savedPayload":{"position":{"x":25536.957826782294,"y":39930.71501490362},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Angle to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Mary Go Round","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-360-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Mary Go Round\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"836a107b-368d-4ef0-8a43-5daeefcb0fe2","savedPayload":{"position":{"x":25886.240655911173,"y":40433.23445084565},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"180 Degrees","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-180-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - 180 Degrees\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d9f1b166-20de-4ee5-94f7-0f9f363a5a82","savedPayload":{"position":{"x":25941.41057881172,"y":40509.16933527975},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Node's Independence","config":"{\n \"icon\": {\n \"name\": \"set-angle-to-parent-node-to-90-degrees\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Node's Independence\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c941ec5d-dcf0-48d5-a67b-5ce312c70470","savedPayload":{"position":{"x":25970.41512373375,"y":40598.43614568955},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Free-range Nodes","config":"{\n \"icon\": {\n \"name\": \"remove-angle-to-parent-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free-range Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"1b8726e1-8fa5-4584-8906-5c084785f476","savedPayload":{"position":{"x":25970.41512373375,"y":40692.29682471368},"targetPosition":{"x":25674.10862155521,"y":40645.366485201615},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"0a6ecc28-5731-49a1-878d-c1d2656cbecc","savedPayload":{"position":{"x":25706.338469709655,"y":40006.12813587088},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Distance to Parent","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Controlling Distances","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Controlling Distances\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e1a511e3-e833-4dcb-882c-28517b6fbaa2","savedPayload":{"position":{"x":25973.18382167515,"y":40807.23895310824},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Play With The Tape!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Play With The Tape!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"9ea33644-954d-475a-b3a1-9bca07951e58","savedPayload":{"position":{"x":25959.425576443755,"y":40923.481780139075},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About The Hierarchy?","config":"{\n \"icon\": {\n \"name\": \"set-distance-to-parent-node-to-one-and-a-half\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About The Hierarchy?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"88ef7405-4f63-42a7-b02c-19f52b8f7576","savedPayload":{"position":{"x":25902.230411235218,"y":41025.61109632564},"targetPosition":{"x":25674.10862155521,"y":40830.77668182659},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}}],"tutorialTopics":[],"id":"c02373f4-3bf5-4b99-8dce-a152af6ec770","savedPayload":{"position":{"x":25799.043568022138,"y":40166.698076268774},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Arrangement Style","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Arrangement Style","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Arrangement Style\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"b03d5c5f-0ee9-48bf-a164-ce60a23b163f","savedPayload":{"position":{"x":25922.560122587445,"y":40717.9456609292},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Shall We Improve This? ","config":"{\n \"icon\": {\n \"name\": \"set-node-arrangement-to-concave\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Shall We Improve This?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"90b822dd-2f06-4474-a728-3500f3a30af4","savedPayload":{"position":{"x":25896.726562387557,"y":40832.113569359586},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Freeze","config":"{\n \"icon\": {\n \"name\": \"freeze-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Freeze!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2e3e7d2f-35ba-4620-b62a-f18d55e30989","savedPayload":{"position":{"x":25829.169297802902,"y":40927.70488774053},"targetPosition":{"x":25622.662925094777,"y":40710.092576436844},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":3,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Design Space","name":"My Design Space","id":"f8485ce5-67f3-4476-b9e2-80994e49c318"}}}],"tutorialTopics":[],"id":"14dbd920-b2e0-4b8f-ae74-22d2a3077082","savedPayload":{"position":{"x":25779.662925094777,"y":40351.092576436844},"targetPosition":{"x":25505.599287801997,"y":40229.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"3f1d0740-00c0-4818-b256-3280bd99ae74","savedPayload":{"position":{"x":25505.599287801997,"y":40229.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Productivity Tools","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Backups","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Backups\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"561b5fd8-43dd-42cf-9230-c098ebc7e176","savedPayload":{"position":{"x":25694.150517837592,"y":40515.65592801336},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"Working With Versions","config":"{\n \"icon\": {\n \"name\": \"hand-drag\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working With Versions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"e60db488-cf9d-4bb0-b1a8-0d66ef657613","savedPayload":{"position":{"x":25816.52309136077,"y":40569.04653605334},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}},{"type":"Tutorial Step","name":"Detaching and Attaching","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Detaching and Attaching\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"ae239506-f063-4e2f-8933-9f44dcc40fe2","savedPayload":{"position":{"x":25903.6116537401,"y":40670.245281501426},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Attaching The Backup","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Attaching The Backup\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"cbdcbdcc-5f47-40a0-870c-ad71d0d12079","savedPayload":{"position":{"x":25938.16724712524,"y":40799.208511700446},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Detached Nodes Don't Count","config":"{\n \"icon\": {\n \"name\": \"detach-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Irrelevant Nodes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"60c572fe-8649-46eb-921e-4815fb9419b1","savedPayload":{"position":{"x":25913.34571244971,"y":40930.39347727926},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Nodes' Attaching Rules","config":"{\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Nodes' Attaching Rules\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"14d77d4f-ae2a-41ca-bcf1-d60044ac45a8","savedPayload":{"position":{"x":25834.063259072154,"y":41037.81738692698},"targetPosition":{"x":25638.377035688718,"y":40810.425869983344},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Parameters","name":"New Parameters","id":"e79ab7df-ba40-46aa-abcd-63df8031a931"}}}],"tutorialTopics":[],"id":"c63ac428-2adf-4189-8560-5129c15ea793","savedPayload":{"position":{"x":25795.377035688718,"y":40451.425869983344},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"References","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing with References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing with References\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"References\"\n }\n }\n}","project":"Superalgos","id":"2733bece-0fd3-4846-9f88-8a95bf4f96f8","savedPayload":{"position":{"x":25846.4129110247,"y":40855.44315481149},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's See Some References","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's See Some References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"775cc223-54d4-47e4-9863-a44e09dc2ff4","savedPayload":{"position":{"x":25898.18465682405,"y":40960.425869983344},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"Visualizing References","config":"{\n \"icon\": {\n \"name\": \"key-r\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Visualizing References\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5b81ad17-e34c-4eed-98f5-d45a84d6f812","savedPayload":{"position":{"x":25905.840367349472,"y":41077.22944118012},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Establishing References","config":"{\n \"icon\": {\n \"name\": \"delink-node\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Establishing References\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"a5847b14-8e83-4f7f-bd1f-55c3ddc3a99b","savedPayload":{"position":{"x":25868.214530072662,"y":41188.0715835141},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}},{"type":"Tutorial Step","name":"Let's Get On With It!","config":"{\n \"icon\": {\n \"name\": \"mouse-right-click\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Get On With It!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Establish and Remove References\",\n \"anchor\": \"What If the Nodes Are Far Away or in Different Hierarchies?\"\n }\n }\n}","project":"Superalgos","id":"f4a434bf-93ac-4aae-9b1a-a5f3e510ed57","savedPayload":{"position":{"x":25791.035337639947,"y":41276.07758560147},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Done?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Done?\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"6449893d-f990-47f3-97d1-089487e3c8b1","savedPayload":{"position":{"x":25686.052622468087,"y":41327.84933140082},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"One Last Point!","config":"{\n \"icon\": {\n \"name\": \"trading-system-reference\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Point!\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"ae02f7ce-5dc4-4014-b385-5405e915c4c1","savedPayload":{"position":{"x":25569.249051271316,"y":41335.50504192625},"targetPosition":{"x":25608.40690893733,"y":41038.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System Reference","name":"Lightning Strike","id":"c6397744-c7b6-4fad-92a0-6954f282c0c2"}}}],"tutorialTopics":[],"id":"e837dc7b-f8e0-4c01-b6f2-87898c505c30","savedPayload":{"position":{"x":25765.40690893733,"y":40679.0715835141},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Backups & Clones","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Backups!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Backups!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Backups\"\n }\n }\n}","project":"Superalgos","id":"49f383cc-5720-4f22-a444-6a12709be5da","savedPayload":{"position":{"x":25880.678459744897,"y":40858.00718906684},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Hammering Backups Home","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Hammering Backups Home\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"823bae09-4875-4b2c-b461-62b016247779","savedPayload":{"position":{"x":25843.052622468087,"y":40968.84933140082},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}},{"type":"Tutorial Step","name":"Back It Up Again!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back It Up Again!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"8737b5cf-02ec-46d6-b6a3-705da85b00ce","savedPayload":{"position":{"x":25765.87343003537,"y":41056.855333488194},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading System","name":"Lightning Strike","id":"628b758d-ffff-445f-9d4f-8aa480a13db3"}}},{"type":"Tutorial Step","name":"One Last Backup!","config":"{\n \"icon\": {\n \"name\": \"backup-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - One Last Backup!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"41e890ee-f42a-4396-9493-8298445b94b6","savedPayload":{"position":{"x":25660.89071486351,"y":41108.627079287544},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Point","name":"End Upper Band","id":"ff8660a3-65b0-4df3-b823-f0656537ea30"}}},{"type":"Tutorial Step","name":"No Need to Memorize","config":"{\n \"icon\": {\n \"name\": \"docs-warning-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - No Need to Memorize\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"d14e808a-d408-455b-be7b-0feb0c862662","savedPayload":{"position":{"x":25544.08714366674,"y":41116.28278981297},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What About Clones?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Clones?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Clones\"\n }\n }\n}","project":"Superalgos","id":"7942b504-e00b-4d78-b4a9-defd17ac6e08","savedPayload":{"position":{"x":25433.245001332754,"y":41078.656952536156},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Only Share Shares!","config":"{\n \"icon\": {\n \"name\": \"share-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Only Share Shares!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Shares\"\n }\n }\n}","project":"Superalgos","id":"39e09d3f-db3f-4961-9e32-915ba513a9a6","savedPayload":{"position":{"x":25345.238999245383,"y":41001.47776010344},"targetPosition":{"x":25583.245001332754,"y":40818.84933140082},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"974c84fb-0112-4a8b-9f53-6d057b22a073","savedPayload":{"position":{"x":25583.245001332754,"y":40818.84933140082},"targetPosition":{"x":25505.599287801997,"y":40529.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"338435fb-8de8-47e5-a51c-891399879226","savedPayload":{"position":{"x":25505.599287801997,"y":40529.0715835141},"targetPosition":{"x":25245.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"22c3e696-b371-48f9-814b-74a883ba6e7c","savedPayload":{"position":{"x":25245.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Workspaces","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Working with Workspaces","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Working with Workspaces\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Workspaces\"\n }\n }\n}","project":"Superalgos","id":"cd7b285d-22bf-4b30-82c1-4aade52c9dfe","savedPayload":{"position":{"x":25385.569414553385,"y":40716.52491818019},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Your Workspace vs Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Workspace vs Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Plugin Workspaces\"\n }\n }\n}","project":"Superalgos","id":"fa5f23d3-3a4b-4b29-9e16-f9d251678272","savedPayload":{"position":{"x":25245.791666666664,"y":40898.68682578477},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Current Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - The Current Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"78deb6f1-5589-4b91-ad96-d4397fafd6fd","savedPayload":{"position":{"x":25018.145953135907,"y":40928.656952536156},"targetPosition":{"x":25095.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Workspace","name":"Basic Education","id":"979bbac5-358b-427c-95d6-2b1df435d74e"}}}],"tutorialTopics":[],"id":"ad149fde-4bf0-4b26-b4a5-809fc8ba62e1","savedPayload":{"position":{"x":25095.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Plugins","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Talk Plugins","config":"{\n \"icon\": {\n \"name\": \"plugins\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Talk Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"366bcfde-71f9-4173-a80f-8fd4f5d7abcf","savedPayload":{"position":{"x":24978.42009536928,"y":40876.885206736806},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugins","name":"New Plugins","id":"bfb0b514-3b9f-4e9a-85ca-d0ca714b09f6"}}},{"type":"Tutorial Step","name":"How Plugins Work","config":"{\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How Plugins Work\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"3e106105-19ca-4a7d-8915-c2ea46d92cec","savedPayload":{"position":{"x":24873.43738019742,"y":40928.656952536156},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Positioning Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-file-position\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Positioning Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"298ab522-ebbc-4b94-8fca-bce27208f8a2","savedPayload":{"position":{"x":24756.63380900065,"y":40936.31266306158},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin File Position","name":"Masters-Lightning-Strike","id":"37ab4b0d-6bd8-46b6-9778-e193c32669a4"}}},{"type":"Tutorial Step","name":"Placing Plugins","config":"{\n \"icon\": {\n \"name\": \"plugin-trading-systems\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Placing Plugins\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"89958980-e536-414d-a55b-25149b6ebca2","savedPayload":{"position":{"x":24645.791666666664,"y":40898.68682578477},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Plugin Trading Systems","name":"New Plugin Trading Systems","id":"3569d452-c593-4e54-a356-7ff8c6b519f3"}}},{"type":"Tutorial Step","name":"Non-Persistence of Changes","config":"{\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Non-Persistence of Changes\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"2658f4f8-46df-4a83-9a39-6327553ba244","savedPayload":{"position":{"x":24557.785664579293,"y":40821.50763335205},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Starting From a Plugin","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Starting From a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"286d6e2a-0020-4461-98e4-974315326ddd","savedPayload":{"position":{"x":24506.013918779943,"y":40716.52491818019},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Improving a Plugin","config":"{\n \"icon\": {\n \"name\": \"sensor-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Improving a Plugin\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"4a1b74f7-8ed5-4771-b0e0-3d1427a5510a","savedPayload":{"position":{"x":24498.35820825452,"y":40599.72134698342},"targetPosition":{"x":24795.791666666664,"y":40638.879204649435},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"73a666a2-268d-42d1-ac73-e7ae316542e7","savedPayload":{"position":{"x":24795.791666666664,"y":40638.879204649435},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Exchanges","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Talking Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Talking Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Community Effort to Test Exchanges\"\n }\n }\n}","project":"Superalgos","id":"70ece243-3a2a-4b2a-9963-5044c11df654","savedPayload":{"position":{"x":24433.6596323107,"y":40591.203617870066},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Testing New Exchanges","config":"{\n \"icon\": {\n \"name\": \"crypto-exchange\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Testing New Exchanges\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Test New Exchanges\"\n }\n }\n}","project":"Superalgos","id":"11a7025e-6b0b-4ac3-9994-e014b1980b08","savedPayload":{"position":{"x":24345.791666666664,"y":40379.0715835141},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Clean Workspace","config":"{\n \"icon\": {\n \"name\": \"workspace\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Clean Workspace\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"57edeba5-84fb-4ae2-bbf8-c16f71c842c1","savedPayload":{"position":{"x":24433.6596323107,"y":40166.93954915814},"targetPosition":{"x":24645.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"3bba7ba9-7d4c-4d84-9c25-307f59bd7670","savedPayload":{"position":{"x":24645.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Data","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Dealing With Data","config":"{\n \"icon\": {\n \"name\": \"dataset-definition\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Dealing With Data\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"811af117-7a9f-4522-a391-f310fcab8167","savedPayload":{"position":{"x":24495.791666666664,"y":40119.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"About Other Markets","config":"{\n \"icon\": {\n \"name\": \"market\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Other Markets\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"7eb3bc72-7230-4c9a-bc7d-a568d3cc2465","savedPayload":{"position":{"x":24535.98404553133,"y":39969.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Markets","name":"New Exchange Markets","id":"2fd80894-900e-44ac-a1a7-56c14124f7a1"}}},{"type":"Tutorial Step","name":"Building Indicators","config":"{\n \"icon\": {\n \"name\": \"indicator-bot\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Building Indicators\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"How to Build an Indicator - Video Series\"\n }\n }\n}","project":"Superalgos","id":"bbdede43-5ebe-4438-969e-e56fb8d36af7","savedPayload":{"position":{"x":24645.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Indicators?","config":"{\n \"icon\": {\n \"name\": \"data-mine\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More Indicators?\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"Community Data Mines\"\n }\n }\n}","project":"Superalgos","id":"fd066dc6-57fb-4121-b8e7-1edc06bdf3a0","savedPayload":{"position":{"x":24795.791666666664,"y":39819.26396237877},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How About Strategies?","config":"{\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - How About Strategies?\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c18673fd-a8cf-4aba-b89b-d38d96991c82","savedPayload":{"position":{"x":24945.791666666664,"y":39859.456341243436},"targetPosition":{"x":24795.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"2c2b7b0c-de6e-480d-93d2-27bbb74b972b","savedPayload":{"position":{"x":24795.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Your Graduation","config":"{\n \"icon\": {\n \"name\": \"trading-strategy\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Your Graduation\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n },\n \"positionAtReferenceParent\": true\n}","project":"Superalgos","id":"2c47bc65-09a1-4576-a69c-990e47930ac5","savedPayload":{"position":{"x":25245.791666666664,"y":39859.456341243436},"targetPosition":{"x":25095.791666666664,"y":40119.26396237877},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"0f058d80-353d-4073-8b41-805938e1551e","savedPayload":{"position":{"x":25095.791666666664,"y":40119.26396237877},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8","savedPayload":{"position":{"x":24945.791666666664,"y":40379.0715835141},"targetPosition":{"x":24945.791666666664,"y":40379.0715835141},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Welcome to Superalgos!","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial - Welcome to Superalgos!\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Nodes & Hierarchies","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Chrome or Chrome","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Use Chrome or Safari!\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"842eafab-4163-42f8-a9fc-74ad48823fe8","savedPayload":{"position":{"x":19316.971696376197,"y":40087.81292043237},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"That's Me","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - That's Me On the Right!\"},\"icon\":{\"name\":\"tutorial\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"89c487cc-e92b-440f-83af-9af10005d607","savedPayload":{"position":{"x":19414.29870102263,"y":40152.844745829796},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Expand That Node!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Expand That Node!\"},\"icon\":{\"name\":\"expand-structure-of-nodes\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"304b92bf-75af-4b2e-a53f-b50b3d3679c2","savedPayload":{"position":{"x":19479.330526420054,"y":40250.171750476235},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Let's Go for a Ride!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Go for a Ride!\"},\"icon\":{\"name\":\"network\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8dc04176-c85f-44a5-a2b9-fff3158115d3","savedPayload":{"position":{"x":19502.166666666668,"y":40364.97678018576},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network","name":"My Network","id":"3c165071-7558-4708-9999-8ffe71d346b1"}}},{"type":"Tutorial Step","name":"Remote access","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Remote Access!\"},\"icon\":{\"name\":\"network-node\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"a7451dda-ad2a-49f6-bb57-e48ffefc4925","savedPayload":{"position":{"x":19479.330526420054,"y":40479.781809895285},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}},{"type":"Tutorial Step","name":"About Small Hardware","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - About Small Hardware\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"9796fa82-0bce-4d43-a48c-cd9e712eabc8","savedPayload":{"position":{"x":19414.29870102263,"y":40577.10881454172},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Accessing remotely?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Accessing Remotely?\"\n },\n \"icon\": {\n \"name\": \"network-node\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4393cd69-8baf-4284-bf51-517d2f387e48","savedPayload":{"position":{"x":19316.971696376197,"y":40642.14063993915},"targetPosition":{"x":19202.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}}],"tutorialTopics":[],"id":"66a8b0d2-7555-49da-a61c-07c819f0dc92","savedPayload":{"position":{"x":19202.166666666668,"y":40364.97678018576},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Start Data Mining","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Ready to Rock?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ready to Rock?\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ae2d279e-47a0-4132-be92-de7098fad0b5","savedPayload":{"position":{"x":19398.083249555828,"y":40419.28847912121},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Binance.com Or Binance.us?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"workspaces\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Binance.com or Binance.us?\"},\"icon\":{\"name\":\"binance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e590835b-44c4-427f-a029-e11105707529","savedPayload":{"position":{"x":19430.838409029886,"y":40531.666340267424},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Crypto Exchange","name":"Binance","id":"61ef0b8d-de6e-4e76-bdd5-996836760a4b"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Binanceus\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1ace3c4c-73bc-4e82-a958-a48dabbad9e6","savedPayload":{"position":{"x":19418.09508482683,"y":40648.02480294301},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Let's Mine Some Data!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Mine Some Data!\"},\"icon\":{\"name\":\"run\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e3b6c510-3352-4ff3-9f2f-0f73b84b8d88","savedPayload":{"position":{"x":19361.793332538055,"y":40750.649345997685},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Start Data Mining Console\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c5a98f67-6263-40de-8223-f52e0565be21","savedPayload":{"position":{"x":19270.50458357287,"y":40823.916313045185},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"How Are Things Going?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - How Are Things Going?\"},\"icon\":{\"name\":\"sensor-bot-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f912a325-59f3-4259-9d1e-2fbc86d03bf0","savedPayload":{"position":{"x":19158.12672242666,"y":40856.67147251924},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Sensor Process Instance","name":"Exchange Raw Data Historic-OHLCVs","id":"d244c564-4e86-43c7-9796-dc3b6294ec8b"}}},{"type":"Tutorial Step","name":"Candles Volumes in Action","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Candles Volumes in Action\"},\"icon\":{\"name\":\"indicator-bot-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"08ff3a9c-19db-400b-b537-710544431bc8","savedPayload":{"position":{"x":19041.76825975108,"y":40843.92814831619},"targetPosition":{"x":19131.97999960236,"y":40557.81306309172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Indicator Process Instance","name":"Candles Volumes Multi-Period-Market","id":"f0ef12ed-f0fd-4b88-8e15-27cf24265a5f"}}}],"tutorialTopics":[],"id":"3ddc45b2-9a20-4169-bf81-cf380360bcff","savedPayload":{"position":{"x":19131.97999960236,"y":40557.81306309172},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Control Basics","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Moving Around","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Click & Drag Baby!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Click & Drag Baby!\"},\"icon\":{\"name\":\"hand-drag\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"2078acc5-d20e-4ee6-9dcb-1953fc09b2ba","savedPayload":{"position":{"x":19209.52323527715,"y":40912.14294030139},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Time to Take Control!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time to Take Control!\"},\"icon\":{\"name\":\"key-ctrl\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"51548c0a-5adf-44c4-a431-0d3d623d4cbf","savedPayload":{"position":{"x":19134.110114309886,"y":41081.52358322875},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Spacetime Teleportation!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Spacetime Teleportation!\"},\"icon\":{\"name\":\"mouse-right-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b266af08-c8dc-46e4-929d-fd453f444b5c","savedPayload":{"position":{"x":18973.540173911995,"y":41174.22868154124},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Warp-Speed Zooming!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"pressButton\":\"\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Warp-Speed Zooming!\"},\"icon\":{\"name\":\"mouse-wheel-down\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4ed7c5e8-48f3-4a42-b3c6-c95d79e97756","savedPayload":{"position":{"x":18789.14567374393,"y":41154.848038613876},"targetPosition":{"x":18911.166666666668,"y":40880.78440132109},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b7fab540-23fd-498d-b3ba-0006f9769589","savedPayload":{"position":{"x":19147.09740287271,"y":40890.232439025116},"targetPosition":{"x":18954.261119966748,"y":40660.41910608942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Tutorials & Help","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"A Bit About Tutorials","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - A Bit About Tutorials...\"},\"icon\":{\"name\":\"tutorial\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"524f67bc-f5f1-42e2-acff-fa12917bfabe","savedPayload":{"position":{"x":19044.49135987501,"y":41172.14022526089},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Need a Quick Reminder?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Need a Quick Reminder?\"},\"icon\":{\"name\":\"key-left\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1b3d0bc9-19ea-4444-a142-0549aad4dbbb","savedPayload":{"position":{"x":18903.749530269128,"y":41237.76921822886},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Hungry For More Info?!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"workspaces\":\"Close\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Hungry For More Info?\"},\"icon\":{\"name\":\"help\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"542c7453-aefe-47f1-8349-27d6320873e9","savedPayload":{"position":{"x":18749.049033971347,"y":41224.23467856097},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Broke Something?","config":"{\"position\":\"\",\"slider\":\"toTop\",\"workspaces\":\"Open\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Broke Something?\"},\"icon\":{\"name\":\"workspace\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c23358ca-fbc9-4c9c-8bde-c1a41fdb508c","savedPayload":{"position":{"x":18621.841744033354,"y":41135.16317523116},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"More Workspaces?","config":"{\"position\":\"\",\"slider\":\"toTop\",\"workspaces\":\"Close\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - More Workspaces?\"},\"icon\":{\"name\":\"workspace\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"af391fa7-8ae8-4acd-a45b-a140887219cb","savedPayload":{"position":{"x":18556.212751065385,"y":40994.42134562528},"targetPosition":{"x":18851.655076969048,"y":40942.326892325196},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"96f94a0a-bf6b-4da1-8733-0d079ece2e7c","savedPayload":{"position":{"x":18851.655076969048,"y":40942.326892325196},"targetPosition":{"x":18954.261119966748,"y":40660.41910608942},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"d7fb8e39-4f66-4078-9656-cd5ffd3d519c","savedPayload":{"position":{"x":18954.261119966748,"y":40660.41910608942},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Explore Data Mining","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back to Work!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ok... Back to Work!\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"d6a339ce-eeaa-409c-8b65-c6d5e8333d6b","savedPayload":{"position":{"x":18780.118350897254,"y":40823.27381363423},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"The Magic of Data Mines","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Magic of Data Mines\"},\"icon\":{\"name\":\"data-mine-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"78c7446b-f865-4100-8bc5-ebb2b3c6b302","savedPayload":{"position":{"x":18647.44528947971,"y":40838.2224775097},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Mine Tasks","name":"Masters","id":"85224e5e-f3ee-4e8d-b9bd-e5901bd49b33"}}},{"type":"Tutorial Step","name":"The Core of Data Mining","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - At the Core of Data Mining\"},\"icon\":{\"name\":\"task\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"9c6c6c80-b31e-4bdc-8e4c-c2050190d9be","savedPayload":{"position":{"x":18521.425009356102,"y":40794.12607431021},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Exchange Raw Data","id":"a8f38508-1cac-4ab1-815f-d338fc813377"}}},{"type":"Tutorial Step","name":"Are We Up to Date?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Are We Up to Date?\"},\"icon\":{\"name\":\"indicator-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"706a4bf5-d0ab-4b50-8c73-3af8dffd438f","savedPayload":{"position":{"x":18427.017372542217,"y":40699.718437496325},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Time to Stop!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time to Stop!\"},\"icon\":{\"name\":\"stop\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c51b5d46-6996-462c-a791-1e250d64e608","savedPayload":{"position":{"x":18382.920969342733,"y":40573.69815737272},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task Manager","name":"Masters","id":"c193ecbb-c3e0-4fd5-94ed-bb6356d1d5ea"}}},{"type":"Tutorial Step","name":"Careful With Your Data","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Careful With Your Data!\"},\"icon\":{\"name\":\"dataset-definition\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"0adc8eeb-082c-4f72-b1fb-66251ab517e9","savedPayload":{"position":{"x":18397.869633218193,"y":40441.02509595517},"targetPosition":{"x":18681.034632310704,"y":40540.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"a81c2ab9-b244-496f-b917-6b1d630defbe","savedPayload":{"position":{"x":18752.166666666668,"y":40624.78440132109},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Charting Space","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"The Viewport","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"The Other Dimension","config":"{\"position\":\"Left\",\"slider\":\"toMiddle\",\"useReferenceParentTo\":\"Position at Node\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Bright Side\"},\"icon\":{\"name\":\"charting-space\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8287c4d6-c945-4eea-b0db-51220403eecd","savedPayload":{"position":{"x":18385.231782232568,"y":40800.41077179823},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Charting Space","name":"New Charting Space","id":"21d2ec55-9e56-4652-8e96-c7e451262c36"}}},{"type":"Tutorial Step","name":"Break On Through","config":"{\"position\":\"Left\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Break On Through!\"},\"icon\":{\"name\":\"full-board\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8ba926ed-a951-4ab9-8fdf-1e4e8ac883dc","savedPayload":{"position":{"x":18295.964971822774,"y":40829.41531672027},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Navigating the White Room","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Navigating the White Room\"},\"icon\":{\"name\":\"mouse-right-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"1f58f993-0c6e-4947-a943-a7e53efd626c","savedPayload":{"position":{"x":18202.104292798635,"y":40829.41531672027},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Talkin Time Travel","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Talkin' Time Travel\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"baa1cbf2-4706-4d2d-ade7-0a74d35e09d8","savedPayload":{"position":{"x":18112.83748238884,"y":40800.41077179823},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Bending Time?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Bending time?\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f6b6c83a-0a74-4fae-8e64-b63e7ea965c0","savedPayload":{"position":{"x":18036.90259795474,"y":40745.24084889769},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Size Matters?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Size Matters?\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4912506e-68a1-40c5-af70-6d04b06491d7","savedPayload":{"position":{"x":17981.732675054194,"y":40669.30596446359},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Putting Things in Order","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Putting Things in Order\"},\"icon\":{\"name\":\"hand-drag\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e5372961-e5c3-4d19-bd41-7e07de37d2c3","savedPayload":{"position":{"x":17952.728130132164,"y":40580.03915405379},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Get In the Wormhole!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Get In the Wormhole!\"},\"icon\":{\"name\":\"mouse-wheel-up\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"393df4cc-4aac-4821-bd19-5cd8d1ce255d","savedPayload":{"position":{"x":17952.728130132164,"y":40486.17847502966},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Dashboard","name":"Production Environment My Computer","id":"abc16155-6614-4397-bf7e-ab4a0ff7c1a4"}}},{"type":"Tutorial Step","name":"The Elegant Way...","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"keyPressedTimeMachineReferenceParent\":{\"shiftKey\":true,\"ctrlKey\":true,\"metaKey\":true,\"code\":\"ArrowRight\",\"key\":\"A\"},\"repositionAtTimeMachineNoZoomReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Elegant Way...\"},\"icon\":{\"name\":\"mouse-pointer\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4af14266-6d19-4890-89b4-6fe0caf6debe","savedPayload":{"position":{"x":17981.732675054194,"y":40396.91166461986},"targetPosition":{"x":18249.034632310704,"y":40533.10881454172},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}}],"tutorialTopics":[],"id":"121d0c89-1269-49e4-9dd3-e56d1992cc24","savedPayload":{"position":{"x":18493.473401908686,"y":40739.47515929445},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"The Charts","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Navigation & Scales","config":"{ \n \"title\": \" \",\n \"summary\": \"\",\n \"gif\": \"\",\n \"image\": \"\",\n \"definition\": \"\",\n \"paragraph1\": \"\",\n \"callOut\": \"\",\n \"externalLink\": [\"\", \"\"],\n \"paragraph2\": \"\",\n \"note\": \"\",\n \"tip\": \"\",\n \"important\": \"\",\n \"warning\": \"\", \n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\" \n }","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Moving in Wonderland","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"keyPressedTimeMachineReferenceParent\":{\"shiftKey\":true,\"ctrlKey\":true,\"metaKey\":true,\"code\":\"ArrowRight\",\"key\":\"A\"},\"repositionAtTimeMachineReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Moving in Wonderland\"},\"icon\":{\"name\":\"mouse-left-click\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"58eed11d-e9f6-4443-8432-63d836bf87fc","savedPayload":{"position":{"x":18394.778840028906,"y":41174.6586337025},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Auto Locked\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"0fea09d5-5321-4163-a7ee-66a05bfee6fa","savedPayload":{"position":{"x":18234.59092388764,"y":41086.472871550075},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Unlocking Time!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Unlocking Time!\"},\"icon\":{\"name\":\"time-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"50d31351-7870-448e-bf34-3c16371649a7","savedPayload":{"position":{"x":18152.65449501482,"y":41249.9455565701},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Unlock Time Scale\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c18adec0-aae5-4a63-a85a-1afbee3e535c","savedPayload":{"position":{"x":18065.572667182147,"y":41089.15484668484},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Scaling Time!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Scaling Time!\"},\"icon\":{\"name\":\"time-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4c1b29d4-70c2-4d45-a960-8eb5b0906a7d","savedPayload":{"position":{"x":17908.263350864432,"y":41182.378642594136},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Playing With the Rate Scale!","config":"{\"position\":\"Left\",\"documentationURL\":\"\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Playing with the Rate Scale!\"},\"icon\":{\"name\":\"rate-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"041278c7-d564-4098-957c-9f1a445d3f5b","savedPayload":{"position":{"x":17921.935476386432,"y":41000.03289927174},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Unlock Rate Scale\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"e43713a3-fa8f-4c2a-8454-9e8988a322ac","savedPayload":{"position":{"x":17739.19786906018,"y":40993.40990955698},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"No Lock on Time Frames!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Time Frames Salad?\"},\"icon\":{\"name\":\"time-frame-scale\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"41640302-1547-4236-8ece-074c65d48c37","savedPayload":{"position":{"x":17849.28314468624,"y":40847.40261790886},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Scales Time Frame Scale\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b283b547-72c7-4a4c-9529-daaf1e4084cc","savedPayload":{"position":{"x":17699.1351455153,"y":40743.03559500867},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":4,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Scales' Best-Kept Secrets","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Scales' Best-Kept Secrets\"},\"controlDocs\":{\"panel\":\"Open\",\"page\":{\"project\":\"Superalgos\",\"category\":\"Topic\",\"type\":\"Scales\"}},\"icon\":{\"name\":\"balance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ea96bec1-6a6c-438a-9780-2e421d50bd2c","savedPayload":{"position":{"x":17870.682274059538,"y":40679.72303849487},"targetPosition":{"x":18145.51481128916,"y":40800.002199116854},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"42a0b960-9fbf-40e7-88c4-d49c696e223b","savedPayload":{"position":{"x":18145.51481128916,"y":40800.002199116854},"targetPosition":{"x":18338.35109419512,"y":40570.18886618116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Layers & Managers","config":"{ \n \"title\": \" \",\n \"summary\": \"\",\n \"gif\": \"\",\n \"image\": \"\",\n \"definition\": \"\",\n \"paragraph1\": \"\",\n \"callOut\": \"\",\n \"externalLink\": [\"\", \"\"],\n \"paragraph2\": \"\",\n \"note\": \"\",\n \"tip\": \"\",\n \"important\": \"\",\n \"warning\": \"\", \n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\" \n }","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Switching Gears","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Switching Gears...\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"layer-manager\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"479cafa3-e05c-43d8-8c94-e523b380435a","savedPayload":{"position":{"x":17785.487413236537,"y":40346.972797604845},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer Managers Scroll\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b8f7d08e-45bb-4288-b057-4e2b2e57d9fb","savedPayload":{"position":{"x":17736.709797663796,"y":40222.689460038615},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Layers on Top of Layers","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Layers on Top of Layers\"},\"icon\":{\"name\":\"layer\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"4f762bd3-8817-424a-baec-252f405cedc0","savedPayload":{"position":{"x":17746.687203795493,"y":40089.55022786249},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer On\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c085f1ed-4c76-4b62-adf6-18c74881086e","savedPayload":{"position":{"x":17813.443483982388,"y":39973.924958854484},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Hard Data","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Hard Data\"},\"icon\":{\"name\":\"plotter-panel\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6e9f3842-76ed-4b8f-b6a7-0ec2128a0852","savedPayload":{"position":{"x":17923.756738221415,"y":39898.7146555925},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toBottom\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Charts Layer Panels\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"15faeff4-22c7-4c49-bbdc-0179e0048f12","savedPayload":{"position":{"x":18055.778073607264,"y":39878.815641031404},"targetPosition":{"x":18033.359045531335,"y":40177.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b62d3cbd-5239-43ea-85aa-a44db555dd91","savedPayload":{"position":{"x":18042.908768291458,"y":40518.09441288108},"targetPosition":{"x":18338.35109419512,"y":40570.18886618116},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"cc2f4260-5e2e-4fd7-b978-8074859e5a4e","savedPayload":{"position":{"x":18338.35109419512,"y":40570.18886618116},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Setup Overview","config":"{\n \"position\": \"Right\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Back in Time","config":"{\n \"position\": \"Right\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back in Time\"\n },\n \"icon\": {\n \"name\": \"time-machine\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"06dfeef4-b2ae-4cd9-b47b-366f9d9ee5ce","savedPayload":{"position":{"x":18081.034632310704,"y":40115.844745829796},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Visual Scripting on Steroids","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Visual Scripting on Steroids\"},\"icon\":{\"name\":\"indicator-bot\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fabeb9d0-a829-46e5-b2c0-21be5a9691f4","savedPayload":{"position":{"x":18168.90259795474,"y":39903.71271147383},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Process Definition","name":"Multi-Period-Market","id":"5d9b2729-43fb-4e7e-aa4f-b8477c424e51"}}},{"type":"Tutorial Step","name":"Plotters Magic","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Plotters Magic!\"},\"icon\":{\"name\":\"plotter\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"889a301a-e67e-4c82-9a39-e67717190fa9","savedPayload":{"position":{"x":18381.034632310704,"y":39815.844745829796},"targetPosition":{"x":18381.034632310704,"y":40115.844745829796},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Polygon","name":"Resistance Zone 5","id":"550e31bb-a95f-4fad-bfbb-b42aae7dc5d3"}}}],"tutorialTopics":[],"id":"0688b8d6-4bc2-4d2e-a170-b9e95c2f72d6","savedPayload":{"position":{"x":18348.3665443199,"y":40340.79734466125},"targetPosition":{"x":18620.258880430894,"y":40467.58282318346},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"aa4fbbe2-c97b-4643-9205-c344c8a46377","savedPayload":{"position":{"x":18620.258880430894,"y":40467.58282318346},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Backtesting","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Network","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Do Some Testing!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Do Some Testing!\"},\"icon\":{\"name\":\"testing-trading-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6da2aeb2-5074-46cf-bbe2-d5bd3c9aa967","savedPayload":{"position":{"x":18431.35798898954,"y":40724.10601961554},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Testing Trading Tasks","name":"New Testing Trading Tasks","id":"8117db0a-e418-4f56-8fe4-fda2ddac1cbb"}}},{"type":"Tutorial Step","name":"Aim High, Trade Big!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Aim High, Trade Big!\"},\"icon\":{\"name\":\"network-node\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"484b6846-b8a7-4358-8bc8-90c458c7d773","savedPayload":{"position":{"x":18314.304910051418,"y":40724.616763263584},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Network Node","name":"My Computer","id":"e452cf65-2b2b-44f2-9e67-bdd9d3c008e4"}}},{"type":"Tutorial Step","name":"Machines Learn Too!","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Machines Learn Too!\"\n },\n \"icon\": {\n \"name\": \"tensorflow-project\",\n \"project\": \"TensorFlow\"\n }\n}","project":"Superalgos","id":"673ebc4c-3021-4743-8af2-81d4d26dd5f9","savedPayload":{"position":{"x":18205.966513070765,"y":40680.29435484944},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Learning Tasks","name":"New Learning Tasks","id":"0818dfbe-61ea-40b8-8544-bee25d7f45be"}}},{"type":"Tutorial Step","name":"Civil Works Ahead!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Civil Works Ahead!\"},\"icon\":{\"name\":\"under-construction\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"36b1efb4-d3db-4a01-9e58-17af3da9fa59","savedPayload":{"position":{"x":18122.83633689787,"y":40597.88647927051},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Enough Digressing!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enough Digressing!\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"backtesting-session\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"29e34206-930a-4c5e-a945-c5dd9c786e78","savedPayload":{"position":{"x":18077.570197278135,"y":40489.938988554444},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Backtesting Session","name":"Lightning Strike","id":"ce648922-fef2-44e3-8d76-2bd7ab72a29f"}}},{"type":"Tutorial Step","name":"What? When? How?","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - What? When? How?\"},\"controlDocs\":{\"panel\":\"Open\",\"page\":{\"project\":\"Superalgos\",\"category\":\"Topic\",\"type\":\"Trading Session Parameters\"}},\"icon\":{\"name\":\"trading-parameters\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"5777f75b-6b41-470e-85a8-75887715be9d","savedPayload":{"position":{"x":18077.059453630085,"y":40372.88590961632},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Ready. Set. Go!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Ready. Set. Go!\"},\"controlDocs\":{\"panel\":\"Close\"},\"icon\":{\"name\":\"task\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"70f84f2d-d298-4001-8696-467060ef51e9","savedPayload":{"position":{"x":18121.381862044233,"y":40264.54751263567},"targetPosition":{"x":18371.547608664383,"y":40430.128608229286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"08222935-2499-4a3e-a927-4f5dfbc392df"}}}],"tutorialTopics":[],"id":"3ef3e1ab-2bbb-4f80-bc6f-44042b8fc1c1","savedPayload":{"position":{"x":18371.547608664383,"y":40430.128608229286},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"On the Charts","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Trading System & Orders","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Getting to the Fun Bits","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"repositionAtTimeMachineReferenceParent\":true,\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Getting to the Fun Bits!\"},\"icon\":{\"name\":\"time-machine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"5f771ec1-9e6d-47bc-83af-6bbf90dfa4b2","savedPayload":{"position":{"x":18013.805424179467,"y":40689.82277763555},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"What Is It We Are Testing?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toBottom\",\n \"batchConfigChangesReferenceParent\": [\n {\n \"nodePath\": \"referenceParent.timeScale\",\n \"properties\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"2020-08-31T23:40:00.000Z\",\n \"toDate\": \"2020-09-01T01:00:00.000Z\"\n }\n },\n {\n \"nodePath\": \"referenceParent.rateScale\",\n \"properties\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"minValue\": 11400,\n \"maxValue\": 11800\n }\n },\n {\n \"nodePath\": \"referenceParent.timeFrameScale\",\n \"properties\": {\n \"value\": \"01-min\"\n }\n }\n ],\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What Is It We Are Testing?\"\n },\n \"icon\": {\n \"name\": \"trading-system\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"52ee03e8-b4c7-4a75-bd44-54846b994ab9","savedPayload":{"position":{"x":17847.159843329788,"y":40608.54429711467},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Green Silver Bullets","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Green Silver Bullets\"},\"icon\":{\"name\":\"bullet-limit-buy-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"536849b8-c58e-4339-87bd-f831c3276441","savedPayload":{"position":{"x":17760.115028563825,"y":40444.83681031316},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Sell It Quick!","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Sell It Quick!\"},\"icon\":{\"name\":\"bullet-limit-sell-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8c582cfc-6760-4be7-a998-b33a486b25e7","savedPayload":{"position":{"x":17785.91914057774,"y":40261.23101297636},"targetPosition":{"x":18055.557354467488,"y":40392.74235701308},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}}],"tutorialTopics":[],"id":"913e262b-39d9-4fbb-8445-520c3819ea4b","savedPayload":{"position":{"x":18055.557354467488,"y":40392.74235701308},"targetPosition":{"x":18320.441632325164,"y":40251.90088817731},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Support","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Shall We Dig Deeper?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:00:00.000Z\",\"toDate\":\"2020-09-01T02:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11400,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}},{\"nodePath\":\"referenceParent.timelineCharts[0].layerManager\",\"properties\":{\"visibleLayers\":3,\"panelLocation\":{\"upOrDown\":\"up\",\"leftOrRight\":\"left\"}}},{\"nodePath\":\"referenceParent.timelineCharts[0].layerManager.botLayers[1].layers[1]\",\"properties\":{\"status\":\"on\",\"showPanels\":false}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Shall We Dig Deeper?\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"2ad6e893-9b64-4ce2-a807-d70c06c125e7","savedPayload":{"position":{"x":17823.752104123316,"y":39709.74721239719},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"Who's Keeping Score?","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Who's Keeping Score?\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"923246a4-0bd0-49b1-a4fa-b57a4c5939e1","savedPayload":{"position":{"x":17856.039007293177,"y":39557.84927560244},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"The Power of Data Mining","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Power of Data Mining\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"b5c35544-147d-4576-b698-9e1559a256f2","savedPayload":{"position":{"x":17959.94925404518,"y":39442.44525514068},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Find the Logic Challenge","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Find the Logic Challenge!\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"c718f88f-3e69-45a6-816b-203a064a4c21","savedPayload":{"position":{"x":18107.640177676803,"y":39394.45756509793},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Here's How It Works","config":"{\"position\":\"Left\",\"slider\":\"toBottom\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Here's How it Works...\"},\"icon\":{\"name\":\"layer-resistance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ad9b32fe-d173-4688-b6fd-6142d88c0a80","savedPayload":{"position":{"x":18259.53811447155,"y":39426.744468267796},"targetPosition":{"x":18123.340964549687,"y":39694.046425524306},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"56dc3db6-054a-41cd-9e8c-44eb45570604","savedPayload":{"position":{"x":18066.027203478236,"y":40092.92510890735},"targetPosition":{"x":18320.441632325164,"y":40251.90088817731},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"9a1a33d4-9e9a-47dc-b227-4efaaeda6776","savedPayload":{"position":{"x":18320.441632325164,"y":40251.90088817731},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Trading System","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Come Meet Someone","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Come Meet Someone!\"},\"icon\":{\"name\":\"execution-algorithm\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f9565d69-3116-448f-bb41-434e10ca8c45","savedPayload":{"position":{"x":18113.24862196247,"y":39825.8420017004},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Execution Algorithm","name":"Buy Orders","id":"e635ed9f-3c8c-45bf-8be0-e3836fa0844e"}}},{"type":"Tutorial Step","name":"Formulations","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Formulations...\"},\"icon\":{\"name\":\"formula\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"54f4b77c-d700-4ea3-9e88-ef2f4f9ac138","savedPayload":{"position":{"x":18161.236312005214,"y":39678.151078068775},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Order Rate","name":"New Order Rate","id":"3ff96eb6-5965-4f82-98d4-cd23bf8d0369"}}},{"type":"Tutorial Step","name":"The Seller","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Seller\"},\"icon\":{\"name\":\"execution-algorithm\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"f7ed3408-7732-46b7-813e-886f7d271185","savedPayload":{"position":{"x":18276.640332466977,"y":39574.240831316776},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Execution Algorithm","name":"Race to Break Even","id":"0fe764ce-3312-4964-9841-b55500e3f80a"}}},{"type":"Tutorial Step","name":"Simplifying Complexity","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Simplifying Complexity\"},\"icon\":{\"name\":\"trading-system\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fa4d056c-7dcf-4e65-ae05-2f06c5cdd50a","savedPayload":{"position":{"x":18428.538269261724,"y":39541.95392814691},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Strategy","name":"My Trading Strategy","id":"711041eb-3055-4611-b64f-570363bae854"}}},{"type":"Tutorial Step","name":"Let's Take a Peek","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Take a Peek...\"},\"icon\":{\"name\":\"limit-sell-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"84c7e6a3-60e1-4f8d-baaa-82c5e4e3606e","savedPayload":{"position":{"x":18576.22919289335,"y":39589.94161818966},"targetPosition":{"x":18412.83748238884,"y":39841.542788573286},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Limit Sell Order","name":"Profit 0.6","id":"b80fe127-d306-4fc1-a3a8-95bf88de046f"}}}],"tutorialTopics":[],"id":"0ab40ba6-687e-49cc-a238-06fded8c08c5","savedPayload":{"position":{"x":18383.855654348878,"y":40077.67229459036},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Trading Engine","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Find the Node Challenge","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Find the Node Challenge\"},\"icon\":{\"name\":\"trading-engine\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fb2ec352-5769-4cfa-b7f6-3b8a35540b1d","savedPayload":{"position":{"x":18354.3643491884,"y":39614.69289570072},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Engine","name":"Low-Frequency","id":"eb20f622-71bf-4479-a574-d2320e1d4bd1"}}},{"type":"Tutorial Step","name":"Found It?","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"pressButton\":\"\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Found It?\"},\"icon\":{\"name\":\"copy-path\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"7b584461-edd8-4fe7-8dca-aaaf45ddde61","savedPayload":{"position":{"x":18452.91250640347,"y":39524.61590370454},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Entry Target Rate","name":"New Entry Target Rate","id":"71b3e7d9-80d0-422d-999e-99549f5ab59d"}}},{"type":"Tutorial Step","name":"The Coolest Trick!","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"repositionAtTimeMachineReferenceParent\":true,\"batchConfigChangesReferenceParent\":[{\"nodePath\":\"referenceParent.timeScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"fromDate\":\"2020-08-31T23:40:00.000Z\",\"toDate\":\"2020-09-01T01:00:00.000Z\"}},{\"nodePath\":\"referenceParent.rateScale\",\"properties\":{\"autoMinScale\":false,\"autoMaxScale\":false,\"minValue\":11000,\"maxValue\":11800}},{\"nodePath\":\"referenceParent.timeFrameScale\",\"properties\":{\"value\":\"01-min\"}},{\"nodePath\":\"referenceParent.timelineCharts[1].layerManager\",\"properties\":{\"visibleLayers\":3,\"panelLocation\":{\"upOrDown\":\"up\",\"leftOrRight\":\"left\"}}},{\"nodePath\":\"referenceParent.timelineCharts[1].layerManager.botLayers[0].layerFolders[0].layerFolders[2].layers[0]\",\"properties\":{\"status\":\"on\"}}],\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - The Coolest Trick!\"},\"icon\":{\"name\":\"exit-target-rate\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"fc86c980-84b3-4769-bc8c-6c387d6557cd","savedPayload":{"position":{"x":18580.78427013916,"y":39486.21778113732},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Backtesting Session My Computer","id":"499eac86-6c40-4362-a36a-5f2002081866"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Backtesting Trading Engine Visualization 01\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8fdfd1bd-1411-4372-9c5a-e40a2170fa8f","savedPayload":{"position":{"x":18712.653069343356,"y":39507.10374709554},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exit Target Rate","name":"New Exit Target Rate","id":"bc637b55-04bd-4701-9683-78593832cb09"}}},{"type":"Tutorial Step","name":"Feedback Loops","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Feedback Loops\"},\"icon\":{\"name\":\"limit-buy-order\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"72d776e0-6984-4da4-8781-9499ab47a503","savedPayload":{"position":{"x":18822.400671068975,"y":39583.13707987163},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Rate","name":"New Rate","id":"1c848292-d64a-456f-b1b9-b9e4a387436e"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Right\",\"slider\":\"toMiddle\",\"positionAtReferenceParent\":true,\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Backtesting Trading Engine Visualization 02\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"d3650fde-e76a-4f08-8ebc-0a4ff85ff671","savedPayload":{"position":{"x":18888.290216828253,"y":39699.25844542165},"targetPosition":{"x":18600.964971822774,"y":39785.53824365125},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"5d5bad8a-4dd9-4ec7-85b1-39e7a05f68ae","savedPayload":{"position":{"x":18537.567673685793,"y":39973.99222840656},"targetPosition":{"x":18620.258880430894,"y":40262.37073718806},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"4d1dd5e9-9076-42a8-b85a-deadab0d8845","savedPayload":{"position":{"x":18620.258880430894,"y":40262.37073718806},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Live Trading","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Set Up & Run","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Enough Chit Chat","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enough Chit Chat!\"},\"icon\":{\"name\":\"production-trading-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"42d95de3-1a3e-43dc-b075-994bf30c8a97","savedPayload":{"position":{"x":18266.238834099815,"y":40125.19286249506},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Production Trading Tasks","name":"New Production Trading Tasks","id":"673caa5f-511d-4688-9305-e5f0f0f780cd"}}},{"type":"Tutorial Step","name":"Warning!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Disclaimer\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ac4949b3-f1ee-4113-917d-7d5c13891598","savedPayload":{"position":{"x":18216.708410934858,"y":40055.63711556865},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Start With 100 Bucks!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Start With 100 Bucks!\"},\"icon\":{\"name\":\"session-quoted-asset\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"8f64bf00-d829-4bdf-bc83-7c32916f51c4","savedPayload":{"position":{"x":18188.780436352525,"y":39974.94453235855},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Session Quoted Asset","name":"","id":"f6cd46c1-66df-422c-82d4-02ac8e37f689"}}},{"type":"Tutorial Step","name":"Check your spot balance!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Check Your Spot Balance!\"},\"icon\":{\"name\":\"binance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"7d6448bf-eb35-45d0-ab93-744f3cb3b406","savedPayload":{"position":{"x":18184.71746875941,"y":39889.65234605917},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Enjoy the Outdoors!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Enjoy the Outdoors!\"},\"icon\":{\"name\":\"crypto-ecosystem\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"40cd9486-d751-4aed-8fbc-ba23a2789eb5","savedPayload":{"position":{"x":18204.848665626512,"y":39806.67042235233},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Crypto Ecosystem","name":"My Crypto Ecosystem","id":"7217b56c-e854-4c06-8b8a-d5d3c05a153d"}}},{"type":"Tutorial Step","name":"Your Keys, Your Coins!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Your Keys, Your Coins!\"},\"icon\":{\"name\":\"exchange-account-key\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"3acced8f-fde1-4549-865d-dd59902d804f","savedPayload":{"position":{"x":18247.5431171085,"y":39732.72146318424},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Exchange Account Key","name":"Key for Lighting Strike","id":"e85bbbd6-aca8-450f-9237-788062de5761"}}},{"type":"Tutorial Step","name":"Fire Up the Machine!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Fire Up the Machine!\"},\"icon\":{\"name\":\"data-tasks\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"178a3937-072f-475c-ba56-f56b60c6487d","savedPayload":{"position":{"x":18309.341972659975,"y":39673.796373435325},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Data Tasks","name":"New Data Tasks","id":"40af91d9-431c-4b7d-addc-aed37bc2f3fe"}}},{"type":"Tutorial Step","name":"Are We Ready Yet?","config":"{\"position\":\"Right\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Are We Ready Yet?\"},\"icon\":{\"name\":\"indicator-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"a2834a77-a3ed-4101-aebd-f066b7f48a04","savedPayload":{"position":{"x":18385.23865653611,"y":39634.66891343603},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Indicator Process Instance","name":"Resistances and Supports Multi-Period-Daily","id":"c5395fbe-4b5a-4492-a7fb-e2d259905e27"}}},{"type":"Tutorial Step","name":"Let's Do this!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"positionAtReferenceParent\":true,\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Let's Do This!\"},\"icon\":{\"name\":\"live-trading-session\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"9b362b6b-389e-42e3-b4ad-6fc8bfa07e34","savedPayload":{"position":{"x":18469.08447078421,"y":39618.508957295526},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Task","name":"Lightning Strike","id":"c8492c4a-a7a7-4a80-a25a-a610377e6180"}}},{"type":"Tutorial Step","name":"GIF","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"slider\": \"toTop\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Live Trading Process Progress\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"6a610041-5a2d-4040-9226-968d9eb6f23f","savedPayload":{"position":{"x":18554.086726184163,"y":39626.625688553366},"targetPosition":{"x":18483.359045531335,"y":39918.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Trading Process Instance","name":"Low Frequency Trading","id":"4d7e7fa0-afcb-4b2f-983b-ceacea91b29d"}}}],"tutorialTopics":[],"id":"8f40aff2-5148-4e29-a366-0b5baba107a9","savedPayload":{"position":{"x":18492.359045531335,"y":39955.16915905043},"targetPosition":{"x":18752.166666666668,"y":40105.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Monitoring","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Check Your Console!","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"documentationURL\":\"\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Check Your Console!\"},\"icon\":{\"name\":\"trading-process-instance\",\"project\":\"Superalgos\"}}","project":"Superalgos","id":"ecd04d8a-2fcd-4369-96c8-23d3eb830e30","savedPayload":{"position":{"x":18481.87600629594,"y":39675.00403731516},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\"position\":\"Left\",\"slider\":\"toTop\",\"docs\":{\"project\":\"Superalgos\",\"category\":\"Tutorial\",\"type\":\"Tutorial Step - Welcome Live Trading Console\"},\"icon\":{\"project\":\"Superalgos\"}}","project":"Superalgos","id":"6aac1ef5-fb87-4569-85e1-aa330eef9fbf","savedPayload":{"position":{"x":18565.11972610905,"y":39570.61971431002},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Is It Working?","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Is It Working?\"\n },\n \"icon\": {\n \"name\": \"binance\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4fad500a-616e-47cc-94ce-f3d61de18d1d","savedPayload":{"position":{"x":18685.410386479773,"y":39512.69078539588},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GIF","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"changeNodeConfigWithEvalReferenceParent\": {\n \"autoMinScale\": false,\n \"autoMaxScale\": false,\n \"fromDate\": \"(new Date((new Date()).valueOf() - 60000 * 120)).toISOString()\",\n \"toDate\": \"(new Date((new Date()).valueOf() + 60000 * 120)).toISOString()\"\n },\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Live Trading Binance Orders\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4a628f64-79d1-4dc4-b908-cc93a06289a3","savedPayload":{"position":{"x":18818.922946853563,"y":39512.69078539588},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Scale","name":"New Time Scale","id":"708c5a9f-a995-4210-aaaf-0794782f0e9e"}}},{"type":"Tutorial Step","name":"Monitor the Fun Way","config":"{\n \"position\": \"Left\",\n \"slider\": \"toBottom\",\n \"documentationURL\": \"\",\n \"repositionAtTimeMachineReferenceParent\": true,\n \"batchConfigChangesReferenceParent\": [\n {\n \"nodePath\": \"referenceParent.rateScale\",\n \"properties\": {\n \"autoMinScale\": true,\n \"autoMaxScale\": true\n }\n },\n {\n \"nodePath\": \"referenceParent.timeFrameScale\",\n \"properties\": {\n \"value\": \"01-min\"\n }\n }\n ],\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Monitoring the Fun Way!\"\n },\n \"icon\": {\n \"name\": \"bullet-limit-buy-order\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"37d42cdc-08b2-4eee-9c76-b06b1bcd239f","savedPayload":{"position":{"x":18939.213607224287,"y":39570.619714310014},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Time Machine","name":"Lightning Strike Live Trading Session My Computer","id":"cc1fcc1e-81de-4011-8e59-c37ebe32ecf7"}}},{"type":"Tutorial Step","name":"Three Minutes to Play","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Three Minutes to Play\"\n },\n \"icon\": {\n \"name\": \"live-trading-session\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"2a1b57cb-cca4-457a-a37d-c3643f9376f9","savedPayload":{"position":{"x":19022.457327037395,"y":39675.00403731516},"targetPosition":{"x":18752.166666666668,"y":39805.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"f7f3ae31-9b14-4e81-b0f2-e131afee1361","savedPayload":{"position":{"x":18752.166666666668,"y":39805.16915905043},"targetPosition":{"x":18752.166666666668,"y":40105.16915905043},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"c8276738-7275-4f32-9200-7ca81a2f98b1","savedPayload":{"position":{"x":18752.166666666668,"y":40105.16915905043},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"What Else?","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"What's Next?","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What's Next?\"\n },\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"d0971551-1077-4d2f-b51f-194031e6a33a","savedPayload":{"position":{"x":18701.243686222882,"y":39908.34457177805},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Back to work","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Back to Work!\"\n },\n \"icon\": {\n \"name\": \"status-dependency\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"searchPage\": true\n }\n}","project":"Superalgos","id":"43cfe24a-01d4-4924-90d3-eb5aa3650e0a","savedPayload":{"position":{"x":18782.188189061435,"y":39823.788840995396},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Tabbed Search Results","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Tabbed Search Results\"\n },\n \"icon\": {\n \"name\": \"dataset\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"a5949f55-dc76-4c61-888b-45bc1e7c6ef1","savedPayload":{"position":{"x":18889.329235785317,"y":39776.645652146115},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"A Couple More Things!","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Couple More Things!\"\n },\n \"icon\": {\n \"name\": \"strategy-counters\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true,\n \"panel\": \"Close\"\n }\n}","project":"Superalgos","id":"192af355-57c9-4c62-a79d-245a0705c180","savedPayload":{"position":{"x":19006.35557326683,"y":39774.092128378434},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"What Else Is Cooking?","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What Else Is Cooking?\"\n },\n \"icon\": {\n \"name\": \"ethereum\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"a40f204e-469b-4d14-a4cf-e3d1eea8fd72","savedPayload":{"position":{"x":19115.451002470796,"y":39816.51702053823},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Help us with a star","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Help Us With a Star!\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"45549599-0051-46be-9847-495c856dd182","savedPayload":{"position":{"x":19200.006733253445,"y":39897.46152337678},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Tweet It!","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Spread the Word on Twitter!\"\n },\n \"icon\": {\n \"name\": \"twitter\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"bc08da7d-e803-458d-99fa-8aae1f64d929","savedPayload":{"position":{"x":19247.14992210273,"y":40004.602570100666},"targetPosition":{"x":18954.261119966748,"y":40069.5344542821},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}}],"tutorialTopics":[],"id":"c4cf3c55-832d-40ac-ae37-5735ecfc4b92","savedPayload":{"position":{"x":18954.261119966748,"y":40069.5344542821},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"The End","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Contacts","config":"{\n \"position\": \"\",\n \"slider\": \"\",\n \"pressButton\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Get In Touch!\"\n },\n \"icon\": {\n \"name\": \"telegram-bot\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7abb039d-4c70-40a1-bcd1-84f23cfc2041","savedPayload":{"position":{"x":19111.053057479123,"y":39872.87128220185},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"Beware of Impersonators!","config":"{\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Beware of Impersonators!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"5237c645-3e66-41fe-8e63-2f10e1793ea4","savedPayload":{"position":{"x":19290.95577887232,"y":39917.72606843287},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Ready for More?","config":"{\n \"position\": \"Left\",\n \"slider\": \"\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Ready for More Tutorials?\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"First Steps Tutorials\"\n },\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"96e240f1-4e57-451f-81eb-f79b41ac2d38","savedPayload":{"position":{"x":19410.1351559724,"y":40059.758519255025},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Welcome to Superalgos!","id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e"}}},{"type":"Tutorial Step","name":"This Is The End","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - My Only Friend, The End!\"\n },\n \"icon\": {\n \"name\": \"close-stage-event\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7fd54288-564a-414f-9b50-a9ade7243f3d","savedPayload":{"position":{"x":19423.06871748516,"y":40244.717065959696},"targetPosition":{"x":19131.97999960236,"y":40172.1404972798},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Basic Education","id":"987e20ec-bf08-488c-92ec-7ef6e8b79ef8"}}}],"tutorialTopics":[],"id":"7bba071a-bda3-4ac5-9cea-57bd2f6778c6","savedPayload":{"position":{"x":19131.97999960236,"y":40172.1404972798},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"c598fe19-7375-400c-95b9-ff1c0c38ec1e","savedPayload":{"position":{"x":18902.166666666668,"y":40364.97678018576},"targetPosition":{"x":18902.166666666668,"y":40364.97678018576},"floatingObject":{"isPinned":true,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isPlaying":true,"isRunning":false},"tutorial":{"status":"Done"}}},{"type":"Tutorial","name":"Contribute to Superalgos","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"documentationURL\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial - Wanna Help? Come On In!\"\n },\n \"icon\": {\n \"name\": \"tutorial\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","tutorialSteps":[],"tutorialTopics":[{"type":"Tutorial Topic","name":"Intro","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"You are in command","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - You Are In Command\"\n },\n \"icon\": {\n \"name\": \"strategy-manage-stage\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"cf295c5b-14f3-4440-b684-c9a429110269","savedPayload":{"position":{"x":31489.999999999996,"y":40071.69237886467},"targetPosition":{"x":31339.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Free For Everyone?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Free For Everyone?\"\n },\n \"icon\": {\n \"name\": \"help\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"64170c58-8848-453c-8bb9-ea8483476b6d","savedPayload":{"position":{"x":31599.80762113533,"y":40181.5},"targetPosition":{"x":31339.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"A Brilliant Idea","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Brilliant Idea\"\n },\n \"icon\": {\n \"name\": \"nodes-highlights\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"4a969dfa-6c68-4eb5-98c3-c20f2b9bebbc","savedPayload":{"position":{"x":31639.999999999996,"y":40331.5},"targetPosition":{"x":31339.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What is a Contribution?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What is a Contribution?\"\n },\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"556f8af1-63ae-423a-a5fe-5720e7b4ae96","savedPayload":{"position":{"x":31599.80762113533,"y":40481.5},"targetPosition":{"x":31339.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"What About Free Riders?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - What About Free Riders?\"\n },\n \"icon\": {\n \"name\": \"bullet-error\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ca46f639-4472-420d-a647-2c3be58a6f4b","savedPayload":{"position":{"x":31489.999999999996,"y":40591.30762113533},"targetPosition":{"x":31339.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"2fefbfbf-c5e3-4da4-82b6-a36e5fb1edcd","savedPayload":{"position":{"x":31339.999999999996,"y":40331.5},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Branches","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Repository Branches","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Repository Branches\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": false,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"e7b60217-70ab-4029-9d0d-8f6682603fdd","savedPayload":{"position":{"x":31432.52234641821,"y":40627.2868038993},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Switching Branches","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Switching Branches\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c3dc484a-9bf2-47f2-aafe-56abd3dbe8ea","savedPayload":{"position":{"x":31410.860254682517,"y":40729.19893291332},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Now the Current Branch","config":"{\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Now the Current Branch\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Topic\",\n \"type\": \"Create the Plugins-Docs Branch in Old Forks\"\n }\n }\n}","project":"Superalgos","id":"c755cfee-f1b5-47a1-8c72-f7bd1285ed5d","savedPayload":{"position":{"x":31355.648545955697,"y":40817.55613679621},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Before You Switch","config":"{\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Before You Switch\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c5186485-0efc-4ced-b670-a012564ffe0d","savedPayload":{"position":{"x":31273.546567148245,"y":40881.70123274623},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Double Trouble?","config":"{\n \"icon\": {\n \"name\": \"clone-entity\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Double Trouble?\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": false\n }\n}","project":"Superalgos","id":"b9110aee-2bb4-4930-a6b3-d3b14d4d62d3","savedPayload":{"position":{"x":31174.4570286005,"y":40913.89737551102},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Let's Switch Already!","config":"{\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Switch Already!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"searchPage\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"014163bf-692e-40dc-be33-8bbba811310d","savedPayload":{"position":{"x":31070.33159106715,"y":40910.261235108694},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Welcome Back!","config":"{\n \"icon\": {\n \"name\": \"hits\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Welcome Back!\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"7cfebeab-bd19-4caf-af9c-60eda4325bc7","savedPayload":{"position":{"x":30973.72931904252,"y":40871.231383735474},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Update the App!","config":"{\n \"icon\": {\n \"name\": \"indicator-process-instance\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Update the App!\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"08e24e17-777d-45bc-887d-e68d734ef751","savedPayload":{"position":{"x":30896.301872230462,"y":40801.51539748625},"targetPosition":{"x":31132.70509831248,"y":40616.81695488855},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"65f4de98-58c6-44b1-9c61-46aa0a45a71c","savedPayload":{"position":{"x":31132.70509831248,"y":40616.81695488855},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"Editing","config":"{\n \"position\": \"\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Let's Add Your Review!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Add Your Review!\"\n },\n \"icon\": {\n \"name\": \"expand-structure-of-nodes\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"a49ea1fc-8cfe-41a1-a781-860e294cf1f6","savedPayload":{"position":{"x":30850.861970127105,"y":40803.01445226733},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Did It Work?","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Did It Work?\"\n },\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"3803ec52-574c-4961-8366-551ed8abd757","savedPayload":{"position":{"x":30717.48384801751,"y":40797.0244338965},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Breaking Up The Command","config":"{\n \"icon\": {\n \"name\": \"copy-path\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Breaking Up The Command\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"c23381c5-d2e3-4b19-9065-8401c0e024d6","savedPayload":{"position":{"x":30599.9132839056,"y":40733.75701548882},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Editing Crash Course","config":"{\n \"icon\": {\n \"name\": \"docs-action-edit-paragraph\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Editing Crash Course\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"686bdf5e-b7a5-4237-9779-f806c0d93065","savedPayload":{"position":{"x":30521.43656992208,"y":40625.743085183916},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Sign!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Sign!\"\n },\n \"icon\": {\n \"name\": \"bullet-warning\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"ef70642b-3699-4101-bb45-7c76cf125af3","savedPayload":{"position":{"x":30497.59698172512,"y":40494.37612658259},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}},{"type":"Tutorial Step","name":"Don't Forget to Save!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Don't Forget to Save!\"\n },\n \"icon\": {\n \"name\": \"under-construction\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"d61352ca-f701-4403-af3f-dcbfcd05b402","savedPayload":{"position":{"x":30533.11624213049,"y":40365.67497694584},"targetPosition":{"x":30797.294901687514,"y":40507.83557568774},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Tutorial","name":"Contribute to Superalgos","id":"a8711464-9e92-4e16-9622-a1b499a856ca"}}}],"tutorialTopics":[],"id":"8bd606bc-a0bd-47e3-99df-a53bf79e0bb9","savedPayload":{"position":{"x":30797.294901687514,"y":40507.83557568774},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"GitHub","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"Get Ready to Push!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Get Ready to Push!\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7859f5c1-bba6-405a-9b62-ec086b59be27","savedPayload":{"position":{"x":30554.58980337503,"y":40331.5},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Translation for Mere Mortals","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Translation for Mere Mortals\"\n },\n \"icon\": {\n \"name\": \"github\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"c35d39f0-5c90-48fd-badc-592be51a8605","savedPayload":{"position":{"x":30511.97794679897,"y":40247.869522624744},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Contributable files?","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Contributable files?\"\n },\n \"icon\": {\n \"name\": \"dataset\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"a2846838-6234-4fb1-8f28-2ce5a69607d4","savedPayload":{"position":{"x":30497.294901687514,"y":40155.16442431226},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Authentication","config":"{\n \"position\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Authentication\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"5934eb7c-d208-498e-9bce-fca825fa129c","savedPayload":{"position":{"x":30511.97794679897,"y":40062.45932599977},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"GitHub.com Auth Clip","config":"{\n \"position\": \"\",\n \"slider\": \"toTop\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - GitHub.com Auth Clip\"\n },\n \"icon\": {\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"ec8aca7b-50a2-4635-b0db-f3ed2c2796e3","savedPayload":{"position":{"x":30554.58980337503,"y":39978.828848624515},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Set Up the Token!","config":"{\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Set Up the Token!\"\n },\n \"icon\": {\n \"name\": \"github-api\",\n \"project\": \"Superalgos\"\n }\n}","project":"Superalgos","id":"f7b3489d-a282-4e12-a28d-6300619713f5","savedPayload":{"position":{"x":30620.95932599977,"y":39912.45932599977},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"},"referenceParent":{"type":"Github API","name":"New Github API","id":"9ea7bee2-c4db-4cee-a05f-63fcf3a86a4a"}}},{"type":"Tutorial Step","name":"A Note On Keys and Tokens!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Note On Keys and Tokens!\"\n },\n \"icon\": {\n \"name\": \"exchange-account-key\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Close\",\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"f7cd63ca-f5bd-4f92-ad8b-ec65ee5efe44","savedPayload":{"position":{"x":30704.58980337503,"y":39869.84746942371},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Let's Run the Command!","config":"{\n \"position\": \"Left\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Let's Run the Command!\"\n },\n \"icon\": {\n \"name\": \"docs-json-code-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"searchPage\": true,\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"79cc032d-7cdc-4b3a-ac77-7ed2d2bbed06","savedPayload":{"position":{"x":30797.294901687514,"y":39855.16442431226},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"Congrats and Thank You!","config":"{\n \"position\": \"Left\",\n \"positionAtReferenceParent\": true,\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - Congrats and Thank You!\"\n },\n \"icon\": {\n \"name\": \"docs-success-style\",\n \"project\": \"Superalgos\"\n },\n \"controlDocs\": {\n \"closeTutorialEditor\": true\n }\n}","project":"Superalgos","id":"7793d0b5-b468-4e4f-aff0-e4b43cf01925","savedPayload":{"position":{"x":30889.999999999996,"y":39869.84746942371},"targetPosition":{"x":30797.294901687514,"y":40155.16442431226},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"924146dc-0d92-41ad-9de8-8b341e379fb2","savedPayload":{"position":{"x":30797.294901687514,"y":40155.16442431226},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Topic","name":"End","config":"{\n \"position\": \"Left\",\n \"pressButton\": \"Next\",\n \"documentationURL\": \"\"\n}","project":"Superalgos","tutorialSteps":[{"type":"Tutorial Step","name":"More on Contributions","config":"{\n \"icon\": {\n \"name\": \"execution-algorithm\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - More on Contributions\"\n },\n \"controlDocs\": {\n \"panel\": \"\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"\",\n \"type\": \"\"\n }\n }\n}","project":"Superalgos","id":"af57eaca-ba68-4f71-9bb0-b5f825de2e49","savedPayload":{"position":{"x":31070.33159106715,"y":39752.738764891306},"targetPosition":{"x":31132.70509831248,"y":40046.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}},{"type":"Tutorial Step","name":"A Book on Tutorials","config":"{\n \"icon\": {\n \"name\": \"scripts-library\",\n \"project\": \"Superalgos\"\n },\n \"position\": \"Left\",\n \"slider\": \"toTop\",\n \"pressButton\": \"\",\n \"docs\": {\n \"project\": \"Superalgos\",\n \"category\": \"Tutorial\",\n \"type\": \"Tutorial Step - A Book on Tutorials\"\n },\n \"controlDocs\": {\n \"panel\": \"Open\",\n \"closeTutorialEditor\": true,\n \"page\": {\n \"project\": \"Superalgos\",\n \"category\": \"Book\",\n \"type\": \"First Steps Tutorials\"\n }\n }\n}","project":"Superalgos","id":"440515fe-9612-4c12-9180-638cc37b75bb","savedPayload":{"position":{"x":31355.648545955697,"y":39845.44386320379},"targetPosition":{"x":31132.70509831248,"y":40046.18304511145},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":false,"angleToParent":2,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"tutorialTopics":[],"id":"b34d468c-ec85-489c-b6a7-28862c0956c6","savedPayload":{"position":{"x":31132.70509831248,"y":40046.18304511145},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Reset"}}}],"id":"a8711464-9e92-4e16-9622-a1b499a856ca","savedPayload":{"position":{"x":31039.999999999996,"y":40331.5},"targetPosition":{"x":31039.999999999996,"y":40331.5},"floatingObject":{"isPinned":false,"isFrozen":false,"isCollapsed":true,"angleToParent":1,"distanceToParent":3,"arrangementStyle":0},"uiObject":{"isRunning":false},"tutorial":{"status":"Done"}}}]} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/AppSchema.json b/Projects/Superalgos/Schemas/AppSchema.json index 6eb0013a3..abc4f3569 100644 --- a/Projects/Superalgos/Schemas/AppSchema.json +++ b/Projects/Superalgos/Schemas/AppSchema.json @@ -15789,7 +15789,7 @@ } ], "initialValues": { -"config": "{ \n\"codeName\": \"DOUBLE_CLICK_ON_THIS_STRING_TO_SELECT_IT_XXX_DELETE_IT_AND_PASTE_YOUR_EXCHANGE_API_PUBLIC_KEY\",\n\"secret\": \"REPLACE_THIS_STRING_WITH_YOUR_API_KEY_SECRET\"\n,\n\"uid\": \"REPLACE_THIS_STRING_WITH_YOUR_UID_IF_NECESSARY\"\n}" }, +"config": "{ \n\"codeName\": \"DOUBLE_CLICK_ON_THIS_STRING_TO_SELECT_IT_XXX_DELETE_IT_AND_PASTE_YOUR_EXCHANGE_API_PUBLIC_KEY\",\n\"secret\": \"REPLACE_THIS_STRING_WITH_YOUR_API_KEY_SECRET\"\n,\n\"uid\": \"REPLACE_THIS_STRING_WITH_YOUR_UID_IF_NECESSARY\"\n,\n\"password\": \"REPLACE_THIS_STRING_WITH_YOUR_PASSWORD_IF_NECESSARY\"\n}" }, "addLeftIcons": true, "editors": { "config": true diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/exchange-account-key.json b/Projects/Superalgos/Schemas/Docs-Nodes/exchange-account-key.json index 79e064c61..aea174f36 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/exchange-account-key.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/exchange-account-key.json @@ -16,9 +16,21 @@ "style": "List", "text": "codeName is the name or label of your key, as supplied by the exchange." }, + { + "style": "List", + "text": "secret is the secret key supplied by the exchange." + }, + { + "style": "List", + "text": "uid is the uid supplied by the exchange. This is not required for all exchanges." + }, + { + "style": "List", + "text": "password is the password or passphrase supplied at the creation of the key and secret. This is not required for all exchanges." + }, { "style": "Warning", "text": "To keep your exchange keys safe, never share data structures you may download from the system, as downloads contain all information in the data structure, including personal information such as exchange keys. Use the share option on the menu instead. The share option strips sensitive information and outputs a file that is safe for sharing." } ] -} \ No newline at end of file +} diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/social-bots.json b/Projects/Superalgos/Schemas/Docs-Nodes/social-bots.json index e9d16292a..cf564cab2 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/social-bots.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/social-bots.json @@ -1,3 +1,19 @@ { - "type": "Social Bots" + "type": "Social Bots", + "paragraphs": [ + { + "style": "Text", + "text": "The Social Bots node contains children nodes for each messaging bot. These messaging bots are used to configure the third party applications used to send announcements and receive incoming commands.", + "updated": 1618221943424 + }, + { + "style": "Note", + "text": "At present Superalgos only supports the Telegram messaging application.", + "updated": 1618221056200 + } + ], + "definition": { + "text": "A Social Bots node is used to define the bots for each messaging application. These messaging bots are used to send announcements and receive commands used to interact with Superalgos.", + "updated": 1618222853055 + } } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Nodes/telegram-bot.json b/Projects/Superalgos/Schemas/Docs-Nodes/telegram-bot.json index 660294d53..7c79e785c 100644 --- a/Projects/Superalgos/Schemas/Docs-Nodes/telegram-bot.json +++ b/Projects/Superalgos/Schemas/Docs-Nodes/telegram-bot.json @@ -1,3 +1,59 @@ { - "type": "Telegram Bot" + "type": "Telegram Bot", + "paragraphs": [ + { + "style": "Text", + "text": "The Telegram Bot node is used to define the botToken and chatId parameters which are required by Superalgos to interact with the Telegram API.", + "updated": 1618224117691 + }, + { + "style": "Text", + "text": "The botToken parameter is provided by the Telegram Bot @BotFather. It is a 10 digit number, followed by a colon and then a 35 character (alpha-numeric but can also containing dash - and underscore _) string.", + "updated": 1618224138149 + }, + { + "style": "Text", + "text": "It should be contained within quotes." + }, + { + "style": "Text", + "text": "Example:", + "updated": 1618223886054 + }, + { + "style": "Javascript", + "text": "\"1234567890:aBCdE_FG4hij0kLMnoP9qrsTUvw25-xyz31\"", + "updated": 1618223916419 + }, + { + "style": "Text", + "text": "The chatId parameter is provided by the Telegram Bot @myidbot using the /getgroupid command. It is a negative 9 digit numeric number. It should be entered without quotes.", + "updated": 1618224061206 + }, + { + "style": "Text", + "text": "Example:" + }, + { + "style": "Javascript", + "text": "-123456789" + }, + { + "style": "Subtitle", + "text": "Example Configuration" + }, + { + "style": "Javascript", + "text": "{\n\t\"botToken\": \"1234567890:aBCdE_FG4hij0kLMnoP9qrsTUvw25-xyz31\",\n\t\"chatId\": -123456789\n }", + "updated": 1618224233921 + }, + { + "style": "Text", + "text": "" + } + ], + "definition": { + "text": "The Telegram Bot node is used to define the parameters used to connect to the Telegram API. This allows Superalgos to interact with Telegram to send announcements and receive incoming commands.", + "updated": 1618220722404 + } } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-feature-rich-platform-for-algorithmic-trading.json b/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-feature-rich-platform-for-algorithmic-trading.json new file mode 100644 index 000000000..f7d078781 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-feature-rich-platform-for-algorithmic-trading.json @@ -0,0 +1,40 @@ +{ + "review": "Superalgos Project Review", + "pageNumber": 7, + "type": "Superalgos Review - Feature-rich platform for algorithmic trading", + "definition": { + "text": "The possibilities are endless when you are in control of the platform. Superalgos allows the end-user to create sophisticated trading strategies through a visual designer with built-in backtesting capabilities based on historical market data.", + "updated": 1618174871748 + }, + "paragraphs": [ + { + "style": "Text", + "text": "After more time than I care to admit executing crypto trades manually, I began to wonder what tools successful traders were able to leverage to quickly recognize and respond to market indicators. I started looking for a trading bot that I could leverage to make trades, but quickly realized that most of the software available today required me to give my account information to a service hosted by someone else.", + "updated": 1618175562829 + }, + { + "style": "Text", + "text": "Superalgos, a community-developed open-source project, does not work in that way at all. With SA, I’m able to run the software from my own device without relying on anyone else for the necessary infrastructure. I don’t need to pay a monthly subscription, and I don’t need to worry about my trading account security being at risk. " + }, + { + "style": "Text", + "text": "It does, however, require a bit of patience and attention to gain an understanding of the fundamental concepts. A familiarity with coding, particularly in Javascript, is helpful, but not necessary to execute successful strategies. The tool features an entirely visual scripting designer to help create and debug your very own strategies and indicators. Once your strategy is designed, the tool has built-in backtesting capabilities that leverage downloaded historical market data, giving you peace of mind that your strategy is fully tested before moving on to live trading. " + }, + { + "style": "Text", + "text": "Out of the box, there are several community-built strategies to learn from. In fact, the community is perhaps the most highly underrated feature included with the tool! A healthy set of contributors and a dedicated group of users who are willing to share and contribute their time and effort has seen this project enjoy rapid growth. " + }, + { + "style": "Text", + "text": "I have personal experience with the speed at which features can be developed, and problems can be addressed; it’s quite astonishing! As an open-sourced project, the capabilities of Superalgos are limitless." + }, + { + "style": "Text", + "text": "Thaddeus McCloud" + }, + { + "style": "Text", + "text": "raubot " + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-initial-thoughts.json b/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-initial-thoughts.json new file mode 100644 index 000000000..ebee11908 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Reviews/superalgos-project-review-007-superalgos-review-initial-thoughts.json @@ -0,0 +1,24 @@ +{ + "review": "Superalgos Project Review", + "pageNumber": 7, + "type": "Superalgos Review - Initial Thoughts", + "definition": { + "text": "My initial thoughts on Superalgos.", + "updated": 1618134889544 + }, + "paragraphs": [ + { + "style": "Text", + "text": "The first thought that came to my mind was how well documented, polished and presented Superalgos is. Considering the shear amount of knowledge to be conveied to a new user, the tutorials move at a the right pace as to not overwhelm.", + "updated": 1618134839988 + }, + { + "style": "Text", + "text": "Having written my own basic trading interface and bots using python, I look forward to not having to worry about software edge cases or outcomes I hadn't considered. Only through the work of a focussed community team can these issues be effectivly solved." + }, + { + "style": "Text", + "text": "Wish I'd found this earlier. Can't wait to dig in. " + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/contributing-to-superalgos-006-how-to-contribute-tutorials.json b/Projects/Superalgos/Schemas/Docs-Topics/contributing-to-superalgos-006-how-to-contribute-tutorials.json index 6264c6d42..b205fca85 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/contributing-to-superalgos-006-how-to-contribute-tutorials.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/contributing-to-superalgos-006-how-to-contribute-tutorials.json @@ -117,55 +117,85 @@ "updated": 1617733117832 }, { - "style": "Subtitle", - "text": "One Call For Action Only" + "style": "Title", + "text": "Consistent Use of Space and Styles", + "updated": 1617904223037 }, { "style": "Text", - "text": "Each tutorial step should have a single call for action, that is, a single instruction that the user must carry out. This is the ideal case scenario. There may be exceptions, for example, when we ask the user to read a page in the Docs and do something else as the main instruction. ", - "updated": 1617720707328 + "text": "Use the different sections on the page and the different paragraph styles for consistent purposes. This helps users get accustomed to a certain format so that they know what to expect from each section of the page. Consistency in the way the information is delivered makes tutorials more usable!" + }, + { + "style": "Subtitle", + "text": "The Definition Box" + }, + { + "style": "Text", + "text": "The definition box is the space to the right of the icon, below the title. Use this space to introduce what the step is about, that is, to set up the story the step will tell, or to provide some basic context. ", + "updated": 1617902992986 + }, + { + "style": "Note", + "text": "To use the definition box correctly, explain the context in four to five lines. Avoid one or two lines or anything over five.", + "updated": 1617903200520 + }, + { + "style": "Subtitle", + "text": "The Call For Action" + }, + { + "style": "Text", + "text": "The most important section on any given step is the call for action, that is, the instruction that the user must follow to progress in the tutorial. Many times users redo tutorials or go back a few steps just to make sure they did everything right. ", + "updated": 1617904108044 + }, + { + "style": "Callout", + "text": "Always use the callout style — the one applied to this paragraph — for the call for action! Similarly, try to avoid using this style for anything else. If the particular step doesn't have a call for action, then the step should not feature this style at all!" + }, + { + "style": "Text", + "text": "Each tutorial step should have a single call for action, that is, a single instruction that the user must carry out. This is the ideal case scenario. There may be exceptions, for example, when we ask the user to read a page in the Docs and do something else as the main instruction.", + "updated": 1617904124728 }, { "style": "Success", "text": "In general terms and when possible, try to avoid giving the user more than one task on the same step. Instead, if you expect the user to perform several sequential actions, try to split the process into more than one step — as many as it takes.", - "updated": 1617721156206 + "updated": 1617904133804 + }, + { + "style": "Text", + "text": "In some cases, you may need the user to take a very simple action so that the main call for action may be delivered. In such cases, you may use the definition box to tell the user how to get ready to execute the call for action delivered later in the page." }, { "style": "Subtitle", - "text": "Consistent Use of Styles and Space", - "updated": 1617722131538 + "text": "Alternating Colors", + "updated": 1617906135945 }, { "style": "Text", - "text": "Use the different sections on the page and the different paragraph styles for consistent purposes. This helps users get accustomed to a certain format so that they know what to expect from each section of the page. Consistency in the way the information is delivered makes tutorials more usable!", - "updated": 1617733162806 + "text": "Colorful tutorial steps look great, while a white pages full of text feel too much like non-interactive documentation. Makes sure you break the monotony with the four different styles of boxes:", + "updated": 1617906625458 }, { - "style": "Text", - "text": "Consider the following:", - "updated": 1617722201424 + "style": "Success", + "text": "This is great for additional tips." }, { - "style": "Text", - "text": "The definition box is the space to the right of the icon, below the title. Use this space to introduce what the step is about, that is, to set up the story the step will tell, or to provide some basic context.", - "updated": 1617721881227 + "style": "Note", + "text": "Use this every once in a while to break up otherwise large sections of plain text." }, { - "style": "Callout", - "text": "The most important section on any given step is the call for action, that is, the instruction that the user must follow to progress in the tutorial. Many times users redo tutorials or go back a few steps just to make sure they did everything right. Always use the callout style — the one applied to this paragraph — for the call for action! Similarly, try to avoid using this style for anything else. If the particular step doesn't have a call for action, then the step should not feature this style at all!", - "updated": 1617733181730 + "style": "Important", + "text": "Leave this box for the truly important stuff. Things you don't want users to overlook or forget.", + "updated": 1617906591147 }, { - "style": "Text", - "text": "In some cases, you may need the user to take a very simple action so that the main call for action may be delivered. In such cases, you may use the definition box to tell the user how to get ready to execute the call for action delivered later in the page.", - "updated": 1617722090611 + "style": "Warning", + "text": "And this one, save it for real warnings. Things that may represent a threat or risk.", + "updated": 1617906578635 }, { - "style": "Text", - "text": "Use the rest of the styes to develop the content." - }, - { - "style": "Subtitle", + "style": "Title", "text": "Use of Docs Pages" }, { @@ -184,7 +214,7 @@ "updated": 1617733203373 }, { - "style": "Subtitle", + "style": "Title", "text": "Interactivity", "updated": 1617724494717 }, @@ -214,7 +244,12 @@ "updated": 1617733297397 }, { - "style": "Subtitle", + "style": "List", + "text": "In some cases, the actions users take may have certain effects. Showing users the outcome of their actions immediately after completing a task has a great educational value. For example, if the user is setting up a new Time Machine in a tutorial about the Charting Space, show users how the time machine appears in the charting space immediately after creating it. If users then set up a Timeline Chart that references a particular Data Mine, show users how the new Timeline Chart appears within the Time Machine, and let them verify that the expected layer managers are there. Don't be afraid to go back and forth... that is the whole point after all!", + "updated": 1617905020985 + }, + { + "style": "Title", "text": "Tooltips", "updated": 1617731886888 }, @@ -233,7 +268,7 @@ "updated": 1617733407351 }, { - "style": "Subtitle", + "style": "Title", "text": "Naming of Nodes", "updated": 1617731585276 }, @@ -276,15 +311,6 @@ "text": "Here's a list of requirements that help tutorials be consistent in their look & feel:", "updated": 1617722868882 }, - { - "style": "List", - "text": "Always use proper title case for titles.", - "updated": 1617722923539 - }, - { - "style": "List", - "text": "Titles look best when they span a single line. Use two-line titles only if strictly necessary!" - }, { "style": "List", "text": "Always use an icon to illustrate the step. Sometimes the appropriate icon is the one corresponding to the node the user is working with. Other times you may use icons figuratively, playing with alternate meanings of what the drawing may represent." @@ -304,6 +330,54 @@ "text": "Do not set two consecutive paragraphs with the same style. The only exception is for bullet lists. Even the Docs Text Style is not formated to look good as consecutive paragraphs in the context of a tutorial (there is no padding between paragraphs).", "updated": 1617723650896 }, + { + "style": "Title", + "text": "Titles" + }, + { + "style": "Text", + "text": "Always use proper title case for titles. But, what exactly is proper title case? Let's agree to the standard propose in this blog post:", + "updated": 1617902503383 + }, + { + "style": "Link", + "text": "Capitalization of titles 101->www.grammarcheck.net/capitalization-in-titles-101/", + "updated": 1617902444077 + }, + { + "style": "Success", + "text": "Titles look best when they span a single line. Use two-line titles only if strictly necessary!", + "updated": 1617902549247 + }, + { + "style": "Subtitle", + "text": "Unique Identifiers", + "updated": 1617905396529 + }, + { + "style": "Important", + "text": "Remember that the title of a tutorial step is also the unique identifier of the corresponding Docs Page. This means that the system does not allow for duplicate titles. Avoid at all costs naming pages after single words or short phrases. Let's leave those unique names for particular cases that may merit the use of such special phrases." + }, + { + "style": "Text", + "text": "For the same reason, all titles should begin with the following fixed string of text:", + "updated": 1617905464492 + }, + { + "style": "Json", + "text": "Tutorial Step - ", + "updated": 1617905492001 + }, + { + "style": "Text", + "text": "The above helps reserve some phrases for contexts different than tutorials.", + "updated": 1617905844332 + }, + { + "style": "Success", + "text": "Don't worry! Your titles will not look ugly in the tutorial, as the system filters the prefix and doesn't show it in the tutorial window!", + "updated": 1617905922481 + }, { "style": "Title", "text": "Proper English", diff --git a/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json b/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json new file mode 100644 index 000000000..db1ed00a6 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/how-to-003-create-the-plugins-docs-branch-in-old-forks.json @@ -0,0 +1,85 @@ +{ + "topic": "How To", + "pageNumber": "3", + "type": "Create the Plugins-Docs Branch in Old Forks", + "definition": { + "text": "If your Superalgos fork is older than April 6, 2021, you must create the plugin-docs branch before you may switch to that branch! Newer forks already have the branch, so you don't need to follow this guide in that case!", + "updated": 1618155549345 + }, + "paragraphs": [ + { + "style": "Warning", + "text": "If you didn't create a fork at all, and cloned or downloaded the Superalgos repository directory instead, you will not be able to send your contributions. If that is the case, you will need to close the app, delete the Superalgos folder, and follow the instructions on the README file to fork the repository." + }, + { + "style": "Title", + "text": "I'm not sure if I have the branch! How can I tell?", + "updated": 1618317357821 + }, + { + "style": "Text", + "text": "Start a new console/terminal window and change directories to the root of the Superalgos folder. Once there, run the following command:", + "updated": 1618317471815 + }, + { + "style": "Json", + "text": "git branch --list", + "updated": 1618317490652 + }, + { + "style": "Callout", + "text": "If you see the plugins-docs branch listed, then you may go back to the tutorial! If not, then proceed with the instructions on this page!", + "updated": 1618317621633 + }, + { + "style": "Title", + "text": "Let's create the branch!", + "updated": 1618317417213 + }, + { + "style": "Subtitle", + "text": "1. Make sure you are on the Master branch", + "updated": 1618317374702 + }, + { + "style": "Important", + "text": "You will create a branch using a Git command, but you must make sure that you create the new branch as a copy of the master branch. If you are currently running the software from a branch different than the master branch, you must first switch to the master branch, and only then create the new branch.", + "updated": 1618316571133 + }, + { + "style": "Subtitle", + "text": "2. Create the plugins-docs branch", + "updated": 1618317383194 + }, + { + "style": "Text", + "text": "Start a new console/terminal window and change directories to the root of the Superalgos folder. Once there, run the following command:", + "updated": 1618316776970 + }, + { + "style": "Json", + "text": "git branch plugins-docs", + "updated": 1618316691052 + }, + { + "style": "Text", + "text": "You will likely NOT get any confirmation that the branch was created. Instead, you will get the prompt again. Run the following command to make sure the branch exists:", + "updated": 1618316910204 + }, + { + "style": "Json", + "text": "git branch --list", + "updated": 1618316915062 + }, + { + "style": "Text", + "text": "You should get a list of the existing local branches, one of which should be the plugins-docs branch.", + "updated": 1618316950598 + }, + { + "style": "Success", + "text": "That's it! Now you may go back to the tutorial!", + "updated": 1618317782493 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-001-omega-one-overview.json b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-001-omega-one-overview.json new file mode 100644 index 000000000..9effa4f95 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-001-omega-one-overview.json @@ -0,0 +1,42 @@ +{ + "topic": "Omega One Data Mine", + "pageNumber": "1", + "type": "Omega One - Overview", + "definition": { + "text": "You can set different values for used periods at the top section of most indicators found in the Omega Data Mine -> Data Building Procedure -> Procedure Loop -> Procedure Javascript Code node." + }, + "paragraphs": [ + { + "style": "Title", + "text": "Indicator list:", + "updated": 1617873731007 + }, + { + "style": "List", + "text": "Chaikin Oscillator" + }, + { + "style": "Text", + "text": "The Chaikin Oscillator is the difference between the 3-day and 10-day EMAs of the Accumulation Distribution Line. Like other momentum indicators, this indicator is designed to anticipate directional changes in the Accumulation Distribution Line by measuring the momentum behind the movements." + }, + { + "style": "List", + "text": "ARPS Slow & ARPS Fast", + "updated": 1617875374428 + }, + { + "style": "Text", + "text": "ARPS - Average Range Percentage Spread measures the amount force of Bull Power and Bear Power. Two separate indicators measuring the same thing, in order to be used either separatly or combined.", + "updated": 1617957855552 + }, + { + "style": "List", + "text": "Average VS Average" + }, + { + "style": "Text", + "text": "The Average VS Average Oscillator can be used to recognize changes between a fast average and a slow average. Considering price movement, volume and a so called \"open interest\".", + "updated": 1617957863133 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-002-chaikin-oscillator.json b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-002-chaikin-oscillator.json new file mode 100644 index 000000000..fccd1c0d8 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-002-chaikin-oscillator.json @@ -0,0 +1,88 @@ +{ + "topic": "Omega One Data Mine", + "pageNumber": "2", + "type": "Chaikin Oscillator", + "definition": { + "text": "The Chaikin Indicator applies MACD to the accumulation-distribution line rather than closing price.\n", + "updated": 1617876911680 + }, + "paragraphs": [ + { + "style": "Subtitle", + "text": "What is the Chaikin Oscillator?" + }, + { + "style": "Text", + "text": "The Chaikin oscillator is named for its creator Marc Chaikin. The oscillator measures the accumulation-distribution line of moving average convergence-divergence (MACD). To calculate the Chaikin oscillator, subtract a 10-day exponential moving average (EMA) of the accumulation-distribution line from a 3-day EMA of the accumulation-distribution line. This measures momentum predicted by oscillations around the accumulation-distribution line.", + "updated": 1617875532630 + }, + { + "style": "Callout", + "text": "A cross above the accumulation-distribution line indicates that market players are accumulating shares, securities or contracts, which is typically bullish." + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/chaikin-oscillator.png" + }, + { + "style": "Subtitle", + "text": "How is the Chaikin Oscillator calculated?", + "updated": 1617875610441 + }, + { + "style": "List", + "text": "Calculate the Money Flow Multiplier (N)." + }, + { + "style": "List", + "text": "Multiply the Money Flow Multiplier (N) by volume to calculate Money Flow Volume (N)." + }, + { + "style": "List", + "text": "List a running total of N to draw the accumulation-distribution line (ADL)." + }, + { + "style": "List", + "text": "Compute the difference between 10 period and 3 period exponential moving averages to calculate the Chaikin oscillator." + }, + { + "style": "Subtitle", + "text": "Example of How to Use the Chaikin Oscillator" + }, + { + "style": "Text", + "text": "The purpose of the Chaikin oscillator is to identify underlying momentum during fluctuations in accumulation-distribution. Specifically, it applies the MACD indicator to accumulation-distribution rather than closing prices." + }, + { + "style": "Text", + "text": "For example, a trader wants to determine whether a stock price is more likely to go up or to fall and MACD is trending higher. The Chaikin oscillator generates a bullish divergence when it crosses above a baseline. The baseline is called the accumulation-distribution line. A cross above that line indicates that traders are accumulating, which is typically bullish." + }, + { + "style": "Text", + "text": "The Chaikin oscillator utilizes two primary buy and sell signals. First, a positive divergence is confirmed with a center-line crossover above the accumulation-distribution line. signaling a potential buying opportunity.. Second, a negative divergence is confirmed with a center-line crossover below the accumulation-distribution line., signaling a potential selling opportunity" + }, + { + "style": "Text", + "text": "A positive divergence signals a stock price is likely to rise, given the increase in accumulation. A negative divergence signals a stock price is likely to fall, given the increase in distribution." + }, + { + "style": "Subtitle", + "text": "Products, Properties & Examples", + "updated": 1617967853007 + }, + { + "style": "Table", + "text": "| Product Name | Product Variable | Properties |\n| Chaikin Oscillator | chaikinOscillator | chaikinOscillator, zeroLine |", + "updated": 1617967606206 + }, + { + "style": "Javascript", + "text": "/* EXAMPLES */\n\n// Bullish cross\nchart.at01hs.chaikinOscillator.previous.chaikinOscillator < \nchart.at01hs.chaikinOscillator.previous.zeroLine && \nchart.at01hs.chaikinOscillator.chaikinOscillator > \nchart.at01hs.chaikinOscillator.zeroLine\n\n// Bearish cross\nchart.at01hs.chaikinOscillator.previous.chaikinOscillator > \nchart.at01hs.chaikinOscillator.previous.zeroLine && \nchart.at01hs.chaikinOscillator.chaikinOscillator < \nchart.at01hs.chaikinOscillator.zeroLine", + "updated": 1617967996718 + }, + { + "style": "Subtitle", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-003-arps-slow-arps-fast.json b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-003-arps-slow-arps-fast.json new file mode 100644 index 000000000..b05156a0a --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-003-arps-slow-arps-fast.json @@ -0,0 +1,166 @@ +{ + "topic": "Omega One Data Mine", + "pageNumber": "3", + "type": "ARPS Slow & ARPS Fast", + "definition": { + "text": "Measures the average Bull Power and average Bear Power in the average Total Range.", + "updated": 1617958264294 + }, + "paragraphs": [ + { + "style": "Note", + "text": "You can set different values for used periods at the top section of most indicators found in the Omega Data Mine -> Data Building Procedure -> Procedure Loop -> Procedure Javascript Code node.", + "updated": 1617957983880 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/arps-slow-arps-fast.png" + }, + { + "style": "Subtitle", + "text": "ARPS - Average Range Percentage Spread", + "updated": 1617957610783 + }, + { + "style": "Text", + "text": "ARPS Slow and ARPS Fast measures the Average Bull and Average Bear power within a given, configurable range." + }, + { + "style": "Text", + "text": "Two separate indicators that can be used either separatly or in combination with others." + }, + { + "style": "Text", + "text": "ARPS follows price action by using a SMA center line, and prints out the bullish power visualised by a blue line, and a red line for bearish power. The distance from the centerline represents the strength of the powers. The greater distance away from the center line, the greater advantage.", + "updated": 1617953949590 + }, + { + "style": "Text", + "text": "The distance between the bull and bear lines represents the average total range for the period." + }, + { + "style": "Text", + "text": "Looking at the Plotter Panel will give you the values measured in percentage (%)." + }, + { + "style": "Subtitle", + "text": "How is ARPS calculated?" + }, + { + "style": "Text", + "text": "All values are being calculated through a SMA function." + }, + { + "style": "List", + "text": "Bull Power is the measured distance between the candle low and candle close, divided the candle range.", + "updated": 1617952901003 + }, + { + "style": "List", + "text": "Bear Power is the measured distance between the candle high and candle close, divided the candle range.", + "updated": 1617952943789 + }, + { + "style": "List", + "text": "The average Bull Power and average Bear Power are divided through the Average Total Range for the same given period - Giving the Average Range Spread.", + "updated": 1617953325703 + }, + { + "style": "List", + "text": "All values are multiplied by 100 to convert it to precentage form (%)." + }, + { + "style": "Subtitle", + "text": "Change the input to optimise it for your use case!", + "updated": 1617953879921 + }, + { + "style": "Text", + "text": "Most of Omega indicators can use different period values. To change periods:", + "updated": 1617955135049 + }, + { + "style": "List", + "text": "Locate the Data Mine and expand it." + }, + { + "style": "List", + "text": "Expand the Indicator Bot node." + }, + { + "style": "List", + "text": "Find the Product Definition -> Data Building Procedure -> Procedure Loop -> Procedure Javascript Code." + }, + { + "style": "List", + "text": "Edit the Procedure Javascript Code node." + }, + { + "style": "List", + "text": "Put the text marker in the edit box, and press Arrow Up until you reach the top of the code." + }, + { + "style": "List", + "text": "Look for \"User defined values\".", + "updated": 1617954642138 + }, + { + "style": "List", + "text": "Enter the values of your choice." + }, + { + "style": "Note", + "text": "Remember that you have to delete existing data for the indicator in the Data-Storage folder, and re-start the Data Tasks needed for the indicator in the Network node before you can see any changes.", + "updated": 1617954918128 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/arps-code-node.png", + "updated": 1617954552809 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/arps-user-defined.png", + "updated": 1617954568478 + }, + { + "style": "Subtitle", + "text": "Products, Properties & Examples", + "updated": 1617967853007 + }, + { + "style": "Table", + "text": "| Product Name | Product Variable | Properties |\n| ARPS Slow | slowARPS | ARPS, apsBull, apsBear, SMA, percentageARPS, percentageApsBull, percentage apsBear |", + "updated": 1617968683265 + }, + { + "style": "Javascript", + "text": "/* EXAMPLES for ARPS Slow */\n\n// Bullish cross (Bull Power turns greater than Bear Power)\nchart.at01hs.slowARPS.previous.apsBull < \nchart.at01hs.slowARPS.previous.apsBear && \nchart.at01hs.slowARPS.apsBull > \nchart.at01hs.slowARPS.apsBear\n\n// Bearish cross (Bear Power turns greater than Bull Power)\nchart.at01hs.slowARPS.previous.apsBull > \nchart.at01hs.slowARPS.previous.apsBear && \nchart.at01hs.slowARPS.apsBull < \nchart.at01hs.slowARPS.apsBear\n\n// Average Price is going up compared to previous Average Price\nchart.at01hs.slowARPS.previous.SMA < chart.at01hs.slowARPS.SMA\n\n// The Average Range, measured in percent, is greater than 0.5%\nchart.at01hs.slowARPS.percentageARPS > 0.5\n\n// The Average Range, measured in rate, is greater than 1\nchart.at01hs.slowARPS.ARPS > 1", + "updated": 1617969217661 + }, + { + "style": "Table", + "text": "| Product Name | Product Variable | Properties |\n| ARPS Fast | fastARPS | ARPS, apsBull, apsBear, SMA, percentageARPS, percentageApsBull, percentage apsBear |", + "updated": 1617969400921 + }, + { + "style": "Javascript", + "text": "/* EXAMPLES for ARPS Fast */\n\n// Bullish cross (Bull Power turns greater than Bear Power)\nchart.at01hs.fastARPS.previous.apsBull < \nchart.at01hs.fastARPS.previous.apsBear && \nchart.at01hs.fastARPS.apsBull > \nchart.at01hs.fastARPS.apsBear\n\n// Bearish cross (Bear Power turns greater than Bull Power)\nchart.at01hs.fastARPS.previous.apsBull > \nchart.at01hs.fastARPS.previous.apsBear && \nchart.at01hs.fastARPS.apsBull < \nchart.at01hs.fastARPS.apsBear\n\n// Average Price is going up compared to previous Average Price\nchart.at01hs.fastARPS.previous.SMA < chart.at01hs.slowARPS.SMA\n\n// The Average Range, measured in percent, is greater than 0.5%\nchart.at01hs.fastARPS.percentageARPS > 0.5\n\n// The Average Range, measured in rate, is greater than 1\nchart.at01hs.fastARPS.ARPS > 1", + "updated": 1617969438749 + }, + { + "style": "Subtitle", + "text": "That Wombo-Combo!", + "updated": 1617969861080 + }, + { + "style": "Javascript", + "text": "/* EXAMPLES for ARPS Slow and ARPS Fast combined */\n\n// Fast SMA crosses Slow SMA (Bullish)\nchart.at01hs.fastARPS.previous.SMA < \nchart.at01hs.slowARPS.previous.SMA && \nchart.at01hs.fastARPS.SMA > \nchart.at01hs.slowARPS.SMA\n\n// Fast Bull crosses Slow SMA (Bearish)\nchart.at01hs.fastARPS.previous.apsBull > \nchart.at01hs.slowARPS.previous.SMA && \nchart.at01hs.fastARPS.apsBull < \nchart.at01hs.slowARPS.SMA\n\n// Fast Average Price is above Slow Average Price\nchart.at01hs.fastARPS.SMA > chart.at01hs.slowARPS.SMA\n\n// The Fast Average Range is greater than 0.5 & greater than the Slow Average Range\nchart.at01hs.fastARPS.percentageARPS > 0.5 &&\nchart.at01hs.fastARPS.ARPS > chart.at01hs.slowARPS.ARPS", + "updated": 1617969959288 + }, + { + "style": "Subtitle", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-004-average-vs-average.json b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-004-average-vs-average.json new file mode 100644 index 000000000..d46540ede --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/omega-one-data-mine-004-average-vs-average.json @@ -0,0 +1,188 @@ +{ + "topic": "Omega One Data Mine", + "pageNumber": "4", + "type": "Average VS Average", + "definition": { + "text": "An oscillator that considers averages of price, volume and \"open interest\".", + "updated": 1617958214490 + }, + "paragraphs": [ + { + "style": "Note", + "text": "You can set different values for used periods at the top section of most indicators found in the Omega Data Mine -> Data Building Procedure -> Procedure Loop -> Procedure Javascript Code node.", + "updated": 1617958138349 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/average-vs-average.png" + }, + { + "style": "Subtitle", + "text": "Average VS Average" + }, + { + "style": "Text", + "text": "The Average VS Average Oscillator can be used to recognize changes between a fast average and a slow average. It measures Price Movement, Volume and a so called Open Interest.", + "updated": 1617958497266 + }, + { + "style": "Text", + "text": "The idea is to visualise if the trend weakens or gets stronger, within the current trend." + }, + { + "style": "Text", + "text": "The indicator is a zero-line cross indicator that is best used with an own rate and scale (in order to place it below the candle chart)." + }, + { + "style": "Text", + "text": "The elements in the indicator are:" + }, + { + "style": "List", + "text": "A mid-line that represents the slow average of the elements (it always has the value 1).", + "updated": 1617973206308 + }, + { + "style": "List", + "text": "A green line that shows fast average Bull Power compared to the slow average.", + "updated": 1617960429886 + }, + { + "style": "List", + "text": "A dotted line that shows the fast average Open Interest compared to the slow average.", + "updated": 1617960458863 + }, + { + "style": "List", + "text": "Faded green and red bars in the background that shows the fast average volume compared to the slow average volume. It changes colors depending on the previous value.", + "updated": 1617961835292 + }, + { + "style": "List", + "text": "Non-faded green and red bars close to the zero-line showing the fast price average compared to the slow price average. It changes colors depending on the previous value.", + "updated": 1617961849374 + }, + { + "style": "Subtitle", + "text": "What is \"Open Interest\"?" + }, + { + "style": "Text", + "text": "The idea of measuring Open Interest - is that a red candle might not be an indication of a bearish interest and vice versa. Considering volume, candle direction and amount movement defines the strength of Open Interest.", + "updated": 1617961616124 + }, + { + "style": "List", + "text": "Bull Candle and Volume Increase = Bull Interest" + }, + { + "style": "List", + "text": "Bull Candle and Volume Decrease = Bear Interest" + }, + { + "style": "List", + "text": "Bear Candle and Volume Increase = Bear Interest" + }, + { + "style": "List", + "text": "Bear Candle and Volume Decrease = Bull Interest" + }, + { + "style": "Subtitle", + "text": "How is the Average VS Average calculated?" + }, + { + "style": "List", + "text": "Bull Power is defined by measuring the value between candle min and candle close, out of the total candle range. Comparing the fast average Bull Power through the slow average Bull Power.", + "updated": 1617961207015 + }, + { + "style": "List", + "text": "Volume is measured by the fast average Total Volume through the slow average Total Volume.", + "updated": 1617961227511 + }, + { + "style": "List", + "text": "The fast average Price is compared to the slow average Price.", + "updated": 1617961304593 + }, + { + "style": "List", + "text": "The fast average Open Interest is compared to the slow average Open Interest. ", + "updated": 1617961386984 + }, + { + "style": "Subtitle", + "text": "Change the input to optimise it for your use case!", + "updated": 1617953879921 + }, + { + "style": "Text", + "text": "Most of Omega indicators can use different period values. To change periods:", + "updated": 1617955135049 + }, + { + "style": "List", + "text": "Locate the Data Mine and expand it." + }, + { + "style": "List", + "text": "Expand the Indicator Bot node." + }, + { + "style": "List", + "text": "Find the Product Definition -> Data Building Procedure -> Procedure Loop -> Procedure Javascript Code." + }, + { + "style": "List", + "text": "Edit the Procedure Javascript Code node." + }, + { + "style": "List", + "text": "Put the text marker in the edit box, and press Arrow Up until you reach the top of the code." + }, + { + "style": "List", + "text": "Look for \"User defined values\".", + "updated": 1617954642138 + }, + { + "style": "List", + "text": "Enter the values of your choice." + }, + { + "style": "Note", + "text": "Remember that you have to delete existing data for the indicator in the Data-Storage folder, and re-start the Data Tasks needed for the indicator in the Network node before you can see any changes.", + "updated": 1617954918128 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/average-vs-average-code-node.png", + "updated": 1617958956443 + }, + { + "style": "Png", + "text": "PNGs/Superalgos/Docs/indicators/average-vs-average-user-defined.png", + "updated": 1617958965558 + }, + { + "style": "Subtitle", + "text": "Products, Properties & Examples", + "updated": 1617967853007 + }, + { + "style": "Table", + "text": "| Product Name | Product Variable | Properties |\n| Average VS Average | averageVsAverage | bullPriceDeviation, smaPrice, volumeDeviation, openInterestDeviation |", + "updated": 1617972838194 + }, + { + "style": "Javascript", + "text": "/* EXAMPLES */\n\n// Average price is increasing compared to the slow average price\nchart.at01hs.averageVsAverage.previous.smaPrice < \nchart.at01hs.averageVsAverage.smaPrice\n\n// Bull Power crosses the mid-line (mid-line is always '1') (Bullish)\nchart.at01hs.averageVsAverage.previous.bullPriceDeviation < 1 &&\nchart.at01hs.averageVsAverage.bullPriceDeviation > 1\n\n// Bull Power crosses the mid-line while Open Interest is above mid-line (Bullish)\n( chart.at01hs.averageVsAverage.previous.bullPriceDeviation < 1 &&\nchart.at01hs.averageVsAverage.bullPriceDeviation > 1 ) &&\nchart.at01hs.averageVsAverage.openInterestDeviation < 1\n\n// Volume increases and SMA Price is below mid-line and SMA Price is getting stronger\nchart.at01hs.averageVsAverage.previous.volumeDeviation < \nchart.at01hs.averageVsAverage.volumeDeviation &&\nchart.at01hs.averageVsAverage.smaPrice < 1 &&\nchart.at01hs.averageVsAverage.previous.smaPrice < \nchart.at01hs.averageVsAverage.smaPrice", + "updated": 1617973639173 + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/tested-exchanges-010-coinbasepro-test-status.json b/Projects/Superalgos/Schemas/Docs-Topics/tested-exchanges-010-coinbasepro-test-status.json index b85b8b9f9..114859374 100644 --- a/Projects/Superalgos/Schemas/Docs-Topics/tested-exchanges-010-coinbasepro-test-status.json +++ b/Projects/Superalgos/Schemas/Docs-Topics/tested-exchanges-010-coinbasepro-test-status.json @@ -14,18 +14,18 @@ }, { "style": "List", - "text": "1-min OHLCVs Capability: Yes. The ability to fetch historic data for backtesting purposes has not been fully verified.", - "updated": 1616005829277 + "text": "1-min OHLCVs Capability: Yes. Backtesting and Paper trading are functional. The data mining process is extremely slow when retrieving full history due to API limits but it is adequate for live trading purposes.", + "updated": 1617935711274 }, { "style": "List", - "text": "Market History: Unknown", - "updated": 1615453086807 + "text": "Market History: Full extent is unknown, however it is at least 2020-01-01.", + "updated": 1617935743856 }, { "style": "List", - "text": "Trading Capability: Unknown.The ability to run strategies in live-trading mode has not been verified.", - "updated": 1616005834904 + "text": "Trading Capability: Partial. With a proper key configuration placing orders is possible. Currently, closing orders is not fully functional, so all types of trading strategies may not be fully functional.", + "updated": 1617935811860 }, { "style": "List", @@ -34,16 +34,24 @@ }, { "style": "Title", - "text": "Configuration" + "text": "Exchange Configuration" }, { "style": "Json", "text": "{\n \"codeName\": \"coinbasepro\",\n \"API\": [\n {\n \"method\": \"fetch_ohlcv\",\n \"limit\": 300\n }\n ]\n}", - "updated": 1615453067170 + "updated": 1617935879109 + }, + { + "style": "Title", + "text": "API Key Configuration" + }, + { + "style": "Json", + "text": "{\n \"codeName\": \"APIKEY\",\n \"secret\": \"SECRETKEY\",\n \"password\": \"PASSPHRASE\"\n}" }, { "style": "Text", "text": "" } ] -} \ No newline at end of file +} diff --git a/Projects/Superalgos/Schemas/Docs-Topics/troubleshooting-016-browser-compatibility.json b/Projects/Superalgos/Schemas/Docs-Topics/troubleshooting-016-browser-compatibility.json new file mode 100644 index 000000000..5f4743244 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/troubleshooting-016-browser-compatibility.json @@ -0,0 +1,41 @@ +{ + "topic": "Troubleshooting", + "pageNumber": "16", + "type": "Browser Compatibility", + "definition": { + "text": "There is no recommended browser to use!", + "updated": 1618298878638 + }, + "paragraphs": [ + { + "style": "Text", + "text": "While there is no recommended browser to use with Superalgos, there is the need to use a common base for developers and users to develop SA and troubleshoot possible errors. As of today Chrome is one of the most used browser worldwide and that's why it's suggested to use it. Some users reported that Edge and Brave browser both based on chromium project are working with no (or minor) issues.", + "updated": 1618299516232 + }, + { + "style": "List", + "text": "Chrome -> Common base browser used by devs to develop SA and troubleshoot issues" + }, + { + "style": "List", + "text": "Edge -> Based on chromium, unknown issues" + }, + { + "style": "List", + "text": "Brave -> Based on chromium, unknown issues. Shields should be set down", + "updated": 1618300294258 + }, + { + "style": "List", + "text": "Firefox -> No reports, unknown" + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-warnings-016-ts-lf-trading-bot-warning-order-not-found-at-the-exchange.json b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-warnings-016-ts-lf-trading-bot-warning-order-not-found-at-the-exchange.json new file mode 100644 index 000000000..3eea20702 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Topics/ts-lf-trading-bot-warnings-016-ts-lf-trading-bot-warning-order-not-found-at-the-exchange.json @@ -0,0 +1,49 @@ +{ + "topic": "TS LF Trading Bot Warnings", + "pageNumber": "15", + "type": "TS LF Trading Bot Warning - Order Not Found at the Exchange", + "definition": { + "text": "The exchange returned null while checking an order. This usually happens at exchanges like Coinbase Pro that after an order cancellation the exchange deletes the order instead of changing it's status to cancelled.", + "updated": 1611922128136 + }, + "paragraphs": [ + { + "style": "Success", + "text": "This is not an error and may be normal behavior. The trading bot created this warning to let you know that this happened so that you may keep track of all the details of the trade should you need to. This page provides information that should help you understand the context of the warning.", + "updated": 1611922148396 + }, + { + "style": "Warning", + "text": "Order Status Not Sync With Exchange" + }, + { + "style": "Title", + "text": "Context Info" + }, + { + "style": "Text", + "text": "Find below the values of variables relevant to the warning at the time the warning was created. They may prove of use to understand what happened." + }, + { + "style": "Placeholder", + "text": "contextInfo" + }, + { + "style": "Title", + "text": "Learn More" + }, + { + "style": "Text", + "text": "To learn more about this topic, please read the following page:" + }, + { + "style": "List", + "text": "Checking Exchange Events", + "updated": 1611921970650 + }, + { + "style": "List", + "text": "Syncing With the Exchange" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-008-tutorial-step-switching-branches.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-008-tutorial-step-switching-branches.json index 7d8b4e9c0..4342c737f 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-008-tutorial-step-switching-branches.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-008-tutorial-step-switching-branches.json @@ -3,8 +3,8 @@ "pageNumber": 8, "type": "Tutorial Step - Switching Branches", "definition": { - "text": "The master branch in the Superalgos repo features the latest stable version, while the develop branch features the version in development!", - "updated": 1616759979604, + "text": "Superalgos allows you to switch branches directly from within the app! But, why would you want to switch branches?", + "updated": 1618145423371, "icon": { "name": "github", "project": "Superalgos" @@ -18,13 +18,13 @@ }, { "style": "Success", - "text": "Or you may wish to submit a contribution, which must always be sent to the develop branch!", - "updated": 1616760455582 + "text": "Or you may wish to submit a contribution, like in our case right now! Let's do it!", + "updated": 1618145540691 }, { "style": "Callout", - "text": "Scroll down the Docs page to the footer and select Develop as your Contributions Branch! It's the option on the right-hand side, not in the center!", - "updated": 1616760852432 + "text": "Scroll down the Docs page to the footer and select Plugins/Docs as your Contributions Branch! It's the option on the right-hand side, not in the center!", + "updated": 1618145561816 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-009-tutorial-step-now-the-current-branch.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-009-tutorial-step-now-the-current-branch.json index 3c19006a6..5242c3ef9 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-009-tutorial-step-now-the-current-branch.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-009-tutorial-step-now-the-current-branch.json @@ -13,13 +13,18 @@ "paragraphs": [ { "style": "Text", - "text": "Now it's time to change the Current Branch! When you do that, the app will run a series of Git commands that will download the software from the develop branch of your fork! The current software will be automatically replaced on your disk! For that reason, you will need to close the app after switching, restart, find the tutorial and resume to keep going!", - "updated": 1617017990927 + "text": "Next in line is switching the Current Branch, but we need to run some checks first!", + "updated": 1618154759190 }, { - "style": "Important", - "text": "But before you switch branches, let's take a moment to think of the consequences!", - "updated": 1617008246622 + "style": "Callout", + "text": "If you forked the Superalgos repo before April 6th, 2021, follow the instructions on this page to create the plugins-docs branch. Otherwise, keep going!", + "updated": 1618154888356 + }, + { + "style": "Text", + "text": "When you switch branches, the app will run a series of Git commands that will download the software from the plugins-docs branch of your fork! The current software will be replaced on your disk! For that reason, you will need to close the app after switching. But let's discuss a couple more things before you proceed!", + "updated": 1618159009151 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-010-tutorial-step-before-you-switch.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-010-tutorial-step-before-you-switch.json index 514833ead..121481bae 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-010-tutorial-step-before-you-switch.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-010-tutorial-step-before-you-switch.json @@ -3,23 +3,23 @@ "pageNumber": 10, "type": "Tutorial Step - Before You Switch", "definition": { - "text": "There are a few things you should consider every time you switch branches! Let's go through a quick list bfore you proceed!", + "text": "There are a few things you should consider every time you switch branches! Let's go through a quick list before you proceed!", "icon": { "name": "bullet-warning", "project": "Superalgos" }, - "updated": 1617018123415 + "updated": 1618147991903 }, "paragraphs": [ { "style": "List", - "text": "It may happen that the workspaces or other data structures in the master branch are not compatible with those in the develop branch. ", - "updated": 1617017830521 + "text": "It may happen that the workspaces or other data structures in the master branch are not compatible with those in the other branch.", + "updated": 1618158546133 }, { "style": "List", - "text": "If the current workspace is incompatible with the software in the other branch, the workspace may break upon reloading the app. In such a case, you must load a Plugin Workspace of the new branch.", - "updated": 1617018153708 + "text": "If the current workspace is incompatible with the software in the other branch, the workspace may break upon reloading the app. In such a case, load one of the Plugin Workspaces of the new branch.", + "updated": 1618158600251 }, { "style": "List", @@ -28,8 +28,8 @@ }, { "style": "Important", - "text": "Always check the README file in the develop branch of the repository for any comments on backward compatibility. Before switching branches, it is always good to back up your work!", - "updated": 1617017837289 + "text": "Always check the README file in the branch of the repository you wish to access for any comments on backward compatibility. Before switching branches, back up your work!", + "updated": 1618158675366 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-011-tutorial-step-double-trouble.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-011-tutorial-step-double-trouble.json index 429974916..b3b2b4ab8 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-011-tutorial-step-double-trouble.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-011-tutorial-step-double-trouble.json @@ -13,8 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "You may have two clones of your fork running from separate folders, one of them in the develop branch.", - "updated": 1617018731051 + "text": "You may have two clones of your fork running from separate folders, each on different branches.", + "updated": 1618158812449 }, { "style": "Note", @@ -23,8 +23,8 @@ }, { "style": "Success", - "text": "Such a setup allows you to run the stable version for your production tasks, and the version in develop to contribute and test new features!", - "updated": 1617018806324 + "text": "Such a setup allows you to run the stable version for your production tasks, and the version in another branch to contribute and test new features! But you can't run two versions at the same time, unless you change ports! We won't go there now!", + "updated": 1618148172616 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-012-tutorial-step-lets-switch-already.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-012-tutorial-step-lets-switch-already.json index 67b6942ed..ace1aedfc 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-012-tutorial-step-lets-switch-already.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-012-tutorial-step-lets-switch-already.json @@ -18,8 +18,8 @@ }, { "style": "List", - "text": "Go back to the footer and select Develop as your Current Branch.", - "updated": 1617019546125 + "text": "Go back to the footer and select Plugins/Docs as your Current Branch.", + "updated": 1618159168230 }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-013-tutorial-step-welcome-back.json b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-013-tutorial-step-welcome-back.json index a69d03db3..2fda57d56 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-013-tutorial-step-welcome-back.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/contribute-to-superalgos-013-tutorial-step-welcome-back.json @@ -3,18 +3,18 @@ "pageNumber": 13, "type": "Tutorial Step - Welcome Back!", "definition": { - "text": "If you followed my instructions to the letter, you should now be running the software in the develop branch! Awesome!", + "text": "If you followed my instructions to the letter, you should now be running the software in the plugins-docs branch! Awesome!", "icon": { "name": "hits", "project": "Superalgos" }, - "updated": 1617007379836 + "updated": 1618159282200 }, "paragraphs": [ { "style": "Text", - "text": "The software you are currently running is the version of Superalgos that was at the develop branch the day you forked the project! This is because the process of switching branches downloads the software from your fork and not the upstream repository.", - "updated": 1617020053004 + "text": "The software you are currently running is the version of Superalgos that was at the plugins-docs branch the day you forked the project! This is because the process of switching branches downloads the software from your fork and not the upstream repository.", + "updated": 1618159308510 }, { "style": "Success", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-001-how-to-set-up-a-new-chart-tutorial.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-001-how-to-set-up-a-new-chart-tutorial.json index 394a62a0e..8f794df31 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-001-how-to-set-up-a-new-chart-tutorial.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-001-how-to-set-up-a-new-chart-tutorial.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "1", - "type": "How to set up a new Chart Tutorial", + "type": "How to Set up a New Chart Tutorial", "definition": { "text": "This Tutorial walks through the basic inner workings of the Charting Space to help you learn how to create your own custom charts.", "updated": 1617371694835 diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-002-adding-charts-introduction.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-002-adding-charts-introduction.json index 6c4d700de..fd97991c8 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-002-adding-charts-introduction.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-002-adding-charts-introduction.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "2", "type": "Adding Charts - Introduction", "definition": { @@ -13,13 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "The charting system within Superalgos is quite powerful! It pulls together information from across the entire system so that you can conveniently visualize it in one place.", - "updated": 1617369523502 - }, - { - "style": "Text", - "text": "As I am sure you have figured out by now, there are a lot of moving pieces within Superalgos. The Charting Space lets you tap into the specific information you want to see. You can look at different combinations of Indicators, Backtesting and Live Trading results, even data from different Markets and Exchanges! This flexibility makes it possible to customize charts to your heart’s content. Pretty cool right!", - "updated": 1617631456321 + "text": "The charting system within Superalgos is quite powerful! It pulls together information from across the entire system so that you can conveniently visualize it in one place. As I am sure you have figured out by now, there are a lot of moving pieces within Superalgos. The Charting Space lets you tap into the specific information you want to see. You can look at different combinations of Indicators, Backtesting and Live Trading results, even data from different Markets and Exchanges! This flexibility makes it possible to customize charts to your heart’s content. Pretty cool right!", + "updated": 1617796990054 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-003-adding-charts-before-we-begin.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-003-adding-charts-before-we-begin.json index 8038d9aed..afcb1d09b 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-003-adding-charts-before-we-begin.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-003-adding-charts-before-we-begin.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "3", "type": "Adding Charts - Before We Begin", "definition": { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-004-adding-charts-charts-without-tears.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-004-adding-charts-charts-without-tears.json index ca6b233bd..8efda9073 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-004-adding-charts-charts-without-tears.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-004-adding-charts-charts-without-tears.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "4", - "type": "Adding Charts - Charts without tears", + "type": "Adding Charts - Charts without Tears", "definition": { "text": "I've got your back!", "updated": 1617630234092, diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-005-adding-charts-looking-for-a-quick-fix.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-005-adding-charts-looking-for-a-quick-fix.json index e1cc42a4e..395abc0c4 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-005-adding-charts-looking-for-a-quick-fix.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-005-adding-charts-looking-for-a-quick-fix.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "5", "type": "Adding Charts - Looking for a quick fix?", "definition": { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-006-adding-charts-dashing-dashboards.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-006-adding-charts-dashing-dashboards.json index 265bf920d..54853e277 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-006-adding-charts-dashing-dashboards.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-006-adding-charts-dashing-dashboards.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "6", "type": "Adding Charts - Dashing Dashboards", "definition": { @@ -13,17 +13,18 @@ "paragraphs": [ { "style": "Text", - "text": "To get us started, I want you to get a little more comfortable with how the Charting Space is set up. Expand the Charting Space node and take a look at the Dashboards underneath. What do you notice?", - "updated": 1617326642397 + "text": "To get us started, I want you to get a little more comfortable with how the Charting Space is set up.", + "updated": 1617798279418 + }, + { + "style": "Callout", + "text": "Expand the Charting Space node and take a look at the Dashboards underneath. What do you notice? ", + "updated": 1617798044669 }, { "style": "Text", - "text": "That’s right! There is one Dashboard set up for Backtesting and one set up for Live Trading. Dashboards are a convenient way to group charts according to type. ", - "updated": 1617635396701 - }, - { - "style": "Note", - "text": "Eventually Dashboards will be used to bring multiple Time Machines together in useful configurations, but for right now they helps us stay organized." + "text": "That’s right! There is one Dashboard set up for Backtesting and one set up for Live Trading. Dashboards are a convenient way to group charts according to type.", + "updated": 1617798035878 }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-007-adding-charts-time-machines-hold-it-all-together.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-007-adding-charts-time-machines-hold-it-all-together.json index 59234274f..b44e1668f 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-007-adding-charts-time-machines-hold-it-all-together.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-007-adding-charts-time-machines-hold-it-all-together.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "7", - "type": "Adding Charts - Time Machines hold it all together", + "type": "Adding Charts - Time Machines Hold It all Together", "definition": { "text": "You've seen these portals to another dimension before! Now let's take a closer look at the magical Time Machine.", "icon": { @@ -13,8 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "As you can see, each dashboard has a Time Machine attached to it. You have already encountered time machines in previous tutorials. But today we are going to be working with them a lot more closely. Take a minute and read their documentation page to get a better idea of what they do.", - "updated": 1617327414064 + "text": "You might have noticed each dashboard has a Time Machine attached to it. You have already encountered time machines in previous tutorials. But today we are going to be working with them a lot more closely. Take a minute and read their documentation page to get a better idea of what they do.", + "updated": 1617799568096 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-008-adding-charts-keep-it-in-one-place.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-008-adding-charts-keep-it-in-one-place.json index 3636985dd..f849860e9 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-008-adding-charts-keep-it-in-one-place.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-008-adding-charts-keep-it-in-one-place.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "8", - "type": "Adding Charts - Keep it in one place", + "type": "Adding Charts - Keep It in One Place", "definition": { "text": "Setting up a Time Machine will allow you to keep your data synchronized and accessible.", "updated": 1617634554869, diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-009-adding-charts-without-further-ado.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-009-adding-charts-without-further-ado.json index f879347ef..c2b3abada 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-009-adding-charts-without-further-ado.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-009-adding-charts-without-further-ado.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "9", "type": "Adding Charts - Without Further Ado", "definition": { @@ -13,13 +13,22 @@ "paragraphs": [ { "style": "Text", - "text": "Enough chit-chat, let’s start adding some charts! Hover over the Testing Environment Dashboard and click Add Time Machine. Then add a name that makes it easy to identify.", - "updated": 1617635008264 + "text": "Enough chit-chat, let’s start adding some charts! ", + "updated": 1617799641215 + }, + { + "style": "Callout", + "text": "Hover over the Testing Environment Dashboard and click Add Time Machine. ", + "updated": 1617799706852 }, { "style": "Text", - "text": "Now that we have something to hold our charts, let's go ahead and add one. Hover over your time machine and click Add Timeline Chart (make sure to name it as well).", - "updated": 1617635775344 + "text": "Make sure to name it something you will recognize. A good naming practice is to reference the Trading System and type of Trading Session that will be connected to the chart. For us that would be: ", + "updated": 1617800245292 + }, + { + "style": "Json", + "text": "Lightning Strike Backtesting Session" }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-010-adding-charts-why-is-it-blank.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-010-adding-charts-why-is-it-blank.json index 01d0a38a0..2921f3e0c 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-010-adding-charts-why-is-it-blank.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-010-adding-charts-why-is-it-blank.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "10", - "type": "Adding Charts - Why is it blank?", + "type": "Adding Charts - Why is It Blank?", "definition": { "text": "Woohoo, you did it! You have added your first custom chart.", "updated": 1617636144825, @@ -17,12 +17,14 @@ "updated": 1617636174999 }, { - "style": "Text", - "text": " If you check the Charting Space, your Time Machine is there, but it is totally blank. That’s because we haven’t hooked it up to any of your data." + "style": "Callout", + "text": "Check the Charting Space. Your Time Machine is there, but it is totally blank. ", + "updated": 1617801603388 }, { "style": "Text", - "text": "Let’s change that!" + "text": "That’s because we haven’t hooked it up to any of your data. Let’s change that!", + "updated": 1617801613196 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-011-adding-charts-the-chart-of-many-talents.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-011-adding-charts-the-chart-of-many-talents.json index ff9ccac8f..e4828a6d6 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-011-adding-charts-the-chart-of-many-talents.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-011-adding-charts-the-chart-of-many-talents.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "11", - "type": "Adding Charts - The Chart of many talents", + "type": "Adding Charts - The Chart of many Talents", "definition": { "text": "The Timeline Chart gives you total control.", "icon": { @@ -13,13 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "As I mentioned earlier, one of the main features the Charting Space offers is the ability to combine many different types of data all in one place. ", - "updated": 1617636673390 - }, - { - "style": "Text", - "text": "The Timeline Chart gives you this control! Each timeline chart allows you to collect the data you wish to see under a Layer Manager. As you may remember, the layer manager is what allows you to turn different layers on and off while inside a Time Machine.", - "updated": 1617661192637 + "text": "As I mentioned earlier, one of the main features the Charting Space offers is the ability to combine many different types of data all in one place. The Timeline Chart gives you this control! Each timeline chart allows you to collect the data you wish to see under a Layer Manager. As you may remember, the layer manager is what allows you to turn different layers on and off while inside a Time Machine.", + "updated": 1617839354763 }, { "style": "Important", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-012-adding-charts-herding-layers.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-012-adding-charts-herding-layers.json index dc31b5a54..eb81507c5 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-012-adding-charts-herding-layers.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-012-adding-charts-herding-layers.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "12", - "type": "Adding Charts - Herding layers", + "type": "Adding Charts - Herding Layers", "definition": { "text": "Let's get into the nitty gritty of layer managment.", "icon": { @@ -13,12 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "Layer Managers keep track of all the layers connected beneath them. They are also the nodes that accept references to a variety of Data Mine Products. By establishing references with a particular mine we can easily add all the data associated with it. ", - "updated": 1617640517891 - }, - { - "style": "Text", - "text": "The three main types of data are:" + "text": "Layer Managers keep track of all the layers connected beneath them. They are also the nodes that accept references to a variety of Data Mine Products. By establishing references with a particular Mine, we can easily add all the data associated with it. The three main types of data are:", + "updated": 1617839461481 }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-013-adding-charts-your-data-treasure-trove.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-013-adding-charts-your-data-treasure-trove.json index 7206684d8..3f2972556 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-013-adding-charts-your-data-treasure-trove.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-013-adding-charts-your-data-treasure-trove.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "13", - "type": "Adding Charts - Your data treasure trove", + "type": "Adding Charts - Your Data Treasure Trove", "definition": { "text": "The Data Storage node holds all the important data your bots work so hard to produce. Think of it like your own personal tresure chest full of data.", "icon": { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-014-adding-charts-follow-the-tree.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-014-adding-charts-follow-the-tree.json index 92abb3945..8f8b605e8 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-014-adding-charts-follow-the-tree.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-014-adding-charts-follow-the-tree.json @@ -1,25 +1,34 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "14", "type": "Adding Charts - Follow the Tree!", "definition": { - "text": "Follow the Data Storage hierarchy and find the Data Mine Products.", + "text": "Follow the Data Mines Data hierarchy and find the Data Mine Products.", "icon": { "name": "data-mines-data", "project": "Superalgos" }, - "updated": 1617328950687 + "updated": 1617849486659 }, "paragraphs": [ { - "style": "Text", - "text": "To do this, pin and drag your whole Time Machine over to the Network node and find the Data Storage node. Expand the Data Storage node. You should notice that there are three branches. One for each type of data we can access in our charts. Since we are interested in Data Mine Products, expand the Data Mines Data node and follow it down. Do you notice any similarity with the other parts of Superalgos you’ve seen? That’s right! The hierarchy is organized according to Project, Exchange, Market, and Data Mine.", - "updated": 1617452392093 + "style": "Callout", + "text": "Keep following the hierarchy. See if you can find the Data Mine Products nodes on your own.", + "updated": 1617849736915 }, { - "style": "Note", - "text": "This is the same basic organization you will find with other types of data as well.", - "updated": 1617328905528 + "style": "Text", + "text": "Did you find them? Keep going farther down the hierarchy until you see them!", + "updated": 1617849595158 + }, + { + "style": "Text", + "text": "" + }, + { + "style": "Important", + "text": "You should see three data mine products nodes. One for each Data Mine install within this Workspace.", + "updated": 1617849622065 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-015-adding-charts-the-data-you-want-to-see.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-015-adding-charts-the-data-you-want-to-see.json index 6b5d82f7f..1ba1a6240 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-015-adding-charts-the-data-you-want-to-see.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-015-adding-charts-the-data-you-want-to-see.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "15", - "type": "Adding Charts - The data you want to see", + "type": "Adding Charts - The Data You Want to See", "definition": { "text": "You control the flow of data.", "updated": 1617646900550, @@ -13,12 +13,13 @@ "paragraphs": [ { "style": "Text", - "text": "The granularity of the Data Storage hierarchy means that you can access Data Products in any combination. Do you want to see data from two different exchanges on the same market? Easily possible. Do you want to see data from two similar markets side by side? Piece of cake! The combinations of data you can view within your charts is truly up to your imagination. ", - "updated": 1617646868051 + "text": "Do you notice any similarity with the other parts of Superalgos you’ve seen? That’s right! The hierarchy is organized according to Project, Exchange, Market, and Data Mine. This is the same basic organization you will find with all data here in Superalgos.", + "updated": 1617840932423 }, { - "style": "Text", - "text": "Whew! I am getting a little carried away. My friends will cover these exciting possiblities in a little while. Let's refocus and finish adding those Data Mine Products." + "style": "Important", + "text": "This granularity means you can access Data Products in any combination. Do you want to see data from two different exchanges on the same market? Easily possible. Do you want to see data from two similar markets side by side? Piece of cake! The combinations of data you can view within your charts is truly up to your imagination.", + "updated": 1617842448486 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-016-adding-charts-hooking-up-a-chart-to-data-products.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-016-adding-charts-hooking-up-a-chart-to-data-products.json index 1beac43e9..68ea99c43 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-016-adding-charts-hooking-up-a-chart-to-data-products.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-016-adding-charts-hooking-up-a-chart-to-data-products.json @@ -1,25 +1,30 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "16", "type": "Adding Charts - Hooking up a Chart to Data Products", "definition": { - "text": "We are almost to the node we need!", + "text": "Get your Time Machine in position. ", "icon": { "name": "data-mine-products", "project": "Superalgos" }, - "updated": 1617329505743 + "updated": 1617841161571 }, "paragraphs": [ { "style": "Text", - "text": "We've been working on adding some Data Mine Products to our chart. Let's be a little more specific, we are going to add the data mine products for the Masters Data Mine in the Binance BTC/USDT market. As you follow the hierarchy down you should see the Market Data Products nodes for the Binance BTC/USDT market.", - "updated": 1617452481209 + "text": "Whew! I am getting a little carried away. My friends will cover these exciting possiblities in a little while. Let's refocus and finish adding those Data Mine Products we've been working on.", + "updated": 1617841292233 }, { - "style": "Note", - "text": "There are three data mines installed in this Workspace. You will see one Market Data Products node for each market.", - "updated": 1617647424199 + "style": "Callout", + "text": "Pin and drag your whole Time Machine over to Data Mine Products nodes you found earlier.", + "updated": 1617842351106 + }, + { + "style": "Success", + "text": "Don't forget Ctrl + ← → ↑ ↓. It's a bit of a trek!", + "updated": 1617841738597 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-017-adding-charts-data-products-make-the-world-go-round.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-017-adding-charts-data-products-make-the-world-go-round.json deleted file mode 100644 index 06ce7d1c2..000000000 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-017-adding-charts-data-products-make-the-world-go-round.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "tutorial": "How to set up a new Chart", - "pageNumber": "17", - "type": "Adding Charts - Data Products make the world go round", - "definition": { - "text": "We finally found it!", - "icon": { - "name": "data-mine-products", - "project": "Superalgos" - }, - "updated": 1617330357641 - }, - "paragraphs": [ - { - "style": "Text", - "text": "Underneath the Market Data Products node are the nodes we are after, the Data Mine Products nodes. These nodes are the ones we will connect to our chart! If the Data Storage node was your treasure chest, Data Products are your gold!", - "updated": 1617452590612 - }, - { - "style": "Note", - "text": "You should see one Data Mine Products node for each data mine you have installed in your workspace. I hope the pattern is starting to sink in for you!", - "updated": 1617329732074 - } - ] -} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-018-adding-charts-make-the-connection.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-018-adding-charts-make-the-connection.json index 7b9db2037..281d7358b 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-018-adding-charts-make-the-connection.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-018-adding-charts-make-the-connection.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "18", - "type": "Adding Charts - Make the connection", + "type": "Adding Charts - Make the Connection", "definition": { "text": "Let's make the connection.", "icon": { @@ -13,8 +13,12 @@ "paragraphs": [ { "style": "Text", - "text": "Find the Layer Manager under the Timeline Chart you added earlier. Then establish a reference between it and the Masters Data Mine Products node. ", - "updated": 1617648263797 + "text": "Out of the three Data Mine Products nodes available, we are going to connect our chart to the Masters Data Mine.", + "updated": 1617850389465 + }, + { + "style": "Callout", + "text": "Find the Layer Manager under the Timeline Chart you added earlier. Then establish a reference between it and the Masters Data Mine Products node." }, { "style": "Success", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-019-adding-charts-add-the-layers.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-019-adding-charts-add-the-layers.json index 3ee4d4a9f..20f294e9e 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-019-adding-charts-add-the-layers.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-019-adding-charts-add-the-layers.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "19", "type": "Adding Charts - Add the Layers", "definition": { @@ -12,18 +12,13 @@ }, "paragraphs": [ { - "style": "Text", - "text": "The last step is to hover over the Layer Manager and click Add All Mine Layers. This will automatically add references to all of the individual layers produced by the Data Mine. ", - "updated": 1617656376504 - }, - { - "style": "Important", - "text": "Make sure to run all Data Tasks and wait for them to reach 100%.", - "updated": 1617656439904 + "style": "Callout", + "text": "The last step is to hover over the Layer Manager and click Add All Mine Layers. ", + "updated": 1617850457047 }, { "style": "Text", - "text": "Now you should be able to check the Charting Space and see the indicators from the Data Mine showing up in your chart!" + "text": "This will automatically add references to all of the individual layers produced by the Data Mine." }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-020-adding-charts-hooking-up-a-chart-to-a-trading-system.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-020-adding-charts-hooking-up-a-chart-to-a-trading-system.json index 994b70ea3..585d08402 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-020-adding-charts-hooking-up-a-chart-to-a-trading-system.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-020-adding-charts-hooking-up-a-chart-to-a-trading-system.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "20", "type": "Adding Charts - Hooking up a Chart to a Trading System", "definition": { @@ -13,18 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "The next thing you will want to connect with most charts are the results of your trading strategies. For the most part, this is the same as connecting to a Data Mine. There are just a few differences I will walk you through.", - "updated": 1617649096083 - }, - { - "style": "Text", - "text": "One major difference is that each Time Machine can only reference one Trading Session. For example, one Backtesting Session that is associated with one Trading System. This helps keep your charts clean and readable. It would be confusing to see buy orders from two different trading systems all at once!", - "updated": 1617649161505 - }, - { - "style": "Text", - "text": "What this means for connecting a chart is that we need to establish two references in order for things to work.", - "updated": 1617369951260 + "text": "The next thing you will want to connect with most charts are the results of your trading strategies. For the most part, this is the same as connecting to a Data Mine. There are just a few differences I will walk you through. One major difference is that each Time Machine can only reference one Trading Session. For example, one Backtesting Session that is associated with one Trading System. This helps keep your charts clean and readable. It would be confusing to see buy orders from two different trading systems all at once! What this means for connecting a chart is that we need to establish two references in order for things to work.", + "updated": 1617851405458 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-021-adding-charts-connection-one.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-021-adding-charts-connection-one.json index 2ab96042b..62098ca76 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-021-adding-charts-connection-one.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-021-adding-charts-connection-one.json @@ -1,24 +1,33 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "21", - "type": "Adding Charts - Connection one", + "type": "Adding Charts - Connection One", "definition": { - "text": "Let's make the first connection.", + "text": "Let's make the first connection. Go find your Time Machine and drag it back here.", "icon": { "name": "delink-node", "project": "Superalgos" }, - "updated": 1617370061516 + "updated": 1617883855631 }, "paragraphs": [ { "style": "Text", - "text": "The first connection is between a Trading Session and the Time Machine we have been working on. Drag your Time Machine back up to the Network node. Find the Testing Trading Tasks hierarchy. Follow it down until you find the Backtesting Task for the Lightning Strike Trading System. Continue down the hierarchy until you find the Backtesting Session. Now take your Time Machine and create a reference to it.", - "updated": 1617649517982 + "text": "The first connection is between a Trading Session and the Time Machine we have been working on. This reference tells our chart which Trading System and Session to listen for.", + "updated": 1617883945973 + }, + { + "style": "Callout", + "text": "Once you are back create a reference between your Time Machine and the Backtesting Session. " + }, + { + "style": "Text", + "text": "" }, { "style": "Note", - "text": "These steps are the same for connecting to a Live Trading Session. The only difference is following the Production Trading Task hierarchy instead." + "text": "These steps are the same for connecting to a Live Trading Session. The only difference is the Session will be found under the Production Trading Task hierarchy instead.", + "updated": 1617884102564 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-022-adding-charts-connection-two.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-022-adding-charts-connection-two.json index 815fb62b2..f7db04a40 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-022-adding-charts-connection-two.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-022-adding-charts-connection-two.json @@ -1,25 +1,32 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "22", - "type": "Adding Charts - Connection two", + "type": "Adding Charts - Connection Two", "definition": { - "text": "And now the second.", + "text": "We are almost there! Go drag your Time Machine back over here.", "icon": { "name": "delink-node", "project": "Superalgos" }, - "updated": 1617374736974 + "updated": 1617886454003 }, "paragraphs": [ { "style": "Text", - "text": "Now we can go back to the Data Storage hierarchy and follow the Trading Mines Data branch until we find the Backtesting Session Reference node that matches the Backtesting Session we just came from.", - "updated": 1617453374362 + "text": "Under the Session Reference node you will see the Trading Mine Products node we are after." + }, + { + "style": "Callout", + "text": "Now create a reference between your new Layer Manager and the Trading Mind Products node.", + "updated": 1617886479339 + }, + { + "style": "Success", + "text": "If you hooked it up correctly, the name Masters should appear over the layer manager." }, { "style": "Text", - "text": "We are almost there! Under the Backtesting Session Reference node you will see a Trading Mine Products node. Just like before, add a new Timeline Chart (don’t forget to name it). Then create a reference between the Trading Mine Products node and the Layer Manager.", - "updated": 1617453393860 + "text": "" } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-023-adding-charts-check-the-chart.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-023-adding-charts-check-the-chart.json index 472f0f855..92937b1a7 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-023-adding-charts-check-the-chart.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-023-adding-charts-check-the-chart.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "23", "type": "Adding Charts - Check the Chart", "definition": { @@ -11,19 +11,15 @@ } }, "paragraphs": [ - { - "style": "Text", - "text": "Run the Backtesting Session for the Lightning Strike Trading System and wait for it to finish. Then verify things are working in the Charting Space by turning on a few layers.", - "updated": 1617661474803 - }, { "style": "Important", - "text": "Remember to pay attention to the Time Frame and dates the session was run under. Otherwise you won’t see anything!" + "text": "Make sure to run the Backtesting Session for the Lightning Strike Trading System and wait for it to finish.", + "updated": 1617887112622 }, { - "style": "Success", - "text": "The Lightning Strike Backtesting Session was run on the one minute time frame from September 1 2020 to September 2 2020.", - "updated": 1617651027780 + "style": "Callout", + "text": "Check your chart by turning on a few Trading System layers.", + "updated": 1617887153627 } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-024-adding-charts-easy-as-1-2-3.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-024-adding-charts-easy-as-1-2-3.json index 5d7bfd085..affd1a816 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-024-adding-charts-easy-as-1-2-3.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-024-adding-charts-easy-as-1-2-3.json @@ -1,5 +1,5 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "24", "type": "Adding Charts - Easy as 1, 2, 3", "definition": { @@ -13,18 +13,8 @@ "paragraphs": [ { "style": "Text", - "text": "Congratulations, your custom chart is now hooked up and working! ", - "updated": 1617370495984 - }, - { - "style": "Text", - "text": "You now know the basic steps of chart creation. You can repeat the same steps, adding more Timeline Charts, to connect any combination of data you want.", - "updated": 1617651306951 - }, - { - "style": "Text", - "text": "Just a quick reminder, the three types of nodes you can connect a Timeline Chart’s Layer Manager to are:", - "updated": 1617370557381 + "text": "Congratulations, your custom chart is now hooked up and working! You now know the basic steps of chart creation. You can repeat the same steps, adding more Timeline Charts, to connect any combination of data you want. Just a quick reminder, the three types of nodes you can connect a Timeline Chart’s Layer Manager to are:", + "updated": 1617886835178 }, { "style": "List", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-025-adding-charts-before-i-go.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-025-adding-charts-before-i-go.json index a1b180d63..08b004d25 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-025-adding-charts-before-i-go.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-025-adding-charts-before-i-go.json @@ -1,7 +1,7 @@ { - "tutorial": "How to set up a new Chart", + "tutorial": "How to Set up a New Chart", "pageNumber": "25", - "type": "Adding Charts - Before I go", + "type": "Adding Charts - Before I Go", "definition": { "text": "Want some more help figuring out complex chart configurations? You are in luck! I have some friends who would love to help you out.", "icon": { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.5-adding-charts-back-to-data-storage.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.5-adding-charts-back-to-data-storage.json new file mode 100644 index 000000000..66ed9a67b --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.5-adding-charts-back-to-data-storage.json @@ -0,0 +1,30 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "21.5", + "type": "Adding Charts - Back to Data Storage", + "definition": { + "text": "Let's find some more Data Products.", + "updated": 1617883193525, + "icon": { + "name": "trading-mines-data", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Text", + "text": "You should notice there are three branches. One for each type of data we can access in our charts. Since we are now interested in the data from our Trading System, we need the data products held under the Trading Mines Data hierarchy. ", + "updated": 1617884873448 + }, + { + "style": "Callout", + "text": "Just like before, follow the hierarchy until you find the Trading Mine Products nodes.", + "updated": 1617884949563 + }, + { + "style": "Success", + "text": "Make sure to look under the Trading Session Reference nodes!", + "updated": 1617884973014 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.7-adding-charts-another-timeline-chart.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.7-adding-charts-another-timeline-chart.json new file mode 100644 index 000000000..f1e539450 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-1.7-adding-charts-another-timeline-chart.json @@ -0,0 +1,28 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "21.7", + "type": "Adding Charts - Another Timeline Chart", + "definition": { + "text": "To connect with our Trading System we will need another Timeline Chart.", + "updated": 1617885750903, + "icon": { + "name": "timeline-chart", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Callout", + "text": "Go find your Time Machine and add a new Timeline Chart." + }, + { + "style": "Text", + "text": "Remember to name it for easy recognition. If we name it according to type of mine or data. A good name would be:", + "updated": 1617885817072 + }, + { + "style": "Json", + "text": "Trading System Layers" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-don’t-forget-the-layers.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-don’t-forget-the-layers.json new file mode 100644 index 000000000..4aaf2006f --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-don’t-forget-the-layers.json @@ -0,0 +1,24 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "22.5", + "type": "Adding Charts - Don’t Forget the Layers!", + "definition": { + "text": "You’ve done this before!", + "updated": 1617888380713, + "icon": { + "name": "layer", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Callout", + "text": "Hover over the Layer Manager and click Add All Mine Layers. " + }, + { + "style": "Text", + "text": "This is an easy step to forget but very important! If there are't any layers under the layer manager, nothing will show up no matter how hard you try.", + "updated": 1617888419678 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-–-don’t-forget-to-add-the-layers.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-–-don’t-forget-to-add-the-layers.json new file mode 100644 index 000000000..58fc00d90 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-2.5-adding-charts-–-don’t-forget-to-add-the-layers.json @@ -0,0 +1,24 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "22.5", + "type": "Adding Charts – Don’t Forget to Add the Layers!", + "definition": { + "text": "You’ve done this before!", + "updated": 1617888064958, + "icon": { + "name": "layer", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Callout", + "text": "Hover over the Layer Manager and click Add All Mine Layers. " + }, + { + "style": "Text", + "text": "This is an easy step to forget but very important! If there aren't any layers under the layer manager, nothing will show up no matter how hard you try.", + "updated": 1617888163173 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-3.5-adding-charts-not-seeing-anything.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-3.5-adding-charts-not-seeing-anything.json new file mode 100644 index 000000000..a1db51ea3 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-3.5-adding-charts-not-seeing-anything.json @@ -0,0 +1,29 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": " 23.5", + "type": "Adding Charts - Not Seeing Anything?", + "definition": { + "text": "Are you having trouble with the Trading Layers?", + "updated": 1617887420953, + "icon": { + "name": "bot-data-dependencies", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Important", + "text": "Remember to pay attention to the Time Frame and dates the session was run under. Otherwise you won’t see anything!", + "updated": 1617887429273 + }, + { + "style": "Success", + "text": "The Lightning Strike Backtesting Session was run on the one minute time frame from September 1 2020 to September 2 2020.", + "updated": 1617887385163 + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-6.5-adding-charts-dashboards-in-the-future.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-6.5-adding-charts-dashboards-in-the-future.json new file mode 100644 index 000000000..4820791a2 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-6.5-adding-charts-dashboards-in-the-future.json @@ -0,0 +1,25 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "6.5", + "type": "Adding Charts - Dashboards in the Future", + "definition": { + "text": "The future holds more in store.", + "updated": 1617798674297, + "icon": { + "name": "under-construction", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Text", + "text": "Eventually Dashboards will be used to bring multiple Time Machines together in useful configurations, but for right now they helps us stay organized.", + "updated": 1617798575876 + }, + { + "style": "Important", + "text": "Superalgos is a community project. If you are a developer that would like to see this feature come to life, you can help make it happen!", + "updated": 1617799444931 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-add-a-timeline-chart.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-add-a-timeline-chart.json new file mode 100644 index 000000000..faeaf8cf7 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-add-a-timeline-chart.json @@ -0,0 +1,33 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "9.5", + "type": "Adding Charts - Add a Timeline Chart", + "definition": { + "text": "Now that we have something to hold our charts, let's go ahead and add one!", + "updated": 1617800759702, + "icon": { + "name": "timeline-chart", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Callout", + "text": "Hover over your Time Machine and click Add Timeline Chart.", + "updated": 1617800816707 + }, + { + "style": "Text", + "text": "Just like with time machines, giving a helpful name to a Timeline Chart is important. A good naming practice is to name timeline charts after the Data Mine or Data Product with which it will be connected. Today we will be adding Data Mine data to this timeline chart. So a helpful name would be:", + "updated": 1617801165071 + }, + { + "style": "Json", + "text": "Data Mine Layers" + }, + { + "style": "Text", + "text": "" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-it’s-alive.json b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-it’s-alive.json new file mode 100644 index 000000000..f865f8ebc --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/how-to-set-up-a-new-chart-9.5-adding-charts-it’s-alive.json @@ -0,0 +1,30 @@ +{ + "tutorial": "How to Set up a New Chart", + "pageNumber": "19.5", + "type": "Adding Charts - It’s Alive!", + "definition": { + "text": "Let's take a look at your new working chart!", + "updated": 1617850745525, + "icon": { + "name": "trading-system", + "project": "Superalgos" + } + }, + "paragraphs": [ + { + "style": "Important", + "text": "First make sure to run all Data Tasks and wait for them to reach 100%.", + "updated": 1617850764129 + }, + { + "style": "Callout", + "text": "Fire up the Charting Space and take a look at your Chart. Have some fun and turn a few layers on and off.", + "updated": 1617850952279 + }, + { + "style": "Text", + "text": "If can see layers showing up when you turn them on, great job! If nothing is showing up, go back over previous steps and make sure you didn't miss anything.", + "updated": 1617851145572 + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-0.5-tutorial-step-beware-of-impersonators.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-0.5-tutorial-step-beware-of-impersonators.json index 69a938bbd..d66c6e294 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-0.5-tutorial-step-beware-of-impersonators.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-0.5-tutorial-step-beware-of-impersonators.json @@ -8,13 +8,27 @@ "name": "bullet-warning", "project": "Superalgos" }, - "updated": 1617608574624 + "updated": 1617608574624, + "translations": [ + { + "language": "IT", + "text": "Gli admin di Superalgos non ti contatteranno mai direttamente, a meno che non li contatti tu per primo.", + "updated": 1618074109290 + } + ] }, "paragraphs": [ { "style": "Warning", "text": "Scammers are lurking! Beware! It's no news that trading-related groups attract all sorts of scammers, and we are aware that they contact people in our groups attempting all sorts of tricks. We will never ask you for API keys, coins, or cash. In fact, we will never ask you to trust us in any way! We want to make it clear that if someone contacts you directly claiming to work with or for the project, it is a scam. Please report scammers in the Community group so that they may be banned, and to increase awareness of the problem, but also block them and report them to Telegram if the option is available.", - "updated": 1617608980211 + "updated": 1617608980211, + "translations": [ + { + "language": "IT", + "text": "Attenzione, gli scammers sono in agguato! Non è una novità che i gruppi riguardanti il trading attraggano ogni tipo di scammer, e siamo al corrente del fatto che contattino persone del gruppo tentando di truffarle. Non chiederemo mai API keys, crypto o soldi. Di fatto, non ti chiederemo di fidarti di noi in alcun modo! Vogliamo che sia chiaro che se qualcuno ti contatta direttamente e dichiarando di lavorare per o con il progetto, è uno scam. Per favore segnalate gli scammers nel canale Community così che possano essere bannati, bloccateli e se possibile segnalateli a Telegram stesso.", + "updated": 1618074329147 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-058-tutorial-step-visual-scripting-on-steroids.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-058-tutorial-step-visual-scripting-on-steroids.json index d97a59324..c7a977c4e 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-058-tutorial-step-visual-scripting-on-steroids.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-058-tutorial-step-visual-scripting-on-steroids.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "indicator-bot" }, - "text": "Talking about block-building, we are now in the confines of the Masters Data Mine. To your left, the definition of one of the bots you sent mining minutes ago." + "text": "Talking about block-building, we are now in the confines of the Masters Data Mine. To your left, the definition of one of the bots you sent mining minutes ago.", + "translations": [ + { + "language": "IT", + "text": "A proposito di costruzioni a blocchi, ora siamo nei confini del Masters Data Mine. Alla tua sinistra vedi la definizione di uno dei bots per cui hai avviato il mining giusto prima.", + "updated": 1618056284204 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "Pretty much like with the Lego-like definitions of the Charting Space, bots are too defined on a visual environment." + "text": "Pretty much like with the Lego-like definitions of the Charting Space, bots are too defined on a visual environment.", + "translations": [ + { + "language": "IT", + "text": "Analogamente alle dinamiche \"stile Lego\" del Charting Space, anche i bots sono definiti visivamente.", + "updated": 1618056303696 + } + ] }, { "style": "Callout", - "text": "All developers need to code is the actual Data Building Procedure." + "text": "All developers need to code is the actual Data Building Procedure.", + "translations": [ + { + "language": "IT", + "text": "Tutto ciò che gli sviluppatori devono programmare è la Data Building Procedure che verrà usata.", + "updated": 1618056067442 + } + ] }, { "style": "Text", - "text": "Everything else is defined on a visual setting: processes with their dependencies, outputs and so on, and products, with their record and dataset definitions, etc." + "text": "Everything else is defined on a visual setting: processes with their dependencies, outputs and so on, and products, with their record and dataset definitions, etc.", + "translations": [ + { + "language": "IT", + "text": "Ogni cosa ha una rappresentazione visiva: sia i processi, con le loro dipendenze e output, che i prodotti, con i loro record e datasets, così come ogni altra entità presente nel programma.", + "updated": 1618056262610 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-059-tutorial-step-plotters-magic.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-059-tutorial-step-plotters-magic.json index 5373f3a72..068791b4c 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-059-tutorial-step-plotters-magic.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-059-tutorial-step-plotters-magic.json @@ -7,17 +7,38 @@ "project": "Superalgos", "name": "plotter" }, - "text": "And this is how plotters are built! Plotters create graphical representations of data... from candles, to everything else!" + "text": "And this is how plotters are built! Plotters create graphical representations of data... from candles, to everything else!", + "translations": [ + { + "language": "IT", + "text": "Ed ecco come vengono costruiti i Plotters! Essi creano rappresentazioni grafiche di tutti i dati...dalle candele, a qualsiasi altra cosa!", + "updated": 1618056813296 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "Again, visual scripting at its best! Plotters use stylized polygons made out of coordinate points to paint lines and shapes that represent data. Every layer made available on the charts is created with a set of definitions of the sort you are looking at right now. The particular case of the Resistances and Supports bot is a rather complex one, but does showcase the power of the tool!" + "text": "Again, visual scripting at its best! Plotters use stylized polygons made out of coordinate points to paint lines and shapes that represent data. Every layer made available on the charts is created with a set of definitions of the sort you are looking at right now. The particular case of the Resistances and Supports bot is a rather complex one, but does showcase the power of the tool!", + "translations": [ + { + "language": "IT", + "text": "Di nuovo, il meglio del visual scripting! I Plotters usano poligoni stilizzati definiti da punti e coordinate per disegnare linee e forme che rappresentano dati. Ogni layer disponibile sul grafico è creato da un insieme di definizioni come quello che stai guardando ora. Il caso del bot dei Supporti e Resistenze è abbastanza complesso, ma mostra la potenza di questo strumento!", + "updated": 1618057031198 + } + ] }, { "style": "Callout", "text": "Find the Resistance Zone 5 Polygon (to the left), expand it, and crawl your way up the branches for a sneak peek of how this beauty was built!", - "updated": 1610623154560 + "updated": 1610623154560, + "translations": [ + { + "language": "IT", + "text": "Cerca il Resistance 5 Polygon (qui a sinistra), espandilo e esplora i percorsi che collegano i vari componenti per osservare come è stata costruita questa bellezza!", + "updated": 1618057208787 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-060-tutorial-step-lets-do-some-testing.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-060-tutorial-step-lets-do-some-testing.json index 6d2199442..483e63bbc 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-060-tutorial-step-lets-do-some-testing.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-060-tutorial-step-lets-do-some-testing.json @@ -7,22 +7,50 @@ "project": "Superalgos", "name": "testing-trading-tasks" }, - "text": "We are back on the Network hierarchy to show you one of the core strategy-testing resources built-in the Trading Bot." + "text": "We are back on the Network hierarchy to show you one of the core strategy-testing resources built-in the Trading Bot.", + "translations": [ + { + "language": "IT", + "text": "Rieccoci nella gerarchia Network. Ora ti mostro una delle risorse chiave per testare le strategie di un Trading Bot.", + "updated": 1618057404730 + } + ] }, "paragraphs": [ { "style": "Text", "text": "But before you run your first Backtesting Session, let's go on a quick scouting mission to grasp how the Testing Trading Tasks node is set up.", - "updated": 1610638880718 + "updated": 1610638880718, + "translations": [ + { + "language": "IT", + "text": "Ma prima di lanciare la nostra prima Backtesting Session, lanciamoci in una piccola esplorazione per capire come è configurato il nodo delle Testing Trading Tasks.", + "updated": 1618057489202 + } + ] }, { "style": "Callout", "text": "Expand the Testing Trading Tasks node and look at the structure of offspring nodes... Looks familiar?", - "updated": 1616427797952 + "updated": 1616427797952, + "translations": [ + { + "language": "IT", + "text": "Espandi il nodo delle Testing Trading Tasks e guarda come è strutturato...ti ricorda qualcosa?", + "updated": 1618057585015 + } + ] }, { "style": "Text", - "text": "Indeed! It resembles the Data Tasks section: tasks are organized by exchange, market, and trading mine, so that you may test any number of strategies optimized for different markets, on multiple exchanges." + "text": "Indeed! It resembles the Data Tasks section: tasks are organized by exchange, market, and trading mine, so that you may test any number of strategies optimized for different markets, on multiple exchanges.", + "translations": [ + { + "language": "IT", + "text": "Esatto! Assomiglia alla sezione dei Data Tasks: le task sono organizzate per exchange, mercato e Trading Mine, cosicchè tu possa testare diverse strategie per mercati differenti e su exchange diversi.", + "updated": 1618057668667 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-061-tutorial-step-aim-high-trade-big.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-061-tutorial-step-aim-high-trade-big.json index 80f169f63..566acdbe1 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-061-tutorial-step-aim-high-trade-big.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-061-tutorial-step-aim-high-trade-big.json @@ -7,22 +7,50 @@ "project": "Superalgos", "name": "network-node" }, - "text": "Picture an army of bots working with multiple exchanges, markets, and strategies, running on a network ala trading farm." + "text": "Picture an army of bots working with multiple exchanges, markets, and strategies, running on a network ala trading farm.", + "translations": [ + { + "language": "IT", + "text": "Immagina un esercito di bots che lavorano con vari exchange, mercati e strategie, coordinati da un network che fa da trading farm.", + "updated": 1618057758985 + } + ] }, "paragraphs": [ { "style": "Text", "text": "That is what the Network Node is about. What you've seen so far is running on a single machine. But...", - "updated": 1616427867794 + "updated": 1616427867794, + "translations": [ + { + "language": "IT", + "text": "Il Network Node fa esattamente questo. I processi che hai visto finora girano su una singola macchina. Però...", + "updated": 1618057806513 + } + ] }, { "style": "Callout", "text": "Superalgos supports distributing and coordinating tasks across networks of nodes running the Client! This enables smart and scalable operations. Any machine running the GUI may control the enterprise!", - "updated": 1616693637435 + "updated": 1616693637435, + "translations": [ + { + "language": "IT", + "text": "Superalgos permette di distribuire e coordinare tasks attraverso una rete di macchine che eseguono il Client! Questo permette di eseguire operazioni avanzate e scalabili. Qualsiasi macchina che esegue la GUI può controllare il tutto!", + "updated": 1618057957707 + } + ] }, { "style": "Text", - "text": "You may set up a network with a few Raspberry Pi, an industrial-grade datacenter—or anything in between." + "text": "You may set up a network with a few Raspberry Pi, an industrial-grade datacenter—or anything in between.", + "translations": [ + { + "language": "IT", + "text": "Puoi creare network arbitrariamente complessi che vanno da qualche Raspberry Pi a un datacenter industriale.", + "updated": 1618058007870 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-062-tutorial-step-machines-learn-too.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-062-tutorial-step-machines-learn-too.json index 8c96f8cbf..397448c74 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-062-tutorial-step-machines-learn-too.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-062-tutorial-step-machines-learn-too.json @@ -5,26 +5,54 @@ "definition": { "icon": { "name": "tensorflow-project", - "project": "TensorFlow" + "project": "Superalgos" }, "text": "The latest version of Superalgos features an experimental integration of TensorFlow to leverage ML from within the app!", - "updated": 1616691534660 + "updated": 1616691534660, + "translations": [ + { + "language": "IT", + "text": "L'ultima versione di Superalgos presenta un integrazione sperimentale per sfruttare il machine learning.", + "updated": 1618058419040 + } + ] }, "paragraphs": [ { "style": "Text", "text": "The integration maps the definition of a NodeJS TensorFlow Library featuring a Supervised Learning algorithm and its Artificial Neural Network in the same kind of structure of nodes typical of Superalgos.", - "updated": 1616692845459 + "updated": 1616692845459, + "translations": [ + { + "language": "IT", + "text": "L'integrazione mappa la TensorFlow Library di NodeJS, che contiene un algoritmo di Supervised Learning e la relativa Artificial Neural Network, allo stesso tipo di struttura di nodi tipica di Superalgos.", + "updated": 1618058443954 + } + ] }, { "style": "Note", "text": "The integration leverages the rest of the Superalgos infrastructure, so that you may use your datasets to train ML algos and use the resulting models from within trading systems!", - "updated": 1616692959991 + "updated": 1616692959991, + "translations": [ + { + "language": "IT", + "text": "L'integrazione sfrutta l'infrastuttura di Superalgos, quindi puoi usare i tuoi datasets per fare il training degli algoritmi di ML e usarne i modelli direttamente dal Trading System.", + "updated": 1618058363973 + } + ] }, { "style": "Success", "text": "After doing the first few tutorials, take a look at the Machine Learning Demo Plugin Workspace!", - "updated": 1616693444144 + "updated": 1616693444144, + "translations": [ + { + "language": "IT", + "text": "Dopo i primi tutorial, dai un'occhiata a Machine Learning Demo Plugin Workspace!", + "updated": 1618058432041 + } + ] } ] -} \ No newline at end of file +} diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-063-tutorial-step-civil-works-ahead.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-063-tutorial-step-civil-works-ahead.json index cb778a841..fc5464df0 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-063-tutorial-step-civil-works-ahead.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-063-tutorial-step-civil-works-ahead.json @@ -7,16 +7,37 @@ "project": "Superalgos", "name": "under-construction" }, - "text": "Please, do not be surprised to find an under construction sign here and there..." + "text": "Please, do not be surprised to find an under construction sign here and there...", + "translations": [ + { + "language": "IT", + "text": "Non sorprenderti se trovi segnali di \"lavori in corso\" qua e là...", + "updated": 1618059716381 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "As I mentioned earlier, Superalgos is constantly growing, and infrastructure architected for the upcoming version may occasionally be merged to the current version in a service pack, along with necessary fixes and minor improvements." + "text": "As I mentioned earlier, Superalgos is constantly growing, and infrastructure architected for the upcoming version may occasionally be merged to the current version in a service pack, along with necessary fixes and minor improvements.", + "translations": [ + { + "language": "IT", + "text": "Come detto prima, Superalgos è in continua evoluzione e gli sviluppi per la versione successiva potrebbero essere occasionalmente implementati nella versione corrente, per risolvere problemi o apportare piccole migliorie.", + "updated": 1618059772511 + } + ] }, { "style": "Callout", - "text": "If you are curious about what is cooking for the upcoming Superalgos release, join the Superalgos Develop Telegram group." + "text": "If you are curious about what is cooking for the upcoming Superalgos release, join the Superalgos Develop Telegram group.", + "translations": [ + { + "language": "IT", + "text": "Se vuoi scoprire cosa bolle in pentola per la prossima release di Superalgos, unisciti al canale Telegram Superalgos Develop.", + "updated": 1618059823365 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-064-tutorial-step-enough-digressing.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-064-tutorial-step-enough-digressing.json index 52a073552..80925a1ef 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-064-tutorial-step-enough-digressing.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-064-tutorial-step-enough-digressing.json @@ -7,17 +7,38 @@ "project": "Superalgos", "name": "backtesting-session" }, - "text": "We'll run a Backtesting Session with a bunch of preconfigured parameters so that you may have a quick glimpse at how simulations work." + "text": "We'll run a Backtesting Session with a bunch of preconfigured parameters so that you may have a quick glimpse at how simulations work.", + "translations": [ + { + "language": "IT", + "text": "Lanceremo una Backtesting Session con dei parametri preconfigurati così da dare un'occhiata al funzionamento delle simulazioni.", + "updated": 1618059892671 + } + ] }, "paragraphs": [ { "style": "Text", "text": "As you can see to the right, a trading session has a reference to a Trading System. That is, the Trading Bot will apply the rules of the referenced trading system to make decisions. There's also a reference to a Trading Engine, a subject worth its own chapter, so I'll leave it for later!", - "updated": 1610639102636 + "updated": 1610639102636, + "translations": [ + { + "language": "IT", + "text": "Come vedi a destra, una Trading Sessionsi riferisce a un Trading System. Ciò significa che il Trading Bot applicherà le regole del corrispondente Trading System per prendere decisioni. C'è anche un riferimento a un Trading Engine, ma di questo parleremo in un capitolo successivo.", + "updated": 1618059980494 + } + ] }, { "style": "Callout", - "text": "The trading session is affected by several parameters. Take a quick look at their configurations selecting Configure on the menu!" + "text": "The trading session is affected by several parameters. Take a quick look at their configurations selecting Configure on the menu!", + "translations": [ + { + "language": "IT", + "text": "La Trading Session è controllata da vari parametri. Dai un'occhiata alle loro configurazioni selezionando Configure dal menù!", + "updated": 1618060016221 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-065-tutorial-step-what-when-how.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-065-tutorial-step-what-when-how.json index 65ccb2762..be33b70fe 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-065-tutorial-step-what-when-how.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-065-tutorial-step-what-when-how.json @@ -7,38 +7,94 @@ "project": "Superalgos", "name": "trading-parameters" }, - "text": "Trading Parameters determine key aspects of how the trading session is run. Let's take a quick, superficial look..." + "text": "Trading Parameters determine key aspects of how the trading session is run. Let's take a quick, superficial look...", + "translations": [ + { + "language": "IT", + "text": "I Trading Parameters controllano gli aspetti chiave dell'esecuzione della sessione di trading. Diamo un'occhiata veloce...", + "updated": 1618060155151 + } + ] }, "paragraphs": [ { "style": "List", - "text": "Session Base Asset: no capital is assigned in BTC." + "text": "Session Base Asset: no capital is assigned in BTC.", + "translations": [ + { + "language": "IT", + "text": "Session Base Asset: 0 BTC", + "updated": 1618060455866 + } + ] }, { "style": "List", - "text": "Session Quoted Asset: 1000 USDT of initial capital." + "text": "Session Quoted Asset: 1000 USDT of initial capital.", + "translations": [ + { + "language": "IT", + "text": "Session Quoted Asset: 1000 USDT di capitale iniziale", + "updated": 1618060205541 + } + ] }, { "style": "List", - "text": "Time Range: we'll test a single day, 2020-09-01." + "text": "Time Range: we'll test a single day, 2020-09-01.", + "translations": [ + { + "language": "IT", + "text": "Time Range: test su un singolo giorno (2020-09-01)", + "updated": 1618060612074 + } + ] }, { "style": "List", - "text": "Time Frame: orders are placed/canceled every minute, thus 01-min is appropriate." + "text": "Time Frame: orders are placed/canceled every minute, thus 01-min is appropriate.", + "translations": [ + { + "language": "IT", + "text": "Time Frame: 01-min (dato che gli ordini vengono inseriti/cancellati ogni minuto)", + "updated": 1618060502887 + } + ] }, { "style": "List", "text": "Slippage: it's irrelevant for this case, as this particular trading system uses limit orders only.", - "updated": 1610639262905 + "updated": 1610639262905, + "translations": [ + { + "language": "IT", + "text": "Slippage: irrilevante in questo di Trading System", + "updated": 1618060520878 + } + ] }, { "style": "List", - "text": "Fee Structure: 0.1% is the lower Binance tier." + "text": "Fee Structure: 0.1% is the lower Binance tier.", + "translations": [ + { + "language": "IT", + "text": "Fee Structure: 0.1% è il livello iniziale di Binance.", + "updated": 1618060361331 + } + ] }, { "style": "Text", "text": "The remaining parameters do not affect the simulation. To learn more about Trading Parameters, take a look at the documentation.", - "updated": 1610640777415 + "updated": 1610640777415, + "translations": [ + { + "language": "IT", + "text": "I restanti parametri non influenzano questa simulazione. Se vuoi saperne di più, consulta la sezione Trading Parameters nella documentazione.", + "updated": 1618060588588 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-066-tutorial-step-ready.-set.-go.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-066-tutorial-step-ready.-set.-go.json index e28c72da4..25aa5cc0d 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-066-tutorial-step-ready.-set.-go.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-066-tutorial-step-ready.-set.-go.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "task" }, - "text": "Let's get going! This is going to be quick anyway, as we are testing a single day worth of historic data." + "text": "Let's get going! This is going to be quick anyway, as we are testing a single day worth of historic data.", + "translations": [ + { + "language": "IT", + "text": "Forza, iniziamo! Sarà comunque una cosa veloce, perchè stiamo testando dati di una sola giornata.", + "updated": 1618060660046 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "Running a trading task is quite similar to running a data mining task. The difference lies in that—after running the task—you also need to run the trading session." + "text": "Running a trading task is quite similar to running a data mining task. The difference lies in that—after running the task—you also need to run the trading session.", + "translations": [ + { + "language": "IT", + "text": "Eseguire una task di trading è simile a eseguire una task di data mining. La differenza sta nel fatto che, dopo aver lanciato la task, devi anche lanciare la trading session.", + "updated": 1618060706178 + } + ] }, { "style": "Callout", "text": "Select Run on the Task menu!

Now select Run on the Backtesting Session menu!", - "updated": 1616428472102 + "updated": 1616428472102, + "translations": [ + { + "language": "IT", + "text": "Seleziona Run dal menu Task, e poi seleziona Run dal menu della Backtesting Session!", + "updated": 1618060790679 + } + ] }, { "style": "Note", - "text": "When the progress notice of the Trading Process Instance get's to the 100% mark, stop the task and click Next." + "text": "When the progress notice of the Trading Process Instance get's to the 100% mark, stop the task and click Next.", + "translations": [ + { + "language": "IT", + "text": "Quando la progress bar della Trading Process Instance raggiunge il 100%, ferma la task e clicca Next.", + "updated": 1618060849542 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-067-tutorial-step-getting-to-the-fun-bits.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-067-tutorial-step-getting-to-the-fun-bits.json index de523cc76..fc986900a 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-067-tutorial-step-getting-to-the-fun-bits.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-067-tutorial-step-getting-to-the-fun-bits.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "time-machine" }, - "text": "I took the liberty of bringing you to a particular moment in time, interesting for what comes next." + "text": "I took the liberty of bringing you to a particular moment in time, interesting for what comes next.", + "translations": [ + { + "language": "IT", + "text": "Mi sono preso la libertà di portarti in un particolare momento del tempo, per mostrarti cosa succede.", + "updated": 1618060917160 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "You are about to be exposed to the beauty of simulations. Am I a simulation? Are you? Is this whole thing real?" + "text": "You are about to be exposed to the beauty of simulations. Am I a simulation? Are you? Is this whole thing real?", + "translations": [ + { + "language": "IT", + "text": "Stai per assistere alla bellezza delle simulazioni. Sono una simulazione? O lo sei tu? È reale tutto ciò?", + "updated": 1618060948467 + } + ] }, { "style": "Callout", - "text": "Look around and decide for yourself!" + "text": "Look around and decide for yourself!", + "translations": [ + { + "language": "IT", + "text": "Guardati intorno e decidilo tu!", + "updated": 1618060965103 + } + ] }, { "style": "Success", - "text": "First of all, notice you are now in the 1-minute time frame, thus, these are 1-minute candles. The span of time in your screen is little more than one hour, at the beginning of September 1st 2020." + "text": "First of all, notice you are now in the 1-minute time frame, thus, these are 1-minute candles. The span of time in your screen is little more than one hour, at the beginning of September 1st 2020.", + "translations": [ + { + "language": "IT", + "text": "Prima di tutto, nota che sei nel time frame 1-min, quindi queste sono candele da un minuto. L'intervallo di tempo sul tuo schermo è di circa un'ora, e si riferisce all'inizio del 1 settembre 2020.", + "updated": 1618061043559 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-068-tutorial-step-what-is-it-we-are-testing.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-068-tutorial-step-what-is-it-we-are-testing.json index 7b8bc42d8..935330c87 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-068-tutorial-step-what-is-it-we-are-testing.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-068-tutorial-step-what-is-it-we-are-testing.json @@ -7,13 +7,27 @@ "project": "Superalgos", "name": "trading-system" }, - "text": "We've run a backtest but we haven't discussed the Trading System we are testing! Let's go through the basics!" + "text": "We've run a backtest but we haven't discussed the Trading System we are testing! Let's go through the basics!", + "translations": [ + { + "language": "IT", + "text": "Abbiamo lanciato un backtest ma non abbiamo discusso del Trading System che stiamo testando! Facciamolo ora!", + "updated": 1618061084694 + } + ] }, "paragraphs": [ { "style": "Text", "text": "The trading idea is buy \"the falling knife\" and sell \"the rebound\". The strategy places a Limit Buy Order a distance below the price. If the order is not filled by the next minute, the order is canceled and a new order is placed, potentially at an adjusted rate. If the price drops suddenly, chances are the order will get filled. If that happens, then the strategy tries to sell at a higher price.", - "updated": 1616428600039 + "updated": 1616428600039, + "translations": [ + { + "language": "IT", + "text": "L'idea è comprare il \"falling knife\" e vendere il \"rebound\". La strategia piazza un Limit Buy Order al di sotto dell'attuale prezzo. Se l'ordine non viene evaso nel giro del minuto successivo, viene cancellato e ne viene creato uno nuovo, eventualmente a un prezzo migliore. Se il prezzo scende, è probabile che l'ordine venga evaso: a quel punto la strategia tenta di vendere a un prezzo maggiore.", + "updated": 1618061264322 + } + ] }, { "style": "Text", @@ -22,7 +36,14 @@ { "style": "Note", "text": "Let's not discuss the merits of the trading idea but the implementation. This is just a demo to show off the capacities of the Trading Bot, not the strategy per se.", - "updated": 1610640921014 + "updated": 1610640921014, + "translations": [ + { + "language": "IT", + "text": "Non discutiamo dell'efficacia del metodo, ma della sua implementazione. Questa è una demo per mostrare le capacità del Trading Bot, non la strategia in sè.", + "updated": 1618061327170 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-069-tutorial-step-green-silver-bullets.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-069-tutorial-step-green-silver-bullets.json index 324027cc1..10dd29338 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-069-tutorial-step-green-silver-bullets.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-069-tutorial-step-green-silver-bullets.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "bullet-limit-buy-order" }, - "text": "Do you see the green bullets with an L in the center? Those are the limit buy orders I mentioned." + "text": "Do you see the green bullets with an L in the center? Those are the limit buy orders I mentioned.", + "translations": [ + { + "language": "IT", + "text": "Vedi quei cerchi verdi con dentro la \"L\"? Sono i Limit Buy Order di cui parlavo.", + "updated": 1618061409837 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "Notice how an order is placed every minute and is canceled before a new order is placed. Do you recognize the symbol for the order cancellation? It's the smaller, darker bullet with a white horizontal stripe in the middle!" + "text": "Notice how an order is placed every minute and is canceled before a new order is placed. Do you recognize the symbol for the order cancellation? It's the smaller, darker bullet with a white horizontal stripe in the middle!", + "translations": [ + { + "language": "IT", + "text": "Nota come viene inserito un ordine al minuto, e come questo viene cancellato prima di inserirne uno nuovo: quest'ultimo evento è riconoscibile dal cerchio scuro più piccolo con una striscia orizziontale che lo attraversa!", + "updated": 1618061508009 + } + ] }, { "style": "Callout", - "text": "Notice the knife falling at 00:21 AM! The price fell well below the rate of the limit order, therefore, the order was filled! That is what the bigger—filled—green bullet indicates!" + "text": "Notice the knife falling at 00:21 AM! The price fell well below the rate of the limit order, therefore, the order was filled! That is what the bigger—filled—green bullet indicates!", + "translations": [ + { + "language": "IT", + "text": "Nota il \"falling knife\" delle 00:21! Il prezzo scende al di sotto di quello del limit order, che quindi viene evaso. Ciò è indicato dal cerchio più grande riempito di colore verde!", + "updated": 1618061604262 + } + ] }, { "style": "Text", "text": "So. . . what happens afterwards?", - "updated": 1610536393495 + "updated": 1610536393495, + "translations": [ + { + "language": "IT", + "text": "Quindi...dopo che succede?", + "updated": 1618061624143 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-070-tutorial-step-sell-it-quick.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-070-tutorial-step-sell-it-quick.json index 05c4806ef..61cd402c7 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-070-tutorial-step-sell-it-quick.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-070-tutorial-step-sell-it-quick.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "bullet-limit-sell-order" }, - "text": "I'm sure you noted there are no more limit buy orders after the order got filled. Instead, sell orders start popping up!" + "text": "I'm sure you noted there are no more limit buy orders after the order got filled. Instead, sell orders start popping up!", + "translations": [ + { + "language": "IT", + "text": "Sicuramente hai notato che non ci sono più limit buy orders: al loro posto, cominciano ad apparire i sell orders!", + "updated": 1618061675585 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Notice how the first Limit Sell Order is placed at 00:22 AM, the minute after the buy order filled!" + "text": "Notice how the first Limit Sell Order is placed at 00:22 AM, the minute after the buy order filled!", + "translations": [ + { + "language": "IT", + "text": "Nota come il Limit Sell Order è inserito alle 00:22, un minuto dopo che il buy order è stato evaso.", + "updated": 1618061709740 + } + ] }, { "style": "Text", "text": "It's the same minute Superalgos would have gotten notice from the exchange that the order got filled. The Trading Bot connects with the exchange and goes through two distinct cycles. ", - "updated": 1616428810807 + "updated": 1616428810807, + "translations": [ + { + "language": "IT", + "text": "È lo stesso minuto in cui Superalgos viene notificato dall'exchange che l'ordine è stato evaso. Il Trading Bot si connette con l'exchange e esegue due cicli distinti di operazioni.", + "updated": 1618061767833 + } + ] }, { "style": "Success", - "text": "In the first Cycle, it finds out the status of existing orders. In the second, it gives new instructions." + "text": "In the first Cycle, it finds out the status of existing orders. In the second, it gives new instructions.", + "translations": [ + { + "language": "IT", + "text": "Nel primo Cycle, controlla lo stato degli ordini esistenti. Nel secondo, dà nuove istruzioni.", + "updated": 1618061798692 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-071-tutorial-step-shall-we-dig-deeper.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-071-tutorial-step-shall-we-dig-deeper.json index cdc24e6cb..8a6196125 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-071-tutorial-step-shall-we-dig-deeper.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-071-tutorial-step-shall-we-dig-deeper.json @@ -8,20 +8,48 @@ "name": "layer-resistance" }, "text": "The logic behind the placing of buy orders is influenced by the Resistances and Supports indicator bot from the Masters Data Mine you ran earlier.", - "updated": 1610641051577 + "updated": 1610641051577, + "translations": [ + { + "language": "IT", + "text": "L'inserimento dei buy orders è influenzato dai supporti e resistenze dell'Indicator Bot della Masters Data Mine che abbiamo eseguito prima.", + "updated": 1618061894381 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "I took the liberty to turn the Supports layer on to show you this beauty... I hope you don't mind!" + "text": "I took the liberty to turn the Supports layer on to show you this beauty... I hope you don't mind!", + "translations": [ + { + "language": "IT", + "text": "Mi sono preso la libertà di attivare il layer dei Supporti per mostrarti questa bellezza. Spero non ti dispiaccia!", + "updated": 1618061926335 + } + ] }, { "style": "Callout", - "text": "The indicator identifies levels (price ranges) on which price is rejected, and keeps a counter of how many rejections occur until the level is breached." + "text": "The indicator identifies levels (price ranges) on which price is rejected, and keeps a counter of how many rejections occur until the level is breached.", + "translations": [ + { + "language": "IT", + "text": "L'indicatore identifica livelli (range di prezzo) oltre i quali il prezzo fatica a salire, e tiene conto di quante volte è respinto da essi prima di romperli.", + "updated": 1618062124164 + } + ] }, { "style": "Text", - "text": "The way levels are represented on-screen varies with the number of rejections the level has witnessed, giving us a visual clue of how strong each support level may be. Once a level is breached, it disappears." + "text": "The way levels are represented on-screen varies with the number of rejections the level has witnessed, giving us a visual clue of how strong each support level may be. Once a level is breached, it disappears.", + "translations": [ + { + "language": "IT", + "text": "Il modo in cui i livelli sono disegnati varia a seconda del numero di \"rimbalzi\" del prezzo su quel livello, dandoci un'idea visiva di quanto sia forte il supporto. Una volta che viene rotto, sparisce.", + "updated": 1618062095822 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-072-tutorial-step-whos-keeping-score.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-072-tutorial-step-whos-keeping-score.json index 4a1cecd39..2d3e99107 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-072-tutorial-step-whos-keeping-score.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-072-tutorial-step-whos-keeping-score.json @@ -7,7 +7,14 @@ "project": "Superalgos", "name": "layer-resistance" }, - "text": "Check the table below and see if you can interpret the support levels you see on the charts." + "text": "Check the table below and see if you can interpret the support levels you see on the charts.", + "translations": [ + { + "language": "IT", + "text": "Guarda questa tabella per interpretare i livelli di supporto che vedi sul grafico.", + "updated": 1618062212883 + } + ] }, "paragraphs": [ { @@ -16,7 +23,14 @@ }, { "style": "Text", - "text": "
For a new support level with one rejection, the dotted line marks the exact level on which price bounced. For further rejections, the blocks mark the rate ranges on which subsequent rejections are counted." + "text": "
For a new support level with one rejection, the dotted line marks the exact level on which price bounced. For further rejections, the blocks mark the rate ranges on which subsequent rejections are counted.", + "translations": [ + { + "language": "IT", + "text": "
Per un nuovo livello di supporto appena creato, la linea tratteggita segna esattamente dove il prezzo ha rimbalzato. Per ogni rimbalzo futuro, il blocco cambia colore.", + "updated": 1618062387108 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-073-tutorial-step-the-power-of-data-mining.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-073-tutorial-step-the-power-of-data-mining.json index cf1898d4c..d99637e34 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-073-tutorial-step-the-power-of-data-mining.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-073-tutorial-step-the-power-of-data-mining.json @@ -7,17 +7,38 @@ "project": "Superalgos", "name": "layer-resistance" }, - "text": "Why do levels jump up and down? There's something I haven't told you yet, 'cos I'm afraid it may blow your mind!" + "text": "Why do levels jump up and down? There's something I haven't told you yet, 'cos I'm afraid it may blow your mind!", + "translations": [ + { + "language": "IT", + "text": "Perchè i livelli saltano su e giù? C'è qualcosa che ancora non ti ho detto, e vedrai che ti farà impazzire!", + "updated": 1618064409000 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "The bot keeps track of all support levels alive since the start of the dataset, but only shows you the five levels closest to the current price." + "text": "The bot keeps track of all support levels alive since the start of the dataset, but only shows you the five levels closest to the current price.", + "translations": [ + { + "language": "IT", + "text": "Il bot tiene traccia di tutti i livelli di supporto esistenti dall'inizio del dataset, ma ti mostra solo i cinque livelli più vicini al prezzo corrente.", + "updated": 1618062479544 + } + ] }, { "style": "Text", "text": "Keeping track of information for the whole span of the dataset—which may count years—is the extraordinary value of data mining, and the kind of things you wouldn't be able to calculate with a function, on the fly. The Plotter associated with the Indicator Bot dynamically shows the five levels of support closest to the price because those are the relevant levels for the context, and it's how the plotter is built!", - "updated": 1616429006453 + "updated": 1616429006453, + "translations": [ + { + "language": "IT", + "text": "Tenere traccia dei dati per tutto il periodo temporale definito dal dataset (che può essere di anni) è il grande potere del data mining, e il tipo di informazioni che non puoi ricavare facilmente. Il Plotter associato all'Indicator Bot mostra dinamicamente i cinque livelli più vicini al prezzo attuale perchè sono i più rilevanti, ed è così che il Plotter è stato configurato!", + "updated": 1618064485684 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-074-tutorial-step-find-the-logic-challenge.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-074-tutorial-step-find-the-logic-challenge.json index 885eed643..b496f59bd 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-074-tutorial-step-find-the-logic-challenge.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-074-tutorial-step-find-the-logic-challenge.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "layer-resistance" }, - "text": "Now that you know how the indicator works, can you find the relationship between buy orders and support levels?" + "text": "Now that you know how the indicator works, can you find the relationship between buy orders and support levels?", + "translations": [ + { + "language": "IT", + "text": "Ora che sai come funzionano gli indicatori, puoi trovare la relazione tra buy orders e livelli di supporto?", + "updated": 1618064528654 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Take some time to explore the period of time tested looking for clues on how support levels determine the rate of the Limit Buy Order!" + "text": "Take some time to explore the period of time tested looking for clues on how support levels determine the rate of the Limit Buy Order!", + "translations": [ + { + "language": "IT", + "text": "Prenditi un'attimo per esplorare il periodo di tempo testato e cercare indizi su come i livelli di supporto determinino l'inserimento del Limit Buy Order!", + "updated": 1618064580106 + } + ] }, { "style": "Text", - "text": "It's fun noticing how new levels form when price changes direction, and how an established level changes color when price bounces-off it." + "text": "It's fun noticing how new levels form when price changes direction, and how an established level changes color when price bounces-off it.", + "translations": [ + { + "language": "IT", + "text": "È divertente osservare come i nuovi livelli si formano quando il prezzo cambia direzione, e come un livello cambia colore quando respinge il prezzo.", + "updated": 1618064645034 + } + ] }, { "style": "Success", - "text": "But the trick lies in counting levels above the order!" + "text": "But the trick lies in counting levels above the order!", + "translations": [ + { + "language": "IT", + "text": "Il trucco sta nel contare i livelli sopra l'ordine!", + "updated": 1618064660104 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-075-tutorial-step-heres-how-it-works..json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-075-tutorial-step-heres-how-it-works..json index 48aaa3e6b..e8930974c 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-075-tutorial-step-heres-how-it-works..json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-075-tutorial-step-heres-how-it-works..json @@ -7,16 +7,37 @@ "project": "Superalgos", "name": "layer-resistance" }, - "text": "Got it? The Trading Bot places the Limit Buy Order at the fourth support level! What's the logic behind this?" + "text": "Got it? The Trading Bot places the Limit Buy Order at the fourth support level! What's the logic behind this?", + "translations": [ + { + "language": "IT", + "text": "Hai capito? Il Trading Bot piazza i Limit Buy Order al quarto livello di supporto! Qual'è la logica di questa scelta?", + "updated": 1618064697343 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "It's sort of arbitrary, but the strategy defines a falling knife as the price action capable of breaching at least three support levels and getting to the fourth during a single minute. Statistically, such events—in this time frame—produce more bounces than continuations. They may be caused by large market orders that temporarily increase the bid/ask spread in the order book." + "text": "It's sort of arbitrary, but the strategy defines a falling knife as the price action capable of breaching at least three support levels and getting to the fourth during a single minute. Statistically, such events—in this time frame—produce more bounces than continuations. They may be caused by large market orders that temporarily increase the bid/ask spread in the order book.", + "translations": [ + { + "language": "IT", + "text": "È una scelta più o meno arbitraria, ma la strategia definisce come \"falling knife\" la price action che riesce a rompere almeno tre livelli di supporto e raggiungere il quarto nel giro di un singolo minuto. Statisticamente, questi eventi (su questo time frame) producono più rimbalzi che proseguimenti. Possono essere causati da market orders di grandi dimensioni che aumentano temporaneamente il bid/ask spread nell'order book.", + "updated": 1618064825884 + } + ] }, { "style": "Callout", - "text": "Take a minute to verify that buy orders are placed at the fifth support level!" + "text": "Take a minute to verify that buy orders are placed at the fifth support level!", + "translations": [ + { + "language": "IT", + "text": "Prenditi un attimo per verificare che i buy orders siano effettivamente piazzati al quinto supporto!", + "updated": 1618064944102 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-076-tutorial-step-come-meet-someone.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-076-tutorial-step-come-meet-someone.json index 2c7f10f2e..7dca4de62 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-076-tutorial-step-come-meet-someone.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-076-tutorial-step-come-meet-someone.json @@ -7,16 +7,37 @@ "project": "Superalgos", "name": "execution-algorithm" }, - "text": "Sorry for dragging you away from the charts, but I wanted to introduce you to someone: the guy on the right is the one placing the buy orders!" + "text": "Sorry for dragging you away from the charts, but I wanted to introduce you to someone: the guy on the right is the one placing the buy orders!", + "translations": [ + { + "language": "IT", + "text": "Scusa se ti ho trascinato via dai grafici, ma volevo presentarti a qualcuno: il tipo qui a destra è quello che piazza tutti i buy order!", + "updated": 1618064981900 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "We are inside the Lightning Strike Trading System, within the definitions of the Open Stage. In this stage, the Execution Algorithm takes over after the decision to take a position has already been made on the Trigger Stage. I know you still don't know what a Situation or a Condition are, but I'd still like you to do something..." + "text": "We are inside the Lightning Strike Trading System, within the definitions of the Open Stage. In this stage, the Execution Algorithm takes over after the decision to take a position has already been made on the Trigger Stage. I know you still don't know what a Situation or a Condition are, but I'd still like you to do something...", + "translations": [ + { + "language": "IT", + "text": "Siamo all'interno del Lightning Strike Trading System, dentro la definizione dell'Open Stage. In questo stage, l'Execution Algorithm prende il sopravvento dopo che la decisione di aprire una posizione è già stata presa nel Trigger Stage. So che non sai ancora cosa siano una Situation o una Condition, ma vorrei comunque facessi una cosa...", + "updated": 1618065153377 + } + ] }, { "style": "Callout", - "text": "Take a few minutes to explore the nodes below the execution algorithm, check the formulas and conditions, and see what you can make of them!" + "text": "Take a few minutes to explore the nodes below the execution algorithm, check the formulas and conditions, and see what you can make of them!", + "translations": [ + { + "language": "IT", + "text": "Esplora i nodi sotto l'Execution Algorithm, controlla le formule e condizioni, e vedi cosa puoi ricavarne!", + "updated": 1618065182365 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-077-tutorial-step-formulations..json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-077-tutorial-step-formulations..json index 218f65ec0..ec52f11b4 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-077-tutorial-step-formulations..json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-077-tutorial-step-formulations..json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "formula" }, - "text": "What you just went through is the definition of the Limit Buy Order that is placed and cancelled every minute until it gets filled." + "text": "What you just went through is the definition of the Limit Buy Order that is placed and cancelled every minute until it gets filled.", + "translations": [ + { + "language": "IT", + "text": "Quella che hai appena guardato è la definizione del Limit Buy Order che viene piazzato e cancellato ogni minuto finchè non viene evaso.", + "updated": 1618065276195 + } + ] }, "paragraphs": [ { "style": "Text", "text": "This is the node that determines the rate of the limit order. Remember what we discussed earlier about placing the order at the rate of the fourth support level?", - "updated": 1616429339703 + "updated": 1616429339703, + "translations": [ + { + "language": "IT", + "text": "Questo è il nodo che determina il prezzo del limit order. Ricordi quando abbiamo parlato di come l'ordine viene piazzato al quarto livello di supporto?", + "updated": 1618065331055 + } + ] }, { "style": "Callout", - "text": "Go to the Formula attached to the Order Rate node and click Edit on the menu." + "text": "Go to the Formula attached to the Order Rate node and click Edit on the menu.", + "translations": [ + { + "language": "IT", + "text": "Vai alla Formula collegata al nodo Order Rate e clicca Edit sul menu.", + "updated": 1618065364382 + } + ] }, { "style": "Text", - "text": "Well... that is how it's done! As you can see, the syntax is virtually self-explanatory! It involves defining the time frame, the indicator, and the indicator property involved." + "text": "Well... that is how it's done! As you can see, the syntax is virtually self-explanatory! It involves defining the time frame, the indicator, and the indicator property involved.", + "translations": [ + { + "language": "IT", + "text": "Ecco, è così che funziona! Come vedi, la sintassi è intuitiva. Comprende la definizione del time frame, degli indicatori interessati e delle loro proprietà.", + "updated": 1618065469493 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-078-tutorial-step-the-seller.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-078-tutorial-step-the-seller.json index 1e094f7cf..c087bbbbc 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-078-tutorial-step-the-seller.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-078-tutorial-step-the-seller.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "execution-algorithm" }, - "text": "We are now in the Close Stage. I thought it would be interesting to tell you more about execution algorithms, with another example." + "text": "We are now in the Close Stage. I thought it would be interesting to tell you more about execution algorithms, with another example.", + "translations": [ + { + "language": "IT", + "text": "Ora siamo nel Close Stage. Pensavo sarebbe stato interessante dirti di più sugli Execution Algorithm con un altro esempio.", + "updated": 1618065500220 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "An Execution Algorithm may handle multiple orders, of all types. In this case, multiple limit sell orders are defined." + "text": "An Execution Algorithm may handle multiple orders, of all types. In this case, multiple limit sell orders are defined.", + "translations": [ + { + "language": "IT", + "text": "Un Execution Algorithm può gestire più ordini di ogni tipo. In questo caso, vari limit sell orders sono definiti.", + "updated": 1618065545085 + } + ] }, { "style": "Callout", - "text": "Select Configure on the menu of the algorithm and reflect on the implications of this definition!" + "text": "Select Configure on the menu of the algorithm and reflect on the implications of this definition!", + "translations": [ + { + "language": "IT", + "text": "Seleziona Configure dal menu dell'algoritmo e rifletti sulle implicazioni di questa definizione!", + "updated": 1618065569642 + } + ] }, { "style": "Text", - "text": "Both the open stage, where you define how to take a position, and the close stage, where you define how to exit, may feature multiple execution algorithms, each of them handling a certain amount of capital." + "text": "Both the open stage, where you define how to take a position, and the close stage, where you define how to exit, may feature multiple execution algorithms, each of them handling a certain amount of capital.", + "translations": [ + { + "language": "IT", + "text": "Sia l'Open Stage, dove definisci come aprire una posizione, che il Close Stage, dove invece definisci come chiuderla, possono contenere diversi Execution Algorithm, ognuno dei quali gestisce un certo capitale.", + "updated": 1618065707647 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-079-tutorial-step-simplifying-complexity.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-079-tutorial-step-simplifying-complexity.json index ba23c42ed..0428512f0 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-079-tutorial-step-simplifying-complexity.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-079-tutorial-step-simplifying-complexity.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "trading-system" }, - "text": "We haven't discussed trading systems as a framework, but a feature relevant to this explanation is that they may handle multiple strategies." + "text": "We haven't discussed trading systems as a framework, but a feature relevant to this explanation is that they may handle multiple strategies.", + "translations": [ + { + "language": "IT", + "text": "Non abbiamo discusso dei Trading System come dei framework, ma un feature di rilievo in questo senso è che possono gestire diverse strategie.", + "updated": 1618065765945 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "Each strategy features an Open Stage and a Close Stage, each with its own execution definitions. Each stage may feature multiple execution algorithms, and each algorithm may handle multiple orders." + "text": "Each strategy features an Open Stage and a Close Stage, each with its own execution definitions. Each stage may feature multiple execution algorithms, and each algorithm may handle multiple orders.", + "translations": [ + { + "language": "IT", + "text": "Ogni strategia ha un Open Stage e un Close Stage, ognuno dei quali ha i propri metodi di esecuzione. Ogni stage può avere diversi execution algorithms e ognuno di questi può gestire vari ordini.", + "updated": 1618065861963 + } + ] }, { "style": "Callout", - "text": "Do you see the pattern? We call it granularity." + "text": "Do you see the pattern? We call it granularity.", + "translations": [ + { + "language": "IT", + "text": "Riesci a vedere lo schema? Noi lo chiamiamo granularità.", + "updated": 1618065885044 + } + ] }, { "style": "Text", - "text": "Superalgos breaks down each issue to the minimum expression, and integrates the solutions. This is how it allows you to design, deploy, and manage both simple and the most complex trading setups you may envision." + "text": "Superalgos breaks down each issue to the minimum expression, and integrates the solutions. This is how it allows you to design, deploy, and manage both simple and the most complex trading setups you may envision.", + "translations": [ + { + "language": "IT", + "text": "Superalgos decompone ogni problema al minimo, e integra le soluzioni. In questo modo ti permette di progettare, rilasciare e gestire ogni tipo di trading setup, semplice o complesso, che vuoi implementare!", + "updated": 1618065967425 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-080-tutorial-step-lets-take-a-peek..json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-080-tutorial-step-lets-take-a-peek..json index f4bea1508..15e27a1b0 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-080-tutorial-step-lets-take-a-peek..json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-080-tutorial-step-lets-take-a-peek..json @@ -7,17 +7,38 @@ "project": "Superalgos", "name": "limit-sell-order" }, - "text": "Before we leave the trading system, let's take a quick look into one of these orders and see what may be of interest." + "text": "Before we leave the trading system, let's take a quick look into one of these orders and see what may be of interest.", + "translations": [ + { + "language": "IT", + "text": "Prima di abbandonare il trading system, diamo un'occhiata veloce a uno di questi ordini e vediamo cosa c'è di interessante.", + "updated": 1618066037707 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Expand Profit 0.6 and check the formula of the Order Rate node." + "text": "Expand Profit 0.6 and check the formula of the Order Rate node.", + "translations": [ + { + "language": "IT", + "text": "Espandi Profit 0.6 e osserva la formula nel nodo Order Rate.", + "updated": 1618066067329 + } + ] }, { "style": "Text", "text": "Let's focus on this misterious bit of the formula:", - "updated": 1610642070428 + "updated": 1610642070428, + "translations": [ + { + "language": "IT", + "text": "Analizziamo questa parte misteriosa:
", + "updated": 1618067107241 + } + ] }, { "style": "Text", @@ -35,7 +56,14 @@ }, { "style": "Text", - "text": "The formula is fetching the value of the Exit Target Rate, defined elsewhere. Let's not focus on what this target rate may be. Instead, let's take a look at the mechanism by which a Trading System may have access to information processed by the Trading Bot." + "text": "The formula is fetching the value of the Exit Target Rate, defined elsewhere. Let's not focus on what this target rate may be. Instead, let's take a look at the mechanism by which a Trading System may have access to information processed by the Trading Bot.", + "translations": [ + { + "language": "IT", + "text": "La formula recupera il valore dell'Exit Target Rate, definito altrove. Non soffermiamoci su cosa sia questo target rate: piuttosto, diamo un'occhiata al meccanismo con il quale il Trading System ha acceso alle informazioni processate dal Trading Bot.", + "updated": 1618067231613 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-081-tutorial-step-find-the-node-challenge.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-081-tutorial-step-find-the-node-challenge.json index 0919ede45..72fddfef3 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-081-tutorial-step-find-the-node-challenge.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-081-tutorial-step-find-the-node-challenge.json @@ -7,13 +7,27 @@ "project": "Superalgos", "name": "trading-engine" }, - "text": "The Trading Engine administers the complexity entailed in automated trading by making information accessible to users and trading systems." + "text": "The Trading Engine administers the complexity entailed in automated trading by making information accessible to users and trading systems.", + "translations": [ + { + "language": "IT", + "text": "Il Trading Engine gestisce la complessità del trading automatico rendendo le informazioni accessibili agli utenti e ai sistemi di trading.", + "updated": 1618067277865 + } + ] }, "paragraphs": [ { "style": "Text", "text": "Rember my comments about granularity? Remember how the formula on the trading system fetched the value of the exit target rate? Here's a quick reminder:", - "updated": 1610536534720 + "updated": 1610536534720, + "translations": [ + { + "language": "IT", + "text": "Ricordi i miei commenti sulla granularità? Ricordi come la formula del trading system prendeva il valore dell'Exit Target Rate? Ecco un promemoria:", + "updated": 1618067378217 + } + ] }, { "style": "Json", @@ -22,7 +36,14 @@ { "style": "Callout", "text": "This string holds the path to that piece of information in the data structure of the Trading Engine hierarchy! Can you find the Exit Target Rate node? Expand the hierarchy and follow the breadcrumb trail!", - "updated": 1616429836465 + "updated": 1616429836465, + "translations": [ + { + "language": "IT", + "text": "Questa stringa contiene il percorso a quel dato nel contesto della struttura della gerarchia del Trading Engine! Riesci a trovare il nodo dell'Exit Target Rate? Espandi la gerarchia e seguila!", + "updated": 1618067490282 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-082-tutorial-step-found-it.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-082-tutorial-step-found-it.json index 7a197a6cc..363ca413b 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-082-tutorial-step-found-it.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-082-tutorial-step-found-it.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "copy-path" }, - "text": "This is how the Trading Engine makes every bit of information processed by the Trading Bot available to trading systems." + "text": "This is how the Trading Engine makes every bit of information processed by the Trading Bot available to trading systems.", + "translations": [ + { + "language": "IT", + "text": "È in questo modo che il Trading Engine rende ogni dato processato dal Trading Bot disponibile a tutti i trading system.", + "updated": 1618067637676 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "There is a path to every piece of data, and by knowing the path, you may access the data from within any Formula or Condition in a Trading Strategy. Let's run a quick check:" + "text": "There is a path to every piece of data, and by knowing the path, you may access the data from within any Formula or Condition in a Trading Strategy. Let's run a quick check:", + "translations": [ + { + "language": "IT", + "text": "Esiste un percorso a ogni informazione, e conoscendolo è possibile accedervi da ogni Formula o Condition di una Trading Strategy. Facciamo una prova:", + "updated": 1618067702996 + } + ] }, { "style": "Callout", - "text": "Open the menu of the Exit Target Rate node to the left, and click Copy Node Path. Now, open a text editor and paste what you copied." + "text": "Open the menu of the Exit Target Rate node to the left, and click Copy Node Path. Now, open a text editor and paste what you copied.", + "translations": [ + { + "language": "IT", + "text": "Apri il menu del nodo Exit Target Rate a sinistra, e clicca Copy Node Path. Poi apri un editor di testo e incolla ciò che hai copiato.", + "updated": 1618067741606 + } + ] }, { "style": "Text", - "text": "Ok! This is how formulas and conditions access the information... How about humans?" + "text": "Ok! This is how formulas and conditions access the information... How about humans?", + "translations": [ + { + "language": "IT", + "text": "Okay, quindi formule e condizioni accedono ai dati in questo modo. E invece gli umani?", + "updated": 1618067770485 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-083-tutorial-step-the-coolest-trick.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-083-tutorial-step-the-coolest-trick.json index 9de6305ee..c68e6bfb3 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-083-tutorial-step-the-coolest-trick.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-083-tutorial-step-the-coolest-trick.json @@ -7,25 +7,60 @@ "project": "Superalgos", "name": "exit-target-rate" }, - "text": "Humans may access this information by using a cool trick that makes the charting space interact with the design space!" + "text": "Humans may access this information by using a cool trick that makes the charting space interact with the design space!", + "translations": [ + { + "language": "IT", + "text": "Gli umani possono accedere a questi dati utilizzando un trucchetto che permette al Charting Space di interagire con il Design Space.", + "updated": 1618067821598 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "To use this trick, I just did the following:" + "text": "To use this trick, I just did the following:", + "translations": [ + { + "language": "IT", + "text": "Per usare questo trucco basta fare così:", + "updated": 1618067975774 + } + ] }, { "style": "List", - "text": "Split the screen in half pulling the slider up so that we can see both spaces at the same time." + "text": "Split the screen in half pulling the slider up so that we can see both spaces at the same time.", + "translations": [ + { + "language": "IT", + "text": "Dividi lo schermo in due trascinando lo slider in su, così che possiamo vedere entrambi gli spazi", + "updated": 1618067893855 + } + ] }, { "style": "List", "text": "Turn on the Current Position layer on the Trading engine layer manager. I chose this layer because it corresponds to this section of the hierarchy... tradingEngine.tradingCurrent.position, remember?", - "updated": 1616430381277 + "updated": 1616430381277, + "translations": [ + { + "language": "IT", + "text": "Attiva il layer Current Position nel layer manager del Trading Engine. Ho scelto questo layer perchè corrisponde alla famosa sezione della gerarchia... tradingEngine.tradingCurrent.position, ricordi?", + "updated": 1618067950391 + } + ] }, { "style": "Callout", - "text": "Now, slide the mouse pointer across the candles on which the position is taken and see what happens on the nodes to the left..." + "text": "Now, slide the mouse pointer across the candles on which the position is taken and see what happens on the nodes to the left...", + "translations": [ + { + "language": "IT", + "text": "Ora, trascina il puntatore del mouse attraverso le candele sulle quali è definita la posizione e guarda cosa succede ai nodi a sinistra...", + "updated": 1618068017032 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-084-tutorial-step-welcome-backtesting-trading-engine-visualization-01.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-084-tutorial-step-welcome-backtesting-trading-engine-visualization-01.json index b708de744..63747490e 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-084-tutorial-step-welcome-backtesting-trading-engine-visualization-01.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-084-tutorial-step-welcome-backtesting-trading-engine-visualization-01.json @@ -3,7 +3,14 @@ "pageNumber": 84, "type": "Tutorial Step - Welcome Backtesting Trading Engine Visualization 01", "definition": { - "text": "This step will play a video in full screen mode." + "text": "This step will play a video in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo step eseguirà un video a schermo intero.", + "updated": 1618068032985 + } + ] }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-085-tutorial-step-feedback-loops.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-085-tutorial-step-feedback-loops.json index 3c00ae0a6..28137a0c0 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-085-tutorial-step-feedback-loops.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-085-tutorial-step-feedback-loops.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "limit-buy-order" }, - "text": "Lets take a look at another example to let the notion of the constant feedback loop sink in before we move on!" + "text": "Lets take a look at another example to let the notion of the constant feedback loop sink in before we move on!", + "translations": [ + { + "language": "IT", + "text": "Diamo un'occhiata a un altro esempio per assorbire bene la nozione di \"constant feedback loop\" prima di proseguire!", + "updated": 1618068120939 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "This is the data structure where information about limit buy orders is kept." + "text": "This is the data structure where information about limit buy orders is kept.", + "translations": [ + { + "language": "IT", + "text": "Questa è la struttura di dati dove si trovano le informazioni sui limit buy orders.", + "updated": 1618068157301 + } + ] }, { "style": "Callout", - "text": "Go to the Trading Engine layers manager on the charts (the second counting from the left). Scroll down and turn on the Limit Buy Orders layer. Now swipe the mouse pointer over a few of the buy orders and check the effect on the nodes on the design space." + "text": "Go to the Trading Engine layers manager on the charts (the second counting from the left). Scroll down and turn on the Limit Buy Orders layer. Now swipe the mouse pointer over a few of the buy orders and check the effect on the nodes on the design space.", + "translations": [ + { + "language": "IT", + "text": "Vai al layer manager del Trading Engine sul grafico (il secondo da sinistra). Scorri verso il basso e attiva il layer dei Limit Buy Orders. Ora passa con il mouse su alcuni dei buy orders e osserva l'effetto sui nodi nel Design Space.", + "updated": 1618068248928 + } + ] }, { "style": "Text", - "text": "Can you envision the implications of having this level of control over the data managed by the trading bot?" + "text": "Can you envision the implications of having this level of control over the data managed by the trading bot?", + "translations": [ + { + "language": "IT", + "text": "Capisci le implicazioni di avere un tale livello di controllo sui dati su cui lavora il Trading Bot?", + "updated": 1618068321644 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-086-tutorial-step-welcome-backtesting-trading-engine-visualization-02.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-086-tutorial-step-welcome-backtesting-trading-engine-visualization-02.json index e1a942a7b..e625c08c5 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-086-tutorial-step-welcome-backtesting-trading-engine-visualization-02.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-086-tutorial-step-welcome-backtesting-trading-engine-visualization-02.json @@ -3,7 +3,14 @@ "pageNumber": 86, "type": "Tutorial Step - Welcome Backtesting Trading Engine Visualization 02", "definition": { - "text": "This step will play a video in full screen mode." + "text": "This step will play a video in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo step riprodurrà un video a schermo intero.", + "updated": 1618068335719 + } + ] }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-087-tutorial-step-enough-chit-chat.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-087-tutorial-step-enough-chit-chat.json index 4bb5250c9..98380f7f9 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-087-tutorial-step-enough-chit-chat.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-087-tutorial-step-enough-chit-chat.json @@ -7,30 +7,72 @@ "project": "Superalgos", "name": "production-trading-tasks" }, - "text": "Ok, my friend... It's time for the real deal! Are you ready for a little Live Trading Session?" + "text": "Ok, my friend... It's time for the real deal! Are you ready for a little Live Trading Session?", + "translations": [ + { + "language": "IT", + "text": "Ok, amico mio...è ora di entrare in azione! Sei pronto a una piccola Live Trading Session?", + "updated": 1618068381473 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "I'll help you with the three main requirements:" + "text": "I'll help you with the three main requirements:", + "translations": [ + { + "language": "IT", + "text": "Ti aiuterò con i tre requisiti principali:", + "updated": 1618068402523 + } + ] }, { "style": "List", - "text": "Check your parameters, in particular, decide how much capital you wish to assign to the session." + "text": "Check your parameters, in particular, decide how much capital you wish to assign to the session.", + "translations": [ + { + "language": "IT", + "text": "Controlla i parametri: in particolar modo decidi bene quanto capitale assegnare alla sessione", + "updated": 1618068548173 + } + ] }, { "style": "List", - "text": "Set up an Exchange Account Key so that the app may access your account at the exchange." + "text": "Set up an Exchange Account Key so that the app may access your account at the exchange.", + "translations": [ + { + "language": "IT", + "text": "Prepara un Exchange Account Key: necessaria perchè l'app possa accedere al tuo account sull'exchange.", + "updated": 1618068559526 + } + ] }, { "style": "List", "text": "Ensure a live data feed, that is, the data mining operation with the indicators required by the Trading System must be running and up to date.", - "updated": 1610642474628 + "updated": 1610642474628, + "translations": [ + { + "language": "IT", + "text": "Garantisci un live data feed: l'operazione di data mining con gli indicatori richiesti dal Trading System deve essere attiva e aggiornata.", + "updated": 1618068565912 + } + ] }, { "style": "Note", "text": "If you are not ready to do some live trading for whatever reason, no worries, just keep going.", - "updated": 1610642653006 + "updated": 1610642653006, + "translations": [ + { + "language": "IT", + "text": "Se per un qualunque motivo non sei pronto a fare live trading, non preccuparti! Prosegui pure.", + "updated": 1618068597799 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-088-tutorial-step-disclaimer.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-088-tutorial-step-disclaimer.json index 4d5605e68..85ee732e3 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-088-tutorial-step-disclaimer.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-088-tutorial-step-disclaimer.json @@ -3,12 +3,26 @@ "pageNumber": 88, "type": "Tutorial Step - Disclaimer", "definition": { - "text": "This warning will be rendered in full screen mode." + "text": "This warning will be rendered in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo warning verrà visualizzato a schermo intero.", + "updated": 1618069224090 + } + ] }, "paragraphs": [ { "style": "Warning", - "text": "Superalgos is a piece of computer software. Like with any software, errors may occur at any point, including errors that may cause you to lose money. You are responsible for taking all precautions you may deem appropriate before trading live. Even if you take all possible precautionary measures, things may still go wrong and errors may occur. By using this software to trade live despite the warnings, you acknowledge that you are aware of the inherent risks in trading and in using software for that purpose. The Superalgos Project offers the software AS IS, with no explicit or implied warranties of any kind. The project, the software, the superalgos.org website, and this tutorial do not offer financial advice. Although the strategies shipping with the system may be fully functional, Superalgos does not make any express or implied recommendation as to how you should use them. We share strategies for educational purposes only. Trade under your responsibility and at your own risk. The use of the software is subject to the terms of the LICENSE." + "text": "Superalgos is a piece of computer software. Like with any software, errors may occur at any point, including errors that may cause you to lose money. You are responsible for taking all precautions you may deem appropriate before trading live. Even if you take all possible precautionary measures, things may still go wrong and errors may occur. By using this software to trade live despite the warnings, you acknowledge that you are aware of the inherent risks in trading and in using software for that purpose. The Superalgos Project offers the software AS IS, with no explicit or implied warranties of any kind. The project, the software, the superalgos.org website, and this tutorial do not offer financial advice. Although the strategies shipping with the system may be fully functional, Superalgos does not make any express or implied recommendation as to how you should use them. We share strategies for educational purposes only. Trade under your responsibility and at your own risk. The use of the software is subject to the terms of the LICENSE.", + "translations": [ + { + "language": "IT", + "text": "Superalgos è un software. Come ogni altro software, può presentare errori di qualsiasi tipo, inclusi errori che possono causare all'utente perdita di denaro. Sei responsabile di prendere ogni precauzione che tu ritenga appropriata prima di fare trading live. Anche prendendo ogni precauzione possibile, è comunque possibile che si verifichino errori. Utilizzando questo software per fare trading live, nonostante i presenti avvertimenti, riconosci di essere a conoscenza dei rischi inerenti all'attività di trading e all'uso di un software per quello scopo. Superalgos Project offre il software \"AS IS\", senza alcun tipo di garanzia esplicita o implicita. Il progetto, il software, il sito superalgos.org e questo tutorial non offrono consulenza finanziaria. Nonostante le strategie incluse nel sistema possano essere funzionanti, Superalgos non fa alcuna raccomandazione esplicita o implicita su come usarle. Condividiamo strategia a puro scopo educativo. Fai trading sotto la tua responsabilità e a tuo rischio e pericolo. L'uso del software è soggetto ai termini di licenza.", + "updated": 1618069837996 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-089-tutorial-step-lets-start-with-100-bucks.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-089-tutorial-step-lets-start-with-100-bucks.json index b96bf271a..032fb847e 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-089-tutorial-step-lets-start-with-100-bucks.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-089-tutorial-step-lets-start-with-100-bucks.json @@ -7,16 +7,37 @@ "project": "Superalgos", "name": "session-quoted-asset" }, - "text": "The default initialBalance is set to 100 USDT, well above the minimum transaction size supported by Binance." + "text": "The default initialBalance is set to 100 USDT, well above the minimum transaction size supported by Binance.", + "translations": [ + { + "language": "IT", + "text": "Il capitale iniziale initialBalance è impostato a 100 USDT, ben al di sopra del limite minimo per transazione supportato da Binance.", + "updated": 1618069933006 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "The initialBalance is defined in the configuration of the Session Quoted Asset. Check it out and decide for yourself if you wish to change it!" + "text": "The initialBalance is defined in the configuration of the Session Quoted Asset. Check it out and decide for yourself if you wish to change it!", + "translations": [ + { + "language": "IT", + "text": "initialBalance è definito nella configurazione del Session Quoted Asset. Esaminalo e decidi pure se preferisci cambiarlo!", + "updated": 1618069983048 + } + ] }, { "style": "Success", - "text": "Binance defines the minimum transaction size in BTC, so the requirement in USDT varies a lot with time. I set the amount to 100 USDT just to ensure you don't run into errors. You are free to try with a smaller amount. You will get errors if it's too small but may try again as many times as needed. Just stop the task, change the initialBalance in the Session Quoted Asset, and try again!" + "text": "Binance defines the minimum transaction size in BTC, so the requirement in USDT varies a lot with time. I set the amount to 100 USDT just to ensure you don't run into errors. You are free to try with a smaller amount. You will get errors if it's too small but may try again as many times as needed. Just stop the task, change the initialBalance in the Session Quoted Asset, and try again!", + "translations": [ + { + "language": "IT", + "text": "Binance definisce il valore minimo di una transazione in BTC, quindi il corrispondente valore in USDT varia molto nel tempo. Sei libero di provare con un importo minore dei 100 USDT iniziali. Riceverai un errore se l'importo è troppo piccolo, ma puoi provare di nuovo quante volte vuoi. Basta fermare la task, cambiare initialBalance nel Session Quoted Asset e riprovare!", + "updated": 1618070211585 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-090-tutorial-step-check-your-spot-balance.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-090-tutorial-step-check-your-spot-balance.json index 4c26e97b2..2a3050ba8 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-090-tutorial-step-check-your-spot-balance.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-090-tutorial-step-check-your-spot-balance.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "binance" }, - "text": "Before you run the Live Trading Session, make sure you have enough spot USDT balance at the exchange!" + "text": "Before you run the Live Trading Session, make sure you have enough spot USDT balance at the exchange!", + "translations": [ + { + "language": "IT", + "text": "Prima di lanciare la Live Trading Session, assicurati di avere abbastanza USDT nel tuo wallet spot sull'exchange.", + "updated": 1618070262891 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Take a look at your balance at the exchange and arrange for enough USDT for the session!" + "text": "Take a look at your balance at the exchange and arrange for enough USDT for the session!", + "translations": [ + { + "language": "IT", + "text": "Controlla il tuo saldo sull'exchange e prepara abbastanza USDT per la sessione!", + "updated": 1618070327486 + } + ] }, { "style": "Important", - "text": "The Trading Bot will place one limit order for the initialBalance, and cancel it the next minute in case it is not filled, as explained earlier." + "text": "The Trading Bot will place one limit order for the initialBalance, and cancel it the next minute in case it is not filled, as explained earlier.", + "translations": [ + { + "language": "IT", + "text": "Il Trading Bot inserirà un limit order del valore di initialBalance, e lo cancellerà il minuto successivo se non viene evaso, come spiegato prima.", + "updated": 1618070448288 + } + ] }, { "style": "Note", "text": "Keep going even if you are not ready to trade. You'll learn a few more tricks before we finish.", - "updated": 1616431994687 + "updated": 1616431994687, + "translations": [ + { + "language": "IT", + "text": "Continua il tutorial anche se non sei pronto al live trading. Imparerai altri trucchi utili prima della fine.", + "updated": 1618070434600 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-091-tutorial-step-enjoy-the-outdoors.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-091-tutorial-step-enjoy-the-outdoors.json index 3fcc75af1..cf5ab1f8e 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-091-tutorial-step-enjoy-the-outdoors.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-091-tutorial-step-enjoy-the-outdoors.json @@ -8,28 +8,63 @@ "name": "crypto-ecosystem" }, "text": "The Crypto Ecosystem hierarchy is where you configure which exchanges and markets you work with, your accounts with exchanges, API keys, and so on...", - "updated": 1616434733644 + "updated": 1616434733644, + "translations": [ + { + "language": "IT", + "text": "La gerarchia del Crypto Ecosystem è dove configuri con quali exchange e mercati operare, i tuoi account sugli exchange, le API keys, e così via.", + "updated": 1618070565551 + } + ] }, "paragraphs": [ { "style": "Text", "text": "Talking about API Keys, when you create your Exchange API key at the exchange, consider the following:", - "updated": 1616434379469 + "updated": 1616434379469, + "translations": [ + { + "language": "IT", + "text": "A proposito di API Keys, quando crei la tua API key sull'exchange, considera quanto segue:", + "updated": 1618070606671 + } + ] }, { "style": "List", "text": "Exclusive for Superalgos: Create a key to use excusively with Superalgos. This will help you track what Superalgos does with your account and prevent conflicts with other bots you may be using.", - "updated": 1616434392105 + "updated": 1616434392105, + "translations": [ + { + "language": "IT", + "text": "Solo per Superalgos: crea una key che userai solo per Superalgos. Questo ti aiuterà a tenere traccia di ciò che Superalgos fa con il tuo account e prevenire conflitti con altri bot che magari usi.", + "updated": 1618070656250 + } + ] }, { "style": "List", "text": "No IP Restrictions: This is to avoid issues while doing the tutorial — you may add restrictions later, once you know how the system works.", - "updated": 1616434940120 + "updated": 1616434940120, + "translations": [ + { + "language": "IT", + "text": "Non mettere restrizioni sull'IP: per evitare problemi mentre fai il tutorial (puoi aggiungere le restrizioni in un secondo momento, una volta capito il funzionamento del sistema).", + "updated": 1618070764665 + } + ] }, { "style": "List", "text": "No Withdrawals: Superalgos does not yet handle funds transfers so there is no point in allowing withdrawals. Remove withdrawals for safety reasons.", - "updated": 1616434684243 + "updated": 1616434684243, + "translations": [ + { + "language": "IT", + "text": "Niente prelievi: Superalgos non gestisce ancora il trasferimento di fondi, quindi è meglio disabilitarli per ragioni di sicurezza.", + "updated": 1618070747185 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-092-tutorial-step-your-keys-your-coins.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-092-tutorial-step-your-keys-your-coins.json index 6688e2ec2..ad6f9abec 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-092-tutorial-step-your-keys-your-coins.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-092-tutorial-step-your-keys-your-coins.json @@ -8,22 +8,50 @@ "name": "exchange-account-key" }, "text": "This is where you configure your Exchange Account Key for the Live Trading Session of the Lightning Strike Trading System.", - "updated": 1610817577376 + "updated": 1610817577376, + "translations": [ + { + "language": "IT", + "text": "Qui è dove configuro le Exchange Account Key per la Live Trading Session del Lightning Strike Trading System.", + "updated": 1618070825773 + } + ] }, "paragraphs": [ { "style": "Callout", "text": "Acess the configuration and carefully enter the API Pubilic Key and the API secret key.", - "updated": 1616435074225 + "updated": 1616435074225, + "translations": [ + { + "language": "IT", + "text": "Accedi alla configurazione e inserisci attentamente la API Public Key e la API Secret Key.", + "updated": 1618070869172 + } + ] }, { "style": "Text", - "text": "Delete the default text string for each parameter first, so that no foreign character gets mixed up with the keys." + "text": "Delete the default text string for each parameter first, so that no foreign character gets mixed up with the keys.", + "translations": [ + { + "language": "IT", + "text": "Cancella prima la stringa di testo di default per ogni parametro, così da non rischiare errori inserendo le tue chiavi.", + "updated": 1618070932988 + } + ] }, { "style": "Note", "text": "The Exchange Account Key is stored in the workspace file. It is used to authenticate with the exchange when the Trading Bot deals with orders. It is never sent or stored anywhere else.", - "updated": 1616435057411 + "updated": 1616435057411, + "translations": [ + { + "language": "IT", + "text": "L'Exchange Account Key è salvata nel workspace file. È utilizzata dal Trading Bot per autenticarsi sull'exchange quando gestisce gli ordini. Non viene inviata nè salvata in nessun'altro luogo.", + "updated": 1618071006665 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-093-tutorial-step-fire-up-the-machine.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-093-tutorial-step-fire-up-the-machine.json index ad979d262..6d1af0411 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-093-tutorial-step-fire-up-the-machine.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-093-tutorial-step-fire-up-the-machine.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "data-tasks" }, - "text": "Now it's time to fire up your Data Tasks operation." + "text": "Now it's time to fire up your Data Tasks operation.", + "translations": [ + { + "language": "IT", + "text": "Ora è il momento di lanciare le tue operazioni di Data Tasks.", + "updated": 1618071030199 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Select Run All Project Data Tasks on the menu." + "text": "Select Run All Project Data Tasks on the menu.", + "translations": [ + { + "language": "IT", + "text": "Seleziona Run All Project Data Tasks dal menù.", + "updated": 1618071069199 + } + ] }, { "style": "Text", - "text": "We'll give it a few minutes to catch up with the present time. Remember, all indicators must get to 100% before we can start trading!" + "text": "We'll give it a few minutes to catch up with the present time. Remember, all indicators must get to 100% before we can start trading!", + "translations": [ + { + "language": "IT", + "text": "Aspettiamo un paio di minuti perchè si aggiorni alla data e ora correnti. Ricorda che tutti gli indicatori devono essere a 100% prima che iniziamo a fare trading!", + "updated": 1618071103032 + } + ] }, { "style": "Success", "text": "If you are not going to run the live session, you don't need to start the Data Tasks. Just keep going to learn how the process works. ", - "updated": 1610643039999 + "updated": 1610643039999, + "translations": [ + { + "language": "IT", + "text": "Se non hai intenzione di fare trading live, non è necessario lanciare la data task. Puoi semplicemente proseguire, per vedere come funziona il procedimento.", + "updated": 1618071161823 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-094-tutorial-step-are-we-ready-yet.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-094-tutorial-step-are-we-ready-yet.json index 8f126d173..1aa9877ac 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-094-tutorial-step-are-we-ready-yet.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-094-tutorial-step-are-we-ready-yet.json @@ -8,21 +8,49 @@ "name": "indicator-process-instance" }, "text": "Resistances and Supports Multi-Period-Daily to the left is the last of the processes to finish.", - "updated": 1610643083669 + "updated": 1610643083669, + "translations": [ + { + "language": "IT", + "text": "Resistances and Supports Multi-Period-Daily a sinistra è l'ultimo processo a terminare.", + "updated": 1618071215837 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "If this process is at 100%, then we are ready to go." + "text": "If this process is at 100%, then we are ready to go.", + "translations": [ + { + "language": "IT", + "text": "Se il processo è a 100%, allora siamo pronti a iniziare.", + "updated": 1618071233196 + } + ] }, { "style": "Note", - "text": "Either way, nothing catastrophic happens if you attempt to run a Live Trading Session when the required indicators are not up to date. There would be an error, and you'd be notified of the reason. So, no big deal!" + "text": "Either way, nothing catastrophic happens if you attempt to run a Live Trading Session when the required indicators are not up to date. There would be an error, and you'd be notified of the reason. So, no big deal!", + "translations": [ + { + "language": "IT", + "text": "Ad ogni modo, non succede niente di catastrofico se tenti di lanciare una Live Trading Session quando gl indicatori non sono pronti. Ti viene semplicemente notificato un errore. Nessun problema quindi!", + "updated": 1618071277306 + } + ] }, { "style": "Success", "text": "In the next step I'll ask you to start the Task and the Live Trading Session. If you choose not to, keep going with the tutorial as if you had...", - "updated": 1610643323637 + "updated": 1610643323637, + "translations": [ + { + "language": "IT", + "text": "Nel prossimo step ti chiederò di lanciare la Task e la Live Trading Session. Se non vuoi farlo, continua con il tutorial come se niente fosse.", + "updated": 1618071315670 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-095-tutorial-step-lets-do-this.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-095-tutorial-step-lets-do-this.json index a9b705550..4f25b6db9 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-095-tutorial-step-lets-do-this.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-095-tutorial-step-lets-do-this.json @@ -7,16 +7,37 @@ "project": "Superalgos", "name": "live-trading-session" }, - "text": "We've gone through the 3-point checklist and we are ready to go, so let's get on with it!" + "text": "We've gone through the 3-point checklist and we are ready to go, so let's get on with it!", + "translations": [ + { + "language": "IT", + "text": "Abbiamo completato tutti e tre i punti sulla nostra checklist e siamo pronti a partire!", + "updated": 1618071368189 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Run the Lightning Strike Task, and then run the Lightning Strike Live Trading Session to the right!" + "text": "Run the Lightning Strike Task, and then run the Lightning Strike Live Trading Session to the right!", + "translations": [ + { + "language": "IT", + "text": "Lancia la Lightning Strike Task, e poi lancia la Lightning Strike Live Trading Session a destra!", + "updated": 1618071413222 + } + ] }, { "style": "Note", - "text": "Once you run the session, the trading bot may have to wait up to 60 seconds for the last indicator to finish processing. Once it does, you will see the current date and a 0% progress notice under the Trading Process Instance, which will remain like that throughout the run." + "text": "Once you run the session, the trading bot may have to wait up to 60 seconds for the last indicator to finish processing. Once it does, you will see the current date and a 0% progress notice under the Trading Process Instance, which will remain like that throughout the run.", + "translations": [ + { + "language": "IT", + "text": "Una volta lanciata la sessione, il trading bot può dover attendere fino a 60 secondi perchè gli ultimi indicatori terminino. Una volta completati, vedrai la data corrente e un progresso dello 0% sotto la Trading Process Instance, che rimarrà così per tutta la durata della sessione.", + "updated": 1618071515418 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-096-tutorial-step-welcome-live-trading-process-progress.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-096-tutorial-step-welcome-live-trading-process-progress.json index 789a2d5c5..829a2260c 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-096-tutorial-step-welcome-live-trading-process-progress.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-096-tutorial-step-welcome-live-trading-process-progress.json @@ -3,7 +3,14 @@ "pageNumber": 96, "type": "Tutorial Step - Welcome Live Trading Process Progress", "definition": { - "text": "This step will play a video in full screen mode." + "text": "This step will play a video in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo step eseguirà un video a schermo intero.", + "updated": 1618071529941 + } + ] }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-097-tutorial-step-check-your-console.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-097-tutorial-step-check-your-console.json index e831b2529..6cd16c8a1 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-097-tutorial-step-check-your-console.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-097-tutorial-step-check-your-console.json @@ -7,20 +7,48 @@ "project": "Superalgos", "name": "trading-process-instance" }, - "text": "If you don't see any errors on the Trading Process Instance, chances are everything is working fine!" + "text": "If you don't see any errors on the Trading Process Instance, chances are everything is working fine!", + "translations": [ + { + "language": "IT", + "text": "Se non vedi alcun errore sulla Trading Process Instance, probabilmente sta andando tutto bene!", + "updated": 1618071552567 + } + ] }, "paragraphs": [ { "style": "Text", - "text": "However, you may want to take a look at your console application and see if you notice anything out of the norm." + "text": "However, you may want to take a look at your console application and see if you notice anything out of the norm.", + "translations": [ + { + "language": "IT", + "text": "Comunque, puoi controllare sulla console application e vedere se noti qualcosa di anomalo.", + "updated": 1618071581430 + } + ] }, { "style": "Callout", - "text": "Take a look at your console app!" + "text": "Take a look at your console app!", + "translations": [ + { + "language": "IT", + "text": "Dai un'occhiata alla console app!", + "updated": 1618071594539 + } + ] }, { "style": "Note", - "text": "You should be able to see the alternating executions of the Candles-Volumes and Resistances-And-Support indicators, with the Low-Frequency Trading Bot" + "text": "You should be able to see the alternating executions of the Candles-Volumes and Resistances-And-Support indicators, with the Low-Frequency Trading Bot", + "translations": [ + { + "language": "IT", + "text": "Dovresti vedere le esecuzioni alternate delle Candles-Volumes e degli indicatori Resistances-And-Supports, con il Low-Frequency Trading Bot.", + "updated": 1618071644756 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-098-tutorial-step-welcome-live-trading-console.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-098-tutorial-step-welcome-live-trading-console.json index 9543c3be8..180acf8e4 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-098-tutorial-step-welcome-live-trading-console.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-098-tutorial-step-welcome-live-trading-console.json @@ -3,7 +3,14 @@ "pageNumber": 98, "type": "Tutorial Step - Welcome Live Trading Console", "definition": { - "text": "This step will play a video in full screen mode." + "text": "This step will play a video in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo step eseguirà un video a schermo intero.", + "updated": 1618071661394 + } + ] }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-099-tutorial-step-is-it-working.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-099-tutorial-step-is-it-working.json index 506fa9b8b..34e4e9907 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-099-tutorial-step-is-it-working.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-099-tutorial-step-is-it-working.json @@ -8,16 +8,37 @@ "name": "binance" }, "text": "The unequivocal way to verify if things are working fine is logging on to Binance and checking your order history for BTC/USDT.", - "updated": 1616435272813 + "updated": 1616435272813, + "translations": [ + { + "language": "IT", + "text": "Il modo più sicuro per verificare che tutto sta andando bene è andare su Binance e controllare la cronologia degli ordini BTC/USDT.", + "updated": 1618071697384 + } + ] }, "paragraphs": [ { "style": "Callout", - "text": "Go to Binance and take a look at what's going on!" + "text": "Go to Binance and take a look at what's going on!", + "translations": [ + { + "language": "IT", + "text": "Vai su Binance e controlla costa sta succedendo!", + "updated": 1618071709908 + } + ] }, { "style": "Note", - "text": "At any point in time, you should see one open order and a number of canceled orders pilling up in your order history, pretty much like in the video on the next step!" + "text": "At any point in time, you should see one open order and a number of canceled orders pilling up in your order history, pretty much like in the video on the next step!", + "translations": [ + { + "language": "IT", + "text": "In qualunque momento, dovresti vedere un ordine aperto e un certo numero di ordini cancellati nella tua cronologia, come nel video al prossimo step!", + "updated": 1618071750939 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-100-tutorial-step-welcome-live-trading-binance-orders.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-100-tutorial-step-welcome-live-trading-binance-orders.json index 9c0e7f7dc..5c8a3a9b5 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-100-tutorial-step-welcome-live-trading-binance-orders.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-100-tutorial-step-welcome-live-trading-binance-orders.json @@ -3,7 +3,14 @@ "pageNumber": 100, "type": "Tutorial Step - Welcome Live Trading Binance Orders", "definition": { - "text": "This step will play a video in full screen mode." + "text": "This step will play a video in full screen mode.", + "translations": [ + { + "language": "IT", + "text": "Questo step eseguirà un video a schermo intero.", + "updated": 1618071771852 + } + ] }, "paragraphs": [ { diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-101-tutorial-step-monitoring-the-fun-way.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-101-tutorial-step-monitoring-the-fun-way.json index 9875466b1..789dd8ce4 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-101-tutorial-step-monitoring-the-fun-way.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-101-tutorial-step-monitoring-the-fun-way.json @@ -7,21 +7,49 @@ "project": "Superalgos", "name": "bullet-limit-buy-order" }, - "text": "You thought I would let you monitor the Live Trading Session watching the ugly list of orders at the exchange? No way!" + "text": "You thought I would let you monitor the Live Trading Session watching the ugly list of orders at the exchange? No way!", + "translations": [ + { + "language": "IT", + "text": "Pensavi che ti avrei lasciato monitorare la Live Trading Session controllando quella brutta lista di ordini sull'exchange? Neanche per sogno!", + "updated": 1618071826917 + } + ] }, "paragraphs": [ { "style": "Text", "text": "Superalgos produces the same kind of simulations you fell in love with for live sessions too, in realtime!", - "updated": 1616435345542 + "updated": 1616435345542, + "translations": [ + { + "language": "IT", + "text": "Superalgos produce lo stesso tipo di simulazioni di cui ti sei innamorato anche per le live sessions, e lo fa in tempo reale!", + "updated": 1618071876792 + } + ] }, { "style": "Callout", - "text": "Can you see the first few buy orders on the chart?" + "text": "Can you see the first few buy orders on the chart?", + "translations": [ + { + "language": "IT", + "text": "Vedi i primi buy orders sul grafico?", + "updated": 1618071889300 + } + ] }, { "style": "Note", - "text": "I just brought you to the present time, on the 1-minute chart. You should be able to see the latest candle forming and a few orders already. The Rate Scale is in automatic mode at both ends. Feel free to change the scales to your liking." + "text": "I just brought you to the present time, on the 1-minute chart. You should be able to see the latest candle forming and a few orders already. The Rate Scale is in automatic mode at both ends. Feel free to change the scales to your liking.", + "translations": [ + { + "language": "IT", + "text": "Ti ho appena portato al momento attuale, sul grafico da 1-min. Dovresti vedere le ultime candele che si formano e già alcuni ordini. La Rate Scale è in automatico a entrambi gli estremi: cambiala pure come preferisci.", + "updated": 1618071961435 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-102-tutorial-step-whats-next.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-102-tutorial-step-whats-next.json index 27aae02e0..9d7dead35 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-102-tutorial-step-whats-next.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-102-tutorial-step-whats-next.json @@ -7,18 +7,39 @@ "name": "help", "project": "Superalgos" }, - "text": "There are tons of things we haven't covered yet, I know! Just look around! So much stuff to see! It's mind-boggling." + "text": "There are tons of things we haven't covered yet, I know! Just look around! So much stuff to see! It's mind-boggling.", + "translations": [ + { + "language": "IT", + "text": "Lo so, ci sono migliaia di cose che non abbiamo trattato o approfondito! C'è così tanto da vedere e imparare!", + "updated": 1618072213077 + } + ] }, "paragraphs": [ { "style": "Text", "text": "I'm sure you still have tons of questions floating in your head... How do I build my own strategies? How do I measure performance? How do I build an indicator? How do I deploy a trading farm? How may I integrate with TradingView? How do I set up Telegram announcements?", - "updated": 1610711099627 + "updated": 1610711099627, + "translations": [ + { + "language": "IT", + "text": "Sono sicuro che hai ancora chissà quante domande che ti girano in testa...come costruisco le mie strategie? Come ne misuro la performance? Come costruisco un indicatore? Come configuro una trading farm? Come posso interfacciarmi con TradingView? Come configuro le notifiche Telegram?", + "updated": 1618072291773 + } + ] }, { "style": "Success", "text": "Don't worry! You'll get there my friend! There are more tutorials and a lot of reading material available! Maybe it's a good idea to give you a quick glimpse into the built-in Documentation system before I say goodbye!", - "updated": 1611579231884 + "updated": 1611579231884, + "translations": [ + { + "language": "IT", + "text": "Non preoccuparti! Imparerai tutto! Ci sono altri tutorial e tonnellate di materiale da leggere! Penso sia una buona idea mostrarti velocemente il sistema di documentazione prima di salutarci!", + "updated": 1618072351473 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-103-tutorial-step-three-minutes-to-play.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-103-tutorial-step-three-minutes-to-play.json index 0681b6a85..5b5c0f190 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-103-tutorial-step-three-minutes-to-play.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-103-tutorial-step-three-minutes-to-play.json @@ -8,23 +8,51 @@ "name": "live-trading-session", "project": "Superalgos" }, - "updated": 1610647035525 + "updated": 1610647035525, + "translations": [ + { + "language": "IT", + "text": "Ti lascio qualche minuto per divertirti con la tua live session, e quando sarai pronto passeremo ad altre cose!", + "updated": 1618071992282 + } + ] }, "paragraphs": [ { "style": "Text", "text": "Take some time to process what you've learned so far...", - "updated": 1610647327253 + "updated": 1610647327253, + "translations": [ + { + "language": "IT", + "text": "Prenditi del tempo per elaborare le cose che hai imparato finora...", + "updated": 1618072011982 + } + ] }, { "style": "Important", "text": "Once you are ready to move on, feel free to stop the Live Trading Session and Data Tasks. You may leave the session running if you wish, but I wouldn't trust my hard-earned cash to the demo strategy indefinitely!", - "updated": 1610647503331 + "updated": 1610647503331, + "translations": [ + { + "language": "IT", + "text": "Una volta che sei pronto a proseguire, sentiti libero di fermare Live Trading Session e Data Tasks. Puoi lasciarle proseguire se preferisci, ma io non affiderei a tempo indefinito i miei sudati soldi alla strategia demo!", + "updated": 1618072064872 + } + ] }, { "style": "Success", "text": "There's still a few more things I want to show you before I let you go! Bear with me!", - "updated": 1610711032226 + "updated": 1610711032226, + "translations": [ + { + "language": "IT", + "text": "Ci sono ancora un paio di cose che voglio mostrarti prima di concludere! Tieni duro!", + "updated": 1618072086072 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-104-tutorial-step-what-else-is-cooking.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-104-tutorial-step-what-else-is-cooking.json index 08a88f531..449138f1f 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-104-tutorial-step-what-else-is-cooking.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-104-tutorial-step-what-else-is-cooking.json @@ -8,26 +8,61 @@ "name": "ethereum" }, "text": "Superalgos is a multi-project platform, and —after TensorFlow— the Ethereum integration is next in line...", - "updated": 1616695001060 + "updated": 1616695001060, + "translations": [ + { + "language": "IT", + "text": "Superalgos è un progetto multi-piattaforma. Dopo quella con TensorFlow, lo step successivo è l'integrazione con Ethereum.", + "updated": 1618073342659 + } + ] }, "paragraphs": [ { "style": "Text", "text": "What does integrating Ethereum mean, you ask? It means that—in future versions—you will be able to:", - "updated": 1610719381268 + "updated": 1610719381268, + "translations": [ + { + "language": "IT", + "text": "Che cosa significa integrare Ethereum? Significa che, nelle future versioni, potrai:", + "updated": 1618073374905 + } + ] }, { "style": "List", - "text": "Connect to an Ethereum node right from within Superalgos using the visual interface." + "text": "Connect to an Ethereum node right from within Superalgos using the visual interface.", + "translations": [ + { + "language": "IT", + "text": "Connetterti a un nodo Ethereum direttamente da Superalgos usando l'interfaccia grafica.", + "updated": 1618073396110 + } + ] }, { "style": "List", "text": "Mine blockchain data to access coin and contract information for all Ethereum-based projects, including De-Fi or what have you, visualizing data on the charts, building indicators, and leveraging the rest of the Superalgos infrastructure.", - "updated": 1611584299475 + "updated": 1611584299475, + "translations": [ + { + "language": "IT", + "text": "Ottenere dati on-chain e accedere a informazioni su token e contratti di tutti i progetti basati su Ethereum, inclusi quelli De-Fi, visualizzando dati sui grafici, creando indicatori e sfruttando il resto delle funzioni di Superalgos.", + "updated": 1618073500896 + } + ] }, { "style": "List", - "text": "Use the data to trade by consuming related indicators from within trading systems!" + "text": "Use the data to trade by consuming related indicators from within trading systems!", + "translations": [ + { + "language": "IT", + "text": "Usa i dati per fare trading utilizzando i relativi indicatori dal tuo trading system!", + "updated": 1618073540467 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-105-tutorial-step-spread-the-word-on-twitter.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-105-tutorial-step-spread-the-word-on-twitter.json index 000ec7929..4e253810a 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-105-tutorial-step-spread-the-word-on-twitter.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-105-tutorial-step-spread-the-word-on-twitter.json @@ -8,23 +8,51 @@ "name": "twitter" }, "text": "Making some noise on Twitter will help bring more traders to the project. More traders pushing the boundaries of the software is the best driver of evolution!", - "updated": 1610914488286 + "updated": 1610914488286, + "translations": [ + { + "language": "IT", + "text": "Condividere il progetto su Twitter aiuterà a raggiungere più traders. Più traders che utilizzano il software è il miglior modo per incentivarne l'evoluzione!", + "updated": 1618072678582 + } + ] }, "paragraphs": [ { "style": "Text", "text": "The more traders using Superalgos, the more they will drive the Community to develop ever more advanced features! This is what you need to do:", - "updated": 1610914531306 + "updated": 1610914531306, + "translations": [ + { + "language": "IT", + "text": "Più persone usano Superalgos, più spingeranno la Community a sviluppare funzionalità ancora migliori! Ecco cosa dovresti fare:", + "updated": 1618072720212 + } + ] }, { "style": "Callout", "text": "Go to our Twitter page, follow us, and retweet our latest tweet. Make sure you tag traders you follow!", - "updated": 1610961950814 + "updated": 1610961950814, + "translations": [ + { + "language": "IT", + "text": "Vai sulla nostra page di Twitter, seguici e ritwitta il nostro ultimo tweet. Assicurati di taggare i traders che segui!", + "updated": 1618072761967 + } + ] }, { "style": "Text", "text": "That's it! No big deal, right? We appreciate your help and wish you some happy and prosperous trading!", - "updated": 1610957777183 + "updated": 1610957777183, + "translations": [ + { + "language": "IT", + "text": "Ottimo! Apprezziamo molto il tuo aiuto e ti auguriamo un trading felice e remunerativo!", + "updated": 1618072801199 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-106-tutorial-step-back-to-work.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-106-tutorial-step-back-to-work.json index fb4b5c853..95f758ea1 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-106-tutorial-step-back-to-work.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-106-tutorial-step-back-to-work.json @@ -8,23 +8,51 @@ "icon": { "name": "status-dependency", "project": "Superalgos" - } + }, + "translations": [ + { + "language": "IT", + "text": "Superalgos è provvisto di una documentazione in-app, editabile e multilingua, e addirittura di una command line! Impara a usare questi strumenti e sarai a cavallo!", + "updated": 1618072460548 + } + ] }, "paragraphs": [ { "style": "Text", "text": "You've already used a couple of documentation pages on the Docs panel on the right, but that's just the tip of the iceberg!", - "updated": 1616694225866 + "updated": 1616694225866, + "translations": [ + { + "language": "IT", + "text": "Hai già utilizzato un paio di pagine della documentazione nel pannello Docs a destra, ma è solo la punta dell'iceberg!", + "updated": 1618072487694 + } + ] }, { "style": "Callout", "text": "Let's try it! Search for the word... network.", - "updated": 1610648926126 + "updated": 1610648926126, + "translations": [ + { + "language": "IT", + "text": "Proviamo! Cerca la parola \"network\".", + "updated": 1618072499244 + } + ] }, { "style": "Success", "text": "Not to brag, but the speed of the search engine rivals the likes of Google ;-)", - "updated": 1610651624723 + "updated": 1610651624723, + "translations": [ + { + "language": "IT", + "text": "Non per vantarmi, ma la velocità del motore di ricerca fa concorrenza a Google ;-)", + "updated": 1618072524938 + } + ] }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-107-tutorial-step-tabbed-search-results.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-107-tutorial-step-tabbed-search-results.json index 4a600c8b2..2397404a9 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-107-tutorial-step-tabbed-search-results.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-107-tutorial-step-tabbed-search-results.json @@ -8,52 +8,122 @@ "icon": { "name": "dataset", "project": "Superalgos" - } + }, + "translations": [ + { + "language": "IT", + "text": "I risultati sono organizzati in categorie, e ogni categoria è rappresentata da un tab che raggruppa i risultati che corrispondono alla categoria...", + "updated": 1618072849624 + } + ] }, "paragraphs": [ { "style": "Text", "text": "I'll explain each briefly and set you free to look around:", - "updated": 1610712854590 + "updated": 1610712854590, + "translations": [ + { + "language": "IT", + "text": "Ti spiego al volo quanto basta per orientarti:", + "updated": 1618072878367 + } + ] }, { "style": "List", - "text": "All: features results from all categories." + "text": "All: features results from all categories.", + "translations": [ + { + "language": "IT", + "text": "All: risultati da ogni categoria", + "updated": 1618072897216 + } + ] }, { "style": "List", "text": "Nodes: Node Type matches containing the phrase.", - "updated": 1616694586239 + "updated": 1616694586239, + "translations": [ + { + "language": "IT", + "text": "Nodes: un tipo di nodo corrisponde alla frase", + "updated": 1618072910891 + } + ] }, { "style": "List", "text": "Concepts: includes notions such as References.", - "updated": 1610712970644 + "updated": 1610712970644, + "translations": [ + { + "language": "IT", + "text": "Concepts: include concetti come le References", + "updated": 1618072928787 + } + ] }, { "style": "List", "text": "Topics: large themes covered in sequenced pages.", - "updated": 1610712670894 + "updated": 1610712670894, + "translations": [ + { + "language": "IT", + "text": "Topics: temi estesi trattati da sequenze di pagine", + "updated": 1618072951866 + } + ] }, { "style": "List", "text": "Tutorials: features the pages that make up tutorials.", - "updated": 1610652329836 + "updated": 1610652329836, + "translations": [ + { + "language": "IT", + "text": "Tutorials: contiene le pagine che formano i tutorial", + "updated": 1618072968448 + } + ] }, { "style": "List", "text": "Reviews: features users reviews on plugins , etc...", - "updated": 1610712626605 + "updated": 1610712626605, + "translations": [ + { + "language": "IT", + "text": "Reviews: contiene le reviews degli utenti su vari temi", + "updated": 1618072989751 + } + ] }, { "style": "List", "text": "Books: collections of topics organized in chapters that cover entire app domains, for an orderly read.", - "updated": 1610712723851 + "updated": 1610712723851, + "translations": [ + { + "language": "IT", + "text": "Books: collezioni di topic organizzati in capitoli che coprono intere funzionalità del software", + "updated": 1618073039515 + } + ] }, { "style": "List", "text": "Workspace: returns nodes that are present in the active workspace... click to go to them!", - "updated": 1610713053382 + "updated": 1610713053382, + "translations": [ + { + "language": "IT", + "text": "Workspace: mostra i nodi presenti nel workspace corrente. Clicca per raggungerli!", + "updated": 1618073062614 + } + ] }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-108-tutorial-step-a-couple-more-things.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-108-tutorial-step-a-couple-more-things.json index 374193f3c..b54b0756a 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-108-tutorial-step-a-couple-more-things.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-108-tutorial-step-a-couple-more-things.json @@ -8,23 +8,51 @@ "icon": { "name": "strategy-counters", "project": "Superalgos" - } + }, + "translations": [ + { + "language": "IT", + "text": "Mancano ancora un paio di cose prima che ci salutiamo! Coraggio!", + "updated": 1618073095923 + } + ] }, "paragraphs": [ { "style": "List", "text": "I'll give you a quick introduction on what we are working on for upcoming versions of Superalgos! I mentioned Machine Learning algorithms, but there's more! It has to do with integrating crypto projects!", - "updated": 1611583731733 + "updated": 1611583731733, + "translations": [ + { + "language": "IT", + "text": "Ti dò un'introduzione rapida di ciò su cui stiamo lavorando per la prossima versione. Ho menzionato algoritmi di Machine Learning, ma c'è di più! Riguarda l'integrazione con dei progetti crypto!", + "updated": 1618073169920 + } + ] }, { "style": "List", "text": "I also want to let you know that—if you appreciate what we are doing—you can help! Tens of thousands of hours of hard work have gone into building Superalgos and bringing it to its current state. I hope you can take a couple of minutes of your time to give back, and I'll be happy to tell you where to start!", - "updated": 1611584131359 + "updated": 1611584131359, + "translations": [ + { + "language": "IT", + "text": "Volevo anche dirti che, se apprezzi ciò che stiamo facendo, ci puoi aiutare! Decine di migliaia di ore e duro lavoro sono state impiegte per costruire Superalgos così come lo vedi ora. Spero che vorrai contribuire anche solo con qualche minuto, e sarò felice di farti vedere da dove iniziare!", + "updated": 1618073272368 + } + ] }, { "style": "Success", "text": "Let's get on with it!", - "updated": 1611584148459 + "updated": 1611584148459, + "translations": [ + { + "language": "IT", + "text": "Coraggio, ti faccio vedere!", + "updated": 1618073296750 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-109-tutorial-step-help-us-with-a-star.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-109-tutorial-step-help-us-with-a-star.json index aa051966e..aa7a5523f 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-109-tutorial-step-help-us-with-a-star.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-109-tutorial-step-help-us-with-a-star.json @@ -8,23 +8,51 @@ "icon": { "name": "github", "project": "Superalgos" - } + }, + "translations": [ + { + "language": "IT", + "text": "Dare a Superalgos una stella su GitHub migliora il suo ranking nella ricerca delle repo sul sito, e aiuta più sviluppatori a trovarci!", + "updated": 1618073606346 + } + ] }, "paragraphs": [ { "style": "Text", "text": "This token of appreciation is not only welcomed by the whole Community, but helps you directly too! The more developers contribute to the project, the better Superalgos gets, and the better it may serve you... so it's a no-brainer!", - "updated": 1611587542411 + "updated": 1611587542411, + "translations": [ + { + "language": "IT", + "text": "Questo gesto di apprezzamento non aiuta solo l'intera Community, ma anche te! Più sviluppatori contribuiscono al progetto, migliore Superalgos diventa, e meglio può servire ai tuoi scopi!", + "updated": 1618073681997 + } + ] }, { "style": "Callout", "text": "Just go back to our repository and click the Star button on the top-right corner!", - "updated": 1611584840715 + "updated": 1611584840715, + "translations": [ + { + "language": "IT", + "text": "Torna semplicemente al nostro repository e clicca il bottone a forma di stella nell'angolo in alto a destra!", + "updated": 1618073720679 + } + ] }, { "style": "Link", "text": "Here's a link for your convenience! Thank you!->github.com/Superalgos/Superalgos", - "updated": 1611584996191 + "updated": 1611584996191, + "translations": [ + { + "language": "IT", + "text": "Ecco il link, per comodità! Grazie mille!->github.com/Superalgos/Superalgos", + "updated": 1618073740398 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-110-tutorial-step-get-in-touch.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-110-tutorial-step-get-in-touch.json index a97eb5b51..da615ba58 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-110-tutorial-step-get-in-touch.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-110-tutorial-step-get-in-touch.json @@ -8,7 +8,14 @@ "name": "telegram-bot" }, "text": "We strive to help users progress fast and push the boundaries of what is possible with Superalgos! Join the conversation in the...", - "updated": 1610957615235 + "updated": 1610957615235, + "translations": [ + { + "language": "IT", + "text": "Mettiamo il massimo impegno nell'aiutare gli utenti a migliorare e ridefinire il concetto di cosa sia possibile fare con Superalgos! Unisciti alla conversazione...", + "updated": 1618073819599 + } + ] }, "paragraphs": [ { @@ -28,7 +35,14 @@ { "style": "Callout", "text": "Join the Announcements Channel to be the first to know about new releases, hot fixes, and important issues!", - "updated": 1610964709408 + "updated": 1610964709408, + "translations": [ + { + "language": "IT", + "text": "Unisciti agli Announcements Channel per essere sempre al corrente di nuove release, hot fix e aggiornamenti importanti!", + "updated": 1618073910521 + } + ] }, { "style": "Text", diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-111-tutorial-step-ready-for-more-tutorials.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-111-tutorial-step-ready-for-more-tutorials.json index 3c2da859d..a8969e434 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-111-tutorial-step-ready-for-more-tutorials.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-111-tutorial-step-ready-for-more-tutorials.json @@ -8,23 +8,51 @@ "name": "tutorial" }, "text": "Not to brag, but I can't stress enough how important it is that you make all tutorials available before venturing on your own!", - "updated": 1610984910896 + "updated": 1610984910896, + "translations": [ + { + "language": "IT", + "text": "Non voglio stressarti, ma non smetterò mai di ripetere quanto sia importante che tu segua tutti i tutorial prima di avventurarti da solo!", + "updated": 1618074463758 + } + ] }, "paragraphs": [ { "style": "Text", "text": "The system is vast and covers complex matters. Going solo on your first days with Superalgos is only recommended for people who enjoy banging their heads against the wall!", - "updated": 1610956232418 + "updated": 1610956232418, + "translations": [ + { + "language": "IT", + "text": "Il sistema è enorme e copre concetti complessi. Iniziare avventurandosi da solo in Superalgos è raccomandato solo a coloro a cui piace finire per sbattere la testa contro il muro!", + "updated": 1618074517616 + } + ] }, { "style": "Success", "text": "The First Steps Tutorials book to your right provides all the details on the best way to invest your time learning Superalgos. ", - "updated": 1616706102160 + "updated": 1616706102160, + "translations": [ + { + "language": "IT", + "text": "Il First Steps Tutorials alla tua destra fornisce tutti i dettagli sul miglior modo di investire il tuo tempo per imparare Superalgos.", + "updated": 1618074583238 + } + ] }, { "style": "Note", "text": "Before you finish, I will leave you with the next best tutorial in the series!", - "updated": 1616706133031 + "updated": 1616706133031, + "translations": [ + { + "language": "IT", + "text": "Prima di terminare, ti lascio con il prossimo miglior tutorial della serie!", + "updated": 1618074621074 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-112-tutorial-step-my-only-friend-the-end.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-112-tutorial-step-my-only-friend-the-end.json index cb255ac8e..ce1193fd3 100644 --- a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-112-tutorial-step-my-only-friend-the-end.json +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-112-tutorial-step-my-only-friend-the-end.json @@ -7,23 +7,51 @@ "project": "Superalgos", "name": "close-stage-event" }, - "text": "Ok, my friend, this is the end! I hope you've enjoyed the show and that I've managed to get you hooked to Superalgos!" + "text": "Ok, my friend, this is the end! I hope you've enjoyed the show and that I've managed to get you hooked to Superalgos!", + "translations": [ + { + "language": "IT", + "text": "Ok amico mio, siamo alla fine! Spero ti sia goduto lo spettacolo e che sia riuscito a coinvolgerti in Superalgos!", + "updated": 1618074673420 + } + ] }, "paragraphs": [ { "style": "Text", "text": "There's no doubt in my mind that you haven't seen anything like Superalgos before, have you?", - "updated": 1611589835629 + "updated": 1611589835629, + "translations": [ + { + "language": "IT", + "text": "Sono certo che tu non abbia mai visto niente di simile a Superalgos, o sbaglio?", + "updated": 1618074705467 + } + ] }, { "style": "Callout", "text": "If you're ready to keep going, my friend the Basic Education Tutorial will complete your understanding on some basic aspects of the system you need to master before you set out to learn how to build Trading Systems!", - "updated": 1616706394194 + "updated": 1616706394194, + "translations": [ + { + "language": "IT", + "text": "Se sei pronto per continuare, il mio amico Basic Education Tutorial integrerà concetti su alcuni aspetti base del sistema che devi conoscere bene prima di costruire i Trading Systems! ", + "updated": 1618074793359 + } + ] }, { "style": "Success", "text": "We're done! Click Next to finish with me and click Play on the next tutorial when you are ready!", - "updated": 1616706565119 + "updated": 1616706565119, + "translations": [ + { + "language": "IT", + "text": "Abbiamo finito! Clicca Next per terminare e clicca Play sul tutorial successivo quando sei pronto!", + "updated": 1618074823724 + } + ] } ] } \ No newline at end of file diff --git a/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json new file mode 100644 index 000000000..8226629b3 --- /dev/null +++ b/Projects/Superalgos/Schemas/Docs-Tutorials/welcome-to-superalgos-7.5-tutorial-step-repository-branches.json @@ -0,0 +1,33 @@ +{ + "tutorial": "Welcome to Superalgos!", + "pageNumber": "7.5", + "type": "Tutorial Step - Repository Branches", + "definition": { + "text": "The Superalgos repository features three main branches: master, develop, and the one we're looking for, plugins-docs.", + "icon": { + "name": "github", + "project": "Superalgos" + }, + "updated": 1618143614949 + }, + "paragraphs": [ + { + "style": "Success", + "text": "There may be more, but these are the main!", + "updated": 1618143442686 + }, + { + "style": "List", + "text": "Master Branch: Features the stable version of the software. Never submit contributions to this branch!" + }, + { + "style": "List", + "text": "Develop Branch: Features the version currently in development. Submit contributions of code affecting the codebase.", + "updated": 1618143744374 + }, + { + "style": "List", + "text": "Plugins/Docs Branch: Features the version in the master branch plus the latest changes in the Docs and Plugins. Submit contributions of translations, improvements in the Docs, tutorials, and plugins such as data mines, trading systems, and so on!" + } + ] +} \ No newline at end of file diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/CONTRIBUTING.md b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/CONTRIBUTING.md index 1d3ff05d1..7ff3d7ae6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/CONTRIBUTING.md +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/CONTRIBUTING.md @@ -261,7 +261,7 @@ These files containing derived exchange classes are transpiled from JS into PHP: These PHP base classes and files are not transpiled: -- `php/base/*` +- `php/Exchange.php php/ExchangeError.php php/Precise.php ... #### Typescript @@ -385,7 +385,7 @@ async fetchTicker (symbol, params = {}) { #### Parsing Symbols -When sending requests to the exchange unified symbols have to be _"converted"_ to exchange-specific market-`id`s like shown above. The same is true on the other side – when receiving an exchange response it has an exchange-specific market-`id` inside it that has to be _"converted back"_ to a unified CCXT symbol. +When sending requests to the exchange unified symbols have to be _"converted"_ to exchange-specific market-`id`s like shown above. The same is true on the other end – when receiving an exchange response it has an exchange-specific market-`id` inside it that has to be _"converted back"_ to a unified CCXT symbol. **We don't put exchange-specific market-`id`s in unified structures directly!** We can't freely interchange symbols with ids! There is a significant difference between an *exchange-specific market-ids* and *unified symbols*! This is explained in the Manual, here: @@ -444,7 +444,7 @@ In JavaScript, dictionary keys can be accessed in two notations: Both work almost identically, and one is implicitly converted to another upon executing the JavaScript code. -While the above does work in JavaScript, it will not work in Python or PHP. In most languages, associative dictionary keys are not treated in the same way as properties. Therefore, in Python `object.key` is not the same as `object['key']`. In PHP `$object->key` is not the same as `$object['key']` as well. Languages that differentiate between associative keys and properties use different notations for the two. +While the above does work in JavaScript, **it will not work in Python or PHP**. In most languages, associative dictionary keys are not treated in the same way as properties. Therefore, in Python `object.key` is not the same as `object['key']`. In PHP `$object->key` is not the same as `$object['key']` as well. Languages that differentiate between associative keys and properties use different notations for the two. To keep the code transpileable, please, remember this simple rule: *always use the single-quoted string key notation `object['key']` for accessing all associative dictionary keys in all languages everywhere throughout this library!* @@ -572,7 +572,7 @@ The `hmac()` method also supports `'base64'` for the `digest` argument. This is #### Timestamps -**All timestamps throughout all unified structures within this library are integer timestamp _in milliseconds_!** +**All timestamps throughout all unified structures within this library are integer UTC timestamps _in milliseconds_!** In order to convert to milliseconds timestamps, CCXT implements the following methods: diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/README.md b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/README.md index 3f8dfeea4..7ec80167e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/README.md +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/README.md @@ -1,6 +1,6 @@ # CCXT – CryptoCurrency eXchange Trading Library -[![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/dhzSKYU) [![Supported Exchanges](https://img.shields.io/badge/exchanges-126-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) +[![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/dhzSKYU) [![Supported Exchanges](https://img.shields.io/badge/exchanges-121-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) [![Twitter Follow](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://twitter.com/ccxt_official) A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. @@ -25,10 +25,10 @@ Current feature list: ## See Also -- [![Quadency](https://user-images.githubusercontent.com/1294454/69334382-a0618100-0c6b-11ea-9ba9-40aa97440cfa.png)](https://quadency.com?utm_source=ccxt)  **[Quadency](https://quadency.com?utm_source=ccxt)** — trading automation terminal for leading exchanges with streaming APIs + Python IDE. - [![TabTrader](https://user-images.githubusercontent.com/1294454/66755907-9c3e8880-eea1-11e9-846e-0bff349ceb87.png)](https://tab-trader.com/?utm_source=ccxt)  **[TabTrader](https://tab-trader.com/?utm_source=ccxt)** — trading on all exchanges in one app. Avaliable on [Android](https://play.google.com/store/apps/details?id=com.tabtrader.android&referrer=utm_source%3Dccxt) and [iOS](https://itunes.apple.com/app/apple-store/id1095716562?mt=8). - [![Pionex](https://user-images.githubusercontent.com/1294454/106112806-c2ec0580-615e-11eb-870c-0b7aef021db2.png)](https://www.pionex.com/en-US/sign?r=8wSFCbNk&utm_source=ad&utm_medium=banner&utm_campaign=ccxt-2)  **[Pionex](https://www.pionex.com/en-US/sign?r=8wSFCbNk&utm_source=ad&utm_medium=banner&utm_campaign=ccxt-2)** — 6 grid bots, spot-futures arb bot, smart trade and DCA bots. Free for [Android](https://play.google.com/store/apps/details?id=com.pionex.client&referrer=utm_source%3Dccxt) and [iOS](https://apps.apple.com/us/app/pionex/id1485348891?pt=ccxt&ct=inline)! - [![AAX](https://user-images.githubusercontent.com/1294454/106509642-ef957980-64de-11eb-92e0-8323cda7874e.png)](https://www.aaxpro.com/en-US/ad-sign-up/?utm_source=ccxt&utm_medium=one-liner&utm_campaign=futures)  **[AAX](https://www.aaxpro.com/en-US/ad-sign-up/?utm_source=ccxt&utm_medium=one-liner&utm_campaign=futures)** — trade bitcoin futures with fees as low as 0.02% and up to 100x leverage! +- [![Freqtrade](https://user-images.githubusercontent.com/1294454/114340585-8e35fa80-9b60-11eb-860f-4379125e2db6.png)](https://www.freqtrade.io)  **[Freqtrade](https://www.freqtrade.io)** — leading opensource cryptocurrency algorithmic trading software! ## Certified Cryptocurrency Exchanges @@ -52,13 +52,13 @@ Current feature list: ## Supported Cryptocurrency Exchange Markets -The CCXT library currently supports the following 126 cryptocurrency exchange markets and trading APIs: +The CCXT library currently supports the following 121 cryptocurrency exchange markets and trading APIs: | logo | id | name | ver | doc | certified | pro | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-----------------------------------------------------------------------------------------|:---:|:-------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| | [![aax](https://user-images.githubusercontent.com/1294454/104140087-a27f2580-53c0-11eb-87c1-5d9e81208fe9.jpg)](https://www.aaxpro.com/invite/sign-up?inviteCode=JXGm5Fy7R2MB) | aax | [AAX](https://www.aaxpro.com/invite/sign-up?inviteCode=JXGm5Fy7R2MB) | 2 | [API](https://www.aaxpro.com/apidoc/index.html) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | -| [![acx](https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg)](https://acx.io) | acx | [ACX](https://acx.io) | 2 | [API](https://acx.io/documents/api_v2) | | | | [![aofex](https://user-images.githubusercontent.com/51840849/77670271-056d1080-6f97-11ea-9ac2-4268e9ed0c1f.jpg)](https://aofex.com/#/register?key=9763840) | aofex | [AOFEX](https://aofex.com/#/register?key=9763840) | * | [API](https://aofex.zendesk.com/hc/en-us/sections/360005576574-API) | | | +| [![ascendex](https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg)](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | ascendex | [AscendEX](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | 1 | [API](https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation) | | | | [![bequant](https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg)](https://bequant.io) | bequant | [Bequant](https://bequant.io) | 2 | [API](https://api.bequant.io/) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bibox](https://user-images.githubusercontent.com/51840849/77257418-3262b000-6c85-11ea-8fb8-20bdf20b3592.jpg)](https://w2.bibox365.com/login/register?invite_code=05Kj3I) | bibox | [Bibox](https://w2.bibox365.com/login/register?invite_code=05Kj3I) | 1 | [API](https://biboxcom.github.io/en/) | | | | [![bigone](https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg)](https://b1.run/users/new?code=D3LLBVFT) | bigone | [BigONE](https://b1.run/users/new?code=D3LLBVFT) | 3 | [API](https://open.big.one/docs/api.html) | | | @@ -76,7 +76,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bithumb](https://user-images.githubusercontent.com/1294454/30597177-ea800172-9d5e-11e7-804c-b9d4fa9b56b0.jpg)](https://www.bithumb.com) | bithumb | [Bithumb](https://www.bithumb.com) | * | [API](https://apidocs.bithumb.com) | | | | [![bitkk](https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg)](https://www.bitkk.com) | bitkk | [bitkk](https://www.bitkk.com) | 1 | [API](https://www.bitkk.com/i/developer) | | | | [![bitmart](https://user-images.githubusercontent.com/1294454/61835713-a2662f80-ae85-11e9-9d00-6442919701fd.jpg)](http://www.bitmart.com/?r=rQCFLh) | bitmart | [BitMart](http://www.bitmart.com/?r=rQCFLh) | 1 | [API](https://developer-pro.bitmart.com/) | | | -| [![bitmax](https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg)](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | bitmax | [BitMax](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | 1 | [API](https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation) | | | | [![bitmex](https://user-images.githubusercontent.com/1294454/27766319-f653c6e6-5ed4-11e7-933d-f0bc3699ae8f.jpg)](https://www.bitmex.com/register/upZpOX) | bitmex | [BitMEX](https://www.bitmex.com/register/upZpOX) | 1 | [API](https://www.bitmex.com/app/apiOverview) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bitpanda](https://user-images.githubusercontent.com/51840849/87591171-9a377d80-c6f0-11ea-94ac-97a126eac3bc.jpg)](https://www.bitpanda.com/en/pro) | bitpanda | [Bitpanda Pro](https://www.bitpanda.com/en/pro) | 1 | [API](https://developers.bitpanda.com/exchange/) | | | | [![bitso](https://user-images.githubusercontent.com/51840849/87295554-11f98280-c50e-11ea-80d6-15b3bafa8cbf.jpg)](https://bitso.com/?ref=itej) | bitso | [Bitso](https://bitso.com/?ref=itej) | 3 | [API](https://bitso.com/api_info) | | | @@ -84,7 +83,7 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bitstamp1](https://user-images.githubusercontent.com/1294454/27786377-8c8ab57e-5fe9-11e7-8ea4-2b05b6bcceec.jpg)](https://www.bitstamp.net) | bitstamp1 | [Bitstamp](https://www.bitstamp.net) | 1 | [API](https://www.bitstamp.net/api) | | | | [![bittrex](https://user-images.githubusercontent.com/51840849/87153921-edf53180-c2c0-11ea-96b9-f2a9a95a455b.jpg)](https://bittrex.com/Account/Register?referralCode=1ZE-G0G-M3B) | bittrex | [Bittrex](https://bittrex.com/Account/Register?referralCode=1ZE-G0G-M3B) | 3 | [API](https://bittrex.github.io/api/v3) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bitvavo](https://user-images.githubusercontent.com/1294454/83165440-2f1cf200-a116-11ea-9046-a255d09fb2ed.jpg)](https://bitvavo.com/?a=24F34952F7) | bitvavo | [Bitvavo](https://bitvavo.com/?a=24F34952F7) | 2 | [API](https://docs.bitvavo.com/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![bitz](https://user-images.githubusercontent.com/51840849/87443304-fec5e000-c5fd-11ea-98f8-ba8e67f7eaff.jpg)](https://u.bitz.com/register?invite_code=1429193) | bitz | [Bit-Z](https://u.bitz.com/register?invite_code=1429193) | 2 | [API](https://apidoc.bitz.com/en/) | | | +| [![bitz](https://user-images.githubusercontent.com/51840849/87443304-fec5e000-c5fd-11ea-98f8-ba8e67f7eaff.jpg)](https://u.bitz.com/register?invite_code=1429193) | bitz | [Bit-Z](https://u.bitz.com/register?invite_code=1429193) | 2 | [API](https://apidocv2.bitz.plus/en/) | | | | [![bl3p](https://user-images.githubusercontent.com/1294454/28501752-60c21b82-6feb-11e7-818b-055ee6d0e754.jpg)](https://bl3p.eu) | bl3p | [BL3P](https://bl3p.eu) | 1 | [API](https://github.com/BitonicNL/bl3p-api/tree/master/docs) | | | | [![bleutrade](https://user-images.githubusercontent.com/1294454/30303000-b602dbe6-976d-11e7-956d-36c5049c01e7.jpg)](https://bleutrade.com) | bleutrade | [Bleutrade](https://bleutrade.com) | * | [API](https://app.swaggerhub.com/apis-docs/bleu/white-label/3.0.0) | | | | [![braziliex](https://user-images.githubusercontent.com/1294454/34703593-c4498674-f504-11e7-8d14-ff8e44fb78c1.jpg)](https://braziliex.com/?ref=5FE61AB6F6D67DA885BC98BA27223465) | braziliex | [Braziliex](https://braziliex.com/?ref=5FE61AB6F6D67DA885BC98BA27223465) | * | [API](https://braziliex.com/exchange/api.php) | | | @@ -99,7 +98,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bytetrade](https://user-images.githubusercontent.com/1294454/67288762-2f04a600-f4e6-11e9-9fd6-c60641919491.jpg)](https://www.byte-trade.com) | bytetrade | [ByteTrade](https://www.byte-trade.com) | * | [API](https://docs.byte-trade.com/#description) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | | [![cdax](https://user-images.githubusercontent.com/1294454/102157692-fd406280-3e90-11eb-8d46-4511b617cd17.jpg)](https://cdax.io/invite?invite_code=esc74) | cdax | [CDAX](https://cdax.io/invite?invite_code=esc74) | 1 | [API](https://github.com/cloudapidoc/API_Docs) | | | | [![cex](https://user-images.githubusercontent.com/1294454/27766442-8ddc33b0-5ed8-11e7-8b98-f786aef0f3c9.jpg)](https://cex.io/r/0/up105393824/0/) | cex | [CEX.IO](https://cex.io/r/0/up105393824/0/) | * | [API](https://cex.io/cex-api) | | | -| [![chilebit](https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg)](https://chilebit.net) | chilebit | [ChileBit](https://chilebit.net) | 1 | [API](https://blinktrade.com/docs) | | | | [![coinbase](https://user-images.githubusercontent.com/1294454/40811661-b6eceae2-653a-11e8-829e-10bfadb078cf.jpg)](https://www.coinbase.com/join/58cbe25a355148797479dbd2) | coinbase | [Coinbase](https://www.coinbase.com/join/58cbe25a355148797479dbd2) | 2 | [API](https://developers.coinbase.com/api/v2) | | | | [![coinbaseprime](https://user-images.githubusercontent.com/1294454/44539184-29f26e00-a70c-11e8-868f-e907fc236a7c.jpg)](https://prime.coinbase.com) | coinbaseprime | [Coinbase Prime](https://prime.coinbase.com) | * | [API](https://docs.prime.coinbase.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![coinbasepro](https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg)](https://pro.coinbase.com/) | coinbasepro | [Coinbase Pro](https://pro.coinbase.com/) | * | [API](https://docs.pro.coinbase.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | @@ -118,7 +116,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![delta](https://user-images.githubusercontent.com/1294454/99450025-3be60a00-2931-11eb-9302-f4fd8d8589aa.jpg)](https://www.delta.exchange/app/signup/?code=IULYNB) | delta | [Delta Exchange](https://www.delta.exchange/app/signup/?code=IULYNB) | 2 | [API](https://docs.delta.exchange) | | | | [![deribit](https://user-images.githubusercontent.com/1294454/41933112-9e2dd65a-798b-11e8-8440-5bab2959fcb8.jpg)](https://www.deribit.com/reg-1189.4038) | deribit | [Deribit](https://www.deribit.com/reg-1189.4038) | 2 | [API](https://docs.deribit.com/v2) | | | | [![digifinex](https://user-images.githubusercontent.com/51840849/87443315-01283a00-c5fe-11ea-8628-c2a0feaf07ac.jpg)](https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp) | digifinex | [DigiFinex](https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp) | 3 | [API](https://docs.digifinex.com) | | | -| [![dsx](https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg)](https://dsxglobal.com) | dsx | [DSX](https://dsxglobal.com) | 3 | [API](https://dsxglobal.com/developers/publicApi) | | | | [![equos](https://user-images.githubusercontent.com/1294454/107758499-05edd180-6d38-11eb-9e09-0b69602a7a15.jpg)](https://equos.io?referredByCode=zpa8kij4ouvBFup3) | equos | [EQUOS](https://equos.io?referredByCode=zpa8kij4ouvBFup3) | * | [API](https://developer.equos.io) | | | | [![eterbase](https://user-images.githubusercontent.com/1294454/82067900-faeb0f80-96d9-11ea-9f22-0071cfcb9871.jpg)](https://eterbase.exchange/invite/1wjjh4Pe) | eterbase | [Eterbase](https://eterbase.exchange/invite/1wjjh4Pe) | 1 | [API](https://developers.eterbase.exchange) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | | [![exmo](https://user-images.githubusercontent.com/1294454/27766491-1b0ea956-5eda-11e7-9225-40d67b481b8d.jpg)](https://exmo.me/?ref=131685) | exmo | [EXMO](https://exmo.me/?ref=131685) | 1.1 | [API](https://exmo.me/en/api_doc?ref=131685) | | | @@ -133,10 +130,9 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![gopax](https://user-images.githubusercontent.com/1294454/102897212-ae8a5e00-4478-11eb-9bab-91507c643900.jpg)](https://www.gopax.co.kr) | gopax | [GOPAX](https://www.gopax.co.kr) | 1 | [API](https://gopax.github.io/API/index.en.html) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![hbtc](https://user-images.githubusercontent.com/51840849/80134449-70663300-85a7-11ea-8942-e204cdeaab5d.jpg)](https://www.hbtc.com/register/O2S8NS) | hbtc | [HBTC](https://www.hbtc.com/register/O2S8NS) | 1 | [API](https://github.com/bhexopen/BHEX-OpenApi/tree/master/doc) | | | | [![hitbtc](https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg)](https://hitbtc.com/?ref_id=5a5d39a65d466) | hitbtc | [HitBTC](https://hitbtc.com/?ref_id=5a5d39a65d466) | 2 | [API](https://api.hitbtc.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![hollaex](https://user-images.githubusercontent.com/1294454/75841031-ca375180-5ddd-11ea-8417-b975674c23cb.jpg)](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | hollaex | [HollaEx](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | 1 | [API](https://apidocs.hollaex.com) | | | +| [![hollaex](https://user-images.githubusercontent.com/1294454/75841031-ca375180-5ddd-11ea-8417-b975674c23cb.jpg)](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | hollaex | [HollaEx](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | 2 | [API](https://apidocs.hollaex.com) | | | | [![huobijp](https://user-images.githubusercontent.com/1294454/85734211-85755480-b705-11ea-8b35-0b7f1db33a2f.jpg)](https://www.huobi.co.jp/register/?invite_code=znnq3) | huobijp | [Huobi Japan](https://www.huobi.co.jp/register/?invite_code=znnq3) | 1 | [API](https://api-doc.huobi.co.jp) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![huobipro](https://user-images.githubusercontent.com/1294454/76137448-22748a80-604e-11ea-8069-6e389271911d.jpg)](https://www.huobi.com/en-us/topic/invited/?invite_code=rwrd3) | huobipro | [Huobi Pro](https://www.huobi.com/en-us/topic/invited/?invite_code=rwrd3) | 1 | [API](https://huobiapi.github.io/docs/spot/v1/cn/) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![ice3x](https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg)](https://ice3x.com?ref=14341802) | ice3x | [ICE3X](https://ice3x.com?ref=14341802) | 1 | [API](https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017) | | | | [![idex](https://user-images.githubusercontent.com/51840849/94481303-2f222100-01e0-11eb-97dd-bc14c5943a86.jpg)](https://idex.io) | idex | [IDEX](https://idex.io) | 2 | [API](https://docs.idex.io/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![independentreserve](https://user-images.githubusercontent.com/51840849/87182090-1e9e9080-c2ec-11ea-8e49-563db9a38f37.jpg)](https://www.independentreserve.com) | independentreserve | [Independent Reserve](https://www.independentreserve.com) | * | [API](https://www.independentreserve.com/API) | | | | [![indodax](https://user-images.githubusercontent.com/51840849/87070508-9358c880-c221-11ea-8dc5-5391afbbb422.jpg)](https://indodax.com/ref/testbitcoincoid/1) | indodax | [INDODAX](https://indodax.com/ref/testbitcoincoid/1) | 2.0 | [API](https://github.com/btcid/indodax-official-api-docs) | | | @@ -172,7 +168,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![tidex](https://user-images.githubusercontent.com/1294454/30781780-03149dc4-a12e-11e7-82bb-313b269d24d4.jpg)](https://tidex.com/exchange/?ref=57f5638d9cd7) | tidex | [Tidex](https://tidex.com/exchange/?ref=57f5638d9cd7) | 3 | [API](https://tidex.com/exchange/public-api) | | | | [![timex](https://user-images.githubusercontent.com/1294454/70423869-6839ab00-1a7f-11ea-8f94-13ae72c31115.jpg)](https://timex.io/?refcode=1x27vNkTbP1uwkCck) | timex | [TimeX](https://timex.io/?refcode=1x27vNkTbP1uwkCck) | 1 | [API](https://docs.timex.io) | | | | [![upbit](https://user-images.githubusercontent.com/1294454/49245610-eeaabe00-f423-11e8-9cba-4b0aed794799.jpg)](https://upbit.com) | upbit | [Upbit](https://upbit.com) | 1 | [API](https://docs.upbit.com/docs/%EC%9A%94%EC%B2%AD-%EC%88%98-%EC%A0%9C%ED%95%9C) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![vaultoro](https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg)](https://www.vaultoro.com) | vaultoro | [Vaultoro](https://www.vaultoro.com) | 1 | [API](https://api.vaultoro.com) | | | | [![vbtc](https://user-images.githubusercontent.com/1294454/27991481-1f53d1d8-6481-11e7-884e-21d17e7939db.jpg)](https://vbtc.exchange) | vbtc | [VBTC](https://vbtc.exchange) | 1 | [API](https://blinktrade.com/docs) | | | | [![vcc](https://user-images.githubusercontent.com/1294454/100545356-8427f500-326c-11eb-9539-7d338242d61b.jpg)](https://vcc.exchange?ref=l4xhrH) | vcc | [VCC Exchange](https://vcc.exchange?ref=l4xhrH) | 3 | [API](https://vcc.exchange/api) | | | | [![wavesexchange](https://user-images.githubusercontent.com/1294454/84547058-5fb27d80-ad0b-11ea-8711-78ac8b3c7f31.jpg)](https://waves.exchange) | wavesexchange | [Waves.Exchange](https://waves.exchange) | * | [API](https://docs.waves.exchange) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | @@ -229,13 +224,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.77/dist/ccxt.browser.js -* unpkg: https://unpkg.com/ccxt@1.42.77/dist/ccxt.browser.js +* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.47.49/dist/ccxt.browser.js +* unpkg: https://unpkg.com/ccxt@1.47.49/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 - + ``` Creates a global `ccxt` object: diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/export-exchanges.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/export-exchanges.js index 580d2cb2c..24ee4806f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/export-exchanges.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/export-exchanges.js @@ -195,7 +195,6 @@ function createMarkdownTable (array, markdownMethod, centeredColumns) { // const columns = underline.split ('|') - for (const i of centeredColumns) { columns[i] = ':' + columns[i].slice (1, columns[i].length - 1) + ':' } @@ -219,51 +218,45 @@ function exportSupportedAndCertifiedExchanges (exchanges, { allExchangesPaths, c const exchangesNotListedInDocs = [ 'hitbtc2' ] const arrayOfExchanges = values (exchanges) + const numExchanges = arrayOfExchanges.length - if (allExchangesPaths) { - + if (allExchangesPaths && numExchanges) { const supportedExchangesMarkdownTable = createMarkdownTable (arrayOfExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , numExchanges = arrayOfExchanges.length , beginning = "The CCXT library currently supports the following " , ending = " cryptocurrency exchange markets and trading APIs:\n\n" , totalString = beginning + numExchanges + ending , allExchangesReplacement = totalString + supportedExchangesMarkdownTable + "$1" , allExchangesRegex = new RegExp ("[^\n]+[\n]{2}\\| logo[^`]+\\|([\n][\n]|[\n]$|$)", 'm') - for (const path of allExchangesPaths) { logExportExchanges (path, allExchangesRegex, allExchangesReplacement) } } - if (proExchangesPaths) { - - const proExchanges = arrayOfExchanges.filter (exchange => exchange.pro) - , proExchangesMarkdownTable = createMarkdownTable (proExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , numExchanges = proExchanges.length + const proExchanges = arrayOfExchanges.filter (exchange => exchange.pro) + const numProExchanges = proExchanges.length + if (proExchangesPaths && numProExchanges) { + const proExchangesMarkdownTable = createMarkdownTable (proExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) , beginning = "The CCXT Pro library currently supports the following " , ending = " cryptocurrency exchange markets and WebSocket trading APIs:\n\n" - , totalString = beginning + numExchanges + ending + , totalString = beginning + numProExchanges + ending , proExchangesReplacement = totalString + proExchangesMarkdownTable + "$1" , proExchangesRegex = new RegExp ("[^\n]+[\n]{2}\\|[^`]+\\|([\n][\n]|[\n]$|$)", 'm') - for (const path of proExchangesPaths) { logExportExchanges (path, proExchangesRegex, proExchangesReplacement) } } - if (certifiedExchangesPaths) { - const certifiedExchanges = arrayOfExchanges.filter (exchange => exchange.certified) - , certifiedExchangesMarkdownTable = createMarkdownTable (certifiedExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , certifiedExchangesReplacement = '$1' + certifiedExchangesMarkdownTable + "\n" - , certifiedExchangesRegex = new RegExp ("^(## Certified Cryptocurrency Exchanges\n{3})(?:\\|.+\\|$\n)+", 'm') - + const certifiedExchanges = arrayOfExchanges.filter (exchange => exchange.certified) + if (certifiedExchangesPaths && certifiedExchanges.length) { + const certifiedExchangesMarkdownTable = createMarkdownTable (certifiedExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) + , certifiedExchangesReplacement = '$1' + certifiedExchangesMarkdownTable + "\n" + , certifiedExchangesRegex = new RegExp ("^(## Certified Cryptocurrency Exchanges\n{3})(?:\\|.+\\|$\n)+", 'm') for (const path of certifiedExchangesPaths) { logExportExchanges (path, certifiedExchangesRegex, certifiedExchangesReplacement) } } if (exchangesByCountriesPaths) { - const exchangesByCountriesMarkdownTable = createMarkdownTable (arrayOfExchanges, createMarkdownListOfExchangesByCountries, [ 4, 5 ]) const result = "# Exchanges By Country\n\nThe ccxt library currently supports the following cryptocurrency exchange markets and trading APIs:\n\n" + exchangesByCountriesMarkdownTable + "\n\n" for (const path of exchangesByCountriesPaths) { @@ -385,7 +378,7 @@ function exportEverything () { replacement: "exchanges = [\n" + " '" + ids.join ("',\n '") + "'," + "\n]", }, { - file: './php/base/Exchange.php', + file: './php/Exchange.php', regex: /public static \$exchanges \= array\s*\([^\)]+\)/, replacement: "public static $exchanges = array(\n '" + ids.join ("',\n '") + "',\n )", }, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/transpile.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/transpile.js index 948a34c0f..233d15e6c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/transpile.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/build/transpile.js @@ -34,6 +34,7 @@ class Transpiler { [ /\.safeIntegerProduct2\s/g, '.safe_integer_product_2'], [ /\.safeTimestamp2\s/g, '.safe_timestamp_2'], [ /\.safeString2\s/g, '.safe_string_2'], + [ /\.safeNumber2\s/g, '.safe_number_2'], [ /\.safeStringLower2\s/g, '.safe_string_lower_2'], [ /\.safeStringUpper2\s/g, '.safe_string_upper_2'], [ /\.safeValue2\s/g, '.safe_value_2'], @@ -195,6 +196,10 @@ class Transpiler { [ /Number\.MAX_SAFE_INTEGER/g, 'float(\'inf\')'], [ /function\s*(\w+\s*\([^)]+\))\s*{/g, 'def $1:'], [ /assert\s*\((.+)\);/g, 'assert $1'], + [ /Precise\.stringAdd\s/g, 'Precise.string_add' ], + [ /Precise\.stringMul\s/g, 'Precise.string_mul' ], + [ /Precise\.stringDiv\s/g, 'Precise.string_div' ], + [ /Precise\.stringSub\s/g, 'Precise.string_sub' ], // insert common regexes in the middle (critical) ].concat (this.getCommonRegexes ()).concat ([ @@ -227,7 +232,7 @@ class Transpiler { [ /for\s+\(([a-zA-Z0-9_]+)\s*=\s*([^\;\s]+\s*)\;[^\<\>\=]+(?:\<=|\>=|<|>)\s*(.*)\s*\;[^\)]+\)\s*{/g, 'for $1 in range($2, $3):'], [ /\s\|\|\s/g, ' or ' ], [ /\s\&\&\s/g, ' and ' ], - [ /\!([^\='"])/g, 'not $1'], + [ /\!([^\s\='"])/g, 'not $1'], [ /\.push\s*\(([\s\S]+?)\);/g, '.append($1);' ], [ /^(\s*}\s*$)+/gm, '' ], [ /\;(\s+?\/\/.+?)/g, '$1' ], @@ -243,9 +248,6 @@ class Transpiler { [ /parseFloat\s*/g, 'float'], [ /parseInt\s*/g, 'int'], [ /self\[([^\]+]+)\]/g, 'getattr(self, $1)' ], - [ /([^\s]+)\.slice \(([^\,\)]+)\,\s?([^\)]+)\)/g, '$1[$2:$3]' ], - [ /([^\s]+)\.slice \(([^\)\:]+)\)/g, '$1[$2:]' ], - [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /Math\.floor\s*\(([^\)]+)\)/g, 'int(math.floor($1))' ], [ /Math\.abs\s*\(([^\)]+)\)/g, 'abs($1)' ], [ /Math\.pow\s*\(([^\)]+)\)/g, 'math.pow($1)' ], @@ -253,6 +255,9 @@ class Transpiler { [ /Math\.ceil\s*\(([^\)]+)\)/g, 'int(math.ceil($1))' ], [ /Math\.log/g, 'math.log' ], [ /([a-zA-Z0-9_\.]*\([^\)]+\)|[^\s]+)\s+\?\s*([^\:]+)\s+\:\s*([^\n]+)/g, '$2 if $1 else $3'], + [ /([^\s]+)\.slice \(([^\,\)]+)\,\s?([^\)]+)\)/g, '$1[$2:$3]' ], + [ /([^\s]+)\.slice \(([^\)\:]+)\)/g, '$1[$2:]' ], + [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /(^|\s)\/\//g, '$1#' ], [ /([^\n\s]) #/g, '$1 #' ], // PEP8 E261 [ /\.indexOf/g, '.find'], @@ -336,6 +341,10 @@ class Transpiler { [ /(\w+)\.shift\s*\(\)/g, 'array_shift($1)' ], [ /(\w+)\.pop\s*\(\)/g, 'array_pop($1)' ], [ /Number\.MAX_SAFE_INTEGER/g, 'PHP_INT_MAX' ], + [ /Precise\.stringAdd\s/g, 'Precise::string_add' ], + [ /Precise\.stringDiv\s/g, 'Precise::string_div' ], + [ /Precise\.stringMul\s/g, 'Precise::string_mul' ], + [ /Precise\.stringSub\s/g, 'Precise::string_sub' ], // insert common regexes in the middle (critical) ].concat (this.getCommonRegexes ()).concat ([ @@ -404,6 +413,7 @@ class Transpiler { [ /([^\(\s]+)\s+%\s+([^\s\,\;\)]+)/g, 'fmod($1, $2)' ], [ /\(([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\>\=\s*0\)/g, '(mb_strpos($1, $2) !== false)' ], [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\>\=\s*0/g, 'mb_strpos($1, $2) !== false' ], + [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\<\s*0/g, 'mb_strpos($1, $2) === false' ], [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)/g, 'mb_strpos($1, $2)' ], [ /\(([^\s\(]+)\sin\s([^\)]+)\)/g, '(is_array($2) && array_key_exists($1, $2))' ], [ /([^\s]+)\.join\s*\(\s*([^\)]+?)\s*\)/g, 'implode($2, $1)' ], @@ -578,6 +588,9 @@ class Transpiler { precisionImports.push ('from ccxt.base.decimal_to_precision import ' + constant) } } + if (bodyAsString.match (/[\s(]Precise/)) { + precisionImports.push ('from ccxt.base.precise import Precise') + } header = header.concat (libraries, errorImports, precisionImports) @@ -633,7 +646,13 @@ class Transpiler { } } - header = header.concat (errorImports) + const precisionImports = [] + + if (async && bodyAsString.match (/[\s(]Precise/)) { + precisionImports.push ('use \\ccxt\\Precise;') + } + + header = header.concat (errorImports).concat (precisionImports) methods = methods.concat (this.getPHPBaseMethods ()) @@ -1179,7 +1198,7 @@ class Transpiler { function phpMakeErrorClassFile (name, parent) { const useClause = "\nuse " + parent + ";\n" - const requireClause = "\nrequire_once PATH_TO_CCXT_BASE . '" + parent + ".php';\n" + const requireClause = "\nrequire_once PATH_TO_CCXT . '" + parent + ".php';\n" const phpBody = [ '; - createLimitOrder (symbol: string, side: Order['side'], amount: number, price?: number, params?: Params): Promise; + createLimitOrder (symbol: string, side: Order['side'], amount: number, price: number, params?: Params): Promise; + createLimitBuyOrder (symbol: string, amount: number, price: number, params?: Params): Promise; + createLimitSellOrder (symbol: string, amount: number, price: number, params?: Params): Promise; createMarketOrder (symbol: string, side: Order['side'], amount: number, price?: number, params?: Params): Promise; createOrder (symbol: string, type: Order['type'], side: Order['side'], amount: number, price?: number, params?: Params): Promise; decode (str: string): string; @@ -423,8 +425,8 @@ declare module 'ccxt' { /* tslint:disable */ export class aax extends Exchange {} - export class acx extends Exchange {} export class aofex extends Exchange {} + export class ascendex extends Exchange {} export class bequant extends hitbtc {} export class bibox extends Exchange {} export class bigone extends Exchange {} @@ -442,7 +444,6 @@ declare module 'ccxt' { export class bithumb extends Exchange {} export class bitkk extends zb {} export class bitmart extends Exchange {} - export class bitmax extends Exchange {} export class bitmex extends Exchange {} export class bitpanda extends Exchange {} export class bitso extends Exchange {} @@ -465,7 +466,6 @@ declare module 'ccxt' { export class bytetrade extends Exchange {} export class cdax extends huobipro {} export class cex extends Exchange {} - export class chilebit extends foxbit {} export class coinbase extends Exchange {} export class coinbaseprime extends coinbasepro {} export class coinbasepro extends Exchange {} @@ -484,7 +484,6 @@ declare module 'ccxt' { export class delta extends Exchange {} export class deribit extends Exchange {} export class digifinex extends Exchange {} - export class dsx extends Exchange {} export class equos extends Exchange {} export class eterbase extends Exchange {} export class exmo extends Exchange {} @@ -502,14 +501,13 @@ declare module 'ccxt' { export class hollaex extends Exchange {} export class huobijp extends huobipro {} export class huobipro extends Exchange {} - export class ice3x extends Exchange {} export class idex extends Exchange {} export class independentreserve extends Exchange {} export class indodax extends Exchange {} export class itbit extends Exchange {} export class kraken extends Exchange {} export class kucoin extends Exchange {} - export class kuna extends acx {} + export class kuna extends Exchange {} export class lakebtc extends Exchange {} export class latoken extends Exchange {} export class lbank extends Exchange {} @@ -538,7 +536,6 @@ declare module 'ccxt' { export class tidex extends Exchange {} export class timex extends Exchange {} export class upbit extends Exchange {} - export class vaultoro extends Exchange {} export class vbtc extends foxbit {} export class vcc extends Exchange {} export class wavesexchange extends Exchange {} @@ -553,8 +550,8 @@ declare module 'ccxt' { export type ExchangeId = | 'aax' - | 'acx' | 'aofex' + | 'ascendex' | 'bequant' | 'bibox' | 'bigone' @@ -572,7 +569,6 @@ declare module 'ccxt' { | 'bithumb' | 'bitkk' | 'bitmart' - | 'bitmax' | 'bitmex' | 'bitpanda' | 'bitso' @@ -595,7 +591,6 @@ declare module 'ccxt' { | 'bytetrade' | 'cdax' | 'cex' - | 'chilebit' | 'coinbase' | 'coinbaseprime' | 'coinbasepro' @@ -614,7 +609,6 @@ declare module 'ccxt' { | 'delta' | 'deribit' | 'digifinex' - | 'dsx' | 'equos' | 'eterbase' | 'exmo' @@ -632,7 +626,6 @@ declare module 'ccxt' { | 'hollaex' | 'huobijp' | 'huobipro' - | 'ice3x' | 'idex' | 'independentreserve' | 'indodax' @@ -668,7 +661,6 @@ declare module 'ccxt' { | 'tidex' | 'timex' | 'upbit' - | 'vaultoro' | 'vbtc' | 'vcc' | 'wavesexchange' diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/ccxt.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/ccxt.js index 1d5c72642..27dc35101 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/ccxt.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/ccxt.js @@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.42.77' +const version = '1.47.49' Exchange.ccxtVersion = version @@ -43,8 +43,8 @@ Exchange.ccxtVersion = version const exchanges = { 'aax': require ('./js/aax.js'), - 'acx': require ('./js/acx.js'), 'aofex': require ('./js/aofex.js'), + 'ascendex': require ('./js/ascendex.js'), 'bequant': require ('./js/bequant.js'), 'bibox': require ('./js/bibox.js'), 'bigone': require ('./js/bigone.js'), @@ -62,7 +62,6 @@ const exchanges = { 'bithumb': require ('./js/bithumb.js'), 'bitkk': require ('./js/bitkk.js'), 'bitmart': require ('./js/bitmart.js'), - 'bitmax': require ('./js/bitmax.js'), 'bitmex': require ('./js/bitmex.js'), 'bitpanda': require ('./js/bitpanda.js'), 'bitso': require ('./js/bitso.js'), @@ -85,7 +84,6 @@ const exchanges = { 'bytetrade': require ('./js/bytetrade.js'), 'cdax': require ('./js/cdax.js'), 'cex': require ('./js/cex.js'), - 'chilebit': require ('./js/chilebit.js'), 'coinbase': require ('./js/coinbase.js'), 'coinbaseprime': require ('./js/coinbaseprime.js'), 'coinbasepro': require ('./js/coinbasepro.js'), @@ -104,7 +102,6 @@ const exchanges = { 'delta': require ('./js/delta.js'), 'deribit': require ('./js/deribit.js'), 'digifinex': require ('./js/digifinex.js'), - 'dsx': require ('./js/dsx.js'), 'equos': require ('./js/equos.js'), 'eterbase': require ('./js/eterbase.js'), 'exmo': require ('./js/exmo.js'), @@ -122,7 +119,6 @@ const exchanges = { 'hollaex': require ('./js/hollaex.js'), 'huobijp': require ('./js/huobijp.js'), 'huobipro': require ('./js/huobipro.js'), - 'ice3x': require ('./js/ice3x.js'), 'idex': require ('./js/idex.js'), 'independentreserve': require ('./js/independentreserve.js'), 'indodax': require ('./js/indodax.js'), @@ -158,7 +154,6 @@ const exchanges = { 'tidex': require ('./js/tidex.js'), 'timex': require ('./js/timex.js'), 'upbit': require ('./js/upbit.js'), - 'vaultoro': require ('./js/vaultoro.js'), 'vbtc': require ('./js/vbtc.js'), 'vcc': require ('./js/vcc.js'), 'wavesexchange': require ('./js/wavesexchange.js'), diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/dist/ccxt.browser.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/dist/ccxt.browser.js index e8b439fb1..334681baa 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/dist/ccxt.browser.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/dist/ccxt.browser.js @@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.42.77' +const version = '1.47.49' Exchange.ccxtVersion = version @@ -51,8 +51,8 @@ Exchange.ccxtVersion = version const exchanges = { 'aax': require ('./js/aax.js'), - 'acx': require ('./js/acx.js'), 'aofex': require ('./js/aofex.js'), + 'ascendex': require ('./js/ascendex.js'), 'bequant': require ('./js/bequant.js'), 'bibox': require ('./js/bibox.js'), 'bigone': require ('./js/bigone.js'), @@ -70,7 +70,6 @@ const exchanges = { 'bithumb': require ('./js/bithumb.js'), 'bitkk': require ('./js/bitkk.js'), 'bitmart': require ('./js/bitmart.js'), - 'bitmax': require ('./js/bitmax.js'), 'bitmex': require ('./js/bitmex.js'), 'bitpanda': require ('./js/bitpanda.js'), 'bitso': require ('./js/bitso.js'), @@ -93,7 +92,6 @@ const exchanges = { 'bytetrade': require ('./js/bytetrade.js'), 'cdax': require ('./js/cdax.js'), 'cex': require ('./js/cex.js'), - 'chilebit': require ('./js/chilebit.js'), 'coinbase': require ('./js/coinbase.js'), 'coinbaseprime': require ('./js/coinbaseprime.js'), 'coinbasepro': require ('./js/coinbasepro.js'), @@ -112,7 +110,6 @@ const exchanges = { 'delta': require ('./js/delta.js'), 'deribit': require ('./js/deribit.js'), 'digifinex': require ('./js/digifinex.js'), - 'dsx': require ('./js/dsx.js'), 'equos': require ('./js/equos.js'), 'eterbase': require ('./js/eterbase.js'), 'exmo': require ('./js/exmo.js'), @@ -130,7 +127,6 @@ const exchanges = { 'hollaex': require ('./js/hollaex.js'), 'huobijp': require ('./js/huobijp.js'), 'huobipro': require ('./js/huobipro.js'), - 'ice3x': require ('./js/ice3x.js'), 'idex': require ('./js/idex.js'), 'independentreserve': require ('./js/independentreserve.js'), 'indodax': require ('./js/indodax.js'), @@ -166,7 +162,6 @@ const exchanges = { 'tidex': require ('./js/tidex.js'), 'timex': require ('./js/timex.js'), 'upbit': require ('./js/upbit.js'), - 'vaultoro': require ('./js/vaultoro.js'), 'vbtc': require ('./js/vbtc.js'), 'vcc': require ('./js/vcc.js'), 'wavesexchange': require ('./js/wavesexchange.js'), @@ -184,7 +179,7 @@ module.exports = Object.assign ({ version, Exchange, 'exchanges': Object.keys (e //----------------------------------------------------------------------------- -},{"./js/aax.js":3,"./js/acx.js":4,"./js/aofex.js":5,"./js/base/Exchange":6,"./js/base/errors":8,"./js/base/functions":9,"./js/bequant.js":20,"./js/bibox.js":21,"./js/bigone.js":22,"./js/binance.js":23,"./js/binanceus.js":24,"./js/bit2c.js":25,"./js/bitbank.js":26,"./js/bitbay.js":27,"./js/bitcoincom.js":28,"./js/bitfinex.js":29,"./js/bitfinex2.js":30,"./js/bitflyer.js":31,"./js/bitforex.js":32,"./js/bitget.js":33,"./js/bithumb.js":34,"./js/bitkk.js":35,"./js/bitmart.js":36,"./js/bitmax.js":37,"./js/bitmex.js":38,"./js/bitpanda.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitvavo.js":44,"./js/bitz.js":45,"./js/bl3p.js":46,"./js/bleutrade.js":47,"./js/braziliex.js":48,"./js/btcalpha.js":49,"./js/btcbox.js":50,"./js/btcmarkets.js":51,"./js/btctradeua.js":52,"./js/btcturk.js":53,"./js/buda.js":54,"./js/bw.js":55,"./js/bybit.js":56,"./js/bytetrade.js":57,"./js/cdax.js":58,"./js/cex.js":59,"./js/chilebit.js":60,"./js/coinbase.js":61,"./js/coinbaseprime.js":62,"./js/coinbasepro.js":63,"./js/coincheck.js":64,"./js/coinegg.js":65,"./js/coinex.js":66,"./js/coinfalcon.js":67,"./js/coinfloor.js":68,"./js/coingi.js":69,"./js/coinmarketcap.js":70,"./js/coinmate.js":71,"./js/coinone.js":72,"./js/coinspot.js":73,"./js/crex24.js":74,"./js/currencycom.js":75,"./js/delta.js":76,"./js/deribit.js":77,"./js/digifinex.js":78,"./js/dsx.js":79,"./js/equos.js":80,"./js/eterbase.js":81,"./js/exmo.js":82,"./js/exx.js":83,"./js/fcoin.js":84,"./js/fcoinjp.js":85,"./js/flowbtc.js":86,"./js/foxbit.js":87,"./js/ftx.js":88,"./js/gateio.js":89,"./js/gemini.js":90,"./js/gopax.js":91,"./js/hbtc.js":92,"./js/hitbtc.js":93,"./js/hollaex.js":94,"./js/huobijp.js":95,"./js/huobipro.js":96,"./js/ice3x.js":97,"./js/idex.js":98,"./js/independentreserve.js":99,"./js/indodax.js":100,"./js/itbit.js":101,"./js/kraken.js":102,"./js/kucoin.js":103,"./js/kuna.js":104,"./js/lakebtc.js":105,"./js/latoken.js":106,"./js/lbank.js":107,"./js/liquid.js":108,"./js/luno.js":109,"./js/lykke.js":110,"./js/mercado.js":111,"./js/mixcoins.js":112,"./js/ndax.js":113,"./js/novadax.js":114,"./js/oceanex.js":115,"./js/okcoin.js":116,"./js/okex.js":117,"./js/paymium.js":118,"./js/phemex.js":119,"./js/poloniex.js":120,"./js/probit.js":121,"./js/qtrade.js":122,"./js/rightbtc.js":123,"./js/ripio.js":124,"./js/southxchange.js":125,"./js/stex.js":166,"./js/surbitcoin.js":167,"./js/therock.js":168,"./js/tidebit.js":169,"./js/tidex.js":170,"./js/timex.js":171,"./js/upbit.js":172,"./js/vaultoro.js":173,"./js/vbtc.js":174,"./js/vcc.js":175,"./js/wavesexchange.js":176,"./js/whitebit.js":177,"./js/xbtce.js":178,"./js/xena.js":179,"./js/yobit.js":180,"./js/zaif.js":181,"./js/zb.js":182}],3:[function(require,module,exports){ +},{"./js/aax.js":3,"./js/aofex.js":4,"./js/ascendex.js":5,"./js/base/Exchange":6,"./js/base/errors":9,"./js/base/functions":10,"./js/bequant.js":21,"./js/bibox.js":22,"./js/bigone.js":23,"./js/binance.js":24,"./js/binanceus.js":25,"./js/bit2c.js":26,"./js/bitbank.js":27,"./js/bitbay.js":28,"./js/bitcoincom.js":29,"./js/bitfinex.js":30,"./js/bitfinex2.js":31,"./js/bitflyer.js":32,"./js/bitforex.js":33,"./js/bitget.js":34,"./js/bithumb.js":35,"./js/bitkk.js":36,"./js/bitmart.js":37,"./js/bitmex.js":38,"./js/bitpanda.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitvavo.js":44,"./js/bitz.js":45,"./js/bl3p.js":46,"./js/bleutrade.js":47,"./js/braziliex.js":48,"./js/btcalpha.js":49,"./js/btcbox.js":50,"./js/btcmarkets.js":51,"./js/btctradeua.js":52,"./js/btcturk.js":53,"./js/buda.js":54,"./js/bw.js":55,"./js/bybit.js":56,"./js/bytetrade.js":57,"./js/cdax.js":58,"./js/cex.js":59,"./js/coinbase.js":60,"./js/coinbaseprime.js":61,"./js/coinbasepro.js":62,"./js/coincheck.js":63,"./js/coinegg.js":64,"./js/coinex.js":65,"./js/coinfalcon.js":66,"./js/coinfloor.js":67,"./js/coingi.js":68,"./js/coinmarketcap.js":69,"./js/coinmate.js":70,"./js/coinone.js":71,"./js/coinspot.js":72,"./js/crex24.js":73,"./js/currencycom.js":74,"./js/delta.js":75,"./js/deribit.js":76,"./js/digifinex.js":77,"./js/equos.js":78,"./js/eterbase.js":79,"./js/exmo.js":80,"./js/exx.js":81,"./js/fcoin.js":82,"./js/fcoinjp.js":83,"./js/flowbtc.js":84,"./js/foxbit.js":85,"./js/ftx.js":86,"./js/gateio.js":87,"./js/gemini.js":88,"./js/gopax.js":89,"./js/hbtc.js":90,"./js/hitbtc.js":91,"./js/hollaex.js":92,"./js/huobijp.js":93,"./js/huobipro.js":94,"./js/idex.js":95,"./js/independentreserve.js":96,"./js/indodax.js":97,"./js/itbit.js":98,"./js/kraken.js":99,"./js/kucoin.js":100,"./js/kuna.js":101,"./js/lakebtc.js":102,"./js/latoken.js":103,"./js/lbank.js":104,"./js/liquid.js":105,"./js/luno.js":106,"./js/lykke.js":107,"./js/mercado.js":108,"./js/mixcoins.js":109,"./js/ndax.js":110,"./js/novadax.js":111,"./js/oceanex.js":112,"./js/okcoin.js":113,"./js/okex.js":114,"./js/paymium.js":115,"./js/phemex.js":116,"./js/poloniex.js":117,"./js/probit.js":118,"./js/qtrade.js":119,"./js/rightbtc.js":120,"./js/ripio.js":121,"./js/southxchange.js":122,"./js/stex.js":163,"./js/surbitcoin.js":164,"./js/therock.js":165,"./js/tidebit.js":166,"./js/tidex.js":167,"./js/timex.js":168,"./js/upbit.js":169,"./js/vbtc.js":170,"./js/vcc.js":171,"./js/wavesexchange.js":172,"./js/whitebit.js":173,"./js/xbtce.js":174,"./js/xena.js":175,"./js/yobit.js":176,"./js/zaif.js":177,"./js/zb.js":178}],3:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -192,6 +187,7 @@ module.exports = Object.assign ({ version, Exchange, 'exchanges': Object.keys (e const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, ExchangeNotAvailable, OrderNotFound, InvalidOrder, CancelPending, RateLimitExceeded, InsufficientFunds, BadRequest, BadSymbol, PermissionDenied } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -222,6 +218,7 @@ module.exports = class aax extends Exchange { 'fetchOrder': true, 'fetchOrderBook': true, 'fetchOrders': true, + 'fetchStatus': true, 'fetchTicker': 'emulated', 'fetchTickers': true, 'fetchTrades': true, @@ -420,6 +417,37 @@ module.exports = class aax extends Exchange { }); } + async fetchStatus (params = {}) { + const response = await this.publicGetAnnouncementMaintenance (params); + // + // { + // "code": 1, + // "data": { + // "startTime":"2020-06-25T02:15:00.000Z", + // "endTime":"2020-06-25T02:45:00.000Z", + // "description":"Spot Trading :UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45),Futures Trading: UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45).We apologize for any inconvenience caused. Thank you for your patience and understanding.Should you have any enquiries, please do not hesitate our live chat support or via email at cs@aax.com." + // }, + // "message":"success", + // "ts":1593043237000 + // } + // + const data = this.safeValue (response, 'data', {}); + const timestamp = this.milliseconds (); + const startTime = this.parse8601 (this.safeString (data, 'startTime')); + const endTime = this.parse8601 (this.safeString (data, 'endTime')); + const update = { + 'updated': this.safeInteger (response, 'ts', timestamp), + }; + if (endTime !== undefined) { + const startTimeIsOk = (startTime === undefined) ? true : (timestamp < startTime); + const isOk = (timestamp > endTime) || startTimeIsOk; + update['eta'] = endTime; + update['status'] = isOk ? 'ok' : 'maintenance'; + } + this.status = this.extend (this.status, update); + return this.status; + } + async fetchMarkets (params = {}) { const response = await this.publicGetInstruments (params); // @@ -505,8 +533,8 @@ module.exports = class aax extends Exchange { const quote = this.safeCurrencyCode (quoteId); const status = this.safeString (market, 'status'); const active = (status === 'enable'); - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); const type = this.safeString (market, 'type'); let inverse = undefined; let linear = undefined; @@ -524,8 +552,8 @@ module.exports = class aax extends Exchange { symbol = base + '/' + quote; } const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; result.push ({ 'id': id, @@ -583,8 +611,8 @@ module.exports = class aax extends Exchange { const timestamp = this.safeInteger (ticker, 't'); const marketId = this.safeString (ticker, 's'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'c'); - const open = this.safeFloat (ticker, 'o'); + const last = this.safeNumber (ticker, 'c'); + const open = this.safeNumber (ticker, 'o'); let change = undefined; let percentage = undefined; let average = undefined; @@ -595,13 +623,13 @@ module.exports = class aax extends Exchange { } average = this.sum (last, open) / 2; } - const quoteVolume = this.safeFloat (ticker, 'v'); + const quoteVolume = this.safeNumber (ticker, 'v'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'h'), - 'low': this.safeFloat (ticker, 'l'), + 'high': this.safeNumber (ticker, 'h'), + 'low': this.safeNumber (ticker, 'l'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -748,8 +776,8 @@ module.exports = class aax extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let price = this.safeFloat2 (trade, 'p', 'filledPrice'); - const amount = this.safeFloat2 (trade, 'q', 'filledQty'); + let priceString = this.safeString2 (trade, 'p', 'filledPrice'); + const amountString = this.safeString2 (trade, 'q', 'filledQty'); const orderId = this.safeString (trade, 'orderID'); const isTaker = this.safeValue (trade, 'taker'); let takerOrMaker = undefined; @@ -763,17 +791,15 @@ module.exports = class aax extends Exchange { side = 'sell'; } if (side === undefined) { - side = (price > 0) ? 'buy' : 'sell'; - } - side = (price > 0) ? 'buy' : 'sell'; - price = Math.abs (price); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; + side = (priceString[0] === '-') ? 'sell' : 'buy'; } + priceString = (priceString[0] === '-') ? priceString.slice (1) : priceString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderType = this.parseOrderType (this.safeString (trade, 'orderType')); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -841,11 +867,11 @@ module.exports = class aax extends Exchange { // return [ this.safeTimestamp (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -930,12 +956,12 @@ module.exports = class aax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'unavailable'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'unavailable'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -963,7 +989,7 @@ module.exports = class aax extends Exchange { request['clOrdID'] = clientOrderId; params = this.omit (params, [ 'clOrdID', 'clientOrderId' ]); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { if ((orderType === 'STOP-LIMIT') || (orderType === 'STOP')) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders'); @@ -1081,7 +1107,7 @@ module.exports = class aax extends Exchange { // 'price': this.priceToPrecision (symbol, price), // 'stopPrice': this.priceToPrecision (symbol, stopPrice), }; - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1718,15 +1744,18 @@ module.exports = class aax extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const price = this.safeFloat (order, 'price'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const price = this.safeNumber (order, 'price'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'Post-Only'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeString (order, 'leavesQty'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + let remaining = this.safeNumber (order, 'leavesQty'); + if ((filled === 0) && (remaining === 0)) { + remaining = undefined; + } let cost = undefined; let lastTradeTimestamp = undefined; if (filled !== undefined) { @@ -1741,7 +1770,7 @@ module.exports = class aax extends Exchange { } } let fee = undefined; - const feeCost = this.safeFloat (order, 'commission'); + const feeCost = this.safeNumber (order, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -1970,496 +1999,7 @@ module.exports = class aax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],4:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { InsufficientFunds, OrderNotFound } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class acx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'acx', - 'name': 'ACX', - 'countries': [ 'AU' ], - 'rateLimit': 1000, - 'version': 'v2', - 'has': { - 'cancelOrder': true, - 'CORS': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchMarkets': true, - 'fetchOHLCV': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTime': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '12h': '720', - '1d': '1440', - '3d': '4320', - '1w': '10080', - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg', - 'extension': '.json', - 'api': 'https://acx.io/api', - 'www': 'https://acx.io', - 'doc': 'https://acx.io/documents/api_v2', - }, - 'api': { - 'public': { - 'get': [ - 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. - 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator - 'k', // Get OHLC(k line) of specific market - 'markets', // Get all available markets - 'order_book', // Get the order book of specified market - 'order_book/{market}', - 'tickers', // Get ticker of all markets - 'tickers/{market}', // Get ticker of specific market - 'timestamp', // Get server current time, in seconds since Unix epoch - 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. - 'trades/{market}', - ], - }, - 'private': { - 'get': [ - 'members/me', // Get your profile and accounts info - 'deposits', // Get your deposits history - 'deposit', // Get details of specific deposit - 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. - 'orders', // Get your orders, results is paginated - 'order', // Get information of specified order - 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. - 'withdraws', // Get your cryptocurrency withdraws - 'withdraw', // Get your cryptocurrency withdraw - ], - 'post': [ - 'orders', // Create a Sell/Buy order - 'orders/multi', // Create multiple sell/buy orders - 'orders/clear', // Cancel all my orders - 'order/delete', // Cancel an order - 'withdraw', // Create a withdraw - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': false, - 'percentage': true, - 'maker': 0.2 / 100, - 'taker': 0.2 / 100, - }, - 'funding': { - 'tierBased': false, - 'percentage': true, - 'withdraw': {}, // There is only 1% fee on withdrawals to your bank account. - }, - }, - 'commonCurrencies': { - 'PLA': 'Plair', - }, - 'exceptions': { - '2002': InsufficientFunds, - '2003': OrderNotFound, - }, - }); - } - - async fetchMarkets (params = {}) { - const markets = await this.publicGetMarkets (params); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = market['id']; - const symbol = market['name']; - let baseId = this.safeString (market, 'base_unit'); - let quoteId = this.safeString (market, 'quote_unit'); - if ((baseId === undefined) || (quoteId === undefined)) { - const ids = symbol.split ('/'); - baseId = ids[0].toLowerCase (); - quoteId = ids[1].toLowerCase (); - } - let base = baseId.toUpperCase (); - let quote = quoteId.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - // todo: find out their undocumented precision and limits - const precision = { - 'amount': 8, - 'price': 8, - }; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'precision': precision, - 'info': market, - 'active': undefined, - 'limits': this.limits, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetMembersMe (params); - const balances = this.safeValue (response, 'accounts'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 300 - } - const orderbook = await this.publicGetDepth (this.extend (request, params)); - const timestamp = this.safeTimestamp (orderbook, 'timestamp'); - return this.parseOrderBook (orderbook, timestamp); - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.safeTimestamp (ticker, 'at'); - ticker = ticker['ticker']; - let symbol = undefined; - if (market) { - symbol = market['symbol']; - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetTickers (params); - const ids = Object.keys (response); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let market = undefined; - let symbol = id; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } else { - let base = id.slice (0, 3); - let quote = id.slice (3, 6); - base = base.toUpperCase (); - quote = quote.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - symbol = base + '/' + quote; - } - result[symbol] = this.parseTicker (response[id], market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTickersMarket (this.extend (request, params)); - return this.parseTicker (response, market); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const id = this.safeString (trade, 'tid'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': undefined, - 'side': undefined, - 'order': undefined, - 'takerOrMaker': undefined, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), - 'cost': this.safeFloat (trade, 'funds'), - 'fee': undefined, - }; - } - - async fetchTime (params = {}) { - const response = await this.publicGetTimestamp (params); - // - // 1594911427 - // - return response * 1000; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - return [ - this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (limit === undefined) { - limit = 500; // default is 30 - } - const request = { - 'market': market['id'], - 'period': this.timeframes[timeframe], - 'limit': limit, - }; - if (since !== undefined) { - request['timestamp'] = parseInt (since / 1000); - } - const response = await this.publicGetK (this.extend (request, params)); - return this.parseOHLCVs (response, market, timeframe, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'done': 'closed', - 'wait': 'open', - 'cancel': 'canceled', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - const marketId = this.safeString (order, 'market'); - const symbol = this.safeSymbol (marketId, market); - const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const status = this.parseOrderStatus (this.safeString (order, 'state')); - const type = this.safeString (order, 'type'); - const side = this.safeString (order, 'side'); - const id = this.safeString (order, 'id'); - return { - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': this.safeFloat (order, 'price'), - 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'volume'), - 'filled': this.safeFloat (order, 'executed_volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'trades': undefined, - 'fee': undefined, - 'info': order, - 'cost': undefined, - 'average': undefined, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': parseInt (id), - }; - const response = await this.privateGetOrder (this.extend (request, params)); - return this.parseOrder (response); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'market': this.marketId (symbol), - 'side': side, - 'volume': amount.toString (), - 'ord_type': type, - }; - if (type === 'limit') { - request['price'] = price.toString (); - } - const response = await this.privatePostOrders (this.extend (request, params)); - const marketId = this.safeValue (response, 'market'); - const market = this.safeValue (this.markets_by_id, marketId); - return this.parseOrder (response, market); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - const response = await this.privatePostOrderDelete (this.extend (request, params)); - const order = this.parseOrder (response); - const status = order['status']; - if (status === 'closed' || status === 'canceled') { - throw new OrderNotFound (this.id + ' ' + this.json (order)); - } - return order; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - // they have XRP but no docs on memo/tag - const request = { - 'currency': currency['id'], - 'sum': amount, - 'address': address, - }; - const response = await this.privatePostWithdraw (this.extend (request, params)); - // withdrawal response is undocumented - return { - 'info': response, - 'id': undefined, - }; - } - - nonce () { - return this.milliseconds (); - } - - encodeParams (params) { - if ('orders' in params) { - const orders = params['orders']; - let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); - for (let i = 0; i < orders.length; i++) { - const order = orders[i]; - const keys = Object.keys (order); - for (let k = 0; k < keys.length; k++) { - const key = keys[k]; - const value = order[key]; - query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); - } - } - return query; - } - return this.urlencode (this.keysort (params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let request = '/api/' + this.version + '/' + this.implodeParams (path, params); - if ('extension' in this.urls) { - request += this.urls['extension']; - } - const query = this.omit (params, this.extractParams (path)); - let url = this.urls['api'] + request; - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce ().toString (); - const query = this.encodeParams (this.extend ({ - 'access_key': this.apiKey, - 'tonce': nonce, - }, params)); - const auth = method + '|' + request + '|' + query; - const signed = this.hmac (this.encode (auth), this.encode (this.secret)); - const suffix = query + '&signature=' + signed; - if (method === 'GET') { - url += '?' + suffix; - } else { - body = suffix; - headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; - } - if (code === 400) { - const error = this.safeValue (response, 'error'); - const errorCode = this.safeString (error, 'code'); - const feedback = this.id + ' ' + this.json (response); - this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); - // fallback to default error handler - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],5:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],4:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -2467,6 +2007,7 @@ module.exports = class acx extends Exchange { const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, BadSymbol, InvalidOrder, PermissionDenied, InvalidAddress, AuthenticationError, InvalidNonce, BadRequest, InsufficientFunds, OrderNotFound } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -2655,8 +2196,8 @@ module.exports = class aofex extends Exchange { const symbol = base + '/' + quote; const numericId = this.safeInteger (market, 'id'); const precision = this.safeValue (precisions, id, {}); - const makerFee = this.safeFloat (market, 'maker_fee'); - const takerFee = this.safeFloat (market, 'taker_fee'); + const makerFee = this.safeNumber (market, 'maker_fee'); + const takerFee = this.safeNumber (market, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -2674,12 +2215,12 @@ module.exports = class aofex extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -2707,11 +2248,11 @@ module.exports = class aofex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -2790,11 +2331,11 @@ module.exports = class aofex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -2817,8 +2358,8 @@ module.exports = class aofex extends Exchange { return { 'info': response, 'symbol': symbol, - 'maker': this.safeFloat (result, 'fromFee'), - 'taker': this.safeFloat (result, 'toFee'), + 'maker': this.safeNumber (result, 'fromFee'), + 'taker': this.safeNumber (result, 'toFee'), }; } @@ -2875,8 +2416,8 @@ module.exports = class aofex extends Exchange { if (market) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); let change = undefined; if (symbol !== undefined) { change = parseFloat (this.priceToPrecision (symbol, last - open)); @@ -2885,8 +2426,8 @@ module.exports = class aofex extends Exchange { } const average = this.sum (last, open) / 2; const percentage = change / open * 100; - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); let vwap = this.vwap (baseVolume, quoteVolume); if (vwap !== undefined) { vwap = parseFloat (this.priceToPrecision (symbol, vwap)); @@ -2895,8 +2436,8 @@ module.exports = class aofex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -3014,13 +2555,15 @@ module.exports = class aofex extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'number'); - let cost = this.safeFloat (trade, 'total_price'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'number'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total_price'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -3164,21 +2707,21 @@ module.exports = class aofex extends Exchange { const orderType = this.safeString (order, 'type'); const type = (orderType === '2') ? 'limit' : 'market'; const side = this.safeString (order, 'side'); - // const amount = this.safeFloat (order, 'number'); - // const price = this.safeFloat (order, 'price'); + // const amount = this.safeNumber (order, 'number'); + // const price = this.safeNumber (order, 'price'); let cost = undefined; let price = undefined; let amount = undefined; let average = undefined; - const number = this.safeFloat (order, 'number'); - const totalPrice = this.safeFloat (order, 'total_price'); + const number = this.safeNumber (order, 'number'); + const totalPrice = this.safeNumber (order, 'total_price'); if (type === 'limit') { amount = number; - price = this.safeFloat (order, 'price'); + price = this.safeNumber (order, 'price'); } else { - average = this.safeFloat (order, 'deal_price'); + average = this.safeNumber (order, 'deal_price'); if (side === 'buy') { - amount = this.safeFloat (order, 'deal_number'); + amount = this.safeNumber (order, 'deal_number'); } else { amount = number; } @@ -3561,7 +3104,1693 @@ module.exports = class aofex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],6:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],5:[function(require,module,exports){ +'use strict'; + +// --------------------------------------------------------------------------- + +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); + +// --------------------------------------------------------------------------- + +module.exports = class ascendex extends Exchange { + describe () { + return this.deepExtend (super.describe (), { + 'id': 'ascendex', + 'name': 'AscendEX', + 'countries': [ 'SG', 'CN' ], // Singapore, China + 'rateLimit': 500, + // new metainfo interface + 'has': { + 'CORS': false, + 'fetchMarkets': true, + 'fetchCurrencies': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchOHLCV': true, + 'fetchTrades': true, + 'fetchAccounts': true, + 'fetchBalance': true, + 'createOrder': true, + 'cancelOrder': true, + 'cancelAllOrders': true, + 'fetchDepositAddress': true, + 'fetchTransactions': true, + 'fetchDeposits': true, + 'fetchWithdrawals': true, + 'fetchOrder': true, + 'fetchOrders': true, + 'fetchOpenOrders': true, + 'fetchClosedOrders': true, + }, + 'timeframes': { + '1m': '1', + '5m': '5', + '15m': '15', + '30m': '30', + '1h': '60', + '2h': '120', + '4h': '240', + '6h': '360', + '12h': '720', + '1d': '1d', + '1w': '1w', + '1M': '1m', + }, + 'version': 'v1', + 'urls': { + 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg', + 'api': 'https://ascendex.com', + 'test': 'https://bitmax-test.io', + 'www': 'https://ascendex.com', + 'doc': [ + 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', + ], + 'fees': 'https://ascendex.com/en/feerate/transactionfee-traderate', + 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', + }, + 'api': { + 'public': { + 'get': [ + 'assets', + 'products', + 'ticker', + 'barhist/info', + 'barhist', + 'depth', + 'trades', + 'cash/assets', // not documented + 'cash/products', // not documented + 'margin/assets', // not documented + 'margin/products', // not documented + 'futures/collateral', + 'futures/contracts', + 'futures/ref-px', + 'futures/market-data', + 'futures/funding-rates', + ], + }, + 'accountCategory': { + 'get': [ + 'balance', + 'order/open', + 'order/status', + 'order/hist/current', + 'risk', + ], + 'post': [ + 'order', + 'order/batch', + ], + 'delete': [ + 'order', + 'order/all', + 'order/batch', + ], + }, + 'accountGroup': { + 'get': [ + 'cash/balance', + 'margin/balance', + 'margin/risk', + 'transfer', + 'futures/collateral-balance', + 'futures/position', + 'futures/risk', + 'futures/funding-payments', + 'order/hist', + ], + 'post': [ + 'futures/transfer/deposit', + 'futures/transfer/withdraw', + ], + }, + 'private': { + 'get': [ + 'info', + 'wallet/transactions', + 'wallet/deposit/address', // not documented + ], + }, + }, + 'fees': { + 'trading': { + 'feeSide': 'get', + 'tierBased': true, + 'percentage': true, + 'taker': 0.002, + 'maker': 0.002, + }, + }, + 'precisionMode': TICK_SIZE, + 'options': { + 'account-category': 'cash', // 'cash'/'margin'/'futures' + 'account-group': undefined, + 'fetchClosedOrders': { + 'method': 'accountGroupGetOrderHist', // 'accountGroupGetAccountCategoryOrderHistCurrent' + }, + }, + 'exceptions': { + 'exact': { + // not documented + '1900': BadRequest, // {"code":1900,"message":"Invalid Http Request Input"} + '2100': AuthenticationError, // {"code":2100,"message":"ApiKeyFailure"} + '5002': BadSymbol, // {"code":5002,"message":"Invalid Symbol"} + '6001': BadSymbol, // {"code":6001,"message":"Trading is disabled on symbol."} + '6010': InsufficientFunds, // {'code': 6010, 'message': 'Not enough balance.'} + '60060': InvalidOrder, // { 'code': 60060, 'message': 'The order is already filled or canceled.' } + '600503': InvalidOrder, // {"code":600503,"message":"Notional is too small."} + // documented + '100001': BadRequest, // INVALID_HTTP_INPUT Http request is invalid + '100002': BadRequest, // DATA_NOT_AVAILABLE Some required data is missing + '100003': BadRequest, // KEY_CONFLICT The same key exists already + '100004': BadRequest, // INVALID_REQUEST_DATA The HTTP request contains invalid field or argument + '100005': BadRequest, // INVALID_WS_REQUEST_DATA Websocket request contains invalid field or argument + '100006': BadRequest, // INVALID_ARGUMENT The arugment is invalid + '100007': BadRequest, // ENCRYPTION_ERROR Something wrong with data encryption + '100008': BadSymbol, // SYMBOL_ERROR Symbol does not exist or not valid for the request + '100009': AuthenticationError, // AUTHORIZATION_NEEDED Authorization is require for the API access or request + '100010': BadRequest, // INVALID_OPERATION The action is invalid or not allowed for the account + '100011': BadRequest, // INVALID_TIMESTAMP Not a valid timestamp + '100012': BadRequest, // INVALID_STR_FORMAT String format does not + '100013': BadRequest, // INVALID_NUM_FORMAT Invalid number input + '100101': ExchangeError, // UNKNOWN_ERROR Some unknown error + '150001': BadRequest, // INVALID_JSON_FORMAT Require a valid json object + '200001': AuthenticationError, // AUTHENTICATION_FAILED Authorization failed + '200002': ExchangeError, // TOO_MANY_ATTEMPTS Tried and failed too many times + '200003': ExchangeError, // ACCOUNT_NOT_FOUND Account not exist + '200004': ExchangeError, // ACCOUNT_NOT_SETUP Account not setup properly + '200005': ExchangeError, // ACCOUNT_ALREADY_EXIST Account already exist + '200006': ExchangeError, // ACCOUNT_ERROR Some error related with error + '200007': ExchangeError, // CODE_NOT_FOUND + '200008': ExchangeError, // CODE_EXPIRED Code expired + '200009': ExchangeError, // CODE_MISMATCH Code does not match + '200010': AuthenticationError, // PASSWORD_ERROR Wrong assword + '200011': ExchangeError, // CODE_GEN_FAILED Do not generate required code promptly + '200012': ExchangeError, // FAKE_COKE_VERIFY + '200013': ExchangeError, // SECURITY_ALERT Provide security alert message + '200014': PermissionDenied, // RESTRICTED_ACCOUNT Account is restricted for certain activity, such as trading, or withdraw. + '200015': PermissionDenied, // PERMISSION_DENIED No enough permission for the operation + '300001': InvalidOrder, // INVALID_PRICE Order price is invalid + '300002': InvalidOrder, // INVALID_QTY Order size is invalid + '300003': InvalidOrder, // INVALID_SIDE Order side is invalid + '300004': InvalidOrder, // INVALID_NOTIONAL Notional is too small or too large + '300005': InvalidOrder, // INVALID_TYPE Order typs is invalid + '300006': InvalidOrder, // INVALID_ORDER_ID Order id is invalid + '300007': InvalidOrder, // INVALID_TIME_IN_FORCE Time In Force in order request is invalid + '300008': InvalidOrder, // INVALID_ORDER_PARAMETER Some order parameter is invalid + '300009': InvalidOrder, // TRADING_VIOLATION Trading violation on account or asset + '300011': InsufficientFunds, // INVALID_BALANCE No enough account or asset balance for the trading + '300012': BadSymbol, // INVALID_PRODUCT Not a valid product supported by exchange + '300013': InvalidOrder, // INVALID_BATCH_ORDER Some or all orders are invalid in batch order request + '300020': InvalidOrder, // TRADING_RESTRICTED There is some trading restriction on account or asset + '300021': InvalidOrder, // TRADING_DISABLED Trading is disabled on account or asset + '300031': InvalidOrder, // NO_MARKET_PRICE No market price for market type order trading + '310001': InsufficientFunds, // INVALID_MARGIN_BALANCE No enough margin balance + '310002': InvalidOrder, // INVALID_MARGIN_ACCOUNT Not a valid account for margin trading + '310003': InvalidOrder, // MARGIN_TOO_RISKY Leverage is too high + '310004': BadSymbol, // INVALID_MARGIN_ASSET This asset does not support margin trading + '310005': InvalidOrder, // INVALID_REFERENCE_PRICE There is no valid reference price + '510001': ExchangeError, // SERVER_ERROR Something wrong with server. + '900001': ExchangeError, // HUMAN_CHALLENGE Human change do not pass + }, + 'broad': {}, + }, + 'commonCurrencies': { + 'BOND': 'BONDED', + 'BTCBEAR': 'BEAR', + 'BTCBULL': 'BULL', + }, + }); + } + + getAccount (params = {}) { + // get current or provided bitmax sub-account + const account = this.safeValue (params, 'account', this.options['account']); + return account.toLowerCase ().capitalize (); + } + + async fetchCurrencies (params = {}) { + const assets = await this.publicGetAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode" : "LTCBULL", + // "assetName" : "3X Long LTC Token", + // "precisionScale" : 9, + // "nativeScale" : 4, + // "withdrawalFee" : "0.2", + // "minWithdrawalAmt" : "1.0", + // "status" : "Normal" + // }, + // ] + // } + // + const margin = await this.publicGetMarginAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode":"BTT", + // "borrowAssetCode":"BTT-B", + // "interestAssetCode":"BTT-I", + // "nativeScale":0, + // "numConfirmations":1, + // "withdrawFee":"100.0", + // "minWithdrawalAmt":"1000.0", + // "statusCode":"Normal", + // "statusMessage":"", + // "interestRate":"0.001" + // } + // ] + // } + // + const cash = await this.publicGetCashAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode":"LTCBULL", + // "nativeScale":4, + // "numConfirmations":20, + // "withdrawFee":"0.2", + // "minWithdrawalAmt":"1.0", + // "statusCode":"Normal", + // "statusMessage":"" + // } + // ] + // } + // + const assetsData = this.safeValue (assets, 'data', []); + const marginData = this.safeValue (margin, 'data', []); + const cashData = this.safeValue (cash, 'data', []); + const assetsById = this.indexBy (assetsData, 'assetCode'); + const marginById = this.indexBy (marginData, 'assetCode'); + const cashById = this.indexBy (cashData, 'assetCode'); + const dataById = this.deepExtend (assetsById, marginById, cashById); + const ids = Object.keys (dataById); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + const currency = dataById[id]; + const code = this.safeCurrencyCode (id); + const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); + // why would the exchange API have different names for the same field + const fee = this.safeNumber2 (currency, 'withdrawFee', 'withdrawalFee'); + const status = this.safeString2 (currency, 'status', 'statusCode'); + const active = (status === 'Normal'); + const margin = ('borrowAssetCode' in currency); + result[code] = { + 'id': id, + 'code': code, + 'info': currency, + 'type': undefined, + 'margin': margin, + 'name': this.safeString (currency, 'assetName'), + 'active': active, + 'fee': fee, + 'precision': precision, + 'limits': { + 'amount': { + 'min': Math.pow (10, -precision), + 'max': undefined, + }, + 'price': { + 'min': Math.pow (10, -precision), + 'max': undefined, + }, + 'cost': { + 'min': undefined, + 'max': undefined, + }, + 'withdraw': { + 'min': this.safeNumber (currency, 'minWithdrawalAmt'), + 'max': undefined, + }, + }, + }; + } + return result; + } + + async fetchMarkets (params = {}) { + const products = await this.publicGetProducts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"LBA/BTC", + // "baseAsset":"LBA", + // "quoteAsset":"BTC", + // "status":"Normal", + // "minNotional":"0.000625", + // "maxNotional":"6.25", + // "marginTradable":false, + // "commissionType":"Quote", + // "commissionReserveRate":"0.001", + // "tickSize":"0.000000001", + // "lotSize":"1" + // }, + // ] + // } + // + const cash = await this.publicGetCashProducts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"QTUM/BTC", + // "domain":"BTC", + // "tradingStartTime":1569506400000, + // "collapseDecimals":"0.0001,0.000001,0.00000001", + // "minQty":"0.000000001", + // "maxQty":"1000000000", + // "minNotional":"0.000625", + // "maxNotional":"12.5", + // "statusCode":"Normal", + // "statusMessage":"", + // "tickSize":"0.00000001", + // "useTick":false, + // "lotSize":"0.1", + // "useLot":false, + // "commissionType":"Quote", + // "commissionReserveRate":"0.001", + // "qtyScale":1, + // "priceScale":8, + // "notionalScale":4 + // } + // ] + // } + // + const futures = await this.publicGetFuturesContracts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"BTC-PERP", + // "tradingStartTime":1579701600000, + // "collapseDecimals":"1,0.1,0.01", + // "minQty":"0.000000001", + // "maxQty":"1000000000", + // "minNotional":"5", + // "maxNotional":"1000000", + // "statusCode":"Normal", + // "statusMessage":"", + // "tickSize":"0.25", + // "lotSize":"0.0001", + // "priceScale":2, + // "qtyScale":4, + // "notionalScale":2 + // } + // ] + // } + // + const productsData = this.safeValue (products, 'data', []); + const productsById = this.indexBy (productsData, 'symbol'); + const cashData = this.safeValue (cash, 'data', []); + const futuresData = this.safeValue (futures, 'data', []); + const cashAndFuturesData = this.arrayConcat (cashData, futuresData); + const cashAndFuturesById = this.indexBy (cashAndFuturesData, 'symbol'); + const dataById = this.deepExtend (productsById, cashAndFuturesById); + const ids = Object.keys (dataById); + const result = []; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + const market = dataById[id]; + const baseId = this.safeString (market, 'baseAsset'); + const quoteId = this.safeString (market, 'quoteAsset'); + const base = this.safeCurrencyCode (baseId); + const quote = this.safeCurrencyCode (quoteId); + const precision = { + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), + }; + const status = this.safeString (market, 'status'); + const active = (status === 'Normal'); + const type = ('useLot' in market) ? 'spot' : 'future'; + const spot = (type === 'spot'); + const future = (type === 'future'); + let symbol = id; + if (!future) { + symbol = base + '/' + quote; + } + result.push ({ + 'id': id, + 'symbol': symbol, + 'base': base, + 'quote': quote, + 'baseId': baseId, + 'quoteId': quoteId, + 'info': market, + 'type': type, + 'spot': spot, + 'future': future, + 'active': active, + 'precision': precision, + 'limits': { + 'amount': { + 'min': this.safeNumber (market, 'minQty'), + 'max': this.safeNumber (market, 'maxQty'), + }, + 'price': { + 'min': this.safeNumber (market, 'tickSize'), + 'max': undefined, + }, + 'cost': { + 'min': this.safeNumber (market, 'minNotional'), + 'max': this.safeNumber (market, 'maxNotional'), + }, + }, + }); + } + return result; + } + + async fetchAccounts (params = {}) { + let accountGroup = this.safeString (this.options, 'account-group'); + let response = undefined; + if (accountGroup === undefined) { + response = await this.privateGetInfo (params); + // + // { + // "code":0, + // "data":{ + // "email":"igor.kroitor@gmail.com", + // "accountGroup":8, + // "viewPermission":true, + // "tradePermission":true, + // "transferPermission":true, + // "cashAccount":["cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda"], + // "marginAccount":["martXoh1v1N3EMQC5FDtSj5VHso8aI2Z"], + // "futuresAccount":["futc9r7UmFJAyBY2rE3beA2JFxav2XFF"], + // "userUID":"U6491137460" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + accountGroup = this.safeString (data, 'accountGroup'); + this.options['account-group'] = accountGroup; + } + return [ + { + 'id': accountGroup, + 'type': undefined, + 'currency': undefined, + 'info': response, + }, + ]; + } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchBalance', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeString (account, 'id'); + const request = { + 'account-group': accountGroup, + }; + let method = 'accountCategoryGetBalance'; + if (accountCategory === 'futures') { + method = 'accountGroupGetFuturesCollateralBalance'; + } else { + request['account-category'] = accountCategory; + } + const response = await this[method] (this.extend (request, params)); + // + // cash + // + // { + // 'code': 0, + // 'data': [ + // { + // 'asset': 'BCHSV', + // 'totalBalance': '64.298000048', + // 'availableBalance': '64.298000048', + // }, + // ] + // } + // + // margin + // + // { + // 'code': 0, + // 'data': [ + // { + // 'asset': 'BCHSV', + // 'totalBalance': '64.298000048', + // 'availableBalance': '64.298000048', + // 'borrowed': '0', + // 'interest': '0', + // }, + // ] + // } + // + // futures + // + // { + // "code":0, + // "data":[ + // {"asset":"BTC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"9456.59"}, + // {"asset":"ETH","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"235.95"}, + // {"asset":"USDT","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"}, + // {"asset":"USDC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00035"}, + // {"asset":"PAX","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00045"}, + // {"asset":"USDTR","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"} + // ] + // } + // + const result = { 'info': response }; + const balances = this.safeValue (response, 'data', []); + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); + const account = this.account (); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async fetchOrderBook (symbol, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + const response = await this.publicGetDepth (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "m":"depth-snapshot", + // "symbol":"BTC-PERP", + // "data":{ + // "ts":1590223998202, + // "seqnum":115444921, + // "asks":[ + // ["9207.5","18.2383"], + // ["9207.75","18.8235"], + // ["9208","10.7873"], + // ], + // "bids":[ + // ["9207.25","0.4009"], + // ["9207","0.003"], + // ["9206.5","0.003"], + // ] + // } + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const orderbook = this.safeValue (data, 'data', {}); + const timestamp = this.safeInteger (orderbook, 'ts'); + const result = this.parseOrderBook (orderbook, timestamp); + result['nonce'] = this.safeInteger (orderbook, 'seqnum'); + return result; + } + + parseTicker (ticker, market = undefined) { + // + // { + // "symbol":"QTUM/BTC", + // "open":"0.00016537", + // "close":"0.00019077", + // "high":"0.000192", + // "low":"0.00016537", + // "volume":"846.6", + // "ask":["0.00018698","26.2"], + // "bid":["0.00018408","503.7"], + // "type":"spot" + // } + // + const timestamp = undefined; + const marketId = this.safeString (ticker, 'symbol'); + let symbol = undefined; + if (marketId in this.markets_by_id) { + market = this.markets_by_id[marketId]; + } else if (marketId !== undefined) { + const type = this.safeString (ticker, 'type'); + if (type === 'spot') { + const [ baseId, quoteId ] = marketId.split ('/'); + const base = this.safeCurrencyCode (baseId); + const quote = this.safeCurrencyCode (quoteId); + symbol = base + '/' + quote; + } + } + if ((symbol === undefined) && (market !== undefined)) { + symbol = market['symbol']; + } + const close = this.safeNumber (ticker, 'close'); + const bid = this.safeValue (ticker, 'bid', []); + const ask = this.safeValue (ticker, 'ask', []); + const open = this.safeNumber (ticker, 'open'); + let change = undefined; + let percentage = undefined; + let average = undefined; + if ((open !== undefined) && (close !== undefined)) { + change = close - open; + if (open > 0) { + percentage = change / open * 100; + } + average = this.sum (open, close) / 2; + } + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 0), + 'bidVolume': this.safeNumber (bid, 1), + 'ask': this.safeNumber (ask, 0), + 'askVolume': this.safeNumber (ask, 1), + 'vwap': undefined, + 'open': open, + 'close': close, + 'last': close, + 'previousClose': undefined, // previous day close + 'change': change, + 'percentage': percentage, + 'average': average, + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + const response = await this.publicGetTicker (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "symbol":"BTC-PERP", // or "BTC/USDT" + // "open":"9073", + // "close":"9185.75", + // "high":"9185.75", + // "low":"9185.75", + // "volume":"576.8334", + // "ask":["9185.75","15.5863"], + // "bid":["9185.5","0.003"], + // "type":"derivatives", // or "spot" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + return this.parseTicker (data, market); + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (symbols !== undefined) { + const marketIds = this.marketIds (symbols); + request['symbol'] = marketIds.join (','); + } + const response = await this.publicGetTicker (this.extend (request, params)); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"QTUM/BTC", + // "open":"0.00016537", + // "close":"0.00019077", + // "high":"0.000192", + // "low":"0.00016537", + // "volume":"846.6", + // "ask":["0.00018698","26.2"], + // "bid":["0.00018408","503.7"], + // "type":"spot" + // } + // ] + // } + // + const data = this.safeValue (response, 'data', []); + return this.parseTickers (data, symbols); + } + + parseOHLCV (ohlcv, market = undefined) { + // + // { + // "m":"bar", + // "s":"BTC/USDT", + // "data":{ + // "i":"1", + // "ts":1590228000000, + // "o":"9139.59", + // "c":"9131.94", + // "h":"9139.99", + // "l":"9121.71", + // "v":"25.20648" + // } + // } + // + const data = this.safeValue (ohlcv, 'data', {}); + return [ + this.safeInteger (data, 'ts'), + this.safeNumber (data, 'o'), + this.safeNumber (data, 'h'), + this.safeNumber (data, 'l'), + this.safeNumber (data, 'c'), + this.safeNumber (data, 'v'), + ]; + } + + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + 'interval': this.timeframes[timeframe], + }; + // if since and limit are not specified + // the exchange will return just 1 last candle by default + const duration = this.parseTimeframe (timeframe); + const options = this.safeValue (this.options, 'fetchOHLCV', {}); + const defaultLimit = this.safeInteger (options, 'limit', 500); + if (since !== undefined) { + request['from'] = since; + if (limit === undefined) { + limit = defaultLimit; + } else { + limit = Math.min (limit, defaultLimit); + } + request['to'] = this.sum (since, limit * duration * 1000, 1); + } else if (limit !== undefined) { + request['n'] = limit; // max 500 + } + const response = await this.publicGetBarhist (this.extend (request, params)); + // + // { + // "code":0, + // "data":[ + // { + // "m":"bar", + // "s":"BTC/USDT", + // "data":{ + // "i":"1", + // "ts":1590228000000, + // "o":"9139.59", + // "c":"9131.94", + // "h":"9139.99", + // "l":"9121.71", + // "v":"25.20648" + // } + // } + // ] + // } + // + const data = this.safeValue (response, 'data', []); + return this.parseOHLCVs (data, market, timeframe, since, limit); + } + + parseTrade (trade, market = undefined) { + // + // public fetchTrades + // + // { + // "p":"9128.5", // price + // "q":"0.0030", // quantity + // "ts":1590229002385, // timestamp + // "bm":false, // if true, the buyer is the market maker, we only use this field to "define the side" of a public trade + // "seqnum":180143985289898554 + // } + // + const timestamp = this.safeInteger (trade, 'ts'); + const priceString = this.safeString2 (trade, 'price', 'p'); + const amountString = this.safeString (trade, 'q'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const buyerIsMaker = this.safeValue (trade, 'bm', false); + const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; + const side = buyerIsMaker ? 'buy' : 'sell'; + let symbol = undefined; + if ((symbol === undefined) && (market !== undefined)) { + symbol = market['symbol']; + } + return { + 'info': trade, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'symbol': symbol, + 'id': undefined, + 'order': undefined, + 'type': undefined, + 'takerOrMaker': makerOrTaker, + 'side': side, + 'price': price, + 'amount': amount, + 'cost': cost, + 'fee': undefined, + }; + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + if (limit !== undefined) { + request['n'] = limit; // max 100 + } + const response = await this.publicGetTrades (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "m":"trades", + // "symbol":"BTC-PERP", + // "data":[ + // {"p":"9128.5","q":"0.0030","ts":1590229002385,"bm":false,"seqnum":180143985289898554}, + // {"p":"9129","q":"0.0030","ts":1590229002642,"bm":false,"seqnum":180143985289898587}, + // {"p":"9129.5","q":"0.0030","ts":1590229021306,"bm":false,"seqnum":180143985289899043} + // ] + // } + // } + // + const records = this.safeValue (response, 'data', []); + const trades = this.safeValue (records, 'data', []); + return this.parseTrades (trades, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'PendingNew': 'open', + 'New': 'open', + 'PartiallyFilled': 'open', + 'Filled': 'closed', + 'Canceled': 'canceled', + 'Rejected': 'rejected', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + // + // createOrder + // + // { + // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", + // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", + // "orderType": "Market", + // "symbol": "BTC/USDT", + // "timestamp": 1573576916201 + // } + // + // fetchOrder, fetchOpenOrders, fetchClosedOrders + // + // { + // "symbol": "BTC/USDT", + // "price": "8131.22", + // "orderQty": "0.00082", + // "orderType": "Market", + // "avgPx": "7392.02", + // "cumFee": "0.005152238", + // "cumFilledQty": "0.00082", + // "errorCode": "", + // "feeAsset": "USDT", + // "lastExecTime": 1575953151764, + // "orderId": "a16eee20b6750866943712zWEDdAjt3", + // "seqNum": 2623469, + // "side": "Buy", + // "status": "Filled", + // "stopPrice": "", + // "execInst": "NULL_VAL" + // } + // + // { + // "ac": "FUTURES", + // "accountId": "testabcdefg", + // "avgPx": "0", + // "cumFee": "0", + // "cumQty": "0", + // "errorCode": "NULL_VAL", + // "execInst": "NULL_VAL", + // "feeAsset": "USDT", + // "lastExecTime": 1584072844085, + // "orderId": "r170d21956dd5450276356bbtcpKa74", + // "orderQty": "1.1499", + // "orderType": "Limit", + // "price": "4000", + // "sendingTime": 1584072841033, + // "seqNum": 24105338, + // "side": "Buy", + // "status": "Canceled", + // "stopPrice": "", + // "symbol": "BTC-PERP" + // }, + // + const status = this.parseOrderStatus (this.safeString (order, 'status')); + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '/'); + const timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); + const lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const average = this.safeNumber (order, 'avgPx'); + const filled = this.safeNumber2 (order, 'cumFilledQty', 'cumQty'); + const id = this.safeString (order, 'orderId'); + let clientOrderId = this.safeString (order, 'id'); + if (clientOrderId !== undefined) { + if (clientOrderId.length < 1) { + clientOrderId = undefined; + } + } + const type = this.safeStringLower (order, 'orderType'); + const side = this.safeStringLower (order, 'side'); + const feeCost = this.safeNumber (order, 'cumFee'); + let fee = undefined; + if (feeCost !== undefined) { + const feeCurrencyId = this.safeString (order, 'feeAsset'); + const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); + fee = { + 'cost': feeCost, + 'currency': feeCurrencyCode, + }; + } + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ + 'info': order, + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': lastTradeTimestamp, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': price, + 'stopPrice': stopPrice, + 'amount': amount, + 'cost': undefined, + 'average': average, + 'filled': filled, + 'remaining': undefined, + 'status': status, + 'fee': fee, + 'trades': undefined, + }); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const market = this.market (symbol); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'createOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'symbol': market['id'], + 'time': this.milliseconds (), + 'orderQty': this.amountToPrecision (symbol, amount), + 'orderType': type, // "limit", "market", "stop_market", "stop_limit" + 'side': side, // "buy" or "sell" + // 'orderPrice': this.priceToPrecision (symbol, price), + // 'stopPrice': this.priceToPrecision (symbol, stopPrice), // required for stop orders + // 'postOnly': 'false', // 'false', 'true' + // 'timeInForce': 'GTC', // GTC, IOC, FOK + // 'respInst': 'ACK', // ACK, 'ACCEPT, DONE + }; + if (clientOrderId !== undefined) { + request['id'] = clientOrderId; + params = this.omit (params, [ 'clientOrderId', 'id' ]); + } + if ((type === 'limit') || (type === 'stop_limit')) { + request['orderPrice'] = this.priceToPrecision (symbol, price); + } + if ((type === 'stop_limit') || (type === 'stop_market')) { + const stopPrice = this.safeNumber (params, 'stopPrice'); + if (stopPrice === undefined) { + throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); + } else { + request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); + params = this.omit (params, 'stopPrice'); + } + } + const response = await this.accountCategoryPostOrder (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "ac": "MARGIN", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "action": "place-order", + // "info": { + // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", + // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", + // "orderType": "Market", + // "symbol": "BTC/USDT", + // "timestamp": 1573576916201 + // }, + // "status": "Ack" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const info = this.safeValue (data, 'info', {}); + return this.parseOrder (info, market); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'orderId': id, + }; + const response = await this.accountCategoryGetOrderStatus (this.extend (request, params)); + // + // { + // "code": 0, + // "accountCategory": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "data": [ + // { + // "symbol": "BTC/USDT", + // "price": "8131.22", + // "orderQty": "0.00082", + // "orderType": "Market", + // "avgPx": "7392.02", + // "cumFee": "0.005152238", + // "cumFilledQty": "0.00082", + // "errorCode": "", + // "feeAsset": "USDT", + // "lastExecTime": 1575953151764, + // "orderId": "a16eee20b6750866943712zWEDdAjt3", + // "seqNum": 2623469, + // "side": "Buy", + // "status": "Filled", + // "stopPrice": "", + // "execInst": "NULL_VAL" + // } + // ] + // } + // + const data = this.safeValue (response, 'data', {}); + return this.parseOrder (data); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + } + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchOpenOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + }; + const response = await this.accountCategoryGetOrderOpen (this.extend (request, params)); + // + // { + // "ac": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "code": 0, + // "data": [ + // { + // "avgPx": "0", // Average filled price of the order + // "cumFee": "0", // cumulative fee paid for this order + // "cumFilledQty": "0", // cumulative filled quantity + // "errorCode": "", // error code; could be empty + // "feeAsset": "USDT", // fee asset + // "lastExecTime": 1576019723550, // The last execution time of the order + // "orderId": "s16ef21882ea0866943712034f36d83", // server provided orderId + // "orderQty": "0.0083", // order quantity + // "orderType": "Limit", // order type + // "price": "7105", // order price + // "seqNum": 8193258, // sequence number + // "side": "Buy", // order side + // "status": "New", // order status on matching engine + // "stopPrice": "", // only available for stop market and stop limit orders; otherwise empty + // "symbol": "BTC/USDT", + // "execInst": "NULL_VAL" // execution instruction + // }, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + if (accountCategory === 'futures') { + return this.parseOrders (data, market, since, limit); + } + // a workaround for https://github.com/ccxt/ccxt/issues/7187 + const orders = []; + for (let i = 0; i < data.length; i++) { + const order = this.parseOrder (data[i], market); + orders.push (order); + } + return this.filterBySymbolSinceLimit (orders, symbol, since, limit); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + } + const defaultAccountCategory = this.safeString (this.options, 'account-category'); + const options = this.safeValue (this.options, 'fetchClosedOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + // 'category': accountCategory, + // 'symbol': market['id'], + // 'orderType': 'market', // optional, string + // 'side': 'buy', // or 'sell', optional, case insensitive. + // 'status': 'Filled', // "Filled", "Canceled", or "Rejected" + // 'startTime': exchange.milliseconds (), + // 'endTime': exchange.milliseconds (), + // 'page': 1, + // 'pageSize': 100, + }; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const method = this.safeValue (options, 'method', 'accountGroupGetOrderHist'); + if (method === 'accountGroupGetOrderHist') { + if (accountCategory !== undefined) { + request['category'] = accountCategory; + } + } else { + request['account-category'] = accountCategory; + } + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['pageSize'] = limit; + } + const response = await this[method] (this.extend (request, params)); + // + // accountCategoryGetOrderHistCurrent + // + // { + // "code":0, + // "accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda", + // "ac":"CASH", + // "data":[ + // { + // "seqNum":15561826728, + // "orderId":"a17294d305c0U6491137460bethu7kw9", + // "symbol":"ETH/USDT", + // "orderType":"Limit", + // "lastExecTime":1591635618200, + // "price":"200", + // "orderQty":"0.1", + // "side":"Buy", + // "status":"Canceled", + // "avgPx":"0", + // "cumFilledQty":"0", + // "stopPrice":"", + // "errorCode":"", + // "cumFee":"0", + // "feeAsset":"USDT", + // "execInst":"NULL_VAL" + // } + // ] + // } + // + // accountGroupGetOrderHist + // + // { + // "code": 0, + // "data": { + // "data": [ + // { + // "ac": "FUTURES", + // "accountId": "testabcdefg", + // "avgPx": "0", + // "cumFee": "0", + // "cumQty": "0", + // "errorCode": "NULL_VAL", + // "execInst": "NULL_VAL", + // "feeAsset": "USDT", + // "lastExecTime": 1584072844085, + // "orderId": "r170d21956dd5450276356bbtcpKa74", + // "orderQty": "1.1499", + // "orderType": "Limit", + // "price": "4000", + // "sendingTime": 1584072841033, + // "seqNum": 24105338, + // "side": "Buy", + // "status": "Canceled", + // "stopPrice": "", + // "symbol": "BTC-PERP" + // }, + // ], + // "hasNext": False, + // "limit": 500, + // "page": 1, + // "pageSize": 20 + // } + // } + // + let data = this.safeValue (response, 'data'); + const isArray = Array.isArray (data); + if (!isArray) { + data = this.safeValue (data, 'data', []); + } + return this.parseOrders (data, market, since, limit); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); + } + await this.loadMarkets (); + await this.loadAccounts (); + const market = this.market (symbol); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'cancelOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'symbol': market['id'], + 'time': this.milliseconds (), + 'id': 'foobar', + }; + if (clientOrderId === undefined) { + request['orderId'] = id; + } else { + request['id'] = clientOrderId; + params = this.omit (params, [ 'clientOrderId', 'id' ]); + } + const response = await this.accountCategoryDeleteOrder (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "ac": "CASH", + // "action": "cancel-order", + // "status": "Ack", + // "info": { + // "id": "wv8QGquoeamhssvQBeHOHGQCGlcBjj23", + // "orderId": "16e6198afb4s8bXHbAwwoqDo2ebc19dc", + // "orderType": "", // could be empty + // "symbol": "ETH/USDT", + // "timestamp": 1573594877822 + // } + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const info = this.safeValue (data, 'info', {}); + return this.parseOrder (info, market); + } + + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'cancelAllOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'time': this.milliseconds (), + }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.accountCategoryDeleteOrderAll (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "ac": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "action": "cancel-all", + // "info": { + // "id": "2bmYvi7lyTrneMzpcJcf2D7Pe9V1P9wy", + // "orderId": "", + // "orderType": "NULL_VAL", + // "symbol": "", + // "timestamp": 1574118495462 + // }, + // "status": "Ack" + // } + // } + // + return response; + } + + parseDepositAddress (depositAddress, currency = undefined) { + // + // { + // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // destTag: "", + // tagType: "", + // tagId: "", + // chainName: "ERC20", + // numConfirmations: 20, + // withdrawalFee: 1, + // nativeScale: 4, + // tips: [] + // } + // + const address = this.safeString (depositAddress, 'address'); + const tagId = this.safeString (depositAddress, 'tagId'); + const tag = this.safeString (depositAddress, tagId); + this.checkAddress (address); + const code = (currency === undefined) ? undefined : currency['code']; + return { + 'currency': code, + 'address': address, + 'tag': tag, + 'info': depositAddress, + }; + } + + async fetchDepositAddress (code, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const chainName = this.safeString (params, 'chainName'); + params = this.omit (params, 'chainName'); + const request = { + 'asset': currency['id'], + }; + const response = await this.privateGetWalletDepositAddress (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "asset":"USDT", + // "assetName":"Tether", + // "address":[ + // { + // "address":"1N22odLHXnLPCjC8kwBJPTayarr9RtPod6", + // "destTag":"", + // "tagType":"", + // "tagId":"", + // "chainName":"Omni", + // "numConfirmations":3, + // "withdrawalFee":4.7, + // "nativeScale":4, + // "tips":[] + // }, + // { + // "address":"0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // "destTag":"", + // "tagType":"", + // "tagId":"", + // "chainName":"ERC20", + // "numConfirmations":20, + // "withdrawalFee":1.0, + // "nativeScale":4, + // "tips":[] + // } + // ] + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const addresses = this.safeValue (data, 'address', []); + const numAddresses = addresses.length; + let address = undefined; + if (numAddresses > 1) { + const addressesByChainName = this.indexBy (addresses, 'chainName'); + if (chainName === undefined) { + const chainNames = Object.keys (addressesByChainName); + const chains = chainNames.join (', '); + throw new ArgumentsRequired (this.id + ' fetchDepositAddress returned more than one address, a chainName parameter is required, one of ' + chains); + } + address = this.safeValue (addressesByChainName, chainName, {}); + } else { + // first address + address = this.safeValue (addresses, 0, {}); + } + const result = this.parseDepositAddress (address, currency); + return this.extend (result, { + 'info': response, + }); + } + + async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'txType': 'deposit', + }; + return await this.fetchTransactions (code, since, limit, this.extend (request, params)); + } + + async fetchWithdrawals (code = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'txType': 'withdrawal', + }; + return await this.fetchTransactions (code, since, limit, this.extend (request, params)); + } + + async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'asset': currency['id'], + // 'page': 1, + // 'pageSize': 20, + // 'startTs': this.milliseconds (), + // 'endTs': this.milliseconds (), + // 'txType': undefned, // deposit, withdrawal + }; + let currency = undefined; + if (code !== undefined) { + currency = this.currency (code); + request['asset'] = currency['id']; + } + if (since !== undefined) { + request['startTs'] = since; + } + if (limit !== undefined) { + request['pageSize'] = limit; + } + const response = await this.privateGetWalletTransactions (this.extend (request, params)); + // + // { + // code: 0, + // data: { + // data: [ + // { + // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", + // time: 1591606166000, + // asset: "USDT", + // transactionType: "deposit", + // amount: "25", + // commission: "0", + // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", + // status: "pending", + // numConfirmed: 8, + // numConfirmations: 20, + // destAddress: { address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722" } + // } + // ], + // page: 1, + // pageSize: 20, + // hasNext: false + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const transactions = this.safeValue (data, 'data', []); + return this.parseTransactions (transactions, currency, since, limit); + } + + parseTransactionStatus (status) { + const statuses = { + 'reviewing': 'pending', + 'pending': 'pending', + 'confirmed': 'ok', + 'rejected': 'rejected', + }; + return this.safeString (statuses, status, status); + } + + parseTransaction (transaction, currency = undefined) { + // + // { + // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", + // time: 1591606166000, + // asset: "USDT", + // transactionType: "deposit", + // amount: "25", + // commission: "0", + // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", + // status: "pending", + // numConfirmed: 8, + // numConfirmations: 20, + // destAddress: { + // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // destTag: "..." // for currencies that have it + // } + // } + // + const id = this.safeString (transaction, 'requestId'); + const amount = this.safeNumber (transaction, 'amount'); + const destAddress = this.safeValue (transaction, 'destAddress', {}); + const address = this.safeString (destAddress, 'address'); + const tag = this.safeString (destAddress, 'destTag'); + const txid = this.safeString (transaction, 'networkTransactionId'); + const type = this.safeString (transaction, 'transactionType'); + const timestamp = this.safeInteger (transaction, 'time'); + const currencyId = this.safeString (transaction, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); + const feeCost = this.safeNumber (transaction, 'commission'); + return { + 'info': transaction, + 'id': id, + 'currency': code, + 'amount': amount, + 'address': address, + 'addressTo': address, + 'addressFrom': undefined, + 'tag': tag, + 'tagTo': tag, + 'tagFrom': undefined, + 'status': status, + 'type': type, + 'updated': undefined, + 'txid': txid, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'fee': { + 'currency': code, + 'cost': feeCost, + }, + }; + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let url = ''; + let query = params; + const accountCategory = (api === 'accountCategory'); + if (accountCategory || (api === 'accountGroup')) { + url += this.implodeParams ('/{account-group}', params); + query = this.omit (params, 'account-group'); + } + const request = this.implodeParams (path, query); + url += '/api/pro/' + this.version; + if (accountCategory) { + url += this.implodeParams ('/{account-category}', query); + query = this.omit (query, 'account-category'); + } + url += '/' + request; + query = this.omit (query, this.extractParams (path)); + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const timestamp = this.milliseconds ().toString (); + const payload = timestamp + '+' + request; + const hmac = this.hmac (this.encode (payload), this.encode (this.secret), 'sha256', 'base64'); + headers = { + 'x-auth-key': this.apiKey, + 'x-auth-timestamp': timestamp, + 'x-auth-signature': hmac, + }; + if (method === 'GET') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + headers['Content-Type'] = 'application/json'; + body = this.json (query); + } + } + url = this.urls['api'] + url; + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; // fallback to default error handler + } + // + // {'code': 6010, 'message': 'Not enough balance.'} + // {'code': 60060, 'message': 'The order is already filled or canceled.'} + // {"code":2100,"message":"ApiKeyFailure"} + // {"code":300001,"message":"Price is too low from market price.","reason":"INVALID_PRICE","accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda","ac":"CASH","action":"place-order","status":"Err","info":{"symbol":"BTC/USDT"}} + // + const code = this.safeString (response, 'code'); + const message = this.safeString (response, 'message'); + const error = (code !== undefined) && (code !== '0'); + if (error || (message !== undefined)) { + const feedback = this.id + ' ' + body; + this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); + this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); + this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); + throw new ExchangeError (feedback); // unknown message + } + } +}; + +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],6:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -3608,6 +4837,7 @@ const { // eslint-disable-line object-curly-newline const { TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING } = functions.precisionConstants const BN = require ('../static_dependencies/BN/bn') +const Precise = require ('./Precise') // ---------------------------------------------------------------------------- @@ -3788,6 +5018,11 @@ module.exports = class Exchange { this.minFundingAddressLength = 1 // used in checkAddress this.substituteCommonCurrencyCodes = true // reserved + this.quoteJsonNumbers = true // treat numbers in json as quoted precise strings + this.number = Number // or String (a pointer to a function) + + // whether fees should be summed by currency code + this.reduceFees = true // do not delete this line, it is needed for users to be able to define their own fetchImplementation this.fetchImplementation = defaultFetch @@ -4083,7 +5318,7 @@ module.exports = class Exchange { parseJson (jsonString) { try { if (this.isJsonEncodedObject (jsonString)) { - return JSON.parse (jsonString) + return JSON.parse (this.onJsonResponse (jsonString)) } } catch (e) { // SyntaxError @@ -4162,7 +5397,11 @@ module.exports = class Exchange { } onRestResponse (statusCode, statusText, url, method, responseHeaders, responseBody, requestHeaders, requestBody) { - return responseBody.trim ().replace (/:(\d{15,}),/g, ':"$1",'); + return responseBody.trim () + } + + onJsonResponse (responseBody) { + return this.quoteJsonNumbers ? responseBody.replace (/":([+.0-9eE-]+),/g, '":"$1",') : responseBody; } setMarkets (markets, currencies = undefined) { @@ -4482,8 +5721,8 @@ module.exports = class Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = parseFloat (bidask[priceKey]) - const amount = parseFloat (bidask[amountKey]) + const price = this.safeNumber (bidask, priceKey) + const amount = this.safeNumber (bidask, amountKey) return [ price, amount ] } @@ -4509,7 +5748,7 @@ module.exports = class Exchange { } } - parseBalance (balance) { + parseBalance (balance, legacy = true) { const codes = Object.keys (this.omit (balance, [ 'info', 'free', 'used', 'total' ])); @@ -4521,20 +5760,34 @@ module.exports = class Exchange { const code = codes[i] if (balance[code].total === undefined) { if (balance[code].free !== undefined && balance[code].used !== undefined) { - balance[code].total = this.sum (balance[code].free, balance[code].used) + if (legacy) { + balance[code].total = this.sum (balance[code].free, balance[code].used) + } else { + balance[code].total = Precise.stringAdd (balance[code].free, balance[code].used) + } } } if (balance[code].free === undefined) { if (balance[code].total !== undefined && balance[code].used !== undefined) { - balance[code].free = this.sum (balance[code].total, -balance[code].used) + if (legacy) { + balance[code].free = this.sum (balance[code].total, -balance[code].used) + } else { + balance[code].free = Precise.stringSub (balance[code].total, balance[code].used) + } } } if (balance[code].used === undefined) { if (balance[code].total !== undefined && balance[code].free !== undefined) { - balance[code].used = this.sum (balance[code].total, -balance[code].free) + if (legacy) { + balance[code].used = this.sum (balance[code].total, -balance[code].free) + } else { + balance[code].used = Precise.stringSub (balance[code].total, balance[code].free) + } } } - + balance[code].free = this.parseNumber (balance[code].free) + balance[code].used = this.parseNumber (balance[code].used) + balance[code].total = this.parseNumber (balance[code].total) balance.free[code] = balance[code].free balance.used[code] = balance[code].used balance.total[code] = balance[code].total @@ -4543,6 +5796,10 @@ module.exports = class Exchange { return balance } + async fetchBalance (params = {}) { + throw new NotSupported (this.id + ' fetchBalance not supported yet') + } + async fetchPartialBalance (part, params = {}) { const balance = await this.fetchBalance (params) return balance[part] @@ -4652,11 +5909,27 @@ module.exports = class Exchange { return indexed ? indexBy (result, key) : result } + parseTickers (tickers, symbols = undefined) { + const result = []; + for (let i = 0; i < tickers.length; i++) { + result.push (this.parseTicker (tickers[i])); + } + return this.filterByArray (result, 'symbol', symbols); + } + + parseDepositAddresses (addresses, codes = undefined) { + let result = []; + for (let i = 0; i < addresses.length; i++) { + const address = this.parseDepositAddress (addresses[i]); + result.push (address); + } + if (codes) { + result = this.filterByArray (result, 'currency', codes); + } + return this.indexBy (result, 'currency'); + } + parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (trades)) { - // throw new ExchangeError (this.id + ' parseTrades expected an array in the trades argument, but got ' + typeof trades); - // } let result = Object.values (trades || []).map ((trade) => this.extend (this.parseTrade (trade, market), params)) result = sortBy (result, 'timestamp') const symbol = (market !== undefined) ? market['symbol'] : undefined @@ -4665,10 +5938,6 @@ module.exports = class Exchange { } parseTransactions (transactions, currency = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (transactions)) { - // throw new ExchangeError (this.id + ' parseTransactions expected an array in the transactions argument, but got ' + typeof transactions); - // } let result = Object.values (transactions || []).map ((transaction) => this.extend (this.parseTransaction (transaction, currency), params)) result = this.sortBy (result, 'timestamp'); const code = (currency !== undefined) ? currency['code'] : undefined; @@ -4676,6 +5945,14 @@ module.exports = class Exchange { return this.filterByCurrencySinceLimit (result, code, since, limit, tail); } + parseTransfers (transfers, currency = undefined, since = undefined, limit = undefined, params = {}) { + let result = Object.values (transfers || []).map ((transfer) => this.extend (this.parseTransfer (transfer, currency), params)) + result = this.sortBy (result, 'timestamp'); + const code = (currency !== undefined) ? currency['code'] : undefined; + const tail = since === undefined; + return this.filterByCurrencySinceLimit (result, code, since, limit, tail); + } + parseLedger (data, currency = undefined, since = undefined, limit = undefined, params = {}) { let result = []; const array = Object.values (data || []); @@ -4820,19 +6097,19 @@ module.exports = class Exchange { return this.createOrder (symbol, ...args) } - createLimitOrder (symbol, side, amount, price = undefined, params = {}) { + createLimitOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'limit', side, amount, price, params) } - createMarketOrder (symbol, side, amount, price = undefined, params = {}) { + createMarketOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'market', side, amount, price, params) } - createLimitBuyOrder (symbol, amount, price = undefined, params = {}) { + createLimitBuyOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'buy', amount, price, params) } - createLimitSellOrder (symbol, amount, price = undefined, params = {}) { + createLimitSellOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'sell', amount, price, params) } @@ -4865,15 +6142,43 @@ module.exports = class Exchange { } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol] - const rate = market[takerOrMaker] - const cost = parseFloat (this.costToPrecision (symbol, amount * price)) + const market = this.markets[symbol]; + const feeSide = this.safeString (market, 'feeSide', 'quote'); + let key = 'quote'; + let cost = undefined; + if (feeSide === 'quote') { + // the fee is always in quote currency + cost = amount * price; + } else if (feeSide === 'base') { + // the fee is always in base currency + cost = amount; + } else if (feeSide === 'get') { + // the fee is always in the currency you get + cost = amount; + if (side === 'sell') { + cost *= price; + } else { + key = 'base'; + } + } else if (feeSide === 'give') { + // the fee is always in the currency you give + cost = amount; + if (side === 'buy') { + cost *= price; + } else { + key = 'base'; + } + } + const rate = market[takerOrMaker]; + if (cost !== undefined) { + cost *= rate; + } return { 'type': takerOrMaker, - 'currency': market['quote'], + 'currency': market[key], 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, rate * cost)), - } + 'cost': cost, + }; } checkRequiredDependencies () { @@ -4957,6 +6262,25 @@ module.exports = class Exchange { return new BN (a).pow (new BN (b)) } + reduceFeesByCurrency (fees) { + const reduced = {}; + for (let i = 0; i < fees.length; i++) { + const fee = fees[i]; + const feeCurrencyCode = this.safeValue (fee, 'currency'); + if (feeCurrencyCode !== undefined) { + if (feeCurrencyCode in reduced) { + reduced[feeCurrencyCode]['cost'] = this.sum (reduced[feeCurrencyCode]['cost'], fee['cost']); + } else { + reduced[feeCurrencyCode] = { + 'cost': fee['cost'], + 'currency': feeCurrencyCode, + }; + } + } + } + return Object.values (reduced); + } + safeOrder (order) { // Cost // Remaining @@ -4965,70 +6289,295 @@ module.exports = class Exchange { // 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']) + // first we try to calculate the order fields from the trades + let amount = this.safeValue (order, 'amount'); + let remaining = this.safeValue (order, 'remaining'); + let filled = this.safeValue (order, 'filled'); + let cost = this.safeValue (order, 'cost'); + let average = this.safeValue (order, 'average'); + let price = this.safeValue (order, 'price'); + let lastTradeTimeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); + const parseFilled = (filled === undefined); + const parseCost = (cost === undefined); + const parseLastTradeTimeTimestamp = (lastTradeTimeTimestamp === undefined); + const parseFee = this.safeValue (order, 'fee') === undefined; + const parseFees = this.safeValue (order, 'fees') === undefined; + const shouldParseFees = parseFee || parseFees; + const fees = shouldParseFees ? [] : undefined; + if (parseFilled || parseCost || shouldParseFees) { + const trades = this.safeValue (order, 'trades'); + if (trades !== undefined) { + if (parseFilled) { + filled = 0; + } + if (parseCost) { + cost = 0; + } + for (let i = 0; i < trades.length; i++) { + const trade = trades[i]; + const tradeAmount = this.safeValue (trade, 'amount'); + if (parseFilled && (tradeAmount !== undefined)) { + filled = this.sum (filled, tradeAmount); } - if (parseCost) { - order['cost'] = this.sum (order['cost'], trade['cost']) + const tradeCost = this.safeValue (trade, 'cost'); + if (parseCost && (tradeCost !== undefined)) { + cost = this.sum (cost, tradeCost); + } + const tradeTimestamp = this.safeValue (trade, 'timestamp'); + if (parseLastTradeTimeTimestamp && (tradeTimestamp !== undefined)) { + if (lastTradeTimeTimestamp === undefined) { + lastTradeTimeTimestamp = tradeTimestamp; + } else { + lastTradeTimeTimestamp = Math.max (lastTradeTimeTimestamp, tradeTimestamp); + } + } + if (shouldParseFees) { + const tradeFees = this.safeValue (trade, 'fees'); + if (tradeFees !== undefined) { + for (let j = 0; j < tradeFees.length; j++) { + const tradeFee = tradeFees[j]; + fees.push (this.extend ({}, tradeFee)); + } + } else { + const tradeFee = this.safeValue (trade, 'fee'); + if (tradeFee !== undefined) { + fees.push (this.extend ({}, tradeFee)); + } + } } } } } - // 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 (shouldParseFees) { + const reducedFees = this.reduceFees ? this.reduceFeesByCurrency (fees) : fees; + const reducedLength = reducedFees.length; + if (!parseFee && (reducedLength === 0)) { + reducedFees.push (order['fee']); + } + if (parseFees) { + order['fees'] = reducedFees; + } + if (parseFee && (reducedLength === 1)) { + order['fee'] = reducedFees[0]; } } - if (order['filled'] === undefined) { - if (order['amount'] !== undefined && order['remaining'] !== undefined) { - order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0) + if (amount === undefined) { + // ensure amount = filled + remaining + if (filled !== undefined && remaining !== undefined) { + amount = this.sum (filled, remaining); + } else if (this.safeString (order, 'status') === 'closed') { + amount = filled; } } - if (order['remaining'] === undefined) { - if (order['amount'] !== undefined && order['filled'] !== undefined) { - order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0) + if (filled === undefined) { + if (amount !== undefined && remaining !== undefined) { + filled = Math.max (this.sum (amount, -remaining), 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'] + if (remaining === undefined) { + if (amount !== undefined && filled !== undefined) { + remaining = Math.max (this.sum (amount, -filled), 0); } } - // 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'] + // ensure that the average field is calculated correctly + if (average === undefined) { + if ((filled !== undefined) && (cost !== undefined) && (cost > 0)) { + average = cost / filled; } - order['cost'] = costPrice * order['filled'] } - // We add support for market orders - if (order['price'] === undefined && order['type'] === 'market') { - order['price'] = order['average'] + // also ensure the cost field is calculated correctly + const costPriceExists = (average !== undefined) || (price !== undefined); + if (parseCost && (filled !== undefined) && costPriceExists) { + cost = (average === undefined) ? (price * filled) : (average * filled); } - return order + // support for market orders + const orderType = this.safeValue (order, 'type'); + const emptyPrice = (price === undefined) || (price === 0.0); + if (emptyPrice && (orderType === 'market')) { + price = average; + } + return this.extend (order, { + 'lastTradeTimestamp': lastTradeTimeTimestamp, + 'price': price, + 'amount': amount, + 'cost': cost, + 'average': average, + 'filled': filled, + 'remaining': remaining, + }); + } + + parseNumber (value, d = undefined) { + if (value === undefined) { + return d + } else { + try { + return this.number (value) + } catch (e) { + return d + } + } + } + + safeNumber (object, key, d = undefined) { + const value = this.safeString (object, key) + return this.parseNumber (value, d) + } + + safeNumber2 (object, key1, key2, d = undefined) { + const value = this.safeString2 (object, key1, key2) + return this.parseNumber (value, d) } } -},{"../static_dependencies/BN/bn":126,"./errors":8,"./functions":9}],7:[function(require,module,exports){ +},{"../static_dependencies/BN/bn":123,"./Precise":7,"./errors":9,"./functions":10}],7:[function(require,module,exports){ +'use strict' + +const BN = require ('../static_dependencies/BN/bn') + +class Precise { + constructor (number, decimals = 0) { + const isBN = number instanceof BN + const isString = typeof number === 'string' + if (!(isBN || isString)) { + throw new Error ('Precise initiated with something other than a string or BN') + } + if (isBN) { + this.integer = number + this.decimals = decimals + } else { + if (decimals) { + throw new Error ('Cannot set decimals when initializing with a string') + } + let modifier = 0 + number = number.toLowerCase () + if (number.indexOf ('e') > -1) { + [ number, modifier ] = number.split ('e') + modifier = parseInt (modifier) + } + const decimalIndex = number.indexOf ('.') + this.decimals = (decimalIndex > -1) ? number.length - decimalIndex - 1 : 0 + const integerString = number.replace ('.', '') + this.integer = new BN (integerString) + this.decimals = this.decimals - modifier + } + this.base = 10 + this.reduce () + } + + mul (other) { + // other must be another instance of Precise + const integerResult = this.integer.mul (other.integer) + return new Precise (integerResult, this.decimals + other.decimals) + } + + div (other, precision = 18) { + const distance = precision - this.decimals + other.decimals + let numerator + if (distance === 0) { + numerator = this.integer + } else if (distance < 0) { + const exponent = new BN (this.base).pow (new BN (-distance)) + numerator = this.integer.div (exponent) + } else { + const exponent = new BN (this.base).pow (new BN (distance)) + numerator = this.integer.mul (exponent) + } + const result = numerator.div (other.integer) + return new Precise (result, precision) + } + + add (other) { + if (this.decimals === other.decimals) { + const integerResult = this.integer.add (other.integer) + return new Precise (integerResult, this.decimals) + } else { + const [ smaller, bigger ] = + (this.decimals > other.decimals) ? [ other, this ] : [ this, other ] + const exponent = new BN (bigger.decimals - smaller.decimals) + const normalised = smaller.integer.mul (new BN (this.base).pow (exponent)) + const result = normalised.add (bigger.integer) + return new Precise (result, bigger.decimals) + } + } + + sub (other) { + const negative = new Precise (other.integer.neg (), other.decimals) + return this.add (negative) + } + + reduce () { + const zero = new BN (0) + if (this.integer.eq (zero)) { + this.decimals = 0 + return this + } + const base = new BN (this.base) + let divmod = this.integer.divmod (base) + while (divmod.mod.eq (zero)) { + this.integer = divmod.div + this.decimals-- + divmod = this.integer.divmod (base) + } + return this + } + + toString () { + const sign = this.integer.negative ? '-' : '' + const integerArray = Array.from (this.integer.abs ().toString (this.base).padStart (this.decimals, '0')) + const index = integerArray.length - this.decimals + let item + if (index === 0) { + // if we are adding to the front + item = '0.' + } else if (this.decimals < 0) { + item = '0'.repeat (-this.decimals) + } else if (this.decimals === 0) { + item = '' + } else { + item = '.' + } + integerArray.splice (index, 0, item) + return sign + integerArray.join ('') + } + + static stringMul (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).mul (new Precise (string2)).toString () + } + + static stringDiv (string1, string2, precision = 18) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).div (new Precise (string2), precision).toString () + } + + static stringAdd (string1, string2) { + if ((string1 === undefined) && (string2 === undefined)) { + return undefined + } + if (string1 === undefined) { + return string2 + } else if (string2 === undefined) { + return string1 + } + return (new Precise (string1)).add (new Precise (string2)).toString () + } + + static stringSub (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).sub (new Precise (string2)).toString () + } +} + +module.exports = Precise; + +},{"../static_dependencies/BN/bn":123}],8:[function(require,module,exports){ 'use strict'; const errorHierarchy = { @@ -5074,7 +6623,7 @@ const errorHierarchy = { module.exports = errorHierarchy; -},{}],8:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ 'use strict'; const errorHierarchy = require ('./errorHierarchy.js') @@ -5131,7 +6680,7 @@ module.exports = subclass ( errorHierarchy ) -},{"./errorHierarchy.js":7}],9:[function(require,module,exports){ +},{"./errorHierarchy.js":8}],10:[function(require,module,exports){ 'use strict'; /* ------------------------------------------------------------------------ */ @@ -5161,7 +6710,7 @@ module.exports = unCamelCasePropertyNames (Object.assign ({} /* ------------------------------------------------------------------------ */ -},{"./functions/crypto":10,"./functions/encode":11,"./functions/generic":12,"./functions/misc":13,"./functions/number":14,"./functions/platform":15,"./functions/string":16,"./functions/throttle":17,"./functions/time":18,"./functions/type":19}],10:[function(require,module,exports){ +},{"./functions/crypto":11,"./functions/encode":12,"./functions/generic":13,"./functions/misc":14,"./functions/number":15,"./functions/platform":16,"./functions/string":17,"./functions/throttle":18,"./functions/time":19,"./functions/type":20}],11:[function(require,module,exports){ 'use strict' /* ------------------------------------------------------------------------ */ @@ -5321,7 +6870,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"../../static_dependencies/BN/bn.js":126,"../../static_dependencies/crypto-js/crypto-js":127,"./../../static_dependencies/elliptic/lib/elliptic":128,"./../../static_dependencies/node-rsa/NodeRSA":146,"./../errors":8,"./encode":11,"./string":16}],11:[function(require,module,exports){ +},{"../../static_dependencies/BN/bn.js":123,"../../static_dependencies/crypto-js/crypto-js":124,"./../../static_dependencies/elliptic/lib/elliptic":125,"./../../static_dependencies/node-rsa/NodeRSA":143,"./../errors":9,"./encode":12,"./string":17}],12:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -5343,7 +6892,6 @@ let base58Encoder = null module.exports = { json: (data, params = undefined) => JSON.stringify (data) - , unjson: JSON.parse , isJsonEncodedObject: object => ( (typeof object === 'string') && @@ -5441,7 +6989,7 @@ module.exports['byteArrayToWordArray'] = byteArrayToWordArray /* ------------------------------------------------------------------------ */ -},{"../../static_dependencies/BN/bn":126,"../../static_dependencies/crypto-js/crypto-js":127,"../../static_dependencies/qs/index":162}],12:[function(require,module,exports){ +},{"../../static_dependencies/BN/bn":123,"../../static_dependencies/crypto-js/crypto-js":124,"../../static_dependencies/qs/index":159}],13:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -5679,7 +7227,7 @@ module.exports = { } -},{"./type":19}],13:[function(require,module,exports){ +},{"./type":20}],14:[function(require,module,exports){ 'use strict'; const { ROUND_UP, ROUND_DOWN } = require ('./number') @@ -5819,7 +7367,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"../errors":8,"./number":14}],14:[function(require,module,exports){ +},{"../errors":9,"./number":15}],15:[function(require,module,exports){ 'use strict' /* ------------------------------------------------------------------------ @@ -6160,7 +7708,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{}],15:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ (function (process){ "use strict"; @@ -6201,7 +7749,7 @@ module.exports = { defaultFetch, } }).call(this,require('_process')) -},{"../../static_dependencies/fetch-ponyfill/fetch-node":144,"_process":210}],16:[function(require,module,exports){ +},{"../../static_dependencies/fetch-ponyfill/fetch-node":141,"_process":206}],17:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -6221,7 +7769,7 @@ module.exports = { , strip: s => s.replace(/^\s+|\s+$/g, '') } -},{}],17:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -6287,7 +7835,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"./time":18}],18:[function(require,module,exports){ +},{"./time":19}],19:[function(require,module,exports){ 'use strict'; /* ------------------------------------------------------------------------ */ @@ -6491,7 +8039,7 @@ module.exports = /* ------------------------------------------------------------------------ */ -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -6559,7 +8107,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{}],20:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -6593,13 +8141,14 @@ module.exports = class bequant extends hitbtc { } }; -},{"./hitbtc":93}],21:[function(require,module,exports){ +},{"./hitbtc":91}],22:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AccountSuspended, ArgumentsRequired, AuthenticationError, DDoSProtection, ExchangeNotAvailable, InvalidOrder, OrderNotFound, PermissionDenied, InsufficientFunds, BadSymbol, RateLimitExceeded, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -6825,9 +8374,9 @@ module.exports = class bibox extends Exchange { const quote = this.safeCurrencyCode (quoteId); symbol = base + '/' + quote; } - const last = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); - const baseVolume = this.safeFloat2 (ticker, 'vol', 'vol24H'); + const last = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); + const baseVolume = this.safeNumber2 (ticker, 'vol', 'vol24H'); let open = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; @@ -6841,11 +8390,11 @@ module.exports = class bibox extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -6856,7 +8405,7 @@ module.exports = class bibox extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': baseVolume, - 'quoteVolume': this.safeFloat (ticker, 'amount'), + 'quoteVolume': this.safeNumber (ticker, 'amount'), 'info': ticker, }; } @@ -6872,17 +8421,6 @@ module.exports = class bibox extends Exchange { return this.parseTicker (response['result'], market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - const ticker = this.parseTicker (rawTickers[i]); - if ((symbols === undefined) || (this.inArray (ticker['symbol'], symbols))) { - tickers.push (ticker); - } - } - return tickers; - } - async fetchTickers (symbols = undefined, params = {}) { const request = { 'cmd': 'marketAll', @@ -6915,7 +8453,7 @@ module.exports = class bibox extends Exchange { symbol = market['symbol']; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = this.safeString (trade, 'fee_symbol'); if (feeCurrency !== undefined) { if (feeCurrency in this.currencies_by_id) { @@ -6925,12 +8463,11 @@ module.exports = class bibox extends Exchange { } } const feeRate = undefined; // todo: deduce from market if market is defined - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if (feeCost !== undefined) { fee = { 'cost': -feeCost, @@ -6981,7 +8518,7 @@ module.exports = class bibox extends Exchange { request['size'] = limit; // default = 200 } const response = await this.publicGetMdata (this.extend (request, params)); - return this.parseOrderBook (response['result'], this.safeFloat (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); + return this.parseOrderBook (response['result'], this.safeNumber (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); } parseOHLCV (ohlcv, market = undefined) { @@ -6997,11 +8534,11 @@ module.exports = class bibox extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -7093,7 +8630,7 @@ module.exports = class bibox extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw_min'), + 'min': this.safeNumber (currency, 'withdraw_min'), 'max': undefined, }, }, @@ -7225,19 +8762,17 @@ module.exports = class bibox extends Exchange { code = this.currencies_by_id[code]['code']; } const account = this.account (); - let balance = indexed[id]; + const balance = indexed[id]; if (typeof balance === 'string') { - balance = parseFloat (balance); account['free'] = balance; - account['used'] = 0.0; account['total'] = balance; } else { - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -7328,8 +8863,8 @@ module.exports = class bibox extends Exchange { let tag = this.safeString (transaction, 'addr_remark'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'fee'); if (type === 'deposit') { feeCost = 0; tag = undefined; @@ -7437,26 +8972,19 @@ module.exports = class bibox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const type = (order['order_type'] === 1) ? 'market' : 'limit'; - const timestamp = order['createdAt']; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'deal_price'); - const filled = this.safeFloat (order, 'deal_amount'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat2 (order, 'deal_money', 'money'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - cost = price * filled; - } - } - const side = (order['order_side'] === 1) ? 'buy' : 'sell'; + const rawType = this.safeString (order, 'order_type'); + const type = (rawType === '1') ? 'market' : 'limit'; + const timestamp = this.safeInteger (order, 'createdAt'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'deal_price'); + const filled = this.safeNumber (order, 'deal_amount'); + const amount = this.safeNumber (order, 'amount'); + const cost = this.safeNumber2 (order, 'deal_money', 'money'); + const rawSide = this.safeString (order, 'order_side'); + const side = (rawSide === '1') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -7464,8 +8992,7 @@ module.exports = class bibox extends Exchange { 'currency': undefined, }; } - cost = cost ? cost : (parseFloat (price) * filled); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -7483,11 +9010,11 @@ module.exports = class bibox extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -7655,7 +9182,7 @@ module.exports = class bibox extends Exchange { }; const response = await this.privatePostTransfer (request); info[code] = response; - withdrawFees[code] = this.safeFloat (response['result'], 'withdraw_fee'); + withdrawFees[code] = this.safeNumber (response['result'], 'withdraw_fee'); } return { 'info': info, @@ -7725,13 +9252,14 @@ module.exports = class bibox extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],22:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],23:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, OrderNotFound, InsufficientFunds, PermissionDenied, BadRequest, RateLimitExceeded, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -7988,28 +9516,28 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (ticker, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = undefined; - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', {}); const ask = this.safeValue (ticker, 'ask', {}); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 'price'), - 'bidVolume': this.safeFloat (bid, 'quantity'), - 'ask': this.safeFloat (ask, 'price'), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 'price'), + 'bidVolume': this.safeNumber (bid, 'quantity'), + 'ask': this.safeNumber (ask, 'price'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, 'last': close, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'daily_change'), + 'change': this.safeNumber (ticker, 'daily_change'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -8174,16 +9702,13 @@ module.exports = class bigone extends Exchange { // } // const timestamp = this.parse8601 (this.safeString2 (trade, 'created_at', 'inserted_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } let side = this.safeString (trade, 'side'); const takerSide = this.safeString (trade, 'taker_side'); let takerOrMaker = undefined; @@ -8257,8 +9782,8 @@ module.exports = class bigone extends Exchange { takerCurrencyCode = market['quote']; } } - const makerFeeCost = this.safeFloat (trade, 'maker_fee'); - const takerFeeCost = this.safeFloat (trade, 'taker_fee'); + const makerFeeCost = this.safeNumber (trade, 'maker_fee'); + const takerFeeCost = this.safeNumber (trade, 'taker_fee'); if (makerFeeCost !== undefined) { if (takerFeeCost !== undefined) { result['fees'] = [ @@ -8321,11 +9846,11 @@ module.exports = class bigone extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -8396,11 +9921,11 @@ module.exports = class bigone extends Exchange { const symbol = this.safeString (balance, 'asset_symbol'); const code = this.safeCurrencyCode (symbol); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -8422,13 +9947,9 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (order, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (amount !== undefined && filled !== undefined) { - remaining = Math.max (0, amount - filled); - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); const status = this.parseOrderStatus (this.safeString (order, 'state')); let side = this.safeString (order, 'side'); if (side === 'BID') { @@ -8436,15 +9957,9 @@ module.exports = class bigone extends Exchange { } else { side = 'sell'; } - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'updated_at')); - const average = this.safeFloat (order, 'avg_deal_price'); - return { + const average = this.safeNumber (order, 'avg_deal_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -8459,14 +9974,14 @@ module.exports = class bigone extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -8490,7 +10005,7 @@ module.exports = class bigone extends Exchange { const isStopLimit = (uppercaseType === 'STOP_LIMIT'); const isStopMarket = (uppercaseType === 'STOP_MARKET'); if (isStopLimit || isStopMarket) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price parameter'); } @@ -8829,7 +10344,7 @@ module.exports = class bigone extends Exchange { const currencyId = this.safeString (transaction, 'asset_symbol'); const code = this.safeCurrencyCode (currencyId); const id = this.safeInteger (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const timestamp = this.parse8601 (this.safeString (transaction, 'inserted_at')); const updated = this.parse8601 (this.safeString2 (transaction, 'updated_at', 'completed_at')); @@ -9000,14 +10515,15 @@ module.exports = class bigone extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],23:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],24:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, RateLimitExceeded, PermissionDenied, NotSupported, BadRequest, BadSymbol, AccountSuspended, OrderImmediatelyFillable } = require ('./base/errors'); -const { ROUND, TRUNCATE } = require ('./base/functions/number'); +const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -9050,6 +10566,8 @@ module.exports = class binance extends Exchange { 'fetchTransactions': false, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, + 'fetchTransfers': true, }, 'timeframes': { '1m': '1m', @@ -9198,6 +10716,26 @@ module.exports = class binance extends Exchange { 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/recentRecord', 'apiReferral/kickback/historicalRecord', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccount', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/info', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/recentRecord', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/status', + 'broker/subAccount/depositHist', + 'broker/subAccount/spotSummary', + 'broker/subAccount/marginSummary', + 'broker/subAccount/futuresSummary', + 'broker/rebate/futures/recentRecord', + 'broker/subAccountApi/ipRestriction', + 'broker/universalTransfer', + // v2 not supported yet + // GET /sapi/v2/broker/subAccount/futuresSummary ], 'post': [ 'asset/dust', @@ -9237,11 +10775,30 @@ module.exports = class binance extends Exchange { // leveraged token endpoints 'blvt/subscribe', 'blvt/redeem', - // broker api + // brokerage API 'apiReferral/customization', 'apiReferral/userCustomization', 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/historicalRecord', + 'broker/subAccount', + 'broker/subAccount/margin', + 'broker/subAccount/futures', + 'broker/subAccountApi', + 'broker/subAccountApi/permission', + 'broker/subAccountApi/commission', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/spot', + 'broker/subAccount/bnbBurn/marginInterest', + 'broker/subAccount/blvt', + 'broker/subAccountApi/ipRestriction', + 'broker/subAccountApi/ipRestriction/ipList', + 'broker/universalTransfer', + 'broker/subAccountApi/permission/universalTransfer', + 'broker/subAccountApi/permission/vanillaOptions', ], 'put': [ 'userDataStream', @@ -9252,6 +10809,9 @@ module.exports = class binance extends Exchange { 'margin/order', 'userDataStream', 'userDataStream/isolated', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccountApi/ipRestriction/ipList', ], }, 'wapi': { @@ -9388,6 +10948,8 @@ module.exports = class binance extends Exchange { 'positionSide/dual', 'userTrades', 'income', + 'commissionRate', + 'apiTradingStatus', // broker endpoints 'apiReferral/ifNewUser', 'apiReferral/customization', @@ -9477,6 +11039,7 @@ module.exports = class binance extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.001, @@ -9501,7 +11064,7 @@ module.exports = class binance extends Exchange { 'parseOrderToPrecision': false, // force amounts and costs in parseOrder to precision 'newOrderRespType': { 'market': 'FULL', // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills - 'limit': 'RESULT', // we change it from 'ACK' by default to 'RESULT' + 'limit': 'FULL', // we change it from 'ACK' by default to 'FULL' (returns immediately if limit is not hit) }, 'quoteOrderQty': true, // whether market orders support amounts in quote currency 'broker': { @@ -9510,6 +11073,25 @@ module.exports = class binance extends Exchange { 'future': 'x-xcKtGhcu', 'delivery': 'x-xcKtGhcu', }, + 'fetchPositions': { + 'future': 'fapiPrivateV2GetAccount', // 'fapiPrivateGetPositionRisk' + 'delivery': 'dapiPrivateGetAccount', // 'dapiPrivateGetPositionRisk' + }, + 'accountsByType': { + 'main': 'MAIN', + 'spot': 'MAIN', + 'margin': 'MARGIN', + 'future': 'UMFUTURE', + 'delivery': 'CMFUTURE', + 'mining': 'MINING', + }, + 'typesByAccount': { + 'MAIN': 'spot', + 'MARGIN': 'margin', + 'UMFUTURE': 'future', + 'CMFUTURE': 'delivery', + 'MINING': 'mining', + }, }, // https://binance-docs.github.io/apidocs/spot/en/#error-codes-2 'exceptions': { @@ -9567,6 +11149,8 @@ module.exports = class binance extends Exchange { '-3010': ExchangeError, // {"code":-3010,"msg":"Repay not allowed. Repay amount exceeds borrow amount."} '-3022': AccountSuspended, // You account's trading is banned. '-4028': BadRequest, // {"code":-4028,"msg":"Leverage 100 is not valid"} + '-3020': InsufficientFunds, // {"code":-3020,"msg":"Transfer out amount exceeds max amount."} + '-3041': InsufficientFunds, // {"code":-3041,"msg":"Balance is not enough"} '-5013': InsufficientFunds, // Asset transfer failed: insufficient balance" }, }); @@ -9709,13 +11293,14 @@ module.exports = class binance extends Exchange { let fee = undefined; for (let j = 0; j < networkList.length; j++) { const networkItem = networkList[j]; - const name = this.safeString (networkItem, 'name'); - const withdrawFee = this.safeFloat (networkItem, 'withdrawFee'); + const network = this.safeString (networkItem, 'network'); + // const name = this.safeString (networkItem, 'name'); + const withdrawFee = this.safeNumber (networkItem, 'withdrawFee'); const depositEnable = this.safeValue (networkItem, 'depositEnable'); const withdrawEnable = this.safeValue (networkItem, 'withdrawEnable'); isDepositEnabled = isDepositEnabled || depositEnable; isWithdrawEnabled = isWithdrawEnabled || withdrawEnable; - fees[name] = withdrawFee; + fees[network] = withdrawFee; const isDefault = this.safeValue (networkItem, 'isDefault'); if (isDefault || fee === undefined) { fee = withdrawFee; @@ -9901,7 +11486,7 @@ module.exports = class binance extends Exchange { if (this.options['adjustForTimeDifference']) { await this.loadTimeDifference (); } - const markets = this.safeValue (response, 'symbols'); + const markets = this.safeValue (response, 'symbols', []); const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -9966,10 +11551,10 @@ module.exports = class binance extends Exchange { // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } @@ -9980,47 +11565,26 @@ module.exports = class binance extends Exchange { const stepSize = this.safeString (filter, 'stepSize'); entry['precision']['amount'] = this.precisionFromString (stepSize); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat2 (filter, 'minNotional', 'notional'); + entry['limits']['cost']['min'] = this.safeNumber2 (filter, 'minNotional', 'notional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -10191,8 +11755,8 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -10205,13 +11769,13 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['used'] = this.safeFloat (balance, 'initialMargin'); - account['total'] = this.safeFloat2 (balance, 'marginBalance', 'balance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['used'] = this.safeString (balance, 'initialMargin'); + account['total'] = this.safeString2 (balance, 'marginBalance', 'balance'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -10264,36 +11828,36 @@ module.exports = class binance extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'openPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'openPrice'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } async fetchStatus (params = {}) { const response = await this.wapiGetSystemStatus (params); - let status = this.safeValue (response, 'status'); + let status = this.safeString (response, 'status'); if (status !== undefined) { - status = (status === 0) ? 'ok' : 'maintenance'; + status = (status === '0') ? 'ok' : 'maintenance'; this.status = this.extend (this.status, { 'status': status, 'updated': this.milliseconds (), @@ -10322,14 +11886,6 @@ module.exports = class binance extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -10384,11 +11940,11 @@ module.exports = class binance extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -10519,8 +12075,11 @@ module.exports = class binance extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -10538,7 +12097,7 @@ module.exports = class binance extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -10551,10 +12110,6 @@ module.exports = class binance extends Exchange { } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } return { 'info': trade, 'timestamp': timestamp, @@ -10673,7 +12228,7 @@ module.exports = class binance extends Exchange { parseOrder (order, market = undefined) { // - // spot + // spot // // { // "symbol": "LTCBTC", @@ -10694,7 +12249,7 @@ module.exports = class binance extends Exchange { // "isWorking": true // } // - // futures + // futures // // { // "symbol": "BTCUSDT", @@ -10712,6 +12267,33 @@ module.exports = class binance extends Exchange { // "updateTime": 1499827319559 // } // + // createOrder with { "newOrderRespType": "FULL" } + // + // { + // "symbol": "BTCUSDT", + // "orderId": 5403233939, + // "orderListId": -1, + // "clientOrderId": "x-R4BD3S825e669e75b6c14f69a2c43e", + // "transactTime": 1617151923742, + // "price": "0.00000000", + // "origQty": "0.00050000", + // "executedQty": "0.00050000", + // "cummulativeQuoteQty": "29.47081500", + // "status": "FILLED", + // "timeInForce": "GTC", + // "type": "MARKET", + // "side": "BUY", + // "fills": [ + // { + // "price": "58941.63000000", + // "qty": "0.00050000", + // "commission": "0.00007050", + // "commissionAsset": "BNB", + // "tradeId": 737466631 + // } + // ] + // } + // const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -10721,80 +12303,26 @@ module.exports = class binance extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); // - Spot/Margin market: cummulativeQuoteQty // - Futures market: cumQuote. // Note this is not the actual cost, since Binance futures uses leverage to calculate margins. - let cost = this.safeFloat2 (order, 'cummulativeQuoteQty', 'cumQuote'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const cost = this.safeNumber2 (order, 'cummulativeQuoteQty', 'cumQuote'); const id = this.safeString (order, 'orderId'); let type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - if (this.options['parseOrderToPrecision']) { - price = parseFloat (this.priceToPrecision (symbol, price)); - } - } - } - } - } else if (type === 'limit_maker') { + if (type === 'limit_maker') { type = 'limit'; } const side = this.safeStringLower (order, 'side'); - let fee = undefined; - let trades = undefined; - const fills = this.safeValue (order, 'fills'); - if (fills !== undefined) { - trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - if (this.options['parseOrderToPrecision']) { - average = parseFloat (this.priceToPrecision (symbol, average)); - } - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const fills = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (fills, market); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = (type === 'limit_maker') || (timeInForce === 'GTX'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -10810,13 +12338,13 @@ module.exports = class binance extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -10863,8 +12391,11 @@ module.exports = class binance extends Exchange { } else { request['newClientOrderId'] = clientOrderId; } - if (market['spot']) { + if ((orderType === 'spot') || (orderType === 'margin')) { request['newOrderRespType'] = this.safeValue (this.options['newOrderRespType'], type, 'RESULT'); // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills + } else { + // delivery and future + request['newOrderRespType'] = 'RESULT'; // "ACK", "RESULT", default "ACK" } // additional required fields depending on the order type let timeInForceIsRequired = false; @@ -10894,7 +12425,7 @@ module.exports = class binance extends Exchange { if (uppercaseType === 'MARKET') { const quoteOrderQty = this.safeValue (this.options, 'quoteOrderQty', false); if (quoteOrderQty) { - const quoteOrderQty = this.safeFloat (params, 'quoteOrderQty'); + const quoteOrderQty = this.safeNumber (params, 'quoteOrderQty'); const precision = market['precision']['price']; if (quoteOrderQty !== undefined) { request['quoteOrderQty'] = this.decimalToPrecision (quoteOrderQty, TRUNCATE, precision, this.precisionMode); @@ -10914,7 +12445,7 @@ module.exports = class binance extends Exchange { } else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) { stopPriceIsRequired = true; quantityIsRequired = true; - if (market['future']) { + if (market['future'] || market['delivery']) { priceIsRequired = true; } } else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) { @@ -10937,7 +12468,7 @@ module.exports = class binance extends Exchange { stopPriceIsRequired = true; } else if (uppercaseType === 'TRAILING_STOP_MARKET') { quantityIsRequired = true; - const callbackRate = this.safeFloat (params, 'callbackRate'); + const callbackRate = this.safeNumber (params, 'callbackRate'); if (callbackRate === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a callbackRate extra param for a ' + type + ' order'); } @@ -10955,7 +12486,7 @@ module.exports = class binance extends Exchange { request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -11171,10 +12702,15 @@ module.exports = class binance extends Exchange { } } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.fetchBalance (params); - const info = this.safeValue (response, 'info', {}); + const defaultType = this.safeString (this.options, 'defaultType', 'future'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + const options = this.safeValue (this.options, 'fetchPositions', {}); + const defaultMethod = (type === 'delivery') ? 'dapiPrivateGetAccount' : 'fapiPrivateV2GetAccount'; + const method = this.safeString (options, type, defaultMethod); + const response = await this[method] (params); // // futures, delivery // @@ -11217,9 +12753,44 @@ module.exports = class binance extends Exchange { // ] // } // - const positions = this.safeValue2 (info, 'positions', 'userAssets', []); - // todo unify parsePosition/parsePositions - return positions; + // fapiPrivateGetPositionRisk, dapiPrivateGetPositionRisk + // + // [ + // { + // symbol: 'XRPUSD_210625', + // positionAmt: '0', + // entryPrice: '0.00000000', + // markPrice: '0.00000000', + // unRealizedProfit: '0.00000000', + // liquidationPrice: '0', + // leverage: '20', + // maxQty: '500000', + // marginType: 'cross', + // isolatedMargin: '0.00000000', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0', + // isolatedWallet: '0' + // }, + // { + // symbol: 'BTCUSD_210326', + // positionAmt: '1', + // entryPrice: '60665.79999885', + // markPrice: '60696.76856843', + // unRealizedProfit: '0.00000084', + // liquidationPrice: '58034.68208092', + // leverage: '20', + // maxQty: '50', + // marginType: 'isolated', + // isolatedMargin: '0.00008345', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0.00164753', + // isolatedWallet: '0.00008261' + // }, + // ] + // + return this.safeValue (response, 'positions', response); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -11357,7 +12928,7 @@ module.exports = class binance extends Exchange { // const fee = { 'currency': earnedCurrency, - 'cost': this.safeFloat (trade, 'serviceChargeAmount'), + 'cost': this.safeNumber (trade, 'serviceChargeAmount'), }; let symbol = undefined; let amount = undefined; @@ -11365,13 +12936,13 @@ module.exports = class binance extends Exchange { let side = undefined; if (tradedCurrencyIsQuote) { symbol = applicantSymbol; - amount = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); - cost = this.safeFloat (trade, 'amount'); + amount = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); + cost = this.safeNumber (trade, 'amount'); side = 'buy'; } else { symbol = tradedCurrency + '/' + earnedCurrency; - amount = this.safeFloat (trade, 'amount'); - cost = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); + amount = this.safeNumber (trade, 'amount'); + cost = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); side = 'sell'; } let price = undefined; @@ -11544,8 +13115,8 @@ module.exports = class binance extends Exchange { } } const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'transactionFee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'transactionFee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -11572,6 +13143,151 @@ module.exports = class binance extends Exchange { }; } + parseTransferStatus (status) { + const statuses = { + 'CONFIRMED': 'ok', + }; + return this.safeString (statuses, status, status); + } + + parseTransfer (transfer, currency = undefined) { + // + // transfer + // + // { + // "tranId":13526853623 + // } + // + // fetchTransfers + // + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // } + // + const id = this.safeString (transfer, 'tranId'); + const currencyId = this.safeString (transfer, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const amount = this.safeNumber (transfer, 'amount'); + const type = this.safeString (transfer, 'type'); + let fromAccount = undefined; + let toAccount = undefined; + const typesByAccount = this.safeValue (this.options, 'typesByAccount', {}); + if (type !== undefined) { + const parts = type.split ('_'); + fromAccount = this.safeValue (parts, 0); + toAccount = this.safeValue (parts, 1); + fromAccount = this.safeString (typesByAccount, fromAccount, fromAccount); + toAccount = this.safeString (typesByAccount, toAccount, toAccount); + } + const timestamp = this.safeInteger (transfer, 'timestamp'); + const status = this.parseTransferStatus (this.safeString (transfer, 'status')); + return { + 'info': transfer, + 'id': id, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'currency': code, + 'amount': amount, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': status, + }; + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount, fromAccount); + const toId = this.safeString (accountsByType, toAccount, toAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'asset': currency['id'], + 'amount': this.currencyToPrecision (code, amount), + 'type': type, + }; + const response = await this.sapiPostAssetTransfer (this.extend (request, params)); + // + // { + // "tranId":13526853623 + // } + // + const transfer = this.parseTransfer (response, currency); + return this.extend (transfer, { + 'amount': amount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + }); + } + + async fetchTransfers (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const defaultType = this.safeString2 (this.options, 'fetchTransfers', 'defaultType', 'spot'); + const fromAccount = this.safeString (params, 'fromAccount', defaultType); + const defaultTo = (fromAccount === 'future') ? 'spot' : 'future'; + const toAccount = this.safeString (params, 'toAccount', defaultTo); + let type = this.safeString (params, 'type'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + if (type === undefined) { + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount parameter must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount parameter must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'type': type, + }; + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['size'] = limit; + } + const response = await this.sapiGetAssetTransfer (this.extend (request, params)); + // + // { + // total: 3, + // rows: [ + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // }, + // ] + // } + // + const rows = this.safeValue (response, 'rows', []); + return this.parseTransfers (rows, currency, since, limit); + } + async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -11634,7 +13350,7 @@ module.exports = class binance extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (detail[id], 'withdrawFee'); + withdrawFees[code] = this.safeNumber (detail[id], 'withdrawFee'); } return { 'withdraw': withdrawFees, @@ -11681,8 +13397,8 @@ module.exports = class binance extends Exchange { return { 'info': fee, 'symbol': symbol, - 'maker': this.safeFloat (fee, 'maker'), - 'taker': this.safeFloat (fee, 'taker'), + 'maker': this.safeNumber (fee, 'maker'), + 'taker': this.safeNumber (fee, 'taker'), }; } @@ -11744,7 +13460,6 @@ module.exports = class binance extends Exchange { if (api === 'wapi') { url += '.html'; } - const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); if (path === 'historicalTrades') { if (this.apiKey) { headers = { @@ -11753,19 +13468,22 @@ module.exports = class binance extends Exchange { } else { throw new AuthenticationError (this.id + ' historicalTrades endpoint requires `apiKey` credential'); } - } else if (userDataStream) { + } + const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); + if (userDataStream) { if (this.apiKey) { // v1 special case for userDataStream - body = this.urlencode (params); headers = { 'X-MBX-APIKEY': this.apiKey, 'Content-Type': 'application/x-www-form-urlencoded', }; + if (method !== 'GET') { + body = this.urlencode (params); + } } else { throw new AuthenticationError (this.id + ' userDataStream endpoint requires `apiKey` credential'); } - } - if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { + } else if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { this.checkRequiredCredentials (); let query = undefined; const recvWindow = this.safeInteger (this.options, 'recvWindow', 5000); @@ -11797,13 +13515,8 @@ module.exports = class binance extends Exchange { headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } else { - // userDataStream endpoints are public, but POST, PUT, DELETE - // therefore they don't accept URL query arguments - // https://github.com/ccxt/ccxt/issues/5224 - if (!userDataStream) { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } + if (Object.keys (params).length) { + url += '?' + this.urlencode (params); } } return { 'url': url, 'method': method, 'body': body, 'headers': headers }; @@ -11885,7 +13598,7 @@ module.exports = class binance extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],24:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],25:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -11937,13 +13650,14 @@ module.exports = class binanceus extends binance { }; -},{"./binance.js":23}],25:[function(require,module,exports){ +},{"./binance.js":24}],26:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, InvalidNonce, AuthenticationError, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -12095,12 +13809,12 @@ module.exports = class bit2c extends Exchange { const currencyId = this.currencyId (code); const uppercase = currencyId.toUpperCase (); if (uppercase in balance) { - account['free'] = this.safeFloat (balance, 'AVAILABLE_' + uppercase); - account['total'] = this.safeFloat (balance, uppercase); + account['free'] = this.safeString (balance, 'AVAILABLE_' + uppercase); + account['total'] = this.safeString (balance, uppercase); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -12119,22 +13833,22 @@ module.exports = class bit2c extends Exchange { }; const ticker = await this.publicGetExchangesPairTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const averagePrice = this.safeFloat (ticker, 'av'); - const baseVolume = this.safeFloat (ticker, 'a'); + const averagePrice = this.safeNumber (ticker, 'av'); + const baseVolume = this.safeNumber (ticker, 'a'); let quoteVolume = undefined; if (baseVolume !== undefined && averagePrice !== undefined) { quoteVolume = baseVolume * averagePrice; } - const last = this.safeFloat (ticker, 'll'); + const last = this.safeNumber (ticker, 'll'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'h'), + 'bid': this.safeNumber (ticker, 'h'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'l'), + 'ask': this.safeNumber (ticker, 'l'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -12216,14 +13930,8 @@ module.exports = class bit2c extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -12236,7 +13944,7 @@ module.exports = class bit2c extends Exchange { } const id = this.safeString (order, 'id'); const status = this.safeString (order, 'status'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -12253,12 +13961,12 @@ module.exports = class bit2c extends Exchange { 'amount': amount, 'filled': undefined, 'remaining': undefined, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -12284,16 +13992,16 @@ module.exports = class bit2c extends Exchange { parseTrade (trade, market = undefined) { let timestamp = undefined; let id = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let orderId = undefined; let feeCost = undefined; let side = undefined; const reference = this.safeString (trade, 'reference'); if (reference !== undefined) { timestamp = this.safeTimestamp (trade, 'ticks'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'firstAmount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'firstAmount'); const reference_parts = reference.split ('|'); // reference contains 'pair|orderId|tradeId' if (market === undefined) { const marketId = this.safeString (trade, 'pair'); @@ -12311,12 +14019,12 @@ module.exports = class bit2c extends Exchange { } else if (side === 1) { side = 'sell'; } - feeCost = this.safeFloat (trade, 'feeAmount'); + feeCost = this.safeNumber (trade, 'feeAmount'); } else { timestamp = this.safeTimestamp (trade, 'date'); id = this.safeString (trade, 'tid'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'amount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'amount'); side = this.safeValue (trade, 'isBid'); if (side !== undefined) { if (side) { @@ -12330,6 +14038,9 @@ module.exports = class bit2c extends Exchange { if (market !== undefined) { symbol = market['symbol']; } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -12342,7 +14053,7 @@ module.exports = class bit2c extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': { 'cost': feeCost, 'currency': 'NIS', @@ -12398,13 +14109,14 @@ module.exports = class bit2c extends Exchange { }; -},{"./base/Exchange":6,"./base/errors":8}],26:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],27:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -12479,21 +14191,23 @@ module.exports = class bitbank extends Exchange { }, }, 'markets': { + 'BAT/JPY': { 'id': 'bat_jpy', 'symbol': 'BAT/JPY', 'base': 'BAT', 'quote': 'JPY', 'baseId': 'bat', 'quoteId': 'jpy' }, + 'BAT/BTC': { 'id': 'bat_btc', 'symbol': 'BAT/BTC', 'base': 'BAT', 'quote': 'BTC', 'baseId': 'bat', 'quoteId': 'btc' }, 'BCH/BTC': { 'id': 'bcc_btc', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC', 'baseId': 'bcc', 'quoteId': 'btc' }, 'BCH/JPY': { 'id': 'bcc_jpy', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bcc', 'quoteId': 'jpy' }, + 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, + 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, + 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, + 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, + 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, 'MONA/BTC': { 'id': 'mona_btc', 'symbol': 'MONA/BTC', 'base': 'MONA', 'quote': 'BTC', 'baseId': 'mona', 'quoteId': 'btc' }, 'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' }, 'QTUM/BTC': { 'id': 'qtum_btc', 'symbol': 'QTUM/BTC', 'base': 'QTUM', 'quote': 'BTC', 'baseId': 'qtum', 'quoteId': 'btc' }, 'QTUM/JPY': { 'id': 'qtum_jpy', 'symbol': 'QTUM/JPY', 'base': 'QTUM', 'quote': 'JPY', 'baseId': 'qtum', 'quoteId': 'jpy' }, - 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, - 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, - 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, - 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, - 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, - 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, - 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, - 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, 'XLM/BTC': { 'id': 'xlm_btc', 'symbol': 'XLM/BTC', 'base': 'XLM', 'quote': 'BTC', 'baseId': 'xlm', 'quoteId': 'btc' }, + 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, + 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, + 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, }, 'fees': { 'trading': { @@ -12542,16 +14256,16 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -12561,7 +14275,7 @@ module.exports = class bitbank extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -12597,18 +14311,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; feeCurrency = market['quote']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'transaction_id', 'trade_id'); const takerOrMaker = this.safeString (trade, 'maker_taker'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee_amount_quote'); + const feeCost = this.safeNumber (trade, 'fee_amount_quote'); if (feeCost !== undefined) { fee = { 'currency': feeCurrency, @@ -12660,11 +14371,11 @@ module.exports = class bitbank extends Exchange { // return [ this.safeInteger (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -12715,14 +14426,13 @@ module.exports = class bitbank extends Exchange { const balance = assets[i]; const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'free_amount'), - 'used': this.safeFloat (balance, 'locked_amount'), - 'total': this.safeFloat (balance, 'onhand_amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'free_amount'); + account['used'] = this.safeString (balance, 'locked_amount'); + account['total'] = this.safeString (balance, 'onhand_amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -12747,21 +14457,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (order, 'ordered_at'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'start_amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const average = this.safeFloat (order, 'average_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'start_amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const average = this.safeNumber (order, 'average_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -12775,7 +14479,7 @@ module.exports = class bitbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, @@ -12783,7 +14487,7 @@ module.exports = class bitbank extends Exchange { 'trades': undefined, 'fee': undefined, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -13026,13 +14730,14 @@ module.exports = class bitbank extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],27:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],28:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { InvalidNonce, InsufficientFunds, AuthenticationError, InvalidOrder, ExchangeError, OrderNotFound, AccountSuspended, BadSymbol, OrderImmediatelyFillable, RateLimitExceeded, OnMaintenance, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -13307,8 +15012,8 @@ module.exports = class bitbay extends Exchange { if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) { fees = this.safeValue (this.fees, 'fiat', {}); } - const maker = this.safeFloat (fees, 'maker'); - const taker = this.safeFloat (fees, 'taker'); + const maker = this.safeNumber (fees, 'maker'); + const taker = this.safeNumber (fees, 'taker'); // todo: check that the limits have ben interpreted correctly // todo: parse the fees page result.push ({ @@ -13324,7 +15029,7 @@ module.exports = class bitbay extends Exchange { 'taker': taker, 'limits': { 'amount': { - 'min': this.safeFloat (first, 'minOffer'), + 'min': this.safeNumber (first, 'minOffer'), 'max': undefined, }, 'price': { @@ -13332,7 +15037,7 @@ module.exports = class bitbay extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (second, 'minOffer'), + 'min': this.safeNumber (second, 'minOffer'), 'max': undefined, }, }, @@ -13372,16 +15077,10 @@ module.exports = class bitbay extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (order, 'time'); - const amount = this.safeFloat (order, 'startAmount'); - const remaining = this.safeFloat (order, 'currentAmount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } + const amount = this.safeNumber (order, 'startAmount'); + const remaining = this.safeNumber (order, 'currentAmount'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'info': order, @@ -13394,16 +15093,16 @@ module.exports = class bitbay extends Exchange { 'timeInForce': undefined, 'postOnly': postOnly, 'side': this.safeStringLower (order, 'offerType'), - 'price': this.safeFloat (order, 'rate'), + 'price': this.safeNumber (order, 'rate'), 'stopPrice': undefined, 'amount': amount, 'cost': undefined, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'average': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -13456,11 +15155,11 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lockedFunds'); - account['free'] = this.safeFloat (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'lockedFunds'); + account['free'] = this.safeString (balance, 'availableFunds'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -13479,22 +15178,22 @@ module.exports = class bitbay extends Exchange { }; const ticker = await this.publicGetIdTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'volume'); - const vwap = this.safeFloat (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max'), + 'low': this.safeNumber (ticker, 'min'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -13503,7 +15202,7 @@ module.exports = class bitbay extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), + 'average': this.safeNumber (ticker, 'average'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -13804,7 +15503,7 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const change = this.safeValue (item, 'change', {}); - let amount = this.safeFloat (change, 'total'); + let amount = this.safeNumber (change, 'total'); let direction = 'in'; if (amount < 0) { direction = 'out'; @@ -13816,9 +15515,9 @@ module.exports = class bitbay extends Exchange { const referenceId = this.safeString (item, 'detailId'); const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const fundsBefore = this.safeValue (item, 'fundsBefore', {}); - const before = this.safeFloat (fundsBefore, 'total'); + const before = this.safeNumber (fundsBefore, 'total'); const fundsAfter = this.safeValue (item, 'fundsAfter', {}); - const after = this.safeFloat (fundsAfter, 'total'); + const after = this.safeNumber (fundsAfter, 'total'); return { 'info': item, 'id': id, @@ -13875,11 +15574,11 @@ module.exports = class bitbay extends Exchange { const first = this.safeValue (ohlcv, 1, {}); return [ this.safeInteger (ohlcv, 0), - this.safeFloat (first, 'o'), - this.safeFloat (first, 'h'), - this.safeFloat (first, 'l'), - this.safeFloat (first, 'c'), - this.safeFloat (first, 'v'), + this.safeNumber (first, 'o'), + this.safeNumber (first, 'h'), + this.safeNumber (first, 'l'), + this.safeNumber (first, 'c'), + this.safeNumber (first, 'v'), ]; } @@ -13962,15 +15661,12 @@ module.exports = class bitbay extends Exchange { if (wasTaker !== undefined) { takerOrMaker = wasTaker ? 'taker' : 'maker'; } - const price = this.safeFloat2 (trade, 'rate', 'r'); - const amount = this.safeFloat2 (trade, 'amount', 'a'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'commissionValue'); + const priceString = this.safeString2 (trade, 'rate', 'r'); + const amountString = this.safeString2 (trade, 'amount', 'a'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'commissionValue'); const marketId = this.safeString (trade, 'market'); market = this.safeMarket (marketId, market, '-'); const symbol = market['symbol']; @@ -14302,7 +15998,7 @@ module.exports = class bitbay extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],28:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],29:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -14338,7 +16034,7 @@ module.exports = class bitcoincom extends hitbtc { } }; -},{"./hitbtc.js":93}],29:[function(require,module,exports){ +},{"./hitbtc.js":91}],30:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -14346,6 +16042,7 @@ module.exports = class bitcoincom extends hitbtc { const Exchange = require ('./base/Exchange'); const { NotSupported, RateLimitExceeded, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, InvalidNonce, BadSymbol } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -14386,6 +16083,7 @@ module.exports = class bitfinex extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': '1m', @@ -14499,6 +16197,7 @@ module.exports = class bitfinex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'maker': 0.1 / 100, @@ -14685,6 +16384,8 @@ module.exports = class bitfinex extends Exchange { 'No summary found.': ExchangeError, // fetchTradingFees (summary) endpoint can give this vague error message 'Cannot evaluate your available balance, please try again': ExchangeNotAvailable, 'Unknown symbol': BadSymbol, + 'Cannot complete transfer. Exchange balance insufficient.': InsufficientFunds, + 'Momentary balance check. Please wait few seconds and try the transfer again.': ExchangeError, }, 'broad': { 'Invalid X-BFX-SIGNATURE': AuthenticationError, @@ -14782,6 +16483,15 @@ module.exports = class bitfinex extends Exchange { 'limit': 'exchange limit', 'market': 'exchange market', }, + 'accountsByType': { + 'spot': 'exchange', + 'margin': 'trading', + 'funding': 'deposit', + 'exchange': 'exchange', + 'trading': 'trading', + 'deposit': 'deposit', + 'derivatives': 'trading', + }, }, }); } @@ -14795,7 +16505,7 @@ module.exports = class bitfinex extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdraw[code] = this.safeFloat (fees, id); + withdraw[code] = this.safeNumber (fees, id); } return { 'info': response, @@ -14831,14 +16541,31 @@ module.exports = class bitfinex extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } async fetchMarkets (params = {}) { const ids = await this.publicGetSymbols (); + // + // [ "btcusd", "ltcusd", "ltcbtc" ] + // const details = await this.publicGetSymbolsDetails (); + // + // [ + // { + // "pair":"btcusd", + // "price_precision":5, + // "initial_margin":"10.0", + // "minimum_margin":"5.0", + // "maximum_order_size":"2000.0", + // "minimum_order_size":"0.0002", + // "expiration":"NA", + // "margin":true + // }, + // ] + // const result = []; for (let i = 0; i < details.length; i++) { const market = details[i]; @@ -14869,8 +16596,8 @@ module.exports = class bitfinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -14881,6 +16608,7 @@ module.exports = class bitfinex extends Exchange { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -14889,6 +16617,8 @@ module.exports = class bitfinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': true, + 'type': 'spot', + 'margin': margin, 'precision': precision, 'limits': limits, 'info': market, @@ -14913,40 +16643,15 @@ module.exports = class bitfinex extends Exchange { return this.decimalToPrecision (price, TRUNCATE, 8, DECIMAL_PLACES); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - const code = market[key]; - const currency = this.safeValue (this.currencies, code); - if (currency !== undefined) { - const precision = this.safeInteger (currency, 'precision'); - if (precision !== undefined) { - cost = parseFloat (this.currencyToPrecision (code, cost)); - } - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); - const types = { - 'exchange': 'exchange', - 'deposit': 'funding', - 'trading': 'margin', - }; - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } const query = this.omit (params, 'type'); const response = await this.privatePostBalances (query); // [ { type: 'deposit', @@ -14962,12 +16667,16 @@ module.exports = class bitfinex extends Exchange { // amount: '0.0005', // available: '0.0005' } ], const result = { 'info': response }; + const isDerivative = requestedType === 'derivatives'; for (let i = 0; i < response.length; i++) { const balance = response[i]; const type = this.safeString (balance, 'type'); - const parsedType = this.safeString (types, type); - if ((parsedType === balanceType) || (type === balanceType)) { - const currencyId = this.safeString (balance, 'currency'); + const currencyId = this.safeStringLower (balance, 'currency', ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { const code = this.safeCurrencyCode (currencyId); // bitfinex had BCH previously, now it's BAB, but the old // BCH symbol is kept for backward-compatibility @@ -14976,13 +16685,80 @@ module.exports = class bitfinex extends Exchange { // https://github.com/ccxt/ccxt/issues/4989 if (!(code in result)) { const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currencyId = this.currencyId (code); + const fromCurrencyId = this.convertDerivativesId (currencyId, fromAccount); + const toCurrencyId = this.convertDerivativesId (currencyId, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'walletfrom': fromId, + 'walletto': toId, + }; + const response = await this.privatePostTransfer (this.extend (request, params)); + // [ + // { + // status: 'success', + // message: '0.0001 Bitcoin transfered from Margin to Exchange' + // } + // ] + const result = this.safeValue (response, 0); + const status = this.safeString (result, 'status'); + const message = this.safeString (result, 'message'); + if (message === undefined) { + throw new ExchangeError (this.id + ' transfer failed'); + } + // [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}] + if (status === 'error') { + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + return { + 'info': response, + 'status': status, + 'amount': requestedAmount, + 'code': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'timestamp': undefined, + 'datetime': undefined, + }; + } + + convertDerivativesId (currencyId, type) { + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if ((type !== 'derivatives' && type !== 'trading' && type !== 'margin') && isDerivativeCode) { + currencyId = currencyId.slice (0, start); + } else if (type === 'derivatives' && !isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + return currencyId; } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -15021,7 +16797,7 @@ module.exports = class bitfinex extends Exchange { } parseTicker (ticker, market = undefined) { - let timestamp = this.safeFloat (ticker, 'timestamp'); + let timestamp = this.safeNumber (ticker, 'timestamp'); if (timestamp !== undefined) { timestamp *= 1000; } @@ -15044,16 +16820,16 @@ module.exports = class bitfinex extends Exchange { } } } - const last = this.safeFloat (ticker, 'last_price'); + const last = this.safeNumber (ticker, 'last_price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -15062,8 +16838,8 @@ module.exports = class bitfinex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'mid'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'mid'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -15071,24 +16847,21 @@ module.exports = class bitfinex extends Exchange { parseTrade (trade, market) { const id = this.safeString (trade, 'tid'); - let timestamp = this.safeFloat (trade, 'timestamp'); + let timestamp = this.safeNumber (trade, 'timestamp'); if (timestamp !== undefined) { timestamp = parseInt (timestamp) * 1000; } const type = undefined; const side = this.safeStringLower (trade, 'type'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; if ('fee_amount' in trade) { - const feeCost = -this.safeFloat (trade, 'fee_amount'); + const feeCost = -this.safeNumber (trade, 'fee_amount'); const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { @@ -15203,6 +16976,30 @@ module.exports = class bitfinex extends Exchange { } parseOrder (order, market = undefined) { + // + // { + // id: 57334010955, + // cid: 1611584840966, + // cid_date: null, + // gid: null, + // symbol: 'ltcbtc', + // exchange: null, + // price: '0.0042125', + // avg_execution_price: '0.0042097', + // side: 'sell', + // type: 'exchange market', + // timestamp: '1611584841.0', + // is_live: false, + // is_cancelled: false, + // is_hidden: 0, + // oco_order: 0, + // was_forced: false, + // original_amount: '0.205176', + // remaining_amount: '0.0', + // executed_amount: '0.205176', + // src: 'web' + // } + // const side = this.safeString (order, 'side'); const open = this.safeValue (order, 'is_live'); const canceled = this.safeValue (order, 'is_cancelled'); @@ -15214,30 +17011,17 @@ module.exports = class bitfinex extends Exchange { } else { status = 'closed'; } - let symbol = undefined; - if (market === undefined) { - const marketId = this.safeStringUpper (order, 'symbol'); - if (marketId !== undefined) { - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } - } - } - if (market !== undefined) { - symbol = market['symbol']; - } - let orderType = order['type']; + const marketId = this.safeStringUpper (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market); + let orderType = this.safeString (order, 'type', ''); const exchange = orderType.indexOf ('exchange ') >= 0; if (exchange) { const parts = order['type'].split (' '); orderType = parts[1]; } - let timestamp = this.safeFloat (order, 'timestamp'); - if (timestamp !== undefined) { - timestamp = parseInt (timestamp) * 1000; - } + const timestamp = this.safeTimestamp (order, 'timestamp'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -15249,17 +17033,17 @@ module.exports = class bitfinex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': side, - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_execution_price'), - 'amount': this.safeFloat (order, 'original_amount'), - 'remaining': this.safeFloat (order, 'remaining_amount'), - 'filled': this.safeFloat (order, 'executed_amount'), + 'average': this.safeNumber (order, 'avg_execution_price'), + 'amount': this.safeNumber (order, 'original_amount'), + 'remaining': this.safeNumber (order, 'remaining_amount'), + 'filled': this.safeNumber (order, 'executed_amount'), 'status': status, 'fee': undefined, 'cost': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -15314,11 +17098,11 @@ module.exports = class bitfinex extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -15466,11 +17250,11 @@ module.exports = class bitfinex extends Exchange { // "timestamp_created": "1561716066.0" // } // - let timestamp = this.safeFloat (transaction, 'timestamp_created'); + let timestamp = this.safeNumber (transaction, 'timestamp_created'); if (timestamp !== undefined) { timestamp = parseInt (timestamp * 1000); } - let updated = this.safeFloat (transaction, 'timestamp'); + let updated = this.safeNumber (transaction, 'timestamp'); if (updated !== undefined) { updated = parseInt (updated * 1000); } @@ -15478,7 +17262,7 @@ module.exports = class bitfinex extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const type = this.safeStringLower (transaction, 'type'); // DEPOSIT or WITHDRAWAL const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -15491,7 +17275,7 @@ module.exports = class bitfinex extends Exchange { 'address': this.safeString (transaction, 'address'), // todo: this is actually the tag for XRP transfers (the address is missing) 'tag': undefined, // refix it properly for the tag from description 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -15545,7 +17329,7 @@ module.exports = class bitfinex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // @@ -15623,7 +17407,7 @@ module.exports = class bitfinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],30:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],31:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -15912,6 +17696,15 @@ module.exports = class bitfinex2 extends bitfinex { 'JPY': 'JPY', 'GBP': 'GBP', }, + // actually the correct names unlike the v1 + // we don't want to extend this with accountsByType in v1 + 'v2AccountsByType': { + 'spot': 'exchange', + 'exchange': 'exchange', + 'funding': 'funding', + 'margin': 'margin', + 'derivatives': 'margin', + }, }, 'exceptions': { 'exact': { @@ -15993,8 +17786,8 @@ module.exports = class bitfinex2 extends bitfinex { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -16005,6 +17798,7 @@ module.exports = class bitfinex2 extends bitfinex { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -16019,6 +17813,7 @@ module.exports = class bitfinex2 extends bitfinex { 'type': type, 'swap': false, 'spot': spot, + 'margin': margin, 'futures': futures, }); } @@ -16131,7 +17926,7 @@ module.exports = class bitfinex2 extends bitfinex { const ids = this.safeValue (response, 0, []); const result = {}; for (let i = 0; i < ids.length; i++) { - let id = ids[i]; + const id = ids[i]; const code = this.safeCurrencyCode (id); const label = this.safeValue (indexed['label'], id, []); const name = this.safeString (label, 1); @@ -16139,13 +17934,14 @@ module.exports = class bitfinex2 extends bitfinex { const type = this.safeString (pool, 1); const feeValues = this.safeValue (indexed['fees'], id, []); const fees = this.safeValue (feeValues, 1, []); - const fee = this.safeFloat (fees, 1); + const fee = this.safeNumber (fees, 1); + const undl = this.safeValue (indexed['undl'], id, []); const precision = 8; // default precision, todo: fix "magic constants" - id = 'f' + id; + const fid = 'f' + id; result[code] = { - 'id': id, + 'id': fid, 'code': code, - 'info': [ id, label, pool, feeValues ], + 'info': [ id, label, pool, feeValues, undl ], 'type': type, 'name': name, 'active': true, @@ -16176,40 +17972,117 @@ module.exports = class bitfinex2 extends bitfinex { async fetchBalance (params = {}) { // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances) + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 await this.loadMarkets (); - const response = await this.privatePostAuthRWallets (params); - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } + const isDerivative = requestedType === 'derivatives'; + const query = this.omit (params, 'type'); + const response = await this.privatePostAuthRWallets (query); const result = { 'info': response }; - for (let b = 0; b < response.length; b++) { - const balance = response[b]; - const accountType = balance[0]; - let currency = balance[1]; - const total = balance[2]; - const available = balance[4]; - if (accountType === balanceType) { - if (currency[0] === 't') { - currency = currency.slice (1); - } - const code = this.safeCurrencyCode (currency); + for (let i = 0; i < response.length; i++) { + const balance = response[i]; + const type = this.safeString (balance, 0); + const currencyId = this.safeStringLower (balance, 1, ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { + const code = this.safeCurrencyCode (currencyId); const account = this.account (); - // do not fill in zeroes and missing values in the parser - // rewrite and unify the following to use the unified parseBalance - account['total'] = total; - if (!available) { - if (available === 0) { - account['free'] = 0; - account['used'] = total; - } else { - account['free'] = total; - } - } else { - account['free'] = available; - account['used'] = account['total'] - account['free']; - } + account['total'] = this.safeString (balance, 2); + account['free'] = this.safeString (balance, 4); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currency = this.currency (code); + const fromCurrencyId = this.convertDerivativesId (currency, fromAccount); + const toCurrencyId = this.convertDerivativesId (currency, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + // this request is slightly different from v1 fromAccount -> from + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'from': fromId, + 'to': toId, + }; + const response = await this.privatePostAuthWTransfer (this.extend (request, params)); + // [1616451183763,"acc_tf",null,null,[1616451183763,"exchange","margin",null,"UST","UST",null,1],null,"SUCCESS","1.0 Tether USDt transfered from Exchange to Margin"] + const timestamp = this.safeInteger (response, 0); + // ["error",10001,"Momentary balance check. Please wait few seconds and try the transfer again."] + const error = this.safeString (response, 0); + if (error === 'error') { + const message = this.safeString (response, 2, ''); + // same message as in v1 + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + const info = this.safeValue (response, 4); + const fromResponse = this.safeString (info, 1); + const toResponse = this.safeString (info, 2); + const toCode = this.safeCurrencyCode (this.safeString (info, 5)); + const success = this.safeString (response, 6); + const status = (success === 'SUCCESS') ? 'ok' : undefined; + return { + 'info': response, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'status': status, + 'amount': requestedAmount, + 'code': toCode, + 'fromAccount': fromResponse, + 'toAccount': toResponse, + }; + } + + convertDerivativesId (currency, type) { + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 + // { + // id: 'fUSTF0', + // code: 'USTF0', + // info: [ 'USTF0', [], [], [], [ 'USTF0', 'UST' ] ], + const info = this.safeValue (currency, 'info'); + const transferId = this.safeString (info, 0); + const underlying = this.safeValue (info, 4, []); + let currencyId = undefined; + if (type === 'derivatives') { + currencyId = this.safeString (underlying, 0, transferId); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if (!isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + } else if (type !== 'margin') { + currencyId = this.safeString (underlying, 1, transferId); + } else { + currencyId = transferId; + } + return currencyId; } async fetchOrder (id, symbol = undefined, params = {}) { @@ -16239,9 +18112,10 @@ module.exports = class bitfinex2 extends bitfinex { const priceIndex = (fullRequest['precision'] === 'R0') ? 1 : 0; for (let i = 0; i < orderbook.length; i++) { const order = orderbook[i]; - const price = order[priceIndex]; - const amount = Math.abs (order[2]); - const side = (order[2] > 0) ? 'bids' : 'asks'; + const price = this.safeNumber (order, priceIndex); + const signedAmount = this.safeNumber (order, 2); + const amount = Math.abs (signedAmount); + const side = (signedAmount > 0) ? 'bids' : 'asks'; result[side].push ([ price, amount ]); } result['bids'] = this.sortBy (result['bids'], 0, true); @@ -16256,26 +18130,26 @@ module.exports = class bitfinex2 extends bitfinex { symbol = market['symbol']; } const length = ticker.length; - const last = ticker[length - 4]; + const last = this.safeNumber (ticker, length - 4); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': ticker[length - 2], - 'low': ticker[length - 1], - 'bid': ticker[length - 10], + 'high': this.safeNumber (ticker, length - 2), + 'low': this.safeNumber (ticker, length - 1), + 'bid': this.safeNumber (ticker, length - 10), 'bidVolume': undefined, - 'ask': ticker[length - 8], + 'ask': this.safeNumber (ticker, length - 8), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': ticker[length - 6], - 'percentage': ticker[length - 5] * 100, + 'change': this.safeNumber (ticker, length - 6), + 'percentage': this.safeNumber (ticker, length - 5) * 100, 'average': undefined, - 'baseVolume': ticker[length - 3], + 'baseVolume': this.safeNumber (ticker, length - 3), 'quoteVolume': undefined, 'info': ticker, }; @@ -16364,12 +18238,12 @@ module.exports = class bitfinex2 extends bitfinex { // const tradeLength = trade.length; const isPrivate = (tradeLength > 5); - const id = trade[0].toString (); + const id = this.safeString (trade, 0); const amountIndex = isPrivate ? 4 : 2; - let amount = trade[amountIndex]; + let amount = this.safeNumber (trade, amountIndex); let cost = undefined; const priceIndex = isPrivate ? 5 : 3; - const price = trade[priceIndex]; + const price = this.safeNumber (trade, priceIndex); let side = undefined; let orderId = undefined; let takerOrMaker = undefined; @@ -16377,7 +18251,7 @@ module.exports = class bitfinex2 extends bitfinex { let fee = undefined; let symbol = undefined; const timestampIndex = isPrivate ? 2 : 1; - const timestamp = trade[timestampIndex]; + const timestamp = this.safeInteger (trade, timestampIndex); if (isPrivate) { const marketId = trade[1]; if (marketId in this.markets_by_id) { @@ -16386,10 +18260,12 @@ module.exports = class bitfinex2 extends bitfinex { } else { symbol = this.parseSymbol (marketId); } - orderId = trade[3].toString (); - takerOrMaker = (trade[8] === 1) ? 'maker' : 'taker'; - let feeCost = trade[9]; - const feeCurrency = this.safeCurrencyCode (trade[10]); + orderId = this.safeString (trade, 3); + const maker = this.safeInteger (trade, 8); + takerOrMaker = (maker === 1) ? 'maker' : 'taker'; + let feeCost = this.safeNumber (trade, 9); + const feeCurrencyId = this.safeString (trade, 10); + const feeCurrency = this.safeCurrencyCode (feeCurrencyId); if (feeCost !== undefined) { feeCost = -feeCost; if (symbol in this.markets) { @@ -16530,10 +18406,10 @@ module.exports = class bitfinex2 extends bitfinex { // https://github.com/ccxt/ccxt/issues/6686 // const timestamp = this.safeTimestamp (order, 5); const timestamp = this.safeInteger (order, 5); - const remaining = Math.abs (this.safeFloat (order, 6)); - const amount = Math.abs (this.safeFloat (order, 7)); - const filled = amount - remaining; - const side = (order[7] < 0) ? 'sell' : 'buy'; + const remaining = Math.abs (this.safeNumber (order, 6)); + const signedAmount = this.safeNumber (order, 7); + const amount = Math.abs (signedAmount); + const side = (signedAmount < 0) ? 'sell' : 'buy'; const orderType = this.safeString (order, 8); const type = this.safeString (this.safeValue (this.options, 'exchangeTypes'), orderType); let status = undefined; @@ -16542,11 +18418,10 @@ module.exports = class bitfinex2 extends bitfinex { const parts = statusString.split (' @ '); status = this.parseOrderStatus (this.safeString (parts, 0)); } - const price = this.safeFloat (order, 16); - const average = this.safeFloat (order, 17); - const cost = price * filled; + const price = this.safeNumber (order, 16); + const average = this.safeNumber (order, 17); const clientOrderId = this.safeString (order, 2); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -16561,14 +18436,14 @@ module.exports = class bitfinex2 extends bitfinex { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -16585,11 +18460,11 @@ module.exports = class bitfinex2 extends bitfinex { if ((orderType === 'LIMIT') || (orderType === 'EXCHANGE LIMIT')) { request['price'] = this.numberToString (price); } else if ((orderType === 'STOP') || (orderType === 'EXCHANGE STOP')) { - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'STOP LIMIT') || (orderType === 'EXCHANGE STOP LIMIT')) { - const priceAuxLimit = this.safeFloat (params, 'price_aux_limit'); - let stopPrice = this.safeFloat (params, 'stopPrice'); + const priceAuxLimit = this.safeNumber (params, 'price_aux_limit'); + let stopPrice = this.safeNumber (params, 'stopPrice'); if (priceAuxLimit === undefined) { if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter or a price_aux_limit parameter for a ' + orderType + ' order'); @@ -16604,9 +18479,9 @@ module.exports = class bitfinex2 extends bitfinex { } request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'TRAILING STOP') || (orderType === 'EXCHANGE TRAILING STOP')) { - const priceTrailing = this.safeFloat (params, 'price_trailing'); + const priceTrailing = this.safeNumber (params, 'price_trailing'); request['price_trailing'] = this.numberToString (priceTrailing); - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'FOK') || (orderType === 'EXCHANGE FOK') || (orderType === 'IOC') || (orderType === 'EXCHANGE IOC')) { request['price'] = this.numberToString (price); @@ -16938,11 +18813,11 @@ module.exports = class bitfinex2 extends bitfinex { if (currency !== undefined) { code = currency['code']; } - feeCost = this.safeFloat (data, 8); + feeCost = this.safeNumber (data, 8); if (feeCost !== undefined) { feeCost = -feeCost; } - amount = this.safeFloat (data, 5); + amount = this.safeNumber (data, 5); id = this.safeValue (data, 0); status = 'ok'; if (id === 0) { @@ -16956,7 +18831,7 @@ module.exports = class bitfinex2 extends bitfinex { timestamp = this.safeInteger (transaction, 5); updated = this.safeInteger (transaction, 6); status = this.parseTransactionStatus (this.safeString (transaction, 9)); - amount = this.safeFloat (transaction, 12); + amount = this.safeNumber (transaction, 12); if (amount !== undefined) { if (amount < 0) { type = 'withdrawal'; @@ -16964,7 +18839,7 @@ module.exports = class bitfinex2 extends bitfinex { type = 'deposit'; } } - feeCost = this.safeFloat (transaction, 13); + feeCost = this.safeNumber (transaction, 13); if (feeCost !== undefined) { feeCost = -feeCost; } @@ -17092,7 +18967,7 @@ module.exports = class bitfinex2 extends bitfinex { }); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // @@ -17197,13 +19072,14 @@ module.exports = class bitfinex2 extends bitfinex { } }; -},{"./base/errors":8,"./bitfinex.js":29}],31:[function(require,module,exports){ +},{"./base/errors":9,"./bitfinex.js":30}],32:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -17385,11 +19261,11 @@ module.exports = class bitflyer extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'amount'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -17408,16 +19284,16 @@ module.exports = class bitflyer extends Exchange { }; const ticker = await this.publicGetGetticker (this.extend (request, params)); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'ltp'); + const last = this.safeNumber (ticker, 'ltp'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'best_bid'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -17427,7 +19303,7 @@ module.exports = class bitflyer extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_by_product'), + 'baseVolume': this.safeNumber (ticker, 'volume_by_product'), 'quoteVolume': undefined, 'info': ticker, }; @@ -17451,14 +19327,11 @@ module.exports = class bitflyer extends Exchange { order = this.safeString (trade, 'child_order_acceptance_id'); } const timestamp = this.parse8601 (this.safeString (trade, 'exec_date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -17534,18 +19407,17 @@ module.exports = class bitflyer extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'child_order_date')); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'outstanding_size'); - const filled = this.safeFloat (order, 'executed_size'); - const price = this.safeFloat (order, 'price'); - const cost = price * filled; + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'outstanding_size'); + const filled = this.safeNumber (order, 'executed_size'); + const price = this.safeNumber (order, 'price'); const status = this.parseOrderStatus (this.safeString (order, 'child_order_state')); const type = this.safeStringLower (order, 'child_order_type'); const side = this.safeStringLower (order, 'side'); const marketId = this.safeString (order, 'product_code'); const symbol = this.safeSymbol (marketId, market); let fee = undefined; - const feeCost = this.safeFloat (order, 'total_commission'); + const feeCost = this.safeNumber (order, 'total_commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -17554,7 +19426,7 @@ module.exports = class bitflyer extends Exchange { }; } const id = this.safeString (order, 'child_order_acceptance_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -17569,14 +19441,14 @@ module.exports = class bitflyer extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrders (symbol = undefined, since = undefined, limit = 100, params = {}) { @@ -17639,7 +19511,7 @@ module.exports = class bitflyer extends Exchange { return this.parseTrades (response, market, since, limit); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchPositions() requires a `symbols` argument, exactly one symbol in an array'); } @@ -17723,13 +19595,14 @@ module.exports = class bitflyer extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],32:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],33:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, OrderNotFound, InsufficientFunds, DDoSProtection, PermissionDenied, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -17985,7 +19858,7 @@ module.exports = class bitforex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -18021,14 +19894,11 @@ module.exports = class bitforex extends Exchange { const timestamp = this.safeInteger (trade, 'time'); const id = this.safeString (trade, 'tid'); const orderId = undefined; - const amount = this.safeFloat (trade, 'amount'); - const price = this.safeFloat (trade, 'price'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const sideId = this.safeInteger (trade, 'direction'); const side = this.parseSide (sideId); return { @@ -18071,12 +19941,12 @@ module.exports = class bitforex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'active'); - account['total'] = this.safeFloat (balance, 'fix'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'active'); + account['total'] = this.safeString (balance, 'fix'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTicker (symbol, params = {}) { @@ -18092,21 +19962,21 @@ module.exports = class bitforex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (data, 'high'), - 'low': this.safeFloat (data, 'low'), - 'bid': this.safeFloat (data, 'buy'), + 'high': this.safeNumber (data, 'high'), + 'low': this.safeNumber (data, 'low'), + 'bid': this.safeNumber (data, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (data, 'sell'), + 'ask': this.safeNumber (data, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (data, 'last'), - 'last': this.safeFloat (data, 'last'), + 'close': this.safeNumber (data, 'last'), + 'last': this.safeNumber (data, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (data, 'vol'), + 'baseVolume': this.safeNumber (data, 'vol'), 'quoteVolume': undefined, 'info': response, }; @@ -18126,11 +19996,11 @@ module.exports = class bitforex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -18198,26 +20068,24 @@ module.exports = class bitforex extends Exchange { parseOrder (order, market = undefined) { const id = this.safeString (order, 'orderId'); - const timestamp = this.safeFloat (order, 'createTime'); - const lastTradeTimestamp = this.safeFloat (order, 'lastTime'); + const timestamp = this.safeNumber (order, 'createTime'); + const lastTradeTimestamp = this.safeNumber (order, 'lastTime'); const symbol = market['symbol']; const sideId = this.safeInteger (order, 'tradeType'); const side = this.parseSide (sideId); const type = undefined; - const price = this.safeFloat (order, 'orderPrice'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderAmount'); - const filled = this.safeFloat (order, 'dealAmount'); - const remaining = amount - filled; + const price = this.safeNumber (order, 'orderPrice'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderAmount'); + const filled = this.safeNumber (order, 'dealAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderState')); - const cost = filled * price; const feeSide = (side === 'buy') ? 'base' : 'quote'; const feeCurrency = market[feeSide]; const fee = { - 'cost': this.safeFloat (order, 'tradeFee'), + 'cost': this.safeNumber (order, 'tradeFee'), 'currency': feeCurrency, }; - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -18231,16 +20099,15 @@ module.exports = class bitforex extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -18356,7 +20223,7 @@ module.exports = class bitforex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],33:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],34:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -18364,6 +20231,7 @@ module.exports = class bitforex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -19152,7 +21020,7 @@ module.exports = class bitget extends Exchange { let swap = false; const baseId = this.safeString2 (market, 'base_currency', 'coin'); const quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { marketType = 'swap'; spot = false; @@ -19170,7 +21038,7 @@ module.exports = class bitget extends Exchange { 'amount': parseFloat ('1e-' + sizeIncrement), 'price': parseFloat ('1e-' + tickSize), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const status = this.safeString (market, 'status'); let active = undefined; if (status !== undefined) { @@ -19427,26 +21295,26 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat2 (ticker, 'last', 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'last', 'close'); + const open = this.safeNumber (ticker, 'open'); let bidVolume = undefined; let askVolume = undefined; let bid = this.safeValue (ticker, 'bid'); if (bid === undefined) { - bid = this.safeFloat (ticker, 'best_bid'); + bid = this.safeNumber (ticker, 'best_bid'); } else { - bidVolume = this.safeFloat (bid, 1); - bid = this.safeFloat (bid, 0); + bidVolume = this.safeNumber (bid, 1); + bid = this.safeNumber (bid, 0); } let ask = this.safeValue (ticker, 'ask'); if (ask === undefined) { - ask = this.safeFloat (ticker, 'best_ask'); + ask = this.safeNumber (ticker, 'best_ask'); } else { - askVolume = this.safeFloat (ask, 1); - ask = this.safeFloat (ask, 0); + askVolume = this.safeNumber (ask, 1); + ask = this.safeNumber (ask, 0); } - const baseVolume = this.safeFloat2 (ticker, 'amount', 'volume_24h'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber2 (ticker, 'amount', 'volume_24h'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; @@ -19460,8 +21328,8 @@ module.exports = class bitget extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -19696,9 +21564,12 @@ module.exports = class bitget extends Exchange { } let timestamp = this.safeInteger (trade, 'created_at'); timestamp = this.safeInteger2 (trade, 'timestamp', 'ts', timestamp); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'filled_amount', 'order_qty'); - amount = this.safeFloat2 (trade, 'size', 'amount', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'filled_amount', 'order_qty'); + amountString = this.safeString2 (trade, 'size', 'amount', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -19717,18 +21588,13 @@ module.exports = class bitget extends Exchange { type = this.parseOrderType (side); side = this.parseOrderSide (side); } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - let feeCost = this.safeFloat (trade, 'fee'); - if (feeCost === undefined) { - feeCost = this.safeFloat (trade, 'filled_fees'); + let feeCostString = this.safeString (trade, 'fee'); + if (feeCostString === undefined) { + feeCostString = this.safeString (trade, 'filled_fees'); } else { - feeCost = -feeCost; + feeCostString = (feeCostString[0] === '-') ? feeCostString.slice (1) : feeCostString; } + const feeCost = this.parseNumber (feeCostString); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -19851,23 +21717,23 @@ module.exports = class bitget extends Exchange { const volumeIndex = this.safeString (volume, market['type'], 'amount'); return [ this.safeInteger (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets ]; } else { const volumeIndex = this.safeValue (volume, market['type'], 6); return [ this.safeInteger (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, volumeIndex), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, volumeIndex), // Base Volume ]; } } @@ -19969,13 +21835,13 @@ module.exports = class bitget extends Exchange { } const type = this.safeValue (balance, 'type'); if (type === 'trade') { - result[code]['free'] = this.safeFloat (balance, 'balance'); + result[code]['free'] = this.safeString (balance, 'balance'); } else if ((type === 'frozen') || (type === 'lock')) { - const used = this.safeFloat (result[code], 'used'); - result[code]['used'] = this.sum (used, this.safeFloat (balance, 'balance')); + const used = this.safeString (result[code], 'used'); + result[code]['used'] = Precise.stringAdd (used, this.safeString (balance, 'balance')); } } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseSwapBalance (response) { @@ -19999,11 +21865,11 @@ module.exports = class bitget extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeString (balance, 'equity'); + account['free'] = this.safeString (balance, 'total_avail_balance'); result[symbol] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchAccounts (params = {}) { @@ -20280,26 +22146,13 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let amount = this.safeFloat2 (order, 'amount', 'size'); - const filled = this.safeFloat2 (order, 'filled_amount', 'filled_qty'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - amount = Math.max (amount, filled); - remaining = Math.max (0, amount - filled); - } - } - if (type === 'market') { - remaining = 0; - } - const cost = this.safeFloat (order, 'filled_cash_amount'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); - if ((average === undefined) && (filled !== undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } + const amount = this.safeNumber2 (order, 'amount', 'size'); + const filled = this.safeNumber2 (order, 'filled_amount', 'filled_qty'); + const cost = this.safeNumber (order, 'filled_cash_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'price_avg'); const status = this.parseOrderStatus (this.safeString2 (order, 'state', 'status')); - const feeCost = this.safeFloat2 (order, 'filled_fees', 'fee'); + const feeCost = this.safeNumber2 (order, 'filled_fees', 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -20309,7 +22162,7 @@ module.exports = class bitget extends Exchange { }; } const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -20327,11 +22180,11 @@ module.exports = class bitget extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -20378,7 +22231,7 @@ module.exports = class bitget extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'amount'); + let cost = this.safeNumber (params, 'amount'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -20928,12 +22781,12 @@ module.exports = class bitget extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const txid = this.safeString (transaction, 'tx_hash'); const timestamp = this.safeInteger (transaction, 'created_at'); const updated = this.safeInteger (transaction, 'updated_at'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -21123,7 +22976,7 @@ module.exports = class bitget extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.swapGetPositionAllPosition (params); // @@ -21264,7 +23117,7 @@ module.exports = class bitget extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],34:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],35:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -21272,6 +23125,7 @@ module.exports = class bitget extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, AuthenticationError, BadRequest, PermissionDenied, InvalidAddress, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); const { DECIMAL_PLACES, SIGNIFICANT_DIGITS, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -21465,12 +23319,12 @@ module.exports = class bithumb extends Exchange { const account = this.account (); const currency = this.currency (code); const lowerCurrencyId = this.safeStringLower (currency, 'id'); - account['total'] = this.safeFloat (balances, 'total_' + lowerCurrencyId); - account['used'] = this.safeFloat (balances, 'in_use_' + lowerCurrencyId); - account['free'] = this.safeFloat (balances, 'available_' + lowerCurrencyId); + account['total'] = this.safeString (balances, 'total_' + lowerCurrencyId); + account['used'] = this.safeString (balances, 'in_use_' + lowerCurrencyId); + account['free'] = this.safeString (balances, 'available_' + lowerCurrencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -21532,8 +23386,8 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'opening_price'); - const close = this.safeFloat (ticker, 'closing_price'); + const open = this.safeNumber (ticker, 'opening_price'); + const close = this.safeNumber (ticker, 'closing_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -21544,18 +23398,18 @@ module.exports = class bithumb extends Exchange { } average = this.sum (open, close) / 2; } - const baseVolume = this.safeFloat (ticker, 'units_traded_24H'); - const quoteVolume = this.safeFloat (ticker, 'acc_trade_value_24H'); + const baseVolume = this.safeNumber (ticker, 'units_traded_24H'); + const quoteVolume = this.safeNumber (ticker, 'acc_trade_value_24H'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -21661,11 +23515,11 @@ module.exports = class bithumb extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -21755,18 +23609,16 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'units_traded', 'units'); - let cost = this.safeFloat (trade, 'total'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'units_traded', 'units'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.commonCurrencyCode (feeCurrencyId); @@ -21969,14 +23821,14 @@ module.exports = class bithumb extends Exchange { const sideProperty = this.safeValue2 (order, 'type', 'side'); const side = (sideProperty === 'bid') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'order_status')); - let price = this.safeFloat2 (order, 'order_price', 'price'); + let price = this.safeNumber2 (order, 'order_price', 'price'); let type = 'limit'; if (price === 0) { price = undefined; type = 'market'; } - const amount = this.safeFloat2 (order, 'order_qty', 'units'); - let remaining = this.safeFloat (order, 'units_remaining'); + const amount = this.safeNumber2 (order, 'order_qty', 'units'); + let remaining = this.safeNumber (order, 'units_remaining'); if (remaining === undefined) { if (status === 'closed') { remaining = 0; @@ -21995,65 +23847,14 @@ module.exports = class bithumb extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let filled = undefined; - let cost = undefined; - let average = undefined; const id = this.safeString (order, 'order_id'); - const rawTrades = this.safeValue (order, 'contract'); - let trades = undefined; - let fee = undefined; - let fees = undefined; - let feesByCurrency = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'side': side, - 'symbol': symbol, - 'order': id, - }); - filled = 0; - feesByCurrency = {}; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - filled = this.sum (filled, trade['amount']); - cost = this.sum (cost, trade['cost']); - const tradeFee = trade['fee']; - const feeCurrency = tradeFee['currency']; - if (feeCurrency in feesByCurrency) { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': this.sum (feesByCurrency[feeCurrency]['cost'], tradeFee['cost']), - }; - } else { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': tradeFee['cost'], - }; - } - } - const feeCurrencies = Object.keys (feesByCurrency); - const feeCurrenciesLength = feeCurrencies.length; - if (feeCurrenciesLength > 1) { - fees = []; - for (let i = 0; i < feeCurrencies.length; i++) { - const feeCurrency = feeCurrencies[i]; - fees.push (feesByCurrency[feeCurrency]); - } - } else { - fee = this.safeValue (feesByCurrency, feeCurrencies[0]); - } - if (filled !== 0) { - average = cost / filled; - } - } - if (amount !== undefined) { - if ((filled === undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if ((remaining === undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const result = { + const rawTrades = this.safeValue (order, 'contract', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'side': side, + 'symbol': symbol, + 'order': id, + }); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -22068,20 +23869,14 @@ module.exports = class bithumb extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, + 'cost': undefined, + 'average': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': trades, - }; - if (fee !== undefined) { - result['fee'] = fee; - } else if (fees !== undefined) { - result['fees'] = fees; - } - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -22241,7 +24036,7 @@ module.exports = class bithumb extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],35:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],36:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -22272,7 +24067,7 @@ module.exports = class bitkk extends zb { } }; -},{"./zb.js":182}],36:[function(require,module,exports){ +},{"./zb.js":178}],37:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -22710,16 +24505,16 @@ module.exports = class bitmart extends Exchange { // const pricePrecision = this.safeInteger (market, 'price_max_precision'); const precision = { - 'amount': this.safeFloat (market, 'base_min_size'), + 'amount': this.safeNumber (market, 'base_min_size'), 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 10)), }; - const minBuyCost = this.safeFloat (market, 'min_buy_amount'); - const minSellCost = this.safeFloat (market, 'min_sell_amount'); + const minBuyCost = this.safeNumber (market, 'min_buy_amount'); + const minSellCost = this.safeNumber (market, 'min_sell_amount'); const minCost = Math.max (minBuyCost, minSellCost); const limits = { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': { 'min': undefined, @@ -22829,16 +24624,16 @@ module.exports = class bitmart extends Exchange { // // the docs are wrong: https://github.com/ccxt/ccxt/issues/5612 // - const amountPrecision = this.safeFloat (contract, 'vol_unit'); - const pricePrecision = this.safeFloat (contract, 'price_unit'); + const amountPrecision = this.safeNumber (contract, 'vol_unit'); + const pricePrecision = this.safeNumber (contract, 'price_unit'); const precision = { 'amount': amountPrecision, 'price': pricePrecision, }; const limits = { 'amount': { - 'min': this.safeFloat (contract, 'min_vol'), - 'max': this.safeFloat (contract, 'max_vol'), + 'min': this.safeNumber (contract, 'min_vol'), + 'max': this.safeNumber (contract, 'max_vol'), }, 'price': { 'min': undefined, @@ -22861,8 +24656,8 @@ module.exports = class bitmart extends Exchange { future = true; } const feeConfig = this.safeValue (market, 'fee_config', {}); - const maker = this.safeFloat (feeConfig, 'maker_fee'); - const taker = this.safeFloat (feeConfig, 'taker_fee'); + const maker = this.safeNumber (feeConfig, 'maker_fee'); + const taker = this.safeNumber (feeConfig, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -22950,33 +24745,33 @@ module.exports = class bitmart extends Exchange { const timestamp = this.safeTimestamp (ticker, 'timestamp', this.milliseconds ()); const marketId = this.safeString2 (ticker, 'symbol', 'contract_id'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat2 (ticker, 'close_24h', 'last_price'); - let percentage = this.safeFloat (ticker, 'fluctuation', 'rise_fall_rate'); + const last = this.safeNumber2 (ticker, 'close_24h', 'last_price'); + let percentage = this.safeNumber (ticker, 'fluctuation', 'rise_fall_rate'); if (percentage !== undefined) { percentage *= 100; } - const baseVolume = this.safeFloat2 (ticker, 'base_volume_24h', 'base_coin_volume'); - const quoteVolume = this.safeFloat2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); + const baseVolume = this.safeNumber2 (ticker, 'base_volume_24h', 'base_coin_volume'); + const quoteVolume = this.safeNumber2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const open = this.safeFloat2 (ticker, 'open_24h', 'open'); + const open = this.safeNumber2 (ticker, 'open_24h', 'open'); let average = undefined; if ((last !== undefined) && (open !== undefined)) { average = this.sum (last, open) / 2; } - average = this.safeFloat (ticker, 'avg_price', average); + average = this.safeNumber (ticker, 'avg_price', average); const price = this.safeValue (ticker, 'depth_price', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), - 'bid': this.safeFloat (price, 'best_bid', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (price, 'best_ask', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), + 'bid': this.safeNumber (price, 'best_bid', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (price, 'best_ask', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open_24h'), + 'open': this.safeNumber (ticker, 'open_24h'), 'close': last, 'last': last, 'previousClose': undefined, @@ -23280,18 +25075,18 @@ module.exports = class bitmart extends Exchange { if (execType !== undefined) { takerOrMaker = (execType === 'M') ? 'maker' : 'taker'; } - let price = this.safeFloat2 (trade, 'price', 'deal_price'); - price = this.safeFloat (trade, 'price_avg', price); - let amount = this.safeFloat2 (trade, 'amount', 'deal_vol'); - amount = this.safeFloat (trade, 'size', amount); - let cost = this.safeFloat2 (trade, 'count', 'notional'); + let price = this.safeNumber2 (trade, 'price', 'deal_price'); + price = this.safeNumber (trade, 'price_avg', price); + let amount = this.safeNumber2 (trade, 'amount', 'deal_vol'); + amount = this.safeNumber (trade, 'size', amount); + let cost = this.safeNumber2 (trade, 'count', 'notional'); if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { cost = amount * price; } const orderId = this.safeInteger (trade, 'order_id'); const marketId = this.safeString2 (trade, 'contract_id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (trade, 'fees'); + const feeCost = this.safeNumber (trade, 'fees'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_coin_name'); @@ -23419,11 +25214,11 @@ module.exports = class bitmart extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -23750,11 +25545,11 @@ module.exports = class bitmart extends Exchange { currencyId = this.safeString (balance, 'coind_code', currencyId); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat2 (balance, 'available', 'available_vol'); - account['used'] = this.safeFloat2 (balance, 'frozen', 'freeze_vol'); + account['free'] = this.safeString2 (balance, 'available', 'available_vol'); + account['used'] = this.safeString2 (balance, 'frozen', 'freeze_vol'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -23823,29 +25618,10 @@ module.exports = class bitmart extends Exchange { if (market !== undefined) { status = this.parseOrderStatusByType (market['type'], this.safeString (order, 'status')); } - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat2 (order, 'price_avg', 'done_avg_price'); - const amount = this.safeFloat2 (order, 'size', 'vol'); - let cost = undefined; - let filled = this.safeFloat2 (order, 'filled_size', 'done_vol'); - let remaining = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - if (filled === undefined) { - filled = Math.max (0, amount - remaining); - } - } - if (filled !== undefined) { - if (remaining === undefined) { - remaining = Math.max (0, amount - filled); - } - if (cost === undefined) { - if (average !== undefined) { - cost = average * filled; - } - } - } - } + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber2 (order, 'price_avg', 'done_avg_price'); + const amount = this.safeNumber2 (order, 'size', 'vol'); + const filled = this.safeNumber2 (order, 'filled_size', 'done_vol'); let side = this.safeString (order, 'side'); // 1 = Open long // 2 = Close short @@ -23867,7 +25643,7 @@ module.exports = class bitmart extends Exchange { average = undefined; } } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -23882,14 +25658,14 @@ module.exports = class bitmart extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatusByType (type, status) { @@ -23930,7 +25706,7 @@ module.exports = class bitmart extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -24516,12 +26292,12 @@ module.exports = class bitmart extends Exchange { type = 'deposit'; id = depositId; } - const amount = this.safeFloat (transaction, 'arrival_amount'); + const amount = this.safeNumber (transaction, 'arrival_amount'); const timestamp = this.safeInteger (transaction, 'tapply_timeime'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -24637,1735 +26413,7 @@ module.exports = class bitmart extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],37:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); - -// --------------------------------------------------------------------------- - -module.exports = class bitmax extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'bitmax', - 'name': 'BitMax', - 'countries': [ 'CN' ], // China - 'rateLimit': 500, - // new metainfo interface - 'has': { - 'CORS': false, - 'fetchMarkets': true, - 'fetchCurrencies': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchOHLCV': true, - 'fetchTrades': true, - 'fetchAccounts': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'cancelAllOrders': true, - 'fetchDepositAddress': true, - 'fetchTransactions': true, - 'fetchDeposits': true, - 'fetchWithdrawals': true, - 'fetchOrder': true, - 'fetchOrders': true, - 'fetchOpenOrders': true, - 'fetchClosedOrders': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '6h': '360', - '12h': '720', - '1d': '1d', - '1w': '1w', - '1M': '1m', - }, - 'version': 'v1', - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg', - 'api': 'https://bitmax.io', - 'test': 'https://bitmax-test.io', - 'www': 'https://bitmax.io', - 'doc': [ - 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', - ], - 'fees': 'https://bitmax.io/#/feeRate/tradeRate', - 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', - }, - 'api': { - 'public': { - 'get': [ - 'assets', - 'products', - 'ticker', - 'barhist/info', - 'barhist', - 'depth', - 'trades', - 'cash/assets', // not documented - 'cash/products', // not documented - 'margin/assets', // not documented - 'margin/products', // not documented - 'futures/collateral', - 'futures/contracts', - 'futures/ref-px', - 'futures/market-data', - 'futures/funding-rates', - ], - }, - 'accountCategory': { - 'get': [ - 'balance', - 'order/open', - 'order/status', - 'order/hist/current', - 'risk', - ], - 'post': [ - 'order', - 'order/batch', - ], - 'delete': [ - 'order', - 'order/all', - 'order/batch', - ], - }, - 'accountGroup': { - 'get': [ - 'cash/balance', - 'margin/balance', - 'margin/risk', - 'transfer', - 'futures/collateral-balance', - 'futures/position', - 'futures/risk', - 'futures/funding-payments', - 'order/hist', - ], - 'post': [ - 'futures/transfer/deposit', - 'futures/transfer/withdraw', - ], - }, - 'private': { - 'get': [ - 'info', - 'wallet/transactions', - 'wallet/deposit/address', // not documented - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'taker': 0.002, - 'maker': 0.002, - }, - }, - 'precisionMode': TICK_SIZE, - 'options': { - 'account-category': 'cash', // 'cash'/'margin'/'futures' - 'account-group': undefined, - 'fetchClosedOrders': { - 'method': 'accountGroupGetOrderHist', // 'accountGroupGetAccountCategoryOrderHistCurrent' - }, - }, - 'exceptions': { - 'exact': { - // not documented - '1900': BadRequest, // {"code":1900,"message":"Invalid Http Request Input"} - '2100': AuthenticationError, // {"code":2100,"message":"ApiKeyFailure"} - '5002': BadSymbol, // {"code":5002,"message":"Invalid Symbol"} - '6001': BadSymbol, // {"code":6001,"message":"Trading is disabled on symbol."} - '6010': InsufficientFunds, // {'code': 6010, 'message': 'Not enough balance.'} - '60060': InvalidOrder, // { 'code': 60060, 'message': 'The order is already filled or canceled.' } - '600503': InvalidOrder, // {"code":600503,"message":"Notional is too small."} - // documented - '100001': BadRequest, // INVALID_HTTP_INPUT Http request is invalid - '100002': BadRequest, // DATA_NOT_AVAILABLE Some required data is missing - '100003': BadRequest, // KEY_CONFLICT The same key exists already - '100004': BadRequest, // INVALID_REQUEST_DATA The HTTP request contains invalid field or argument - '100005': BadRequest, // INVALID_WS_REQUEST_DATA Websocket request contains invalid field or argument - '100006': BadRequest, // INVALID_ARGUMENT The arugment is invalid - '100007': BadRequest, // ENCRYPTION_ERROR Something wrong with data encryption - '100008': BadSymbol, // SYMBOL_ERROR Symbol does not exist or not valid for the request - '100009': AuthenticationError, // AUTHORIZATION_NEEDED Authorization is require for the API access or request - '100010': BadRequest, // INVALID_OPERATION The action is invalid or not allowed for the account - '100011': BadRequest, // INVALID_TIMESTAMP Not a valid timestamp - '100012': BadRequest, // INVALID_STR_FORMAT String format does not - '100013': BadRequest, // INVALID_NUM_FORMAT Invalid number input - '100101': ExchangeError, // UNKNOWN_ERROR Some unknown error - '150001': BadRequest, // INVALID_JSON_FORMAT Require a valid json object - '200001': AuthenticationError, // AUTHENTICATION_FAILED Authorization failed - '200002': ExchangeError, // TOO_MANY_ATTEMPTS Tried and failed too many times - '200003': ExchangeError, // ACCOUNT_NOT_FOUND Account not exist - '200004': ExchangeError, // ACCOUNT_NOT_SETUP Account not setup properly - '200005': ExchangeError, // ACCOUNT_ALREADY_EXIST Account already exist - '200006': ExchangeError, // ACCOUNT_ERROR Some error related with error - '200007': ExchangeError, // CODE_NOT_FOUND - '200008': ExchangeError, // CODE_EXPIRED Code expired - '200009': ExchangeError, // CODE_MISMATCH Code does not match - '200010': AuthenticationError, // PASSWORD_ERROR Wrong assword - '200011': ExchangeError, // CODE_GEN_FAILED Do not generate required code promptly - '200012': ExchangeError, // FAKE_COKE_VERIFY - '200013': ExchangeError, // SECURITY_ALERT Provide security alert message - '200014': PermissionDenied, // RESTRICTED_ACCOUNT Account is restricted for certain activity, such as trading, or withdraw. - '200015': PermissionDenied, // PERMISSION_DENIED No enough permission for the operation - '300001': InvalidOrder, // INVALID_PRICE Order price is invalid - '300002': InvalidOrder, // INVALID_QTY Order size is invalid - '300003': InvalidOrder, // INVALID_SIDE Order side is invalid - '300004': InvalidOrder, // INVALID_NOTIONAL Notional is too small or too large - '300005': InvalidOrder, // INVALID_TYPE Order typs is invalid - '300006': InvalidOrder, // INVALID_ORDER_ID Order id is invalid - '300007': InvalidOrder, // INVALID_TIME_IN_FORCE Time In Force in order request is invalid - '300008': InvalidOrder, // INVALID_ORDER_PARAMETER Some order parameter is invalid - '300009': InvalidOrder, // TRADING_VIOLATION Trading violation on account or asset - '300011': InsufficientFunds, // INVALID_BALANCE No enough account or asset balance for the trading - '300012': BadSymbol, // INVALID_PRODUCT Not a valid product supported by exchange - '300013': InvalidOrder, // INVALID_BATCH_ORDER Some or all orders are invalid in batch order request - '300020': InvalidOrder, // TRADING_RESTRICTED There is some trading restriction on account or asset - '300021': InvalidOrder, // TRADING_DISABLED Trading is disabled on account or asset - '300031': InvalidOrder, // NO_MARKET_PRICE No market price for market type order trading - '310001': InsufficientFunds, // INVALID_MARGIN_BALANCE No enough margin balance - '310002': InvalidOrder, // INVALID_MARGIN_ACCOUNT Not a valid account for margin trading - '310003': InvalidOrder, // MARGIN_TOO_RISKY Leverage is too high - '310004': BadSymbol, // INVALID_MARGIN_ASSET This asset does not support margin trading - '310005': InvalidOrder, // INVALID_REFERENCE_PRICE There is no valid reference price - '510001': ExchangeError, // SERVER_ERROR Something wrong with server. - '900001': ExchangeError, // HUMAN_CHALLENGE Human change do not pass - }, - 'broad': {}, - }, - 'commonCurrencies': { - 'BTCBEAR': 'BEAR', - 'BTCBULL': 'BULL', - }, - }); - } - - getAccount (params = {}) { - // get current or provided bitmax sub-account - const account = this.safeValue (params, 'account', this.options['account']); - return account.toLowerCase ().capitalize (); - } - - async fetchCurrencies (params = {}) { - const assets = await this.publicGetAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode" : "LTCBULL", - // "assetName" : "3X Long LTC Token", - // "precisionScale" : 9, - // "nativeScale" : 4, - // "withdrawalFee" : "0.2", - // "minWithdrawalAmt" : "1.0", - // "status" : "Normal" - // }, - // ] - // } - // - const margin = await this.publicGetMarginAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode":"BTT", - // "borrowAssetCode":"BTT-B", - // "interestAssetCode":"BTT-I", - // "nativeScale":0, - // "numConfirmations":1, - // "withdrawFee":"100.0", - // "minWithdrawalAmt":"1000.0", - // "statusCode":"Normal", - // "statusMessage":"", - // "interestRate":"0.001" - // } - // ] - // } - // - const cash = await this.publicGetCashAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode":"LTCBULL", - // "nativeScale":4, - // "numConfirmations":20, - // "withdrawFee":"0.2", - // "minWithdrawalAmt":"1.0", - // "statusCode":"Normal", - // "statusMessage":"" - // } - // ] - // } - // - const assetsData = this.safeValue (assets, 'data', []); - const marginData = this.safeValue (margin, 'data', []); - const cashData = this.safeValue (cash, 'data', []); - const assetsById = this.indexBy (assetsData, 'assetCode'); - const marginById = this.indexBy (marginData, 'assetCode'); - const cashById = this.indexBy (cashData, 'assetCode'); - const dataById = this.deepExtend (assetsById, marginById, cashById); - const ids = Object.keys (dataById); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const currency = dataById[id]; - const code = this.safeCurrencyCode (id); - const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); - // why would the exchange API have different names for the same field - const fee = this.safeFloat2 (currency, 'withdrawFee', 'withdrawalFee'); - const status = this.safeString2 (currency, 'status', 'statusCode'); - const active = (status === 'Normal'); - const margin = ('borrowAssetCode' in currency); - result[code] = { - 'id': id, - 'code': code, - 'info': currency, - 'type': undefined, - 'margin': margin, - 'name': this.safeString (currency, 'assetName'), - 'active': active, - 'fee': fee, - 'precision': precision, - 'limits': { - 'amount': { - 'min': Math.pow (10, -precision), - 'max': undefined, - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': undefined, - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawalAmt'), - 'max': undefined, - }, - }, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - const products = await this.publicGetProducts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"LBA/BTC", - // "baseAsset":"LBA", - // "quoteAsset":"BTC", - // "status":"Normal", - // "minNotional":"0.000625", - // "maxNotional":"6.25", - // "marginTradable":false, - // "commissionType":"Quote", - // "commissionReserveRate":"0.001", - // "tickSize":"0.000000001", - // "lotSize":"1" - // }, - // ] - // } - // - const cash = await this.publicGetCashProducts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"QTUM/BTC", - // "domain":"BTC", - // "tradingStartTime":1569506400000, - // "collapseDecimals":"0.0001,0.000001,0.00000001", - // "minQty":"0.000000001", - // "maxQty":"1000000000", - // "minNotional":"0.000625", - // "maxNotional":"12.5", - // "statusCode":"Normal", - // "statusMessage":"", - // "tickSize":"0.00000001", - // "useTick":false, - // "lotSize":"0.1", - // "useLot":false, - // "commissionType":"Quote", - // "commissionReserveRate":"0.001", - // "qtyScale":1, - // "priceScale":8, - // "notionalScale":4 - // } - // ] - // } - // - const futures = await this.publicGetFuturesContracts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"BTC-PERP", - // "tradingStartTime":1579701600000, - // "collapseDecimals":"1,0.1,0.01", - // "minQty":"0.000000001", - // "maxQty":"1000000000", - // "minNotional":"5", - // "maxNotional":"1000000", - // "statusCode":"Normal", - // "statusMessage":"", - // "tickSize":"0.25", - // "lotSize":"0.0001", - // "priceScale":2, - // "qtyScale":4, - // "notionalScale":2 - // } - // ] - // } - // - const productsData = this.safeValue (products, 'data', []); - const productsById = this.indexBy (productsData, 'symbol'); - const cashData = this.safeValue (cash, 'data', []); - const futuresData = this.safeValue (futures, 'data', []); - const cashAndFuturesData = this.arrayConcat (cashData, futuresData); - const cashAndFuturesById = this.indexBy (cashAndFuturesData, 'symbol'); - const dataById = this.deepExtend (productsById, cashAndFuturesById); - const ids = Object.keys (dataById); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const market = dataById[id]; - const baseId = this.safeString (market, 'baseAsset'); - const quoteId = this.safeString (market, 'quoteAsset'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), - }; - const status = this.safeString (market, 'status'); - const active = (status === 'Normal'); - const type = ('useLot' in market) ? 'spot' : 'future'; - const spot = (type === 'spot'); - const future = (type === 'future'); - let symbol = id; - if (!future) { - symbol = base + '/' + quote; - } - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'type': type, - 'spot': spot, - 'future': future, - 'active': active, - 'precision': precision, - 'limits': { - 'amount': { - 'min': this.safeFloat (market, 'minQty'), - 'max': this.safeFloat (market, 'maxQty'), - }, - 'price': { - 'min': this.safeFloat (market, 'tickSize'), - 'max': undefined, - }, - 'cost': { - 'min': this.safeFloat (market, 'minNotional'), - 'max': this.safeFloat (market, 'maxNotional'), - }, - }, - }); - } - return result; - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - // TODO: fee calculation here is incorrect, we need to support tiered fee calculation. - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - - async fetchAccounts (params = {}) { - let accountGroup = this.safeString (this.options, 'account-group'); - let response = undefined; - if (accountGroup === undefined) { - response = await this.privateGetInfo (params); - // - // { - // "code":0, - // "data":{ - // "email":"igor.kroitor@gmail.com", - // "accountGroup":8, - // "viewPermission":true, - // "tradePermission":true, - // "transferPermission":true, - // "cashAccount":["cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda"], - // "marginAccount":["martXoh1v1N3EMQC5FDtSj5VHso8aI2Z"], - // "futuresAccount":["futc9r7UmFJAyBY2rE3beA2JFxav2XFF"], - // "userUID":"U6491137460" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - accountGroup = this.safeString (data, 'accountGroup'); - this.options['account-group'] = accountGroup; - } - return [ - { - 'id': accountGroup, - 'type': undefined, - 'currency': undefined, - 'info': response, - }, - ]; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchBalance', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeString (account, 'id'); - const request = { - 'account-group': accountGroup, - }; - let method = 'accountCategoryGetBalance'; - if (accountCategory === 'futures') { - method = 'accountGroupGetFuturesCollateralBalance'; - } else { - request['account-category'] = accountCategory; - } - const response = await this[method] (this.extend (request, params)); - // - // cash - // - // { - // 'code': 0, - // 'data': [ - // { - // 'asset': 'BCHSV', - // 'totalBalance': '64.298000048', - // 'availableBalance': '64.298000048', - // }, - // ] - // } - // - // margin - // - // { - // 'code': 0, - // 'data': [ - // { - // 'asset': 'BCHSV', - // 'totalBalance': '64.298000048', - // 'availableBalance': '64.298000048', - // 'borrowed': '0', - // 'interest': '0', - // }, - // ] - // } - // - // futures - // - // { - // "code":0, - // "data":[ - // {"asset":"BTC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"9456.59"}, - // {"asset":"ETH","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"235.95"}, - // {"asset":"USDT","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"}, - // {"asset":"USDC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00035"}, - // {"asset":"PAX","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00045"}, - // {"asset":"USDTR","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"} - // ] - // } - // - const result = { 'info': response }; - const balances = this.safeValue (response, 'data', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - const response = await this.publicGetDepth (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "m":"depth-snapshot", - // "symbol":"BTC-PERP", - // "data":{ - // "ts":1590223998202, - // "seqnum":115444921, - // "asks":[ - // ["9207.5","18.2383"], - // ["9207.75","18.8235"], - // ["9208","10.7873"], - // ], - // "bids":[ - // ["9207.25","0.4009"], - // ["9207","0.003"], - // ["9206.5","0.003"], - // ] - // } - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const orderbook = this.safeValue (data, 'data', {}); - const timestamp = this.safeInteger (orderbook, 'ts'); - const result = this.parseOrderBook (orderbook, timestamp); - result['nonce'] = this.safeInteger (orderbook, 'seqnum'); - return result; - } - - parseTicker (ticker, market = undefined) { - // - // { - // "symbol":"QTUM/BTC", - // "open":"0.00016537", - // "close":"0.00019077", - // "high":"0.000192", - // "low":"0.00016537", - // "volume":"846.6", - // "ask":["0.00018698","26.2"], - // "bid":["0.00018408","503.7"], - // "type":"spot" - // } - // - const timestamp = undefined; - const marketId = this.safeString (ticker, 'symbol'); - let symbol = undefined; - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } else if (marketId !== undefined) { - const type = this.safeString (ticker, 'type'); - if (type === 'spot') { - const [ baseId, quoteId ] = marketId.split ('/'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - } - } - if ((symbol === undefined) && (market !== undefined)) { - symbol = market['symbol']; - } - const close = this.safeFloat (ticker, 'close'); - const bid = this.safeValue (ticker, 'bid', []); - const ask = this.safeValue (ticker, 'ask', []); - const open = this.safeFloat (ticker, 'open'); - let change = undefined; - let percentage = undefined; - let average = undefined; - if ((open !== undefined) && (close !== undefined)) { - change = close - open; - if (open > 0) { - percentage = change / open * 100; - } - average = this.sum (open, close) / 2; - } - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 0), - 'bidVolume': this.safeFloat (bid, 1), - 'ask': this.safeFloat (ask, 0), - 'askVolume': this.safeFloat (ask, 1), - 'vwap': undefined, - 'open': open, - 'close': close, - 'last': close, - 'previousClose': undefined, // previous day close - 'change': change, - 'percentage': percentage, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - const response = await this.publicGetTicker (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "symbol":"BTC-PERP", // or "BTC/USDT" - // "open":"9073", - // "close":"9185.75", - // "high":"9185.75", - // "low":"9185.75", - // "volume":"576.8334", - // "ask":["9185.75","15.5863"], - // "bid":["9185.5","0.003"], - // "type":"derivatives", // or "spot" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - return this.parseTicker (data, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const request = {}; - if (symbols !== undefined) { - const marketIds = this.marketIds (symbols); - request['symbol'] = marketIds.join (','); - } - const response = await this.publicGetTicker (this.extend (request, params)); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"QTUM/BTC", - // "open":"0.00016537", - // "close":"0.00019077", - // "high":"0.000192", - // "low":"0.00016537", - // "volume":"846.6", - // "ask":["0.00018698","26.2"], - // "bid":["0.00018408","503.7"], - // "type":"spot" - // } - // ] - // } - // - const data = this.safeValue (response, 'data', []); - return this.parseTickers (data, symbols); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "m":"bar", - // "s":"BTC/USDT", - // "data":{ - // "i":"1", - // "ts":1590228000000, - // "o":"9139.59", - // "c":"9131.94", - // "h":"9139.99", - // "l":"9121.71", - // "v":"25.20648" - // } - // } - // - const data = this.safeValue (ohlcv, 'data', {}); - return [ - this.safeInteger (data, 'ts'), - this.safeFloat (data, 'o'), - this.safeFloat (data, 'h'), - this.safeFloat (data, 'l'), - this.safeFloat (data, 'c'), - this.safeFloat (data, 'v'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - 'interval': this.timeframes[timeframe], - }; - // if since and limit are not specified - // the exchange will return just 1 last candle by default - const duration = this.parseTimeframe (timeframe); - const options = this.safeValue (this.options, 'fetchOHLCV', {}); - const defaultLimit = this.safeInteger (options, 'limit', 500); - if (since !== undefined) { - request['from'] = since; - if (limit === undefined) { - limit = defaultLimit; - } else { - limit = Math.min (limit, defaultLimit); - } - request['to'] = this.sum (since, limit * duration * 1000, 1); - } else if (limit !== undefined) { - request['n'] = limit; // max 500 - } - const response = await this.publicGetBarhist (this.extend (request, params)); - // - // { - // "code":0, - // "data":[ - // { - // "m":"bar", - // "s":"BTC/USDT", - // "data":{ - // "i":"1", - // "ts":1590228000000, - // "o":"9139.59", - // "c":"9131.94", - // "h":"9139.99", - // "l":"9121.71", - // "v":"25.20648" - // } - // } - // ] - // } - // - const data = this.safeValue (response, 'data', []); - return this.parseOHLCVs (data, market, timeframe, since, limit); - } - - parseTrade (trade, market = undefined) { - // - // public fetchTrades - // - // { - // "p":"9128.5", // price - // "q":"0.0030", // quantity - // "ts":1590229002385, // timestamp - // "bm":false, // if true, the buyer is the market maker, we only use this field to "define the side" of a public trade - // "seqnum":180143985289898554 - // } - // - const timestamp = this.safeInteger (trade, 'ts'); - const price = this.safeFloat2 (trade, 'price', 'p'); - const amount = this.safeFloat (trade, 'q'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } - const buyerIsMaker = this.safeValue (trade, 'bm', false); - const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; - const side = buyerIsMaker ? 'buy' : 'sell'; - let symbol = undefined; - if ((symbol === undefined) && (market !== undefined)) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'id': undefined, - 'order': undefined, - 'type': undefined, - 'takerOrMaker': makerOrTaker, - 'side': side, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - if (limit !== undefined) { - request['n'] = limit; // max 100 - } - const response = await this.publicGetTrades (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "m":"trades", - // "symbol":"BTC-PERP", - // "data":[ - // {"p":"9128.5","q":"0.0030","ts":1590229002385,"bm":false,"seqnum":180143985289898554}, - // {"p":"9129","q":"0.0030","ts":1590229002642,"bm":false,"seqnum":180143985289898587}, - // {"p":"9129.5","q":"0.0030","ts":1590229021306,"bm":false,"seqnum":180143985289899043} - // ] - // } - // } - // - const records = this.safeValue (response, 'data', []); - const trades = this.safeValue (records, 'data', []); - return this.parseTrades (trades, market, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'PendingNew': 'open', - 'New': 'open', - 'PartiallyFilled': 'open', - 'Filled': 'closed', - 'Canceled': 'canceled', - 'Rejected': 'rejected', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - // - // createOrder - // - // { - // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", - // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", - // "orderType": "Market", - // "symbol": "BTC/USDT", - // "timestamp": 1573576916201 - // } - // - // fetchOrder, fetchOpenOrders, fetchClosedOrders - // - // { - // "symbol": "BTC/USDT", - // "price": "8131.22", - // "orderQty": "0.00082", - // "orderType": "Market", - // "avgPx": "7392.02", - // "cumFee": "0.005152238", - // "cumFilledQty": "0.00082", - // "errorCode": "", - // "feeAsset": "USDT", - // "lastExecTime": 1575953151764, - // "orderId": "a16eee20b6750866943712zWEDdAjt3", - // "seqNum": 2623469, - // "side": "Buy", - // "status": "Filled", - // "stopPrice": "", - // "execInst": "NULL_VAL" - // } - // - // { - // "ac": "FUTURES", - // "accountId": "testabcdefg", - // "avgPx": "0", - // "cumFee": "0", - // "cumQty": "0", - // "errorCode": "NULL_VAL", - // "execInst": "NULL_VAL", - // "feeAsset": "USDT", - // "lastExecTime": 1584072844085, - // "orderId": "r170d21956dd5450276356bbtcpKa74", - // "orderQty": "1.1499", - // "orderType": "Limit", - // "price": "4000", - // "sendingTime": 1584072841033, - // "seqNum": 24105338, - // "side": "Buy", - // "status": "Canceled", - // "stopPrice": "", - // "symbol": "BTC-PERP" - // }, - // - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'symbol'); - const symbol = this.safeSymbol (marketId, market, '/'); - let timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); - let lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const average = this.safeFloat (order, 'avgPx'); - const filled = this.safeFloat2 (order, 'cumFilledQty', 'cumQty'); - let remaining = undefined; - if (filled !== undefined) { - if (filled === 0) { - timestamp = lastTradeTimestamp; - lastTradeTimestamp = undefined; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - let cost = undefined; - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - const id = this.safeString (order, 'orderId'); - let clientOrderId = this.safeString (order, 'id'); - if (clientOrderId !== undefined) { - if (clientOrderId.length < 1) { - clientOrderId = undefined; - } - } - const type = this.safeStringLower (order, 'orderType'); - const side = this.safeStringLower (order, 'side'); - const feeCost = this.safeFloat (order, 'cumFee'); - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (order, 'feeAsset'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': stopPrice, - 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, - 'remaining': remaining, - 'status': status, - 'fee': fee, - 'trades': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const market = this.market (symbol); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'createOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'symbol': market['id'], - 'time': this.milliseconds (), - 'orderQty': this.amountToPrecision (symbol, amount), - 'orderType': type, // "limit", "market", "stop_market", "stop_limit" - 'side': side, // "buy" or "sell" - // 'orderPrice': this.priceToPrecision (symbol, price), - // 'stopPrice': this.priceToPrecision (symbol, stopPrice), // required for stop orders - // 'postOnly': 'false', // 'false', 'true' - // 'timeInForce': 'GTC', // GTC, IOC, FOK - // 'respInst': 'ACK', // ACK, 'ACCEPT, DONE - }; - if (clientOrderId !== undefined) { - request['id'] = clientOrderId; - params = this.omit (params, [ 'clientOrderId', 'id' ]); - } - if ((type === 'limit') || (type === 'stop_limit')) { - request['orderPrice'] = this.priceToPrecision (symbol, price); - } - if ((type === 'stop_limit') || (type === 'stop_market')) { - const stopPrice = this.safeFloat (params, 'stopPrice'); - if (stopPrice === undefined) { - throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); - } else { - request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); - params = this.omit (params, 'stopPrice'); - } - } - const response = await this.accountCategoryPostOrder (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "ac": "MARGIN", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "action": "place-order", - // "info": { - // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", - // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", - // "orderType": "Market", - // "symbol": "BTC/USDT", - // "timestamp": 1573576916201 - // }, - // "status": "Ack" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const info = this.safeValue (data, 'info', {}); - return this.parseOrder (info, market); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'orderId': id, - }; - const response = await this.accountCategoryGetOrderStatus (this.extend (request, params)); - // - // { - // "code": 0, - // "accountCategory": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "data": [ - // { - // "symbol": "BTC/USDT", - // "price": "8131.22", - // "orderQty": "0.00082", - // "orderType": "Market", - // "avgPx": "7392.02", - // "cumFee": "0.005152238", - // "cumFilledQty": "0.00082", - // "errorCode": "", - // "feeAsset": "USDT", - // "lastExecTime": 1575953151764, - // "orderId": "a16eee20b6750866943712zWEDdAjt3", - // "seqNum": 2623469, - // "side": "Buy", - // "status": "Filled", - // "stopPrice": "", - // "execInst": "NULL_VAL" - // } - // ] - // } - // - const data = this.safeValue (response, 'data', {}); - return this.parseOrder (data); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchOpenOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - }; - const response = await this.accountCategoryGetOrderOpen (this.extend (request, params)); - // - // { - // "ac": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "code": 0, - // "data": [ - // { - // "avgPx": "0", // Average filled price of the order - // "cumFee": "0", // cumulative fee paid for this order - // "cumFilledQty": "0", // cumulative filled quantity - // "errorCode": "", // error code; could be empty - // "feeAsset": "USDT", // fee asset - // "lastExecTime": 1576019723550, // The last execution time of the order - // "orderId": "s16ef21882ea0866943712034f36d83", // server provided orderId - // "orderQty": "0.0083", // order quantity - // "orderType": "Limit", // order type - // "price": "7105", // order price - // "seqNum": 8193258, // sequence number - // "side": "Buy", // order side - // "status": "New", // order status on matching engine - // "stopPrice": "", // only available for stop market and stop limit orders; otherwise empty - // "symbol": "BTC/USDT", - // "execInst": "NULL_VAL" // execution instruction - // }, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - if (accountCategory === 'futures') { - return this.parseOrders (data, market, since, limit); - } - // a workaround for https://github.com/ccxt/ccxt/issues/7187 - const orders = []; - for (let i = 0; i < data.length; i++) { - const order = this.parseOrder (data[i], market); - orders.push (order); - } - return this.filterBySymbolSinceLimit (orders, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - const defaultAccountCategory = this.safeString (this.options, 'account-category'); - const options = this.safeValue (this.options, 'fetchClosedOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - // 'category': accountCategory, - // 'symbol': market['id'], - // 'orderType': 'market', // optional, string - // 'side': 'buy', // or 'sell', optional, case insensitive. - // 'status': 'Filled', // "Filled", "Canceled", or "Rejected" - // 'startTime': exchange.milliseconds (), - // 'endTime': exchange.milliseconds (), - // 'page': 1, - // 'pageSize': 100, - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['symbol'] = market['id']; - } - const method = this.safeValue (options, 'method', 'accountGroupGetOrderHist'); - if (method === 'accountGroupGetOrderHist') { - if (accountCategory !== undefined) { - request['category'] = accountCategory; - } - } else { - request['account-category'] = accountCategory; - } - if (since !== undefined) { - request['startTime'] = since; - } - if (limit !== undefined) { - request['pageSize'] = limit; - } - const response = await this[method] (this.extend (request, params)); - // - // accountCategoryGetOrderHistCurrent - // - // { - // "code":0, - // "accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda", - // "ac":"CASH", - // "data":[ - // { - // "seqNum":15561826728, - // "orderId":"a17294d305c0U6491137460bethu7kw9", - // "symbol":"ETH/USDT", - // "orderType":"Limit", - // "lastExecTime":1591635618200, - // "price":"200", - // "orderQty":"0.1", - // "side":"Buy", - // "status":"Canceled", - // "avgPx":"0", - // "cumFilledQty":"0", - // "stopPrice":"", - // "errorCode":"", - // "cumFee":"0", - // "feeAsset":"USDT", - // "execInst":"NULL_VAL" - // } - // ] - // } - // - // accountGroupGetOrderHist - // - // { - // "code": 0, - // "data": { - // "data": [ - // { - // "ac": "FUTURES", - // "accountId": "testabcdefg", - // "avgPx": "0", - // "cumFee": "0", - // "cumQty": "0", - // "errorCode": "NULL_VAL", - // "execInst": "NULL_VAL", - // "feeAsset": "USDT", - // "lastExecTime": 1584072844085, - // "orderId": "r170d21956dd5450276356bbtcpKa74", - // "orderQty": "1.1499", - // "orderType": "Limit", - // "price": "4000", - // "sendingTime": 1584072841033, - // "seqNum": 24105338, - // "side": "Buy", - // "status": "Canceled", - // "stopPrice": "", - // "symbol": "BTC-PERP" - // }, - // ], - // "hasNext": False, - // "limit": 500, - // "page": 1, - // "pageSize": 20 - // } - // } - // - let data = this.safeValue (response, 'data'); - const isArray = Array.isArray (data); - if (!isArray) { - data = this.safeValue (data, 'data', []); - } - return this.parseOrders (data, market, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); - } - await this.loadMarkets (); - await this.loadAccounts (); - const market = this.market (symbol); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'cancelOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'symbol': market['id'], - 'time': this.milliseconds (), - 'id': 'foobar', - }; - if (clientOrderId === undefined) { - request['orderId'] = id; - } else { - request['id'] = clientOrderId; - params = this.omit (params, [ 'clientOrderId', 'id' ]); - } - const response = await this.accountCategoryDeleteOrder (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "ac": "CASH", - // "action": "cancel-order", - // "status": "Ack", - // "info": { - // "id": "wv8QGquoeamhssvQBeHOHGQCGlcBjj23", - // "orderId": "16e6198afb4s8bXHbAwwoqDo2ebc19dc", - // "orderType": "", // could be empty - // "symbol": "ETH/USDT", - // "timestamp": 1573594877822 - // } - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const info = this.safeValue (data, 'info', {}); - return this.parseOrder (info, market); - } - - async cancelAllOrders (symbol = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'cancelAllOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'time': this.milliseconds (), - }; - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - request['symbol'] = market['id']; - } - const response = await this.accountCategoryDeleteOrderAll (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "ac": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "action": "cancel-all", - // "info": { - // "id": "2bmYvi7lyTrneMzpcJcf2D7Pe9V1P9wy", - // "orderId": "", - // "orderType": "NULL_VAL", - // "symbol": "", - // "timestamp": 1574118495462 - // }, - // "status": "Ack" - // } - // } - // - return response; - } - - parseDepositAddress (depositAddress, currency = undefined) { - // - // { - // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // destTag: "", - // tagType: "", - // tagId: "", - // chainName: "ERC20", - // numConfirmations: 20, - // withdrawalFee: 1, - // nativeScale: 4, - // tips: [] - // } - // - const address = this.safeString (depositAddress, 'address'); - const tagId = this.safeString (depositAddress, 'tagId'); - const tag = this.safeString (depositAddress, tagId); - this.checkAddress (address); - const code = (currency === undefined) ? undefined : currency['code']; - return { - 'currency': code, - 'address': address, - 'tag': tag, - 'info': depositAddress, - }; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const chainName = this.safeString (params, 'chainName'); - params = this.omit (params, 'chainName'); - const request = { - 'asset': currency['id'], - }; - const response = await this.privateGetWalletDepositAddress (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "asset":"USDT", - // "assetName":"Tether", - // "address":[ - // { - // "address":"1N22odLHXnLPCjC8kwBJPTayarr9RtPod6", - // "destTag":"", - // "tagType":"", - // "tagId":"", - // "chainName":"Omni", - // "numConfirmations":3, - // "withdrawalFee":4.7, - // "nativeScale":4, - // "tips":[] - // }, - // { - // "address":"0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // "destTag":"", - // "tagType":"", - // "tagId":"", - // "chainName":"ERC20", - // "numConfirmations":20, - // "withdrawalFee":1.0, - // "nativeScale":4, - // "tips":[] - // } - // ] - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const addresses = this.safeValue (data, 'address', []); - const numAddresses = addresses.length; - let address = undefined; - if (numAddresses > 1) { - const addressesByChainName = this.indexBy (addresses, 'chainName'); - if (chainName === undefined) { - const chainNames = Object.keys (addressesByChainName); - const chains = chainNames.join (', '); - throw new ArgumentsRequired (this.id + ' fetchDepositAddress returned more than one address, a chainName parameter is required, one of ' + chains); - } - address = this.safeValue (addressesByChainName, chainName, {}); - } else { - // first address - address = this.safeValue (addresses, 0, {}); - } - const result = this.parseDepositAddress (address, currency); - return this.extend (result, { - 'info': response, - }); - } - - async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { - const request = { - 'txType': 'deposit', - }; - return await this.fetchTransactions (code, since, limit, this.extend (request, params)); - } - - async fetchWithdrawals (code = undefined, since = undefined, limit = undefined, params = {}) { - const request = { - 'txType': 'withdrawal', - }; - return await this.fetchTransactions (code, since, limit, this.extend (request, params)); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'asset': currency['id'], - // 'page': 1, - // 'pageSize': 20, - // 'startTs': this.milliseconds (), - // 'endTs': this.milliseconds (), - // 'txType': undefned, // deposit, withdrawal - }; - let currency = undefined; - if (code !== undefined) { - currency = this.currency (code); - request['asset'] = currency['id']; - } - if (since !== undefined) { - request['startTs'] = since; - } - if (limit !== undefined) { - request['pageSize'] = limit; - } - const response = await this.privateGetWalletTransactions (this.extend (request, params)); - // - // { - // code: 0, - // data: { - // data: [ - // { - // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", - // time: 1591606166000, - // asset: "USDT", - // transactionType: "deposit", - // amount: "25", - // commission: "0", - // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", - // status: "pending", - // numConfirmed: 8, - // numConfirmations: 20, - // destAddress: { address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722" } - // } - // ], - // page: 1, - // pageSize: 20, - // hasNext: false - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const transactions = this.safeValue (data, 'data', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - 'reviewing': 'pending', - 'pending': 'pending', - 'confirmed': 'ok', - 'rejected': 'rejected', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", - // time: 1591606166000, - // asset: "USDT", - // transactionType: "deposit", - // amount: "25", - // commission: "0", - // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", - // status: "pending", - // numConfirmed: 8, - // numConfirmations: 20, - // destAddress: { - // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // destTag: "..." // for currencies that have it - // } - // } - // - const id = this.safeString (transaction, 'requestId'); - const amount = this.safeFloat (transaction, 'amount'); - const destAddress = this.safeValue (transaction, 'destAddress', {}); - const address = this.safeString (destAddress, 'address'); - const tag = this.safeString (destAddress, 'destTag'); - const txid = this.safeString (transaction, 'networkTransactionId'); - const type = this.safeString (transaction, 'transactionType'); - const timestamp = this.safeInteger (transaction, 'time'); - const currencyId = this.safeString (transaction, 'asset'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'commission'); - return { - 'info': transaction, - 'id': id, - 'currency': code, - 'amount': amount, - 'address': address, - 'addressTo': address, - 'addressFrom': undefined, - 'tag': tag, - 'tagTo': tag, - 'tagFrom': undefined, - 'status': status, - 'type': type, - 'updated': undefined, - 'txid': txid, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'fee': { - 'currency': code, - 'cost': feeCost, - }, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = ''; - let query = params; - const accountCategory = (api === 'accountCategory'); - if (accountCategory || (api === 'accountGroup')) { - url += this.implodeParams ('/{account-group}', params); - query = this.omit (params, 'account-group'); - } - const request = this.implodeParams (path, query); - url += '/api/pro/' + this.version; - if (accountCategory) { - url += this.implodeParams ('/{account-category}', query); - query = this.omit (query, 'account-category'); - } - url += '/' + request; - query = this.omit (query, this.extractParams (path)); - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const timestamp = this.milliseconds ().toString (); - const payload = timestamp + '+' + request; - const hmac = this.hmac (this.encode (payload), this.encode (this.secret), 'sha256', 'base64'); - headers = { - 'x-auth-key': this.apiKey, - 'x-auth-timestamp': timestamp, - 'x-auth-signature': hmac, - }; - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - headers['Content-Type'] = 'application/json'; - body = this.json (query); - } - } - url = this.urls['api'] + url; - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - // - // {'code': 6010, 'message': 'Not enough balance.'} - // {'code': 60060, 'message': 'The order is already filled or canceled.'} - // {"code":2100,"message":"ApiKeyFailure"} - // {"code":300001,"message":"Price is too low from market price.","reason":"INVALID_PRICE","accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda","ac":"CASH","action":"place-order","status":"Err","info":{"symbol":"BTC/USDT"}} - // - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'message'); - const error = (code !== undefined) && (code !== '0'); - if (error || (message !== undefined)) { - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],38:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],38:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -26373,6 +26421,7 @@ module.exports = class bitmax extends Exchange { const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -26583,8 +26632,8 @@ module.exports = class bitmex extends Exchange { 'amount': undefined, 'price': undefined, }; - const lotSize = this.safeFloat (market, 'lotSize'); - const tickSize = this.safeFloat (market, 'tickSize'); + const lotSize = this.safeNumber (market, 'lotSize'); + const tickSize = this.safeNumber (market, 'tickSize'); if (lotSize !== undefined) { precision['amount'] = lotSize; } @@ -26598,7 +26647,7 @@ module.exports = class bitmex extends Exchange { }, 'price': { 'min': tickSize, - 'max': this.safeFloat (market, 'maxPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { 'min': undefined, @@ -26608,7 +26657,7 @@ module.exports = class bitmex extends Exchange { const limitField = (position === quote) ? 'cost' : 'amount'; limits[limitField] = { 'min': lotSize, - 'max': this.safeFloat (market, 'maxOrderQty'), + 'max': this.safeNumber (market, 'maxOrderQty'), }; result.push ({ 'id': id, @@ -26620,8 +26669,8 @@ module.exports = class bitmex extends Exchange { 'active': active, 'precision': precision, 'limits': limits, - 'taker': this.safeFloat (market, 'takerFee'), - 'maker': this.safeFloat (market, 'makerFee'), + 'taker': this.safeNumber (market, 'takerFee'), + 'maker': this.safeNumber (market, 'makerFee'), 'type': type, 'spot': false, 'swap': swap, @@ -26687,21 +26736,17 @@ module.exports = class bitmex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - let free = this.safeFloat (balance, 'availableMargin'); - let total = this.safeFloat (balance, 'marginBalance'); + let free = this.safeString (balance, 'availableMargin'); + let total = this.safeString (balance, 'marginBalance'); if (code === 'BTC') { - if (free !== undefined) { - free /= 100000000; - } - if (total !== undefined) { - total /= 100000000; - } + free = Precise.stringDiv (free, '1e8'); + total = Precise.stringDiv (total, '1e8'); } account['free'] = free; account['total'] = total; result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -26780,8 +26825,8 @@ module.exports = class bitmex extends Exchange { for (let i = 0; i < response.length; i++) { const order = response[i]; const side = (order['side'] === 'Sell') ? 'asks' : 'bids'; - const amount = this.safeFloat (order, 'size'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const price = this.safeNumber (order, 'price'); // https://github.com/ccxt/ccxt/issues/4926 // https://github.com/ccxt/ccxt/issues/4927 // the exchange sometimes returns null price in the orderbook @@ -26987,7 +27032,7 @@ module.exports = class bitmex extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'transactType')); const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount !== undefined) { amount = amount / 100000000; } @@ -26998,7 +27043,7 @@ module.exports = class bitmex extends Exchange { // for unrealized pnl and other transactions without a timestamp timestamp = 0; // see comments above } - let feeCost = this.safeFloat (item, 'fee', 0); + let feeCost = this.safeNumber (item, 'fee', 0); if (feeCost !== undefined) { feeCost = feeCost / 100000000; } @@ -27006,7 +27051,7 @@ module.exports = class bitmex extends Exchange { 'cost': feeCost, 'currency': code, }; - let after = this.safeFloat (item, 'walletBalance'); + let after = this.safeNumber (item, 'walletBalance'); if (after !== undefined) { after = after / 100000000; } @@ -27325,8 +27370,8 @@ module.exports = class bitmex extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const open = this.safeFloat (ticker, 'prevPrice24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'prevPrice24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; if (last !== undefined && open !== undefined) { @@ -27339,13 +27384,13 @@ module.exports = class bitmex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askPrice'), + 'ask': this.safeNumber (ticker, 'askPrice'), 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'vwap'), + 'vwap': this.safeNumber (ticker, 'vwap'), 'open': open, 'close': last, 'last': last, @@ -27353,8 +27398,8 @@ module.exports = class bitmex extends Exchange { 'change': change, 'percentage': percentage, 'average': this.sum (open, last) / 2, - 'baseVolume': this.safeFloat (ticker, 'homeNotional24h'), - 'quoteVolume': this.safeFloat (ticker, 'foreignNotional24h'), + 'baseVolume': this.safeNumber (ticker, 'homeNotional24h'), + 'quoteVolume': this.safeNumber (ticker, 'foreignNotional24h'), 'info': ticker, }; } @@ -27379,11 +27424,11 @@ module.exports = class bitmex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -27512,23 +27557,23 @@ module.exports = class bitmex extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat2 (trade, 'avgPx', 'price'); - const amount = this.safeFloat2 (trade, 'size', 'lastQty'); + const price = this.safeNumber2 (trade, 'avgPx', 'price'); + const amount = this.safeNumber2 (trade, 'size', 'lastQty'); const id = this.safeString (trade, 'trdMatchID'); const order = this.safeString (trade, 'orderID'); const side = this.safeStringLower (trade, 'side'); // price * amount doesn't work for all symbols (e.g. XBT, ETH) - let cost = this.safeFloat (trade, 'execCost'); + let cost = this.safeNumber (trade, 'execCost'); if (cost !== undefined) { cost = Math.abs (cost) / 100000000; } let fee = undefined; if ('execComm' in trade) { - let feeCost = this.safeFloat (trade, 'execComm'); + let feeCost = this.safeNumber (trade, 'execComm'); feeCost = feeCost / 100000000; const currencyId = this.safeString (trade, 'settlCurrency'); const feeCurrency = this.safeCurrencyCode (currencyId); - const feeRate = this.safeFloat (trade, 'commission'); + const feeRate = this.safeNumber (trade, 'commission'); fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -27630,33 +27675,19 @@ module.exports = class bitmex extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'transactTime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty', 0.0); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (amount - filled, 0.0); - } - } - const average = this.safeFloat (order, 'avgPx'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = average * filled; - } else if (price !== undefined) { - cost = price * filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty', 0.0); + const average = this.safeNumber (order, 'avgPx'); const id = this.safeString (order, 'orderID'); const type = this.safeStringLower (order, 'ordType'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'clOrdID'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'ParticipateDoNotInitiate'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -27671,14 +27702,14 @@ module.exports = class bitmex extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { @@ -27739,7 +27770,7 @@ module.exports = class bitmex extends Exchange { 'ordType': orderType, }; if ((orderType === 'Stop') || (orderType === 'StopLimit') || (orderType === 'MarketIfTouched') || (orderType === 'LimitIfTouched')) { - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPx or stopPrice parameter for the ' + orderType + ' order type'); } else { @@ -27856,7 +27887,7 @@ module.exports = class bitmex extends Exchange { return this.parseOrders (response, market); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPosition (params); // [ @@ -28051,7 +28082,7 @@ module.exports = class bitmex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],39:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],39:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -28382,7 +28413,7 @@ module.exports = class bitpanda extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; @@ -28455,9 +28486,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -28504,8 +28535,8 @@ module.exports = class bitpanda extends Exchange { const activeFeeTier = this.safeValue (response, 'active_fee_tier', {}); const result = { 'info': response, - 'maker': this.safeFloat (activeFeeTier, 'maker_fee'), - 'taker': this.safeFloat (activeFeeTier, 'taker_fee'), + 'maker': this.safeNumber (activeFeeTier, 'maker_fee'), + 'taker': this.safeNumber (activeFeeTier, 'taker_fee'), 'percentage': true, 'tierBased': true, }; @@ -28514,9 +28545,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -28554,27 +28585,27 @@ module.exports = class bitpanda extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last_price'); - const percentage = this.safeFloat (ticker, 'price_change_percentage'); - const change = this.safeFloat (ticker, 'price_change'); + const last = this.safeNumber (ticker, 'last_price'); + const percentage = this.safeNumber (ticker, 'price_change_percentage'); + const change = this.safeNumber (ticker, 'price_change'); let open = undefined; let average = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'best_bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -28759,11 +28790,11 @@ module.exports = class bitpanda extends Exchange { const volumeField = this.safeString (options, 'volume', 'total_amount'); return [ alignedTimestamp, - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -28849,21 +28880,21 @@ module.exports = class bitpanda extends Exchange { timestamp = this.parse8601 (this.safeString (trade, 'time')); } const side = this.safeStringLower2 (trade, 'side', 'taker_side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + let cost = this.safeNumber (trade, 'volume'); if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { cost = amount * price; } const marketId = this.safeString (trade, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (feeInfo, 'fee_amount'); + const feeCost = this.safeNumber (feeInfo, 'fee_amount'); let takerOrMaker = undefined; let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (feeInfo, 'fee_percentage'); + const feeRate = this.safeNumber (feeInfo, 'fee_percentage'); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, @@ -28946,11 +28977,11 @@ module.exports = class bitpanda extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -29204,12 +29235,12 @@ module.exports = class bitpanda extends Exchange { // } // const id = this.safeString (transaction, 'transaction_id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const currencyId = this.safeString (transaction, 'currency'); currency = this.safeCurrency (currencyId, currency); const status = 'ok'; // the exchange returns cleared transactions only - const feeCost = this.safeFloat2 (transaction, 'fee_amount', 'fee'); + const feeCost = this.safeNumber2 (transaction, 'fee_amount', 'fee'); let fee = undefined; const addressTo = this.safeString (transaction, 'recipient'); const tagTo = this.safeString (transaction, 'destination_tag'); @@ -29324,72 +29355,34 @@ module.exports = class bitpanda extends Exchange { // ] // } // - const rawTrades = this.safeValue (order, 'trades', []); - order = this.safeValue (order, 'order', order); - const id = this.safeString (order, 'order_id'); - const clientOrderId = this.safeString (order, 'client_id'); - const timestamp = this.parse8601 (this.safeString (order, 'time')); - let status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'instrument_code'); + const rawOrder = this.safeValue (order, 'order', order); + const id = this.safeString (rawOrder, 'order_id'); + const clientOrderId = this.safeString (rawOrder, 'client_id'); + const timestamp = this.parse8601 (this.safeString (rawOrder, 'time')); + const rawStatus = this.parseOrderStatus (this.safeString (rawOrder, 'status')); + const status = this.parseOrderStatus (rawStatus); + const marketId = this.safeString (rawOrder, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - if (status === undefined) { - if (remaining > 0) { - status = 'open'; - } else { - status = 'closed'; - } - } - } - } - const side = this.safeStringLower (order, 'side'); - const type = this.safeStringLower (order, 'type'); - const trades = this.parseTrades (rawTrades, market, undefined, undefined); - const fees = []; - const numTrades = trades.length; - let lastTradeTimestamp = undefined; - let tradeCost = undefined; - let tradeAmount = undefined; - if (numTrades > 0) { - lastTradeTimestamp = trades[0]['timestamp']; - tradeCost = 0; - tradeAmount = 0; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - fees.push (trade['fee']); - lastTradeTimestamp = Math.max (lastTradeTimestamp, trade['timestamp']); - tradeCost = this.sum (tradeCost, trade['cost']); - tradeAmount = this.sum (tradeAmount, trade['amount']); - } - } - let average = this.safeFloat (order, 'average_price'); - if (average === undefined) { - if ((tradeCost !== undefined) && (tradeAmount !== undefined) && (tradeAmount !== 0)) { - average = tradeCost / tradeAmount; - } - } - if (cost === undefined) { - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - } - const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'trigger_price'); - const postOnly = this.safeValue (order, 'is_post_only'); - const result = { + const price = this.safeNumber (rawOrder, 'price'); + const amount = this.safeNumber (rawOrder, 'amount'); + const filledString = this.safeString (rawOrder, 'filled_amount'); + const filled = this.parseNumber (filledString); + const side = this.safeStringLower (rawOrder, 'side'); + const type = this.safeStringLower (rawOrder, 'type'); + const timeInForce = this.parseTimeInForce (this.safeString (rawOrder, 'time_in_force')); + const stopPrice = this.safeNumber (rawOrder, 'trigger_price'); + const postOnly = this.safeValue (rawOrder, 'is_post_only'); + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'type': type, + }); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -29398,41 +29391,14 @@ module.exports = class bitpanda extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, // 'fee': undefined, 'trades': trades, - }; - const numFees = fees.length; - if (numFees > 0) { - if (numFees === 1) { - result['fee'] = fees[0]; - } else { - const feesByCurrency = this.groupBy (fees, 'currency'); - const feeCurrencies = Object.keys (feesByCurrency); - const numFeesByCurrency = feeCurrencies.length; - if (numFeesByCurrency === 1) { - const feeCurrency = feeCurrencies[0]; - const feeArray = this.safeValue (feesByCurrency, feeCurrency); - let feeCost = 0; - for (let i = 0; i < feeArray.length; i++) { - feeCost = this.sum (feeCost, feeArray[i]['cost']); - } - result['fee'] = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } else { - result['fees'] = fees; - } - } - } else { - result['fee'] = undefined; - } - return result; + }); } parseTimeInForce (timeInForce) { @@ -29466,7 +29432,7 @@ module.exports = class bitpanda extends Exchange { priceIsRequired = true; } if (uppercaseType === 'STOP') { - const triggerPrice = this.safeFloat (params, 'trigger_price'); + const triggerPrice = this.safeNumber (params, 'trigger_price'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a trigger_price param for ' + type + ' orders'); } @@ -29869,7 +29835,7 @@ module.exports = class bitpanda extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],40:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],40:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -30029,28 +29995,28 @@ module.exports = class bitso extends Exchange { const symbol = base + '/' + quote; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), - 'max': this.safeFloat (market, 'maximum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), + 'max': this.safeNumber (market, 'maximum_amount'), }, 'price': { - 'min': this.safeFloat (market, 'minimum_price'), - 'max': this.safeFloat (market, 'maximum_price'), + 'min': this.safeNumber (market, 'minimum_price'), + 'max': this.safeNumber (market, 'maximum_price'), }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), - 'max': this.safeFloat (market, 'maximum_value'), + 'min': this.safeNumber (market, 'minimum_value'), + 'max': this.safeNumber (market, 'maximum_value'), }, }; - const defaultPricePrecision = this.safeFloat (this.options['precision'], quote, this.options['defaultPrecision']); - const pricePrecision = this.safeFloat (market, 'tick_size', defaultPricePrecision); + const defaultPricePrecision = this.safeNumber (this.options['precision'], quote, this.options['defaultPrecision']); + const pricePrecision = this.safeNumber (market, 'tick_size', defaultPricePrecision); const precision = { - 'amount': this.safeFloat (this.options['precision'], base, this.options['defaultPrecision']), + 'amount': this.safeNumber (this.options['precision'], base, this.options['defaultPrecision']), 'price': pricePrecision, }; const fees = this.safeValue (market, 'fees', {}); const flatRate = this.safeValue (fees, 'flat_rate', {}); - const maker = this.safeFloat (flatRate, 'maker'); - const taker = this.safeFloat (flatRate, 'taker'); + const maker = this.safeNumber (flatRate, 'maker'); + const taker = this.safeNumber (flatRate, 'taker'); const feeTiers = this.safeValue (fees, 'structure', []); const fee = { 'taker': parseFloat (this.decimalToPrecision (taker / 100, ROUND, 0.00000001, TICK_SIZE)), @@ -30062,9 +30028,9 @@ module.exports = class bitso extends Exchange { const makerFees = []; for (let j = 0; j < feeTiers.length; j++) { const tier = feeTiers[j]; - const volume = this.safeFloat (tier, 'volume'); - const takerFee = this.safeFloat (tier, 'taker'); - const makerFee = this.safeFloat (tier, 'maker'); + const volume = this.safeNumber (tier, 'volume'); + const takerFee = this.safeNumber (tier, 'taker'); + const makerFee = this.safeNumber (tier, 'maker'); const takerFeeToPrecision = parseFloat (this.decimalToPrecision (takerFee / 100, ROUND, 0.00000001, TICK_SIZE)); const makerFeeToPrecision = parseFloat (this.decimalToPrecision (makerFee / 100, ROUND, 0.00000001, TICK_SIZE)); takerFees.push ([ volume, takerFeeToPrecision ]); @@ -30104,14 +30070,13 @@ module.exports = class bitso extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'locked'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -30133,22 +30098,22 @@ module.exports = class bitso extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'payload'); const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -30169,12 +30134,12 @@ module.exports = class bitso extends Exchange { const marketId = this.safeString (trade, 'book'); const symbol = this.safeSymbol (marketId, market, '_'); const side = this.safeString2 (trade, 'side', 'maker_side'); - let amount = this.safeFloat2 (trade, 'amount', 'major'); + let amount = this.safeNumber2 (trade, 'amount', 'major'); if (amount !== undefined) { amount = Math.abs (amount); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fees_amount'); + const feeCost = this.safeNumber (trade, 'fees_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fees_currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -30183,11 +30148,11 @@ module.exports = class bitso extends Exchange { 'currency': feeCurrency, }; } - let cost = this.safeFloat (trade, 'minor'); + let cost = this.safeNumber (trade, 'minor'); if (cost !== undefined) { cost = Math.abs (cost); } - const price = this.safeFloat (trade, 'price'); + const price = this.safeNumber (trade, 'price'); const orderId = this.safeString (trade, 'oid'); const id = this.safeString (trade, 'tid'); return { @@ -30288,17 +30253,11 @@ module.exports = class bitso extends Exchange { const symbol = this.safeSymbol (marketId, market, '_'); const orderType = this.safeString (order, 'type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'unfilled_amount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'unfilled_amount'); const clientOrderId = this.safeString (order, 'client_id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -30315,12 +30274,12 @@ module.exports = class bitso extends Exchange { 'amount': amount, 'cost': undefined, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = 25, params = {}) { @@ -30496,7 +30455,7 @@ module.exports = class bitso extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],41:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],41:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -30614,6 +30573,16 @@ module.exports = class bitstamp extends Exchange { 'usdc_address/', 'omg_withdrawal/', 'omg_address/', + 'dai_withdrawal/', + 'dai_address/', + 'knc_withdrawal/', + 'knc_address/', + 'mkr_withdrawal/', + 'mkr_address/', + 'zrx_withdrawal/', + 'zrx_address/', + 'gusd_withdrawal/', + 'gusd_address/', 'transfer-to-main/', 'transfer-from-main/', 'withdrawal-requests/', @@ -30748,13 +30717,15 @@ module.exports = class bitstamp extends Exchange { const symbolId = baseId + '_' + quoteId; const id = this.safeString (market, 'url_symbol'); const precision = { - 'amount': market['base_decimals'], - 'price': market['counter_decimals'], + 'amount': this.safeInteger (market, 'base_decimals'), + 'price': this.safeInteger (market, 'counter_decimals'), }; - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; // let [ cost, currency ] = market['minimum_order'].split (' '); - const active = (market['trading'] === 'Enabled'); + const trading = this.safeString (market, 'trading'); + const active = (trading === 'Enabled'); result.push ({ 'id': id, 'symbol': symbol, @@ -30798,7 +30769,7 @@ module.exports = class bitstamp extends Exchange { 'type': currencyType, 'name': name, 'active': true, - 'fee': this.safeFloat (description['fees']['funding']['withdraw'], code), + 'fee': this.safeNumber (description['fees']['funding']['withdraw'], code), 'precision': precision, 'limits': { 'amount': { @@ -30851,13 +30822,16 @@ module.exports = class bitstamp extends Exchange { quote = this.safeCurrencyCode (quote); const description = this.safeString (market, 'description'); const [ baseDescription, quoteDescription ] = description.split (' / '); - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; if (!(base in result)) { - result[base] = this.constructCurrencyObject (baseId, base, baseDescription, market['base_decimals'], undefined, market); + const baseDecimals = this.safeInteger (market, 'base_decimals'); + result[base] = this.constructCurrencyObject (baseId, base, baseDescription, baseDecimals, undefined, market); } if (!(quote in result)) { - result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, market['counter_decimals'], parseFloat (cost), market); + const counterDecimals = this.safeInteger (market, 'counter_decimals'); + result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, counterDecimals, parseFloat (cost), market); } } return result; @@ -30899,25 +30873,25 @@ module.exports = class bitstamp extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -30960,7 +30934,7 @@ module.exports = class bitstamp extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; if (id.indexOf ('_') < 0) { - const value = this.safeFloat (transaction, id); + const value = this.safeNumber (transaction, id); if ((value !== undefined) && (value !== 0)) { return id; } @@ -31042,11 +31016,11 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString2 (trade, 'id', 'tid'); let symbol = undefined; let side = undefined; - let price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat (trade, 'amount'); + let price = this.safeNumber (trade, 'price'); + let amount = this.safeNumber (trade, 'amount'); const orderId = this.safeString (trade, 'order_id'); const type = undefined; - let cost = this.safeFloat (trade, 'cost'); + let cost = this.safeNumber (trade, 'cost'); if (market === undefined) { const keys = Object.keys (trade); for (let i = 0; i < keys.length; i++) { @@ -31063,12 +31037,12 @@ module.exports = class bitstamp extends Exchange { market = this.getMarketFromTrade (trade); } } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = undefined; if (market !== undefined) { - price = this.safeFloat (trade, market['symbolId'], price); - amount = this.safeFloat (trade, market['baseId'], amount); - cost = this.safeFloat (trade, market['quoteId'], cost); + price = this.safeNumber (trade, market['symbolId'], price); + amount = this.safeNumber (trade, market['baseId'], amount); + cost = this.safeNumber (trade, market['quoteId'], cost); feeCurrency = market['quote']; symbol = market['symbol']; } @@ -31137,7 +31111,7 @@ module.exports = class bitstamp extends Exchange { parseTradingFee (balances, symbol) { const market = this.market (symbol); - const tradeFee = this.safeFloat (balances, market['id'] + '_fee'); + const tradeFee = this.safeNumber (balances, market['id'] + '_fee'); return { 'symbol': symbol, 'maker': tradeFee, @@ -31187,11 +31161,11 @@ module.exports = class bitstamp extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -31249,12 +31223,12 @@ module.exports = class bitstamp extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -31301,7 +31275,7 @@ module.exports = class bitstamp extends Exchange { if (id.indexOf ('_withdrawal_fee') >= 0) { const currencyId = id.split ('_')[0]; const code = this.safeCurrencyCode (currencyId); - withdraw[code] = this.safeFloat (balance, id); + withdraw[code] = this.safeNumber (balance, id); } } return { @@ -31547,16 +31521,16 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString (transaction, 'id'); const currencyId = this.getCurrencyIdFromTransaction (transaction); const code = this.safeCurrencyCode (currencyId, currency); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let feeCurrency = undefined; let amount = undefined; if ('amount' in transaction) { - amount = this.safeFloat (transaction, 'amount'); + amount = this.safeNumber (transaction, 'amount'); } else if (currency !== undefined) { - amount = this.safeFloat (transaction, currency['id'], amount); + amount = this.safeNumber (transaction, currency['id'], amount); feeCurrency = currency['code']; } else if ((code !== undefined) && (currencyId !== undefined)) { - amount = this.safeFloat (transaction, currencyId, amount); + amount = this.safeNumber (transaction, currencyId, amount); feeCurrency = code; } if (amount !== undefined) { @@ -31681,83 +31655,23 @@ module.exports = class bitstamp extends Exchange { } // there is no timestamp from fetchOrder const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - let lastTradeTimestamp = undefined; - let symbol = undefined; - let marketId = this.safeStringLower (order, 'currency_pair'); - if (marketId !== undefined) { - marketId = marketId.replace ('/', ''); - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - symbol = market['symbol']; - } - } - let amount = this.safeFloat (order, 'amount'); - let filled = 0.0; - const trades = []; - const transactions = this.safeValue (order, 'transactions', []); - let feeCost = undefined; - let cost = undefined; - const numTransactions = transactions.length; - if (numTransactions > 0) { - feeCost = 0.0; - for (let i = 0; i < numTransactions; i++) { - const trade = this.parseTrade (this.extend ({ - 'order_id': id, - 'side': side, - }, transactions[i]), market); - filled = this.sum (filled, trade['amount']); - feeCost = this.sum (feeCost, trade['fee']['cost']); - if (cost === undefined) { - cost = 0.0; - } - cost = this.sum (cost, trade['cost']); - trades.push (trade); - } - lastTradeTimestamp = trades[numTransactions - 1]['timestamp']; - } + const marketId = this.safeStringLower (order, 'currency_pair'); + let symbol = this.safeSymbol (marketId, market, '/'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((status === 'closed') && (amount === undefined)) { - amount = filled; + const amount = this.safeNumber (order, 'amount'); + const transactions = this.safeValue (order, 'transactions', []); + const trades = this.parseTrades (transactions, market); + const length = trades.length; + if (length) { + symbol = trades[0]['symbol']; } - let remaining = undefined; - if (amount !== undefined) { - remaining = amount - filled; - } - let price = this.safeFloat (order, 'price'); - if (market === undefined) { - market = this.getMarketFromTrades (trades); - } - let feeCurrency = undefined; - if (market !== undefined) { - if (symbol === undefined) { - symbol = market['symbol']; - } - feeCurrency = market['quote']; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if (price === undefined) { - if (filled > 0) { - price = cost / filled; - } - } - let fee = undefined; - if (feeCost !== undefined) { - if (feeCurrency !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { + const price = this.safeNumber (order, 'price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'status': status, 'symbol': symbol, 'type': undefined, @@ -31766,15 +31680,15 @@ module.exports = class bitstamp extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, - 'filled': filled, - 'remaining': remaining, + 'filled': undefined, + 'remaining': undefined, 'trades': trades, - 'fee': fee, + 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } parseLedgerEntryType (type) { @@ -31854,11 +31768,11 @@ module.exports = class bitstamp extends Exchange { const parsedTransaction = this.parseTransaction (item); let direction = undefined; if ('amount' in item) { - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); direction = amount > 0 ? 'in' : 'out'; } else if (('currency' in parsedTransaction) && parsedTransaction['currency'] !== undefined) { const currencyId = this.currencyId (parsedTransaction['currency']); - const amount = this.safeFloat (item, currencyId); + const amount = this.safeNumber (item, currencyId); direction = amount > 0 ? 'in' : 'out'; } return { @@ -32105,13 +32019,14 @@ module.exports = class bitstamp extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],42:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],42:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -32208,25 +32123,25 @@ module.exports = class bitstamp1 extends Exchange { await this.loadMarkets (); const ticker = await this.publicGetTicker (params); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -32249,14 +32164,11 @@ module.exports = class bitstamp1 extends Exchange { } } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -32300,12 +32212,12 @@ module.exports = class bitstamp1 extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -32406,7 +32318,7 @@ module.exports = class bitstamp1 extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],43:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],43:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -32414,6 +32326,7 @@ module.exports = class bitstamp1 extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, DDoSProtection, PermissionDenied, AddressPending, OnMaintenance, BadRequest, InvalidAddress } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -32689,7 +32602,7 @@ module.exports = class bittrex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeSize'), + 'min': this.safeNumber (market, 'minTradeSize'), 'max': undefined, }, 'price': { @@ -32717,11 +32630,11 @@ module.exports = class bittrex extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); const balance = indexed[currencyId]; - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -32781,7 +32694,7 @@ module.exports = class bittrex extends Exchange { const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); const precision = 8; // default precision, todo: fix "magic constants" - const fee = this.safeFloat (currency, 'txFee'); // todo: redesign + const fee = this.safeNumber (currency, 'txFee'); // todo: redesign const isActive = this.safeString (currency, 'status'); result[code] = { 'id': id, @@ -32842,17 +32755,17 @@ module.exports = class bittrex extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'updatedAt')); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const percentage = this.safeFloat (ticker, 'percentChange'); - const last = this.safeFloat (ticker, 'lastTradeRate'); + const percentage = this.safeNumber (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'lastTradeRate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidRate'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidRate'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askRate'), + 'ask': this.safeNumber (ticker, 'askRate'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -32862,8 +32775,8 @@ module.exports = class bittrex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -32976,21 +32889,18 @@ module.exports = class bittrex extends Exchange { const order = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'marketSymbol'); market = this.safeMarket (marketId, market, '-'); - let cost = undefined; - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'quantity'); - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = undefined; const isTaker = this.safeValue (trade, 'isTaker'); if (isTaker !== undefined) { takerOrMaker = isTaker ? 'taker' : 'maker'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -33060,11 +32970,11 @@ module.exports = class bittrex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'startsAt')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -33171,9 +33081,9 @@ module.exports = class bittrex extends Exchange { let cost = undefined; if (isCeilingLimit) { request['limit'] = this.priceToPrecision (symbol, price); - cost = this.safeFloat2 (params, 'ceiling', 'cost', amount); + cost = this.safeNumber2 (params, 'ceiling', 'cost', amount); } else if (isCeilingMarket) { - cost = this.safeFloat2 (params, 'ceiling', 'cost'); + cost = this.safeNumber2 (params, 'ceiling', 'cost'); if (cost === undefined) { if (price === undefined) { cost = amount; @@ -33332,7 +33242,7 @@ module.exports = class bittrex extends Exchange { // } // const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const address = this.safeString (transaction, 'cryptoAddress'); const txid = this.safeString (transaction, 'txId'); const updated = this.parse8601 (this.safeString (transaction, 'updatedAt')); @@ -33368,7 +33278,7 @@ module.exports = class bittrex extends Exchange { status = 'ok'; } } - let feeCost = this.safeFloat (transaction, 'txCost'); + let feeCost = this.safeNumber (transaction, 'txCost'); if (feeCost === undefined) { if (type === 'deposit') { // according to https://support.bittrex.com/hc/en-us/articles/115000199651-What-fees-does-Bittrex-charge- @@ -33425,15 +33335,9 @@ module.exports = class bittrex extends Exchange { // } // const marketSymbol = this.safeString (order, 'marketSymbol'); - let symbol = undefined; - let feeCurrency = undefined; - if (marketSymbol !== undefined) { - const [ baseId, quoteId ] = marketSymbol.split ('-'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - feeCurrency = quote; - } + market = this.safeMarket (marketSymbol, market, '-'); + const symbol = market['symbol']; + const feeCurrency = market['quote']; const direction = this.safeStringLower (order, 'direction'); const createdAt = this.safeString (order, 'createdAt'); const updatedAt = this.safeString (order, 'updatedAt'); @@ -33446,32 +33350,15 @@ module.exports = class bittrex extends Exchange { } const timestamp = this.parse8601 (createdAt); const type = this.safeStringLower (order, 'type'); - const quantity = this.safeFloat (order, 'quantity'); - const limit = this.safeFloat (order, 'limit'); - const fillQuantity = this.safeFloat (order, 'fillQuantity'); - const commission = this.safeFloat (order, 'commission'); - const proceeds = this.safeFloat (order, 'proceeds'); - let average = undefined; - let remaining = undefined; - if (fillQuantity !== undefined) { - if (proceeds !== undefined) { - if (fillQuantity > 0) { - average = proceeds / fillQuantity; - } else if (proceeds === 0) { - average = 0; - } - } - if (quantity !== undefined) { - remaining = quantity - fillQuantity; - } - } - let status = this.safeStringLower (order, 'status'); - if ((status === 'closed') && (remaining !== undefined) && (remaining > 0)) { - status = 'canceled'; - } + const quantity = this.safeNumber (order, 'quantity'); + const limit = this.safeNumber (order, 'limit'); + const fillQuantity = this.safeNumber (order, 'fillQuantity'); + const commission = this.safeNumber (order, 'commission'); + const proceeds = this.safeNumber (order, 'proceeds'); + const status = this.safeStringLower (order, 'status'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'timestamp': timestamp, @@ -33485,10 +33372,10 @@ module.exports = class bittrex extends Exchange { 'price': limit, 'stopPrice': undefined, 'cost': proceeds, - 'average': average, + 'average': undefined, 'amount': quantity, 'filled': fillQuantity, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': { 'cost': commission, @@ -33496,7 +33383,7 @@ module.exports = class bittrex extends Exchange { }, 'info': order, 'trades': undefined, - }; + }); } parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { @@ -33545,9 +33432,9 @@ module.exports = class bittrex extends Exchange { 'side': this.safeString (order, 'side'), 'order': this.safeString (order, 'id'), 'type': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'average'), - 'amount': this.safeFloat (order, 'filled'), - 'cost': this.safeFloat (order, 'cost'), + 'price': this.safeNumber (order, 'average'), + 'amount': this.safeNumber (order, 'filled'), + 'cost': this.safeNumber (order, 'cost'), 'symbol': this.safeString (order, 'symbol'), 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -33839,7 +33726,7 @@ module.exports = class bittrex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],44:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],44:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -33847,6 +33734,7 @@ module.exports = class bittrex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, BadSymbol, AuthenticationError, InsufficientFunds, InvalidOrder, ArgumentsRequired, OrderNotFound, InvalidAddress, BadRequest, RateLimitExceeded, PermissionDenied, ExchangeNotAvailable, AccountSuspended, OnMaintenance } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -34148,7 +34036,7 @@ module.exports = class bitvavo extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minOrderInBaseAsset'), + 'min': this.safeNumber (market, 'minOrderInBaseAsset'), 'max': undefined, }, 'price': { @@ -34156,7 +34044,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderInQuoteAsset'), + 'min': this.safeNumber (market, 'minOrderInQuoteAsset'), 'max': undefined, }, }, @@ -34219,7 +34107,7 @@ module.exports = class bitvavo extends Exchange { 'code': code, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -34235,7 +34123,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMinAmount'), + 'min': this.safeNumber (currency, 'withdrawalMinAmount'), 'max': undefined, }, }, @@ -34292,14 +34180,14 @@ module.exports = class bitvavo extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); + const last = this.safeNumber (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -34311,12 +34199,12 @@ module.exports = class bitvavo extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': vwap, 'open': open, 'close': last, @@ -34332,14 +34220,6 @@ module.exports = class bitvavo extends Exchange { return result; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24h (params); @@ -34453,12 +34333,11 @@ module.exports = class bitvavo extends Exchange { // feeCurrency: 'EUR' // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'side'); const id = this.safeString2 (trade, 'id', 'fillId'); @@ -34469,7 +34348,7 @@ module.exports = class bitvavo extends Exchange { if (taker !== undefined) { takerOrMaker = taker ? 'taker' : 'maker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); @@ -34540,11 +34419,11 @@ module.exports = class bitvavo extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -34592,13 +34471,12 @@ module.exports = class bitvavo extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'inOrder'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'inOrder'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDepositAddress (code, params = {}) { @@ -34648,7 +34526,7 @@ module.exports = class bitvavo extends Exchange { if (price !== undefined) { cost = amount * price; } else { - cost = this.safeFloat2 (params, 'cost', 'amountQuote'); + cost = this.safeNumber2 (params, 'cost', 'amountQuote'); } if (cost !== undefined) { const precision = market['precision']['price']; @@ -34661,7 +34539,7 @@ module.exports = class bitvavo extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['amount'] = this.amountToPrecision (symbol, amount); } else if (isStopMarket || isStopLimit) { - let stopPrice = this.safeFloat2 (params, 'stopPrice', 'triggerAmount'); + let stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerAmount'); if (stopPrice === undefined) { if (isStopLimit) { throw new ArgumentsRequired (this.id + ' createOrder requires a stopPrice parameter for a ' + type + ' order'); @@ -34723,7 +34601,7 @@ module.exports = class bitvavo extends Exchange { await this.loadMarkets (); const market = this.market (symbol); let request = {}; - const amountRemaining = this.safeFloat (params, 'amountRemaining'); + const amountRemaining = this.safeNumber (params, 'amountRemaining'); params = this.omit (params, 'amountRemaining'); if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); @@ -34788,7 +34666,6 @@ module.exports = class bitvavo extends Exchange { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); } await this.loadMarkets (); - await this.loadMarkets (); const market = this.market (symbol); const request = { 'orderId': id, @@ -35014,26 +34891,13 @@ module.exports = class bitvavo extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let remaining = this.safeFloat (order, 'amountRemaining'); - let filled = this.safeFloat (order, 'filledAmount'); - const remainingCost = this.safeFloat (order, 'remainingCost'); - if ((remainingCost !== undefined) && (remainingCost === 0.0)) { - remaining = 0; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - const cost = this.safeFloat (order, 'filledAmountQuote'); - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amountRemaining'); + const filled = this.safeNumber (order, 'filledAmount'); + const cost = this.safeNumber (order, 'filledAmountQuote'); let fee = undefined; - const feeCost = this.safeFloat (order, 'feePaid'); + const feeCost = this.safeNumber (order, 'feePaid'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -35042,32 +34906,24 @@ module.exports = class bitvavo extends Exchange { 'currency': feeCurrencyCode, }; } - let lastTradeTimestamp = undefined; - const rawTrades = this.safeValue (order, 'fills'); - let trades = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'symbol': symbol, - 'order': id, - 'side': side, - }); - const numTrades = trades.length; - if (numTrades > 0) { - const lastTrade = this.safeValue (trades, numTrades - 1); - lastTradeTimestamp = lastTrade['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'symbol': symbol, + 'order': id, + 'side': side, + 'type': type, + }); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = this.safeValue (order, 'postOnly'); // https://github.com/ccxt/ccxt/issues/8489 - const stopPrice = this.safeFloat (order, 'triggerPrice'); - return { + const stopPrice = this.safeNumber (order, 'triggerPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -35077,13 +34933,13 @@ module.exports = class bitvavo extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -35278,11 +35134,11 @@ module.exports = class bitvavo extends Exchange { const currencyId = this.safeString (transaction, 'symbol'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -35373,7 +35229,7 @@ module.exports = class bitvavo extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],45:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],45:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -35435,7 +35291,7 @@ module.exports = class bitz extends Exchange { 'assets': 'https://{hostname}', }, 'www': 'https://www.bitz.com', - 'doc': 'https://apidoc.bitz.com/en/', + 'doc': 'https://apidocv2.bitz.plus/en/', 'fees': 'https://www.bitz.com/fee?type=1', 'referral': 'https://u.bitz.com/register?invite_code=1429193', }, @@ -35452,6 +35308,11 @@ module.exports = class bitz extends Exchange { 'currencyRate', 'currencyCoinRate', 'coinRate', + 'getContractCoin', + 'getContractKline', + 'getContractOrderBook', + 'getContractTradesHistory', + 'getContractTickers', ], }, 'trade': { @@ -35464,6 +35325,10 @@ module.exports = class bitz extends Exchange { 'getUserNowEntrustSheet', // open orders 'getEntrustSheetInfo', // order 'depositOrWithdraw', // transactions + 'getCoinAddress', + 'getCoinAddressList', + 'marketTrade', + 'addEntrustSheetBatch', ], }, 'assets': { @@ -35471,6 +35336,20 @@ module.exports = class bitz extends Exchange { 'getUserAssets', ], }, + 'contract': { + 'post': [ + 'addContractTrade', + 'cancelContractTrade', + 'getContractActivePositions', + 'getContractAccountInfo', + 'getContractMyPositions', + 'getContractOrderResult', + 'getContractTradeResult', + 'getContractOrder', + 'getContractMyHistoryTrade', + 'getContractMyTrades', + ], + }, }, 'fees': { 'trading': { @@ -35657,8 +35536,8 @@ module.exports = class bitz extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTrade'), - 'max': this.safeFloat (market, 'maxTrade'), + 'min': this.safeNumber (market, 'minTrade'), + 'max': this.safeNumber (market, 'maxTrade'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -35707,12 +35586,12 @@ module.exports = class bitz extends Exchange { const currencyId = this.safeString (balance, 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lock'); - account['total'] = this.safeFloat (balance, 'num'); - account['free'] = this.safeFloat (balance, 'over'); + account['used'] = this.safeString (balance, 'lock'); + account['total'] = this.safeString (balance, 'num'); + account['free'] = this.safeString (balance, 'over'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTicker (ticker, market = undefined) { @@ -35742,8 +35621,8 @@ module.exports = class bitz extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'now'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'now'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -35754,22 +35633,22 @@ module.exports = class bitz extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': undefined, 'open': open, 'close': last, 'last': last, 'previousClose': undefined, 'change': change, - 'percentage': this.safeFloat (ticker, 'priceChange24h'), + 'percentage': this.safeNumber (ticker, 'priceChange24h'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -35959,8 +35838,8 @@ module.exports = class bitz extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'p'); - const amount = this.safeFloat (trade, 'n'); + const price = this.safeNumber (trade, 'p'); + const amount = this.safeNumber (trade, 'n'); let cost = undefined; if (price !== undefined) { if (amount !== undefined) { @@ -36028,11 +35907,11 @@ module.exports = class bitz extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -36130,22 +36009,17 @@ module.exports = class bitz extends Exchange { if (side !== undefined) { side = (side === 'sale') ? 'sell' : 'buy'; } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'number'); - const remaining = this.safeFloat (order, 'numberOver'); - const filled = this.safeFloat (order, 'numberDeal'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'number'); + const remaining = this.safeNumber (order, 'numberOver'); + const filled = this.safeNumber (order, 'numberDeal'); let timestamp = this.safeInteger (order, 'timestamp'); if (timestamp === undefined) { timestamp = this.safeTimestamp (order, 'created'); } - let cost = this.safeFloat (order, 'orderTotalPrice'); - if (price !== undefined) { - if (filled !== undefined) { - cost = filled * price; - } - } + const cost = this.safeNumber (order, 'orderTotalPrice'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -36167,7 +36041,7 @@ module.exports = class bitz extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -36494,7 +36368,7 @@ module.exports = class bitz extends Exchange { const type = this.safeStringLower (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'network_fee'); + const feeCost = this.safeNumber (transaction, 'network_fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -36509,7 +36383,7 @@ module.exports = class bitz extends Exchange { 'address': this.safeString (transaction, 'wallet'), 'tag': this.safeString (transaction, 'memo'), 'type': type, - 'amount': this.safeFloat (transaction, 'number'), + 'amount': this.safeNumber (transaction, 'number'), 'currency': code, 'status': status, 'updated': timestamp, @@ -36661,12 +36535,13 @@ module.exports = class bitz extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],46:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],46:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -36745,17 +36620,19 @@ module.exports = class bl3p extends Exchange { const available = this.safeValue (wallet, 'available', {}); const balance = this.safeValue (wallet, 'balance', {}); const account = this.account (); - account['free'] = this.safeFloat (available, 'value'); - account['total'] = this.safeFloat (balance, 'value'); + account['free'] = this.safeString (available, 'value'); + account['total'] = this.safeString (balance, 'value'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { + const price = this.safeNumber (bidask, priceKey); + const size = this.safeNumber (bidask, amountKey); return [ - bidask[priceKey] / 100000.0, - bidask[amountKey] / 100000000.0, + price / 100000.0, + size / 100000000.0, ]; } @@ -36775,16 +36652,16 @@ module.exports = class bl3p extends Exchange { }; const ticker = await this.publicGetMarketTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -36794,7 +36671,7 @@ module.exports = class bl3p extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker['volume'], '24h'), + 'baseVolume': this.safeNumber (ticker['volume'], '24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -36803,20 +36680,13 @@ module.exports = class bl3p extends Exchange { parseTrade (trade, market = undefined) { const id = this.safeString (trade, 'trade_id'); const timestamp = this.safeInteger (trade, 'date'); - let price = this.safeFloat (trade, 'price_int'); - if (price !== undefined) { - price /= 100000.0; - } - let amount = this.safeFloat (trade, 'amount_int'); - if (amount !== undefined) { - amount /= 100000000.0; - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + let priceString = this.safeString (trade, 'price_int'); + priceString = Precise.stringDiv (priceString, '100000'); + let amountString = this.safeString (trade, 'amount_int'); + amountString = Precise.stringDiv (amountString, '100000000'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -36899,7 +36769,7 @@ module.exports = class bl3p extends Exchange { } }; -},{"./base/Exchange":6}],47:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],47:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -37065,8 +36935,8 @@ module.exports = class bleutrade extends Exchange { 'code': code, 'name': this.safeString (item, 'AssetLong'), 'active': this.safeValue (item, 'IsActive') && !this.safeValue (item, 'MaintenanceMode'), - 'fee': this.safeFloat (item, 'WithdrawTxFee'), - 'precision': this.safeFloat (item, 'DecimalPlaces'), + 'fee': this.safeNumber (item, 'WithdrawTxFee'), + 'precision': this.safeNumber (item, 'DecimalPlaces'), 'info': item, 'limits': this.limits, }; @@ -37118,7 +36988,7 @@ module.exports = class bleutrade extends Exchange { 'taker': this.fees['trading']['taker'], 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinTradeSize'), + 'min': this.safeNumber (market, 'MinTradeSize'), 'max': undefined, }, 'price': { @@ -37194,8 +37064,8 @@ module.exports = class bleutrade extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'TimeStamp')); const marketId = this.safeString (ticker, 'MarketName'); const symbol = this.safeSymbol (marketId, market, '_'); - const previous = this.safeFloat (ticker, 'PrevDay'); - const last = this.safeFloat (ticker, 'Last'); + const previous = this.safeNumber (ticker, 'PrevDay'); + const last = this.safeNumber (ticker, 'Last'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -37210,11 +37080,11 @@ module.exports = class bleutrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'High'), - 'low': this.safeFloat (ticker, 'Low'), - 'bid': this.safeFloat (ticker, 'Bid'), + 'high': this.safeNumber (ticker, 'High'), + 'low': this.safeNumber (ticker, 'Low'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': previous, @@ -37224,8 +37094,8 @@ module.exports = class bleutrade extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume'), - 'quoteVolume': this.safeFloat (ticker, 'BaseVolume'), + 'baseVolume': this.safeNumber (ticker, 'Volume'), + 'quoteVolume': this.safeNumber (ticker, 'BaseVolume'), 'info': ticker, }; } @@ -37233,11 +37103,11 @@ module.exports = class bleutrade extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (ohlcv['TimeStamp'] + '+00:00'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -37313,11 +37183,11 @@ module.exports = class bleutrade extends Exchange { const currencyId = this.safeString (item, 'Asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (item, 'Available'); - account['total'] = this.safeFloat (item, 'Balance'); + account['free'] = this.safeString (item, 'Available'); + account['total'] = this.safeString (item, 'Balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -37460,7 +37330,7 @@ module.exports = class bleutrade extends Exchange { // } const timestamp = this.parse8601 (this.safeString (item, 'TimeStamp')); - let amount = this.safeFloat (item, 'Amount'); + let amount = this.safeNumber (item, 'Amount'); let direction = undefined; if (amount !== undefined) { direction = 'in'; @@ -37534,27 +37404,12 @@ module.exports = class bleutrade extends Exchange { if ('Created' in order) { timestamp = this.parse8601 (order['Created'] + '+00:00'); } - let price = this.safeFloat (order, 'Price'); - let cost = undefined; - const amount = this.safeFloat (order, 'Quantity'); - const remaining = this.safeFloat (order, 'QuantityRemaining'); - let filled = undefined; - if (amount !== undefined && remaining !== undefined) { - filled = amount - remaining; - } - if (!cost) { - if (price && filled) { - cost = price * filled; - } - } - if (!price) { - if (cost && filled) { - price = cost / filled; - } - } - const average = this.safeFloat (order, 'PricePerUnit'); + const price = this.safeNumber (order, 'Price'); + const amount = this.safeNumber (order, 'Quantity'); + const remaining = this.safeNumber (order, 'QuantityRemaining'); + const average = this.safeNumber (order, 'PricePerUnit'); const id = this.safeString (order, 'OrderID'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -37568,15 +37423,15 @@ module.exports = class bleutrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -37613,7 +37468,7 @@ module.exports = class bleutrade extends Exchange { // Symbol: 'BTC' } // const id = this.safeString (transaction, 'ID'); - let amount = this.safeFloat (transaction, 'Amount'); + let amount = this.safeNumber (transaction, 'Amount'); let type = 'deposit'; if (amount < 0) { amount = Math.abs (amount); @@ -37715,13 +37570,14 @@ module.exports = class bleutrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],48:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],48:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -37902,11 +37758,11 @@ module.exports = class braziliex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': this.safeFloat (currency, 'txWithdrawalFee'), + 'fee': this.safeNumber (currency, 'txWithdrawalFee'), }, 'deposit': { 'active': canDeposit, - 'fee': this.safeFloat (currency, 'txDepositFee'), + 'fee': this.safeNumber (currency, 'txDepositFee'), }, }, 'limits': { @@ -37923,11 +37779,11 @@ module.exports = class braziliex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'MinWithdrawal'), + 'min': this.safeNumber (currency, 'MinWithdrawal'), 'max': Math.pow (10, precision), }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, }, @@ -37975,9 +37831,9 @@ module.exports = class braziliex extends Exchange { const quoteIsFiat = this.safeInteger (quoteCurrency, 'is_fiat', 0); let minCost = undefined; if (quoteIsFiat) { - minCost = this.safeFloat (baseCurrency, 'minAmountTradeFIAT'); + minCost = this.safeNumber (baseCurrency, 'minAmountTradeFIAT'); } else { - minCost = this.safeFloat (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); + minCost = this.safeNumber (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); } const isActive = this.safeInteger (market, 'active'); const active = (isActive === 1); @@ -38020,27 +37876,27 @@ module.exports = class braziliex extends Exchange { symbol = market['symbol']; } const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highestBid24'), - 'low': this.safeFloat (ticker, 'lowestAsk24'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'highestBid24'), + 'low': this.safeNumber (ticker, 'lowestAsk24'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'percentChange'), + 'change': this.safeNumber (ticker, 'percentChange'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume24'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume24'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24'), 'info': ticker, }; } @@ -38080,13 +37936,18 @@ module.exports = class braziliex extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString2 (trade, 'date_exec', 'date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } - const cost = this.safeFloat (trade, 'total'); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_number'); const type = 'limit'; const side = this.safeString (trade, 'type'); @@ -38128,11 +37989,11 @@ module.exports = class braziliex extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -38154,21 +38015,16 @@ module.exports = class braziliex extends Exchange { if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'date')); } - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'total', 0.0); - const amount = this.safeFloat (order, 'amount'); - const filledPercentage = this.safeFloat (order, 'progress'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'total'); + const amount = this.safeNumber (order, 'amount'); + const filledPercentage = this.safeNumber (order, 'progress'); const filled = amount * filledPercentage; - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); - let info = order; - if ('info' in info) { - info = order['info']; - } const id = this.safeString (order, 'order_number'); const fee = this.safeValue (order, 'fee'); // propagated from createOrder const status = (filledPercentage === 1.0) ? 'closed' : 'open'; const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -38185,12 +38041,12 @@ module.exports = class braziliex extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, - 'info': info, + 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -38242,7 +38098,7 @@ module.exports = class braziliex extends Exchange { 'price': this.safeString (priceParts, 1), 'total': this.safeString (totalParts, 1), 'fee': { - 'cost': this.safeFloat (feeParts, 1), + 'cost': this.safeNumber (feeParts, 1), 'currency': this.safeString (feeParts, 2), }, 'progress': '0.0', @@ -38359,13 +38215,14 @@ module.exports = class braziliex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],49:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],49:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, DDoSProtection, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -38507,8 +38364,8 @@ module.exports = class btcalpha extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -38560,14 +38417,11 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'id', 'tid'); const side = this.safeString2 (trade, 'my_side', 'side'); const orderId = this.safeString (trade, 'o_id'); @@ -38616,11 +38470,11 @@ module.exports = class btcalpha extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -38657,11 +38511,11 @@ module.exports = class btcalpha extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'reserve'); - account['total'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserve'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -38682,8 +38536,8 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (order, 'date'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString2 (order, 'oid', 'id'); let trades = this.safeValue (order, 'trades', []); @@ -38864,13 +38718,14 @@ module.exports = class btcalpha extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],50:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],50:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, InvalidOrder, AuthenticationError, PermissionDenied, InvalidNonce, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -38955,12 +38810,12 @@ module.exports = class btcbox extends Exchange { if (free in response) { const account = this.account (); const used = currencyId + '_lock'; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -38981,16 +38836,16 @@ module.exports = class btcbox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -39000,8 +38855,8 @@ module.exports = class btcbox extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -39025,14 +38880,11 @@ module.exports = class btcbox extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeString (trade, 'type'); return { @@ -39132,15 +38984,15 @@ module.exports = class btcbox extends Exchange { if (datetimeString !== undefined) { timestamp = this.parse8601 (order['datetime'] + '+09:00'); // Tokyo time } - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let cost = undefined; if (price !== undefined) { if (filled !== undefined) { @@ -39292,7 +39144,7 @@ module.exports = class btcbox extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],51:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],51:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -39541,11 +39393,11 @@ module.exports = class btcmarkets extends Exchange { const tagTo = tag; const addressFrom = undefined; const tagFrom = undefined; - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const currencyId = this.safeString (transaction, 'assetName'); const code = this.safeCurrencyCode (currencyId); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (fee) { amount -= fee; } @@ -39598,10 +39450,10 @@ module.exports = class btcmarkets extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const fees = this.safeValue (this.safeValue (this.options, 'fees', {}), quote, this.fees); - const pricePrecision = this.safeFloat (market, 'priceDecimals'); - const amountPrecision = this.safeFloat (market, 'amountDecimals'); - const minAmount = this.safeFloat (market, 'minOrderAmount'); - const maxAmount = this.safeFloat (market, 'maxOrderAmount'); + const pricePrecision = this.safeNumber (market, 'priceDecimals'); + const amountPrecision = this.safeNumber (market, 'amountDecimals'); + const minAmount = this.safeNumber (market, 'minOrderAmount'); + const maxAmount = this.safeNumber (market, 'maxOrderAmount'); let minPrice = undefined; if (quote === 'AUD') { minPrice = Math.pow (10, -pricePrecision); @@ -39660,14 +39512,12 @@ module.exports = class btcmarkets extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetName'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance, 'balance'); - const used = this.safeFloat (balance, 'locked'); const account = this.account (); - account['used'] = used; - account['total'] = total; + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -39683,11 +39533,11 @@ module.exports = class btcmarkets extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 0)), - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 2), // high - this.safeFloat (ohlcv, 3), // low - this.safeFloat (ohlcv, 4), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 2), // high + this.safeNumber (ohlcv, 3), // low + this.safeNumber (ohlcv, 4), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -39783,21 +39633,21 @@ module.exports = class btcmarkets extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'lastPrice'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); - const quoteVolume = this.safeFloat (ticker, 'volumeQte24h'); + const last = this.safeNumber (ticker, 'lastPrice'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); + const quoteVolume = this.safeNumber (ticker, 'volumeQte24h'); const vwap = this.vwap (baseVolume, quoteVolume); - const change = this.safeFloat (ticker, 'price24h'); - const percentage = this.safeFloat (ticker, 'pricePct24h'); + const change = this.safeNumber (ticker, 'price24h'); + const percentage = this.safeNumber (ticker, 'pricePct24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bestBid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'bestAsk'), + 'ask': this.safeNumber (ticker, 'bestAsk'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -39908,8 +39758,8 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -39918,7 +39768,7 @@ module.exports = class btcmarkets extends Exchange { } const orderId = this.safeString (trade, 'orderId'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -40009,7 +39859,7 @@ module.exports = class btcmarkets extends Exchange { } } if (triggerPriceIsRequired) { - const triggerPrice = this.safeFloat (params, 'triggerPrice'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); params = this.omit (params, 'triggerPrice'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a triggerPrice parameter for a ' + type + 'order'); @@ -40142,9 +39992,9 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const type = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'openAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'openAmount'); let filled = undefined; if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); @@ -40159,7 +40009,7 @@ module.exports = class btcmarkets extends Exchange { const id = this.safeString (order, 'orderId'); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -40351,13 +40201,14 @@ module.exports = class btcmarkets extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],52:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],52:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -40460,10 +40311,10 @@ module.exports = class btctradeua extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -40603,14 +40454,11 @@ module.exports = class btctradeua extends Exchange { const id = this.safeString (trade, 'id'); const type = 'limit'; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amnt_trade'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amnt_trade'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -40691,11 +40539,11 @@ module.exports = class btctradeua extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'amnt_trade'), + 'amount': this.safeNumber (order, 'amnt_trade'), 'filled': 0, - 'remaining': this.safeFloat (order, 'amnt_trade'), + 'remaining': this.safeNumber (order, 'amnt_trade'), 'trades': undefined, 'info': order, 'cost': undefined, @@ -40747,7 +40595,7 @@ module.exports = class btctradeua extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],53:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],53:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -40875,13 +40723,13 @@ module.exports = class btcturk extends Exchange { const used = currency['id'] + '_reserved'; if (free in response) { const account = this.account (); - account['free'] = this.safeFloat (response, free); - account['total'] = this.safeFloat (response, total); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['total'] = this.safeString (response, total); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -40901,26 +40749,26 @@ module.exports = class btcturk extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'average'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -40954,8 +40802,8 @@ module.exports = class btcturk extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -40997,11 +40845,11 @@ module.exports = class btcturk extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (this.safeString (ohlcv, 'Time')), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -41076,13 +40924,14 @@ module.exports = class btcturk extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],54:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],54:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { AddressPending, AuthenticationError, ExchangeError, NotSupported, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -41299,7 +41148,7 @@ module.exports = class buda extends Exchange { } const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); - const precision = this.safeFloat (currency, 'input_decimals'); + const precision = this.safeNumber (currency, 'input_decimals'); const minimum = Math.pow (10, -precision); result[code] = { 'id': id, @@ -41460,24 +41309,25 @@ module.exports = class buda extends Exchange { let timestamp = undefined; let side = undefined; const type = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; const order = undefined; const fee = undefined; let symbol = undefined; - let cost = undefined; if (market) { symbol = market['symbol']; } if (Array.isArray (trade)) { - timestamp = parseInt (trade[0]); - price = parseFloat (trade[1]); - amount = parseFloat (trade[2]); - cost = price * amount; - side = trade[3]; - id = trade[4].toString (); + timestamp = this.safeInteger (trade, 0); + priceString = this.safeString (trade, 1); + amountString = this.safeString (trade, 2); + side = this.safeString (trade, 3); + id = this.safeString (trade, 4); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': order, @@ -41532,11 +41382,11 @@ module.exports = class buda extends Exchange { const currencyId = this.safeString (balance, 'id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = parseFloat (balance['available_amount'][0]); - account['total'] = parseFloat (balance['amount'][0]); + account['free'] = this.safeString (balance['available_amount'], 0); + account['total'] = this.safeString (balance['amount'], 0); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -41644,15 +41494,15 @@ module.exports = class buda extends Exchange { const side = this.safeStringLower (order, 'type'); const status = this.parseOrderStatus (this.safeString (order, 'state')); const originalAmount = this.safeValue (order, 'original_amount', []); - const amount = this.safeFloat (originalAmount, 0); + const amount = this.safeNumber (originalAmount, 0); const remainingAmount = this.safeValue (order, 'amount', []); - const remaining = this.safeFloat (remainingAmount, 0); + const remaining = this.safeNumber (remainingAmount, 0); const tradedAmount = this.safeValue (order, 'traded_amount', []); - const filled = this.safeFloat (tradedAmount, 0); + const filled = this.safeNumber (tradedAmount, 0); const totalExchanged = this.safeValue (order, 'totalExchanged', []); - const cost = this.safeFloat (totalExchanged, 0); + const cost = this.safeNumber (totalExchanged, 0); const limitPrice = this.safeValue (order, 'limit', []); - let price = this.safeFloat (limitPrice, 0); + let price = this.safeNumber (limitPrice, 0); if (price === undefined) { if (limitPrice !== undefined) { price = limitPrice; @@ -41663,7 +41513,7 @@ module.exports = class buda extends Exchange { average = this.priceToPrecision (symbol, cost / filled); } const paidFee = this.safeValue (order, 'paid_fee', []); - const feeCost = this.safeFloat (paidFee, 0); + const feeCost = this.safeNumber (paidFee, 0); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (paidFee, 1); @@ -41902,13 +41752,14 @@ module.exports = class buda extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],55:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],55:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { RateLimitExceeded, BadSymbol, OrderNotFound, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -42090,7 +41941,7 @@ module.exports = class bw extends Exchange { const symbol = base + '/' + quote; const state = this.safeInteger (market, 'state'); const active = (state === 1); - const fee = this.safeFloat (market, 'defaultFee'); + const fee = this.safeNumber (market, 'defaultFee'); result.push ({ 'id': id, 'active': active, @@ -42111,7 +41962,7 @@ module.exports = class bw extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -42197,11 +42048,11 @@ module.exports = class bw extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'drawFee'), + 'fee': this.safeNumber (currency, 'drawFee'), 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'limitAmount', 0), + 'min': this.safeNumber (currency, 'limitAmount', 0), 'max': undefined, }, 'price': { @@ -42214,7 +42065,7 @@ module.exports = class bw extends Exchange { }, 'withdraw': { 'min': undefined, - 'max': this.safeFloat (currency, 'onceDrawLimit'), + 'max': this.safeNumber (currency, 'onceDrawLimit'), }, }, }; @@ -42251,9 +42102,9 @@ module.exports = class bw extends Exchange { 'high': parseFloat (this.safeValue (ticker, 2)), 'low': parseFloat (this.safeValue (ticker, 3)), 'bid': parseFloat (this.safeValue (ticker, 7)), - 'bidVolume': this.safeFloat (bid, 'quantity'), + 'bidVolume': this.safeNumber (bid, 'quantity'), 'ask': parseFloat (this.safeValue (ticker, 8)), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, 'open': undefined, 'close': close, @@ -42382,8 +42233,11 @@ module.exports = class bw extends Exchange { // ... // const timestamp = this.safeTimestamp (trade, 2); - const price = this.safeFloat (trade, 5); - const amount = this.safeFloat (trade, 6); + const priceString = this.safeString (trade, 5); + const amountString = this.safeString (trade, 6); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 1); let symbol = undefined; if (marketId !== undefined) { @@ -42400,12 +42254,6 @@ module.exports = class bw extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const sideString = this.safeString (trade, 4); const side = (sideString === 'ask') ? 'sell' : 'buy'; return { @@ -42419,7 +42267,7 @@ module.exports = class bw extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': parseFloat (cost), + 'cost': cost, 'fee': undefined, 'info': trade, }; @@ -42476,11 +42324,11 @@ module.exports = class bw extends Exchange { // return [ this.safeTimestamp (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - this.safeFloat (ohlcv, 6), - this.safeFloat (ohlcv, 7), - this.safeFloat (ohlcv, 8), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + this.safeNumber (ohlcv, 6), + this.safeNumber (ohlcv, 7), + this.safeNumber (ohlcv, 8), ]; } @@ -42538,11 +42386,11 @@ module.exports = class bw extends Exchange { const currencyId = this.safeString (balance, 'currencyTypeId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'amount'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'amount'); + account['used'] = this.safeString (balance, 'freeze'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -42638,25 +42486,13 @@ module.exports = class bw extends Exchange { } else if (side === '1') { side = 'buy'; } - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'completeAmount'); - let remaining = this.safeFloat2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available - let cost = this.safeFloat (order, 'totalMoney'); - if (filled !== undefined) { - if (amount !== undefined) { - if (remaining === undefined) { - remaining = amount - filled; - } - } - if (cost === undefined) { - if (price !== undefined) { - cost = filled * cost; - } - } - } + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'completeAmount'); + const remaining = this.safeNumber2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available + const cost = this.safeNumber (order, 'totalMoney'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'entrustId'), 'clientOrderId': undefined, @@ -42678,7 +42514,7 @@ module.exports = class bw extends Exchange { 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -42974,12 +42810,12 @@ module.exports = class bw extends Exchange { code = currency['code']; } const type = ('depositId' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat2 (transaction, 'actuallyAmount', 'amount'); + const amount = this.safeNumber2 (transaction, 'actuallyAmount', 'amount'); const status = this.parseTransactionStatus (this.safeString2 (transaction, 'verifyStatus', 'state')); const timestamp = this.safeInteger (transaction, 'createTime'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -43110,7 +42946,7 @@ module.exports = class bw extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],56:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],56:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -43155,6 +42991,7 @@ module.exports = class bybit extends Exchange { 'fetchTrades': true, 'fetchTransactions': false, 'fetchWithdrawals': true, + 'fetchPositions': true, }, 'timeframes': { '1m': '1', @@ -43186,6 +43023,34 @@ module.exports = class bybit extends Exchange { 'referral': 'https://www.bybit.com/app/register?ref=X7Prm', }, 'api': { + 'futures': { + 'private': { + 'get': [ + 'position/list', + 'order/list', + 'order', + 'stop-order/list', + 'stop-order', + 'execution/list', + 'trade/closed-pnl/list', + ], + 'post': [ + 'order/create', + 'order/cancel', + 'order/cancelAll', + 'order/replace', + 'stop-order/create', + 'stop-order/cancel', + 'stop-order/cancelAll', + 'stop-order/replace', + 'position/change-position-margin', + 'position/trading-stop', + 'position/leverage/save', + 'position/switch-mode', + 'position/switch-isolated', + ], + }, + }, 'v2': { 'public': { 'get': [ @@ -43399,7 +43264,11 @@ module.exports = class bybit extends Exchange { 'LTC/USDT': 'linear', 'XTZ/USDT': 'linear', 'LINK/USDT': 'linear', + 'ADA/USDT': 'linear', + 'DOT/USDT': 'linear', + 'UNI/USDT': 'linear', }, + 'defaultType': 'linear', // may also be inverse or inverseFuture 'code': 'BTC', 'cancelAllOrders': { // 'method': 'v2PrivatePostOrderCancelAll', // v2PrivatePostStopOrderCancelAll @@ -43514,8 +43383,8 @@ module.exports = class bybit extends Exchange { const lotSizeFilter = this.safeValue (market, 'lot_size_filter', {}); const priceFilter = this.safeValue (market, 'price_filter', {}); const precision = { - 'amount': this.safeFloat (lotSizeFilter, 'qty_step'), - 'price': this.safeFloat (priceFilter, 'tick_size'), + 'amount': this.safeNumber (lotSizeFilter, 'qty_step'), + 'price': this.safeNumber (priceFilter, 'tick_size'), }; const status = this.safeString (market, 'status'); let active = undefined; @@ -43529,8 +43398,8 @@ module.exports = class bybit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'type': 'future', 'spot': false, 'future': true, @@ -43539,12 +43408,12 @@ module.exports = class bybit extends Exchange { 'inverse': inverse, 'limits': { 'amount': { - 'min': this.safeFloat (lotSizeFilter, 'min_trading_qty'), - 'max': this.safeFloat (lotSizeFilter, 'max_trading_qty'), + 'min': this.safeNumber (lotSizeFilter, 'min_trading_qty'), + 'max': this.safeNumber (lotSizeFilter, 'max_trading_qty'), }, 'price': { - 'min': this.safeFloat (priceFilter, 'min_price'), - 'max': this.safeFloat (priceFilter, 'max_price'), + 'min': this.safeNumber (priceFilter, 'min_price'), + 'max': this.safeNumber (priceFilter, 'max_price'), }, 'cost': { 'min': undefined, @@ -43590,9 +43459,9 @@ module.exports = class bybit extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const open = this.safeFloat (ticker, 'prev_price_24h'); - let percentage = this.safeFloat (ticker, 'price_24h_pcnt'); + const last = this.safeNumber (ticker, 'last_price'); + const open = this.safeNumber (ticker, 'prev_price_24h'); + let percentage = this.safeNumber (ticker, 'price_24h_pcnt'); if (percentage !== undefined) { percentage *= 100; } @@ -43602,18 +43471,18 @@ module.exports = class bybit extends Exchange { change = last - open; average = this.sum (open, last) / 2; } - const baseVolume = this.safeFloat (ticker, 'turnover_24h'); - const quoteVolume = this.safeFloat (ticker, 'volume_24h'); + const baseVolume = this.safeNumber (ticker, 'turnover_24h'); + const quoteVolume = this.safeNumber (ticker, 'volume_24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price_24h'), - 'low': this.safeFloat (ticker, 'low_price_24h'), - 'bid': this.safeFloat (ticker, 'bid_price'), + 'high': this.safeNumber (ticker, 'high_price_24h'), + 'low': this.safeNumber (ticker, 'low_price_24h'), + 'bid': this.safeNumber (ticker, 'bid_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask_price'), + 'ask': this.safeNumber (ticker, 'ask_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -43762,11 +43631,11 @@ module.exports = class bybit extends Exchange { // return [ this.safeTimestamp2 (ohlcv, 'open_time', 'start_at'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat2 (ohlcv, 'turnover', 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber2 (ohlcv, 'turnover', 'volume'), ]; } @@ -43892,9 +43761,9 @@ module.exports = class bybit extends Exchange { const marketId = this.safeString (trade, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat2 (trade, 'qty', 'exec_qty'); - let cost = this.safeFloat (trade, 'exec_value'); - const price = this.safeFloat2 (trade, 'exec_price', 'price'); + const amount = this.safeNumber2 (trade, 'qty', 'exec_qty'); + let cost = this.safeNumber (trade, 'exec_value'); + const price = this.safeNumber2 (trade, 'exec_price', 'price'); if (cost === undefined) { if (amount !== undefined) { if (price !== undefined) { @@ -43909,14 +43778,14 @@ module.exports = class bybit extends Exchange { const side = this.safeStringLower (trade, 'side'); const lastLiquidityInd = this.safeString (trade, 'last_liquidity_ind'); const takerOrMaker = (lastLiquidityInd === 'AddedLiquidity') ? 'maker' : 'taker'; - const feeCost = this.safeFloat (trade, 'exec_fee'); + const feeCost = this.safeNumber (trade, 'exec_fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyCode = market['inverse'] ? market['base'] : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'fee_rate'), + 'rate': this.safeNumber (trade, 'fee_rate'), }; } return { @@ -44076,12 +43945,12 @@ module.exports = class bybit extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['used'] = this.safeFloat (balance, 'used_margin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'used_margin'); + account['total'] = this.safeString (balance, 'equity'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -44208,56 +44077,42 @@ module.exports = class bybit extends Exchange { // const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); - let symbol = undefined; - let base = undefined; + const symbol = market['symbol']; + let feeCurrency = undefined; const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const id = this.safeString2 (order, 'order_id', 'stop_order_id'); const type = this.safeStringLower (order, 'order_type'); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - let average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'qty'); - let cost = this.safeFloat (order, 'cum_exec_value'); - let filled = this.safeFloat (order, 'cum_exec_qty'); - let remaining = this.safeFloat (order, 'leaves_qty'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'qty'); + const cost = this.safeNumber (order, 'cum_exec_value'); + const filled = this.safeNumber (order, 'cum_exec_qty'); + const remaining = this.safeNumber (order, 'leaves_qty'); + const marketTypes = this.safeValue (this.options, 'marketTypes', {}); + const marketType = this.safeString (marketTypes, symbol); if (market !== undefined) { - symbol = market['symbol']; - base = market['base']; + if (marketType === 'linear') { + feeCurrency = market['quote']; + } else { + feeCurrency = market['base']; + } } let lastTradeTimestamp = this.safeTimestamp (order, 'last_exec_time'); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = amount - remaining; - } - if (filled !== undefined) { - if ((remaining === undefined) && (amount !== undefined)) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if ((type === 'market') && (cost !== undefined) && (cost > 0)) { - price = undefined; - if (average === undefined) { - average = filled / cost; - } - } - } const status = this.parseOrderStatus (this.safeString2 (order, 'order_status', 'stop_order_status')); const side = this.safeStringLower (order, 'side'); - let feeCost = this.safeFloat (order, 'cum_exec_fee'); + let feeCost = this.safeNumber (order, 'cum_exec_fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); fee = { 'cost': feeCost, - 'currency': base, + 'currency': feeCurrency, }; } let clientOrderId = this.safeString (order, 'order_link_id'); @@ -44265,9 +44120,9 @@ module.exports = class bybit extends Exchange { clientOrderId = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'stop_px'); + const stopPrice = this.safeNumber (order, 'stop_px'); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -44289,7 +44144,7 @@ module.exports = class bybit extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -45140,7 +44995,8 @@ module.exports = class bybit extends Exchange { const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); + const type = this.safeStringLower (transaction, 'type'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -45160,8 +45016,8 @@ module.exports = class bybit extends Exchange { 'tag': undefined, 'tagTo': undefined, 'tagFrom': undefined, - 'type': 'withdrawal', - 'amount': this.safeFloat (transaction, 'amount'), + 'type': type, + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -45244,8 +45100,8 @@ module.exports = class bybit extends Exchange { // const currencyId = this.safeString (item, 'coin'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'wallet_balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'wallet_balance'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -45311,7 +45167,8 @@ module.exports = class bybit extends Exchange { 'recv_window': this.options['recvWindow'], 'timestamp': timestamp, }); - const auth = this.rawencode (this.keysort (query)); + const sortedQuery = this.keysort (query); + const auth = this.rawencode (sortedQuery); const signature = this.hmac (this.encode (auth), this.encode (this.secret)); if (method === 'POST') { body = this.json (this.extend (query, { @@ -45321,7 +45178,7 @@ module.exports = class bybit extends Exchange { 'Content-Type': 'application/json', }; } else { - request += '?' + auth + '&sign=' + signature; + request += '?' + this.urlencode (sortedQuery) + '&sign=' + signature; } } url += request; @@ -45344,17 +45201,48 @@ module.exports = class bybit extends Exchange { // time_now: '1583934106.590436' // } // - const errorCode = this.safeValue (response, 'ret_code'); - if (errorCode !== 0) { + const errorCode = this.safeString (response, 'ret_code'); + if (errorCode !== '0') { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, feedback); this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback); throw new ExchangeError (feedback); // unknown message } } + + async fetchPositions (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (Array.isArray (symbols)) { + const length = symbols.length; + if (length !== 1) { + throw new ArgumentsRequired (this.id + ' fetchPositions takes exactly one symbol'); + } + request['symbol'] = this.marketId (symbols[0]); + } + const defaultType = this.safeString (this.options, 'defaultType', 'linear'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + let response = undefined; + if (type === 'linear') { + response = await this.privateLinearGetPositionList (this.extend (request, params)); + } else if (type === 'inverse') { + response = await this.v2PrivateGetPositionList (this.extend (request, params)); + } else if (type === 'inverseFuture') { + response = await this.futuresPrivateGetPositionList (this.extend (request, params)); + } + // { + // ret_code: 0, + // ret_msg: 'OK', + // ext_code: '', + // ext_info: '', + // result: [] or {} depending on the request + // } + return this.safeValue (response, 'result'); + } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],57:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],57:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -45543,12 +45431,12 @@ module.exports = class bytetrade extends Exchange { const limits = this.safeValue (currency, 'limits'); const deposit = this.safeValue (limits, 'deposit'); const amountPrecision = this.safeInteger (currency, 'basePrecision'); - let maxDeposit = this.safeFloat (deposit, 'max'); + let maxDeposit = this.safeNumber (deposit, 'max'); if (maxDeposit === -1.0) { maxDeposit = undefined; } const withdraw = this.safeValue (limits, 'withdraw'); - let maxWithdraw = this.safeFloat (withdraw, 'max'); + let maxWithdraw = this.safeNumber (withdraw, 'max'); if (maxWithdraw === -1.0) { maxWithdraw = undefined; } @@ -45564,11 +45452,11 @@ module.exports = class bytetrade extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (deposit, 'min'), + 'min': this.safeNumber (deposit, 'min'), 'max': maxDeposit, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'min'), + 'min': this.safeNumber (withdraw, 'min'), 'max': maxWithdraw, }, }, @@ -45622,12 +45510,12 @@ module.exports = class bytetrade extends Exchange { 'normalSymbol': normalSymbol, 'limits': { 'amount': { - 'min': this.safeFloat (amount, 'min'), - 'max': this.safeFloat (amount, 'max'), + 'min': this.safeNumber (amount, 'min'), + 'max': this.safeNumber (amount, 'max'), }, 'price': { - 'min': this.safeFloat (price, 'min'), - 'max': this.safeFloat (price, 'max'), + 'min': this.safeNumber (price, 'min'), + 'max': this.safeNumber (price, 'max'), }, 'cost': { 'min': undefined, @@ -45655,11 +45543,11 @@ module.exports = class bytetrade extends Exchange { const currencyId = this.safeString (balance, 'code'); const code = this.safeCurrencyCode (currencyId, undefined); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'used'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'used'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -45720,22 +45608,22 @@ module.exports = class bytetrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'open'), - 'close': this.safeFloat (ticker, 'close'), - 'last': this.safeFloat (ticker, 'last'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'open'), + 'close': this.safeNumber (ticker, 'close'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, // previous day close - 'change': this.safeFloat (ticker, 'change'), - 'percentage': this.safeFloat (ticker, 'percentage'), + 'change': this.safeNumber (ticker, 'change'), + 'percentage': this.safeNumber (ticker, 'percentage'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -45778,24 +45666,16 @@ module.exports = class bytetrade extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetDepth (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetDepth (params); + return this.parseTickers (response, symbols); } async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetTickers (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetTickers (params); + return this.parseTickers (response, symbols); } parseOHLCV (ohlcv, market = undefined) { @@ -45811,11 +45691,11 @@ module.exports = class bytetrade extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -45845,9 +45725,9 @@ module.exports = class bytetrade extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeInteger (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - const cost = this.safeFloat (trade, 'cost'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + const cost = this.safeNumber (trade, 'cost'); const id = this.safeString (trade, 'id'); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'takerOrMaker'); @@ -45917,12 +45797,12 @@ module.exports = class bytetrade extends Exchange { const timestamp = this.safeInteger (order, 'timestamp'); const datetime = this.safeString (order, 'datetime'); const lastTradeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled'); - const remaining = this.safeFloat (order, 'remaining'); - const cost = this.safeFloat (order, 'cost'); - const average = this.safeFloat (order, 'average'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled'); + const remaining = this.safeNumber (order, 'remaining'); + const cost = this.safeNumber (order, 'cost'); + const average = this.safeNumber (order, 'average'); const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); @@ -46315,7 +46195,7 @@ module.exports = class bytetrade extends Exchange { }; } - async transfer (code, amount, address, message = '', params = {}) { + async transfer (code, amount, fromAccount, toAccount, params = {}) { this.checkRequiredDependencies (); if (this.apiKey === undefined) { throw new ArgumentsRequired ('transfer() requires this.apiKey'); @@ -46333,6 +46213,7 @@ module.exports = class bytetrade extends Exchange { expirationDatetime = expirationDatetime.split ('.')[0]; const feeAmount = '300000000000000'; const defaultDappId = 'Sagittarius'; + const message = this.safeString (params, 'message', ''); const dappId = this.safeString (params, 'dappId', defaultDappId); const eightBytes = this.integerPow ('2', '64'); const byteStringArray = [ @@ -46346,8 +46227,8 @@ module.exports = class bytetrade extends Exchange { this.numberToLE (feeAmount, 8), // string for 32 bit php this.numberToLE (this.apiKey.length, 1), this.stringToBinary (this.encode (this.apiKey)), - this.numberToLE (address.length, 1), - this.stringToBinary (this.encode (address)), + this.numberToLE (toAccount.length, 1), + this.stringToBinary (this.encode (toAccount)), this.numberToLE (assetType, 4), this.numberToLE (this.integerDivide (amountChain, eightBytes), 8), this.numberToLE (this.integerModulo (amountChain, eightBytes), 8), @@ -46368,7 +46249,7 @@ module.exports = class bytetrade extends Exchange { const operation = { 'fee': '300000000000000', 'from': this.apiKey, - 'to': address, + 'to': toAccount, 'asset_type': parseInt (currency['id']), 'amount': amountChain.toString (), 'message': message, @@ -46522,9 +46403,9 @@ module.exports = class bytetrade extends Exchange { const datetime = this.safeString (transaction, 'datetime'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const feeInfo = this.safeValue (transaction, 'fee'); - const feeCost = this.safeFloat (feeInfo, 'cost'); + const feeCost = this.safeNumber (feeInfo, 'cost'); const feeCurrencyId = this.safeString (feeInfo, 'code'); const feeCode = this.safeCurrencyCode (feeCurrencyId, currency); const fee = { @@ -46787,7 +46668,7 @@ module.exports = class bytetrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],58:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],58:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -46822,7 +46703,7 @@ module.exports = class cdax extends huobipro { } }; -},{"./huobipro.js":96}],59:[function(require,module,exports){ +},{"./huobipro.js":94}],59:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -47081,7 +46962,7 @@ module.exports = class cex extends Exchange { 'fee': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimumCurrencyAmount'), + 'min': this.safeNumber (currency, 'minimumCurrencyAmount'), 'max': undefined, }, 'price': { @@ -47093,7 +46974,7 @@ module.exports = class cex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimalWithdrawalAmount'), + 'min': this.safeNumber (currency, 'minimalWithdrawalAmount'), 'max': undefined, }, }, @@ -47176,15 +47057,15 @@ module.exports = class cex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minLotSize'), - 'max': this.safeFloat (market, 'maxLotSize'), + 'min': this.safeNumber (market, 'minLotSize'), + 'max': this.safeNumber (market, 'maxLotSize'), }, 'price': { - 'min': this.safeFloat (market, 'minPrice'), - 'max': this.safeFloat (market, 'maxPrice'), + 'min': this.safeNumber (market, 'minPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { - 'min': this.safeFloat (market, 'minLotSizeS2'), + 'min': this.safeNumber (market, 'minLotSizeS2'), 'max': undefined, }, }, @@ -47205,13 +47086,13 @@ module.exports = class cex extends Exchange { const currencyId = currencyIds[i]; const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); + account['free'] = this.safeString (balance, 'available'); // https://github.com/ccxt/ccxt/issues/5484 - account['used'] = this.safeFloat (balance, 'orders', 0.0); + account['used'] = this.safeString (balance, 'orders', '0'); const code = this.safeCurrencyCode (currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -47240,11 +47121,11 @@ module.exports = class cex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -47286,12 +47167,12 @@ module.exports = class cex extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const volume = this.safeFloat (ticker, 'volume'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'last'); + const volume = this.safeNumber (ticker, 'volume'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'last'); let symbol = undefined; if (market) { symbol = market['symbol']; @@ -47353,8 +47234,8 @@ module.exports = class cex extends Exchange { const id = this.safeString (trade, 'tid'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -47426,8 +47307,8 @@ module.exports = class cex extends Exchange { // "complete": false // } // - const placedAmount = this.safeFloat (response, 'amount'); - const remaining = this.safeFloat (response, 'pending'); + const placedAmount = this.safeNumber (response, 'amount'); + const remaining = this.safeNumber (response, 'pending'); const timestamp = this.safeValue (response, 'time'); const complete = this.safeValue (response, 'complete'); const status = complete ? 'closed' : 'open'; @@ -47446,7 +47327,7 @@ module.exports = class cex extends Exchange { 'side': this.safeString (response, 'type'), 'symbol': symbol, 'status': status, - 'price': this.safeFloat (response, 'price'), + 'price': this.safeNumber (response, 'price'), 'amount': placedAmount, 'cost': undefined, 'average': undefined, @@ -47488,42 +47369,42 @@ module.exports = class cex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - let amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + let amount = this.safeNumber (order, 'amount'); // sell orders can have a negative amount // https://github.com/ccxt/ccxt/issues/5338 if (amount !== undefined) { amount = Math.abs (amount); } - const remaining = this.safeFloat2 (order, 'pending', 'remains'); + const remaining = this.safeNumber2 (order, 'pending', 'remains'); const filled = amount - remaining; let fee = undefined; let cost = undefined; if (market !== undefined) { symbol = market['symbol']; - const taCost = this.safeFloat (order, 'ta:' + market['quote']); - const ttaCost = this.safeFloat (order, 'tta:' + market['quote']); + const taCost = this.safeNumber (order, 'ta:' + market['quote']); + const ttaCost = this.safeNumber (order, 'tta:' + market['quote']); cost = this.sum (taCost, ttaCost); const baseFee = 'fa:' + market['base']; const baseTakerFee = 'tfa:' + market['base']; const quoteFee = 'fa:' + market['quote']; const quoteTakerFee = 'tfa:' + market['quote']; - let feeRate = this.safeFloat (order, 'tradingFeeMaker'); + let feeRate = this.safeNumber (order, 'tradingFeeMaker'); if (!feeRate) { - feeRate = this.safeFloat (order, 'tradingFeeTaker', feeRate); + feeRate = this.safeNumber (order, 'tradingFeeTaker', feeRate); } if (feeRate) { feeRate /= 100.0; // convert to mathematically-correct percentage coefficients: 1.0 = 100% } if ((baseFee in order) || (baseTakerFee in order)) { - const baseFeeCost = this.safeFloat2 (order, baseFee, baseTakerFee); + const baseFeeCost = this.safeNumber2 (order, baseFee, baseTakerFee); fee = { 'currency': market['base'], 'rate': feeRate, 'cost': baseFeeCost, }; } else if ((quoteFee in order) || (quoteTakerFee in order)) { - const quoteFeeCost = this.safeFloat2 (order, quoteFee, quoteTakerFee); + const quoteFeeCost = this.safeNumber2 (order, quoteFee, quoteTakerFee); fee = { 'currency': market['quote'], 'rate': feeRate, @@ -47563,7 +47444,7 @@ module.exports = class cex extends Exchange { // ds: 0 } continue; } - const tradePrice = this.safeFloat (item, 'price'); + const tradePrice = this.safeNumber (item, 'price'); if (tradePrice === undefined) { // this represents the order // { @@ -47667,8 +47548,8 @@ module.exports = class cex extends Exchange { // "fee_amount": "0.03" // } const tradeTimestamp = this.parse8601 (this.safeString (item, 'time')); - const tradeAmount = this.safeFloat (item, 'amount'); - const feeCost = this.safeFloat (item, 'fee_amount'); + const tradeAmount = this.safeNumber (item, 'amount'); + const feeCost = this.safeNumber (item, 'fee_amount'); let absTradeAmount = (tradeAmount < 0) ? -tradeAmount : tradeAmount; let tradeCost = undefined; if (tradeSide === 'sell') { @@ -48013,12 +47894,12 @@ module.exports = class cex extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const side = this.safeString (order, 'type'); - const baseAmount = this.safeFloat (order, 'a:' + baseId + ':cds'); - const quoteAmount = this.safeFloat (order, 'a:' + quoteId + ':cds'); - const fee = this.safeFloat (order, 'f:' + quoteId + ':cds'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const remaining = this.safeFloat (order, 'remains'); + const baseAmount = this.safeNumber (order, 'a:' + baseId + ':cds'); + const quoteAmount = this.safeNumber (order, 'a:' + quoteId + ':cds'); + const fee = this.safeNumber (order, 'f:' + quoteId + ':cds'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const remaining = this.safeNumber (order, 'remains'); const filled = amount - remaining; let orderAmount = undefined; let cost = undefined; @@ -48030,10 +47911,10 @@ module.exports = class cex extends Exchange { cost = quoteAmount; average = orderAmount / cost; } else { - const ta = this.safeFloat (order, 'ta:' + quoteId, 0); - const tta = this.safeFloat (order, 'tta:' + quoteId, 0); - const fa = this.safeFloat (order, 'fa:' + quoteId, 0); - const tfa = this.safeFloat (order, 'tfa:' + quoteId, 0); + const ta = this.safeNumber (order, 'ta:' + quoteId, 0); + const tta = this.safeNumber (order, 'tta:' + quoteId, 0); + const fa = this.safeNumber (order, 'fa:' + quoteId, 0); + const tfa = this.safeNumber (order, 'tfa:' + quoteId, 0); if (side === 'sell') { cost = this.sum (this.sum (ta, tta), this.sum (fa, tfa)); } else { @@ -48172,47 +48053,14 @@ module.exports = class cex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],60:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const foxbit = require ('./foxbit.js'); - -// --------------------------------------------------------------------------- - -module.exports = class chilebit extends foxbit { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'chilebit', - 'name': 'ChileBit', - 'countries': [ 'CL' ], - 'has': { - 'CORS': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg', - 'api': { - 'public': 'https://api.blinktrade.com/api', - 'private': 'https://api.blinktrade.com/tapi', - }, - 'www': 'https://chilebit.net', - 'doc': 'https://blinktrade.com/docs', - }, - 'options': { - 'brokerId': '9', // https://blinktrade.com/docs/#brokers - }, - }); - } -}; - -},{"./foxbit.js":87}],61:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],60:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, RateLimitExceeded, InvalidNonce } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -48620,10 +48468,10 @@ module.exports = class coinbase extends Exchange { const timestamp = this.parse8601 (this.safeValue (transaction, 'created_at')); const updated = this.parse8601 (this.safeValue (transaction, 'updated_at')); const type = this.safeString (transaction, 'resource'); - const amount = this.safeFloat (subtotalObject, 'amount'); + const amount = this.safeNumber (subtotalObject, 'amount'); const currencyId = this.safeString (subtotalObject, 'currency'); const currency = this.safeCurrencyCode (currencyId); - const feeCost = this.safeFloat (feeObject, 'amount'); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -48699,15 +48547,12 @@ module.exports = class coinbase extends Exchange { const orderId = undefined; const side = this.safeString (trade, 'resource'); const type = undefined; - const cost = this.safeFloat (subtotalObject, 'amount'); - const amount = this.safeFloat (amountObject, 'amount'); - let price = undefined; - if (cost !== undefined) { - if ((amount !== undefined) && (amount > 0)) { - price = cost / amount; - } - } - const feeCost = this.safeFloat (feeObject, 'amount'); + const costString = this.safeString (subtotalObject, 'amount'); + const amountString = this.safeString (amountObject, 'amount'); + const cost = this.parseNumber (costString); + const amount = this.parseNumber (amountString); + const price = this.parseNumber (Precise.stringDiv (costString, amountString)); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -48775,7 +48620,7 @@ module.exports = class coinbase extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (quoteCurrency, 'min_size'), + 'min': this.safeNumber (quoteCurrency, 'min_size'), 'max': undefined, }, }, @@ -48857,7 +48702,7 @@ module.exports = class coinbase extends Exchange { 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min_size'), + 'min': this.safeNumber (currency, 'min_size'), 'max': undefined, }, 'price': { @@ -48888,9 +48733,9 @@ module.exports = class coinbase extends Exchange { const buy = await this.publicGetPricesSymbolBuy (request); const sell = await this.publicGetPricesSymbolSell (request); const spot = await this.publicGetPricesSymbolSpot (request); - const ask = this.safeFloat (buy['data'], 'amount'); - const bid = this.safeFloat (sell['data'], 'amount'); - const last = this.safeFloat (spot['data'], 'amount'); + const ask = this.safeNumber (buy['data'], 'amount'); + const bid = this.safeNumber (sell['data'], 'amount'); + const last = this.safeNumber (spot['data'], 'amount'); return { 'symbol': symbol, 'timestamp': timestamp, @@ -48933,7 +48778,7 @@ module.exports = class coinbase extends Exchange { if (this.inArray (balance['type'], accounts)) { const currencyId = this.safeString (balance['balance'], 'currency'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance['balance'], 'amount'); + const total = this.safeNumber (balance['balance'], 'amount'); const free = total; const used = undefined; if (code in result) { @@ -49234,7 +49079,7 @@ module.exports = class coinbase extends Exchange { // } // const amountInfo = this.safeValue (item, 'amount', {}); - let amount = this.safeFloat (amountInfo, 'amount'); + let amount = this.safeNumber (amountInfo, 'amount'); let direction = undefined; if (amount < 0) { direction = 'out'; @@ -49260,7 +49105,7 @@ module.exports = class coinbase extends Exchange { if (feeInfo !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId, currency); - const feeAmount = this.safeFloat (feeInfo, 'amount'); + const feeAmount = this.safeNumber (feeInfo, 'amount'); fee = { 'cost': feeAmount, 'currency': feeCurrencyCode, @@ -49424,7 +49269,7 @@ module.exports = class coinbase extends Exchange { }; -},{"./base/Exchange":6,"./base/errors":8}],62:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],61:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -49457,7 +49302,7 @@ module.exports = class coinbaseprime extends coinbasepro { } }; -},{"./coinbasepro.js":63}],63:[function(require,module,exports){ +},{"./coinbasepro.js":62}],62:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -49465,6 +49310,7 @@ module.exports = class coinbaseprime extends coinbasepro { const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ArgumentsRequired, ExchangeError, InvalidOrder, InvalidAddress, AuthenticationError, NotSupported, OrderNotFound, OnMaintenance, PermissionDenied, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -49699,7 +49545,7 @@ module.exports = class coinbasepro extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const details = this.safeValue (currency, 'details', {}); - const precision = this.safeFloat (currency, 'max_precision'); + const precision = this.safeNumber (currency, 'max_precision'); const status = this.safeString (currency, 'status'); const active = (status === 'online'); result[code] = { @@ -49713,7 +49559,7 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (details, 'min_size'), + 'min': this.safeNumber (details, 'min_size'), 'max': undefined, }, 'price': { @@ -49725,7 +49571,7 @@ module.exports = class coinbasepro extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (details, 'min_withdrawal_amount'), + 'min': this.safeNumber (details, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -49769,12 +49615,12 @@ module.exports = class coinbasepro extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const priceLimits = { - 'min': this.safeFloat (market, 'quote_increment'), + 'min': this.safeNumber (market, 'quote_increment'), 'max': undefined, }; const precision = { - 'amount': this.safeFloat (market, 'base_increment'), - 'price': this.safeFloat (market, 'quote_increment'), + 'amount': this.safeNumber (market, 'base_increment'), + 'price': this.safeNumber (market, 'quote_increment'), }; const status = this.safeString (market, 'status'); const active = (status === 'online'); @@ -49788,13 +49634,13 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': priceLimits, 'cost': { - 'min': this.safeFloat (market, 'min_market_funds'), - 'max': this.safeFloat (market, 'max_market_funds'), + 'min': this.safeNumber (market, 'min_market_funds'), + 'max': this.safeNumber (market, 'max_market_funds'), }, }, 'active': active, @@ -49851,14 +49697,13 @@ module.exports = class coinbasepro extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'hold'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'hold'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -49915,29 +49760,29 @@ module.exports = class coinbasepro extends Exchange { // } // const timestamp = this.parse8601 (this.safeValue (ticker, 'time')); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'price'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'price'); const symbol = (market === undefined) ? undefined : market['symbol']; return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': undefined, 'ask': ask, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -50010,7 +49855,7 @@ module.exports = class coinbasepro extends Exchange { if (market !== undefined) { const feeCurrencyId = this.safeStringLower (market, 'quoteId'); const costField = feeCurrencyId + '_value'; - cost = this.safeFloat (trade, costField); + cost = this.safeNumber (trade, costField); feeCurrency = market['quote']; const liquidity = this.safeString (trade, 'liquidity'); if (liquidity !== undefined) { @@ -50018,7 +49863,7 @@ module.exports = class coinbasepro extends Exchange { feeRate = market[takerOrMaker]; } } - const feeCost = this.safeFloat2 (trade, 'fill_fees', 'fee'); + const feeCost = this.safeNumber2 (trade, 'fill_fees', 'fee'); const fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -50032,10 +49877,12 @@ module.exports = class coinbasepro extends Exchange { if (orderId !== undefined) { side = (trade['side'] === 'buy') ? 'buy' : 'sell'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - cost = amount * price; + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -50097,11 +49944,11 @@ module.exports = class coinbasepro extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -50181,17 +50028,11 @@ module.exports = class coinbasepro extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'filled_size'); - const amount = this.safeFloat (order, 'size', filled); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'executed_value'); - const feeCost = this.safeFloat (order, 'fill_fees'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'filled_size'); + const amount = this.safeNumber (order, 'size', filled); + const cost = this.safeNumber (order, 'executed_value'); + const feeCost = this.safeNumber (order, 'fill_fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -50209,9 +50050,9 @@ module.exports = class coinbasepro extends Exchange { const side = this.safeString (order, 'side'); const timeInForce = this.safeString (order, 'time_in_force'); const postOnly = this.safeValue (order, 'post_only'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -50229,11 +50070,11 @@ module.exports = class coinbasepro extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -50323,7 +50164,7 @@ module.exports = class coinbasepro extends Exchange { request['client_oid'] = clientOrderId; params = this.omit (params, [ 'clientOrderId', 'client_oid' ]); } - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop_price'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stop_price'); if (stopPrice !== undefined) { request['stop_price'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, [ 'stopPrice', 'stop_price' ]); @@ -50337,7 +50178,7 @@ module.exports = class coinbasepro extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['size'] = this.amountToPrecision (symbol, amount); } else if (type === 'market') { - let cost = this.safeFloat2 (params, 'cost', 'funds'); + let cost = this.safeNumber2 (params, 'cost', 'funds'); if (cost === undefined) { if (price !== undefined) { cost = amount * price; @@ -50408,19 +50249,6 @@ module.exports = class coinbasepro extends Exchange { return await this.privateDeleteOrders (this.extend (request, params)); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - const cost = amount * price; - const currency = market['quote']; - return { - 'type': takerOrMaker, - 'currency': currency, - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (currency, rate * cost)), - }; - } - async fetchPaymentMethods (params = {}) { return await this.privateGetPaymentMethods (params); } @@ -50559,7 +50387,7 @@ module.exports = class coinbasepro extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (transaction); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let type = this.safeString (transaction, 'type'); let address = this.safeString (details, 'crypto_address'); const tag = this.safeString (details, 'destination_tag'); @@ -50568,7 +50396,7 @@ module.exports = class coinbasepro extends Exchange { if (type === 'withdraw') { type = 'withdrawal'; address = this.safeString (details, 'sent_to_address', address); - const feeCost = this.safeFloat (details, 'fee'); + const feeCost = this.safeNumber (details, 'fee'); if (feeCost !== undefined) { if (amount !== undefined) { amount -= feeCost; @@ -50682,13 +50510,14 @@ module.exports = class coinbasepro extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],64:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],63:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -50812,12 +50641,12 @@ module.exports = class coincheck extends Exchange { if (currencyId in balances) { const account = this.account (); const reserved = currencyId + '_reserved'; - account['free'] = this.safeFloat (balances, currencyId); - account['used'] = this.safeFloat (balances, reserved); + account['free'] = this.safeString (balances, currencyId); + account['used'] = this.safeString (balances, reserved); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -50855,23 +50684,13 @@ module.exports = class coincheck extends Exchange { const id = this.safeString (order, 'id'); const side = this.safeString (order, 'order_type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const amount = this.safeFloat (order, 'pending_amount'); - const remaining = this.safeFloat (order, 'pending_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = Math.max (amount - remaining, 0); - if (price !== undefined) { - cost = filled * price; - } - } - } + const amount = this.safeNumber (order, 'pending_amount'); + const remaining = this.safeNumber (order, 'pending_amount'); + const price = this.safeNumber (order, 'rate'); const status = undefined; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -50879,7 +50698,7 @@ module.exports = class coincheck extends Exchange { 'lastTradeTimestamp': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'side': side, 'type': undefined, 'timeInForce': undefined, @@ -50888,12 +50707,12 @@ module.exports = class coincheck extends Exchange { 'symbol': symbol, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'info': order, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -50917,16 +50736,16 @@ module.exports = class coincheck extends Exchange { }; const ticker = await this.publicGetTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -50936,7 +50755,7 @@ module.exports = class coincheck extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -50945,7 +50764,7 @@ module.exports = class coincheck extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'rate'); + const priceString = this.safeString (trade, 'rate'); const marketId = this.safeString (trade, 'pair'); market = this.safeValue (this.markets_by_id, marketId, market); let symbol = undefined; @@ -50972,7 +50791,7 @@ module.exports = class coincheck extends Exchange { } } let takerOrMaker = undefined; - let amount = undefined; + let amountString = undefined; let cost = undefined; let side = undefined; let fee = undefined; @@ -50984,24 +50803,22 @@ module.exports = class coincheck extends Exchange { takerOrMaker = 'maker'; } const funds = this.safeValue (trade, 'funds', {}); - amount = this.safeFloat (funds, baseId); - cost = this.safeFloat (funds, quoteId); + amountString = this.safeString (funds, baseId); + cost = this.safeNumber (funds, quoteId); fee = { 'currency': this.safeString (trade, 'fee_currency'), - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), }; side = this.safeString (trade, 'side'); orderId = this.safeString (trade, 'order_id'); } else { - amount = this.safeFloat (trade, 'amount'); + amountString = this.safeString (trade, 'amount'); side = this.safeString (trade, 'order_type'); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -51072,6 +50889,10 @@ module.exports = class coincheck extends Exchange { return await this.privateDeleteExchangeOrdersId (this.extend (request, params)); } + nonce () { + return this.milliseconds (); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { let url = this.urls['api'] + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); @@ -51118,13 +50939,14 @@ module.exports = class coincheck extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],65:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],64:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -51335,8 +51157,8 @@ module.exports = class coinegg extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; let change = undefined; let average = undefined; @@ -51350,11 +51172,11 @@ module.exports = class coinegg extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -51364,8 +51186,8 @@ module.exports = class coinegg extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVol'), 'info': ticker, }; } @@ -51394,15 +51216,12 @@ module.exports = class coinegg extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const type = 'limit'; const side = this.safeString (trade, 'type'); const id = this.safeString (trade, 'tid'); @@ -51449,9 +51268,9 @@ module.exports = class coinegg extends Exchange { result[code] = this.account (); } const type = (accountType === 'lock') ? 'used' : 'free'; - result[code][type] = this.safeFloat (balances, key); + result[code][type] = this.safeString (balances, key); } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -51460,15 +51279,9 @@ module.exports = class coinegg extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let status = this.safeString (order, 'status'); if (status === 'cancelled') { status = 'canceled'; @@ -51479,7 +51292,7 @@ module.exports = class coinegg extends Exchange { const type = 'limit'; const side = this.safeString (order, 'type'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -51495,13 +51308,13 @@ module.exports = class coinegg extends Exchange { 'stopPrice': undefined, 'cost': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'trades': undefined, 'fee': undefined, 'info': info, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -51637,13 +51450,14 @@ module.exports = class coinegg extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],66:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],65:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, OrderNotFound, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -51836,13 +51650,13 @@ module.exports = class coinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': this.safeFloat (market, 'taker_fee_rate'), - 'maker': this.safeFloat (market, 'maker_fee_rate'), + 'taker': this.safeNumber (market, 'taker_fee_rate'), + 'maker': this.safeNumber (market, 'maker_fee_rate'), 'info': market, 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -51862,16 +51676,16 @@ module.exports = class coinex extends Exchange { symbol = market['symbol']; } ticker = this.safeValue (ticker, 'ticker', {}); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -51881,7 +51695,7 @@ module.exports = class coinex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat2 (ticker, 'vol', 'volume'), + 'baseVolume': this.safeNumber2 (ticker, 'vol', 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -51941,16 +51755,18 @@ module.exports = class coinex extends Exchange { } const tradeId = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market); - let cost = this.safeFloat (trade, 'deal_money'); - if (!cost) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); + let cost = this.safeNumber (trade, 'deal_money'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_asset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -52003,11 +51819,11 @@ module.exports = class coinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -52068,11 +51884,11 @@ module.exports = class coinex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -52111,11 +51927,11 @@ module.exports = class coinex extends Exchange { // } // const timestamp = this.safeTimestamp (order, 'create_time'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'deal_money'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'deal_amount'); - const average = this.safeFloat (order, 'avg_price'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'deal_money'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'deal_amount'); + const average = this.safeNumber (order, 'avg_price'); let symbol = undefined; const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); @@ -52127,11 +51943,11 @@ module.exports = class coinex extends Exchange { feeCurrency = market['quote']; } } - const remaining = this.safeFloat (order, 'left'); + const remaining = this.safeNumber (order, 'left'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -52153,10 +51969,10 @@ module.exports = class coinex extends Exchange { 'trades': undefined, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'deal_fee'), + 'cost': this.safeNumber (order, 'deal_fee'), }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -52402,8 +52218,8 @@ module.exports = class coinex extends Exchange { const timestamp = this.safeTimestamp (transaction, 'create_time'); const type = ('coin_withdraw_id' in transaction) ? 'withdraw' : 'deposit'; const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'tx_fee'); + let amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'tx_fee'); if (type === 'deposit') { feeCost = 0; } @@ -52594,13 +52410,14 @@ module.exports = class coinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],67:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],66:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, RateLimitExceeded, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -52733,11 +52550,11 @@ module.exports = class coinfalcon extends Exchange { 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'change_in_24h'), + 'change': this.safeNumber (ticker, 'change_in_24h'), 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -52774,20 +52591,17 @@ module.exports = class coinfalcon extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } const tradeId = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'order_id'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = this.safeString (trade, 'fee_currency_code'); fee = { @@ -52855,14 +52669,13 @@ module.exports = class coinfalcon extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available_balance'), - 'used': this.safeFloat (balance, 'hold_balance'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'hold_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -52897,19 +52710,9 @@ module.exports = class coinfalcon extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'size_filled'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (price !== undefined) { - cost = filled * price; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'size_filled'); const status = this.parseOrderStatus (this.safeString (order, 'status')); let type = this.safeString (order, 'operation_type'); if (type !== undefined) { @@ -52918,7 +52721,7 @@ module.exports = class coinfalcon extends Exchange { } const side = this.safeString (order, 'order_type'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -52931,16 +52734,16 @@ module.exports = class coinfalcon extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'lastTradeTimestamp': undefined, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -53050,13 +52853,14 @@ module.exports = class coinfalcon extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],68:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],67:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ExchangeError, InvalidNonce, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -53158,14 +52962,14 @@ module.exports = class coinfloor extends Exchange { const baseIdLower = this.safeStringLower (market, 'baseId'); const quoteIdLower = this.safeStringLower (market, 'quoteId'); result[base] = { - 'free': this.safeFloat (response, baseIdLower + '_available'), - 'used': this.safeFloat (response, baseIdLower + '_reserved'), - 'total': this.safeFloat (response, baseIdLower + '_balance'), + 'free': this.safeNumber (response, baseIdLower + '_available'), + 'used': this.safeNumber (response, baseIdLower + '_reserved'), + 'total': this.safeNumber (response, baseIdLower + '_balance'), }; result[quote] = { - 'free': this.safeFloat (response, quoteIdLower + '_available'), - 'used': this.safeFloat (response, quoteIdLower + '_reserved'), - 'total': this.safeFloat (response, quoteIdLower + '_balance'), + 'free': this.safeNumber (response, quoteIdLower + '_available'), + 'used': this.safeNumber (response, quoteIdLower + '_reserved'), + 'total': this.safeNumber (response, quoteIdLower + '_balance'), }; return this.parseBalance (result); } @@ -53186,22 +52990,22 @@ module.exports = class coinfloor extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -53230,14 +53034,11 @@ module.exports = class coinfloor extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -53355,8 +53156,8 @@ module.exports = class coinfloor extends Exchange { const parts = key.split ('_'); const numParts = parts.length; if (numParts === 2) { - const tmpBaseAmount = this.safeFloat (item, parts[0]); - const tmpQuoteAmount = this.safeFloat (item, parts[1]); + const tmpBaseAmount = this.safeNumber (item, parts[0]); + const tmpQuoteAmount = this.safeNumber (item, parts[1]); if (tmpBaseAmount !== undefined && tmpQuoteAmount !== undefined) { baseId = parts[0]; quoteId = parts[1]; @@ -53372,7 +53173,7 @@ module.exports = class coinfloor extends Exchange { const referenceId = this.safeString (item, 'id'); const timestamp = this.parse8601 (this.safeString (item, 'datetime')); let fee = undefined; - const feeCost = this.safeFloat (item, 'fee'); + const feeCost = this.safeNumber (item, 'fee'); const result = { 'id': undefined, 'timestamp': timestamp, @@ -53476,8 +53277,8 @@ module.exports = class coinfloor extends Exchange { 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, 'type': type, - 'price': this.safeFloat (response, 'price'), - 'remaining': this.safeFloat (response, 'amount'), + 'price': this.safeNumber (response, 'price'), + 'remaining': this.safeNumber (response, 'amount'), 'info': response, }; } @@ -53502,19 +53303,14 @@ module.exports = class coinfloor extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let side = undefined; const status = this.safeString (order, 'status'); - if (order['type'] === 0) { + const rawType = this.safeString (order, 'type'); + if (rawType === '0') { side = 'buy'; - } else if (order['type'] === 1) { + } else if (rawType === '1') { side = 'sell'; } let symbol = undefined; @@ -53522,7 +53318,7 @@ module.exports = class coinfloor extends Exchange { symbol = market['symbol']; } const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -53540,11 +53336,11 @@ module.exports = class coinfloor extends Exchange { 'amount': undefined, 'filled': undefined, 'remaining': amount, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -53603,13 +53399,14 @@ module.exports = class coinfloor extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],69:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],68:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -53771,14 +53568,14 @@ module.exports = class coingi extends Exchange { const currencyId = this.safeString (balance['currency'], 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - const blocked = this.safeFloat (balance, 'blocked'); - const inOrders = this.safeFloat (balance, 'inOrders'); - const withdrawing = this.safeFloat (balance, 'withdrawing'); - account['used'] = this.sum (blocked, inOrders, withdrawing); + account['free'] = this.safeString (balance, 'available'); + const blocked = this.safeString (balance, 'blocked'); + const inOrders = this.safeString (balance, 'inOrders'); + const withdrawing = this.safeString (balance, 'withdrawing'); + account['used'] = Precise.stringAdd (Precise.stringAdd (blocked, inOrders), withdrawing); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = 512, params = {}) { @@ -53804,11 +53601,11 @@ module.exports = class coingi extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -53818,8 +53615,8 @@ module.exports = class coingi extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'counterVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'counterVolume'), 'info': ticker, }; } @@ -53852,14 +53649,11 @@ module.exports = class coingi extends Exchange { } parseTrade (trade, market = undefined) { - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const id = this.safeString (trade, 'id'); const marketId = this.safeString (trade, 'currencyPair'); @@ -53953,7 +53747,7 @@ module.exports = class coingi extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],70:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],69:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -54164,16 +53958,16 @@ module.exports = class coinmarketcap extends Exchange { if (timestamp === undefined) { timestamp = this.milliseconds (); } - const change = this.safeFloat (ticker, 'percent_change_24h'); + const change = this.safeNumber (ticker, 'percent_change_24h'); let last = undefined; let symbol = undefined; let volume = undefined; if (market !== undefined) { symbol = market['symbol']; const priceKey = 'price_' + market['quoteId']; - last = this.safeFloat (ticker, priceKey); + last = this.safeNumber (ticker, priceKey); const volumeKey = '24h_volume_' + market['quoteId']; - volume = this.safeFloat (ticker, volumeKey); + volume = this.safeNumber (ticker, volumeKey); } return { 'symbol': symbol, @@ -54302,13 +54096,14 @@ module.exports = class coinmarketcap extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],71:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],70:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder, OrderNotFound, RateLimitExceeded, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -54535,7 +54330,7 @@ module.exports = class coinmate extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -54563,12 +54358,12 @@ module.exports = class coinmate extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -54591,16 +54386,16 @@ module.exports = class coinmate extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'data'); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'vwap': undefined, 'askVolume': undefined, 'open': undefined, @@ -54610,7 +54405,7 @@ module.exports = class coinmate extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'amount'), + 'baseVolume': this.safeNumber (ticker, 'amount'), 'quoteVolume': undefined, 'info': ticker, }; @@ -54679,8 +54474,8 @@ module.exports = class coinmate extends Exchange { // } // const timestamp = this.safeInteger (item, 'timestamp'); - const amount = this.safeFloat (item, 'amount'); - const fee = this.safeFloat (item, 'fee'); + const amount = this.safeNumber (item, 'amount'); + const fee = this.safeNumber (item, 'fee'); const txid = this.safeString (item, 'txid'); const address = this.safeString (item, 'destination'); const tag = this.safeString (item, 'destinationTag'); @@ -54758,21 +54553,18 @@ module.exports = class coinmate extends Exchange { // const marketId = this.safeString (trade, 'currencyPair'); market = this.safeMarket (marketId, market, '_'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeStringLower2 (trade, 'type', 'tradeType'); const type = this.safeStringLower (trade, 'orderType'); const orderId = this.safeString (trade, 'orderId'); const id = this.safeString (trade, 'transactionId'); const timestamp = this.safeInteger2 (trade, 'timestamp', 'createdTimestamp'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -54913,11 +54705,11 @@ module.exports = class coinmate extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.safeInteger (order, 'timestamp'); const side = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'originalAmount'); - let remaining = this.safeFloat (order, 'remainingAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'originalAmount'); + let remaining = this.safeNumber (order, 'remainingAmount'); if (remaining === undefined) { - remaining = this.safeFloat (order, 'amount'); + remaining = this.safeNumber (order, 'amount'); } let status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.parseOrderType (this.safeString (order, 'orderTradeType')); @@ -54932,11 +54724,11 @@ module.exports = class coinmate extends Exchange { cost = filled * price; } } - const average = this.safeFloat (order, 'avgPrice'); + const average = this.safeNumber (order, 'avgPrice'); const marketId = this.safeString (order, 'currencyPair'); const symbol = this.safeSymbol (marketId, market, '_'); const clientOrderId = this.safeString (order, 'clientOrderId'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); return { 'id': id, 'clientOrderId': clientOrderId, @@ -55064,13 +54856,14 @@ module.exports = class coinmate extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],72:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],71:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, BadRequest, ExchangeError, ArgumentsRequired, OrderNotFound, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -55209,11 +55002,11 @@ module.exports = class coinone extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'avail'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -55266,13 +55059,13 @@ module.exports = class coinone extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const first = this.safeFloat (ticker, 'first'); - const last = this.safeFloat (ticker, 'last'); + const first = this.safeNumber (ticker, 'first'); + const last = this.safeNumber (ticker, 'last'); let average = undefined; if (first !== undefined && last !== undefined) { average = this.sum (first, last) / 2; } - const previousClose = this.safeFloat (ticker, 'yesterday_last'); + const previousClose = this.safeNumber (ticker, 'yesterday_last'); let change = undefined; let percentage = undefined; if (last !== undefined && previousClose !== undefined) { @@ -55286,8 +55079,8 @@ module.exports = class coinone extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -55300,7 +55093,7 @@ module.exports = class coinone extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -55346,20 +55139,17 @@ module.exports = class coinone extends Exchange { side = 'buy'; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'fee'); + let feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); - let feeRate = this.safeFloat (trade, 'feeRate'); + let feeRate = this.safeNumber (trade, 'feeRate'); feeRate = Math.abs (feeRate); let feeCurrencyCode = undefined; if (market !== undefined) { @@ -55519,7 +55309,7 @@ module.exports = class coinone extends Exchange { // } // const id = this.safeString (order, 'orderId'); - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); const timestamp = this.safeTimestamp (order, 'timestamp'); let side = this.safeString (order, 'type'); if (side === 'ask') { @@ -55527,9 +55317,8 @@ module.exports = class coinone extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const remaining = this.safeFloat (order, 'remainQty'); - let filled = undefined; - const amount = this.safeFloat (order, 'qty'); + const remaining = this.safeNumber (order, 'remainQty'); + const amount = this.safeNumber (order, 'qty'); let status = this.safeString (order, 'status'); // https://github.com/ccxt/ccxt/pull/7067 if (status === 'live') { @@ -55539,14 +55328,7 @@ module.exports = class coinone extends Exchange { } } } - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (amount - remaining); - } status = this.parseOrderStatus (status); - let cost = undefined; - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } let symbol = undefined; let base = undefined; let quote = undefined; @@ -55566,16 +55348,16 @@ module.exports = class coinone extends Exchange { quote = market['quote']; } let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = (side === 'sell') ? quote : base; fee = { 'cost': feeCost, - 'rate': this.safeFloat (order, 'feeRate'), + 'rate': this.safeNumber (order, 'feeRate'), 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -55589,15 +55371,15 @@ module.exports = class coinone extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': amount, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -55672,8 +55454,8 @@ module.exports = class coinone extends Exchange { // eslint-disable-next-line quotes throw new ArgumentsRequired (this.id + " cancelOrder() requires a symbol argument. To cancel the order, pass a symbol argument and {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument of cancelOrder."); } - const price = this.safeFloat (params, 'price'); - const qty = this.safeFloat (params, 'qty'); + const price = this.safeNumber (params, 'price'); + const qty = this.safeNumber (params, 'qty'); const isAsk = this.safeInteger (params, 'is_ask'); if ((price === undefined) || (qty === undefined) || (isAsk === undefined)) { // eslint-disable-next-line quotes @@ -55748,13 +55530,14 @@ module.exports = class coinone extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],73:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],72:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -55874,7 +55657,7 @@ module.exports = class coinspot extends Exchange { const balance = currencies[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } } @@ -55884,11 +55667,11 @@ module.exports = class coinspot extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -55908,16 +55691,16 @@ module.exports = class coinspot extends Exchange { id = id.toLowerCase (); const ticker = response['prices'][id]; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -55965,11 +55748,13 @@ module.exports = class coinspot extends Exchange { // "market":"BTC/AUD" // } // - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'total'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger (trade, 'solddate'); const marketId = this.safeString (trade, 'market'); @@ -56037,13 +55822,15 @@ module.exports = class coinspot extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],74:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],73:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, InvalidNonce, RequestTimeout, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, AuthenticationError, BadSymbol } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -56150,6 +55937,7 @@ module.exports = class crex24 extends Exchange { ], }, }, + 'precisionMode': TICK_SIZE, 'fees': { 'trading': { 'tierBased': true, @@ -56170,6 +55958,7 @@ module.exports = class crex24 extends Exchange { 'BIT': 'BitMoney', 'BULL': 'BuySell', 'CREDIT': 'TerraCredit', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'GHOST': 'GHOSTPRISM', 'IQ': 'IQ.Cash', 'PUT': 'PutinCoin', @@ -56203,6 +55992,7 @@ module.exports = class crex24 extends Exchange { 'API Key': AuthenticationError, // "API Key '9edc48de-d5b0-4248-8e7e-f59ffcd1c7f1' doesn't exist." 'Insufficient funds': InsufficientFunds, // "Insufficient funds: new order requires 10 ETH which is more than the available balance." 'has been delisted.': BadSymbol, // {"errorDescription":"Instrument '$PAC-BTC' has been delisted."} + 'is currently suspended.': BadSymbol, // {"errorDescription":"Trading in BITG-BTC is currently suspended."} 'Mandatory parameter': BadRequest, // {"errorDescription":"Mandatory parameter 'feeCurrency' is missing."} }, }, @@ -56244,12 +56034,12 @@ module.exports = class crex24 extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const tickSize = this.safeValue (market, 'tickSize'); - const minPrice = this.safeValue (market, 'minPrice'); - const minAmount = this.safeFloat (market, 'minVolume'); + const tickSize = this.safeNumber (market, 'tickSize'); + const minPrice = this.safeNumber (market, 'minPrice'); + const minAmount = this.safeNumber (market, 'minVolume'); const precision = { - 'amount': this.precisionFromString (this.numberToString (minAmount)), - 'price': this.precisionFromString (this.numberToString (tickSize)), + 'amount': minAmount, + 'price': tickSize, }; const active = (market['state'] === 'active'); result.push ({ @@ -56314,7 +56104,8 @@ module.exports = class crex24 extends Exchange { const currency = response[i]; const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); - const precision = this.safeInteger (currency, 'withdrawalPrecision'); + const withdrawalPrecision = this.safeInteger (currency, 'withdrawalPrecision'); + const precision = Math.pow (10, -withdrawalPrecision); const address = this.safeValue (currency, 'BaseAddress'); const active = (currency['depositsAllowed'] && currency['withdrawalsAllowed'] && !currency['isDelisted']); const type = currency['isFiat'] ? 'fiat' : 'crypto'; @@ -56326,7 +56117,7 @@ module.exports = class crex24 extends Exchange { 'type': type, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'flatWithdrawalFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'flatWithdrawalFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -56342,12 +56133,12 @@ module.exports = class crex24 extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -56377,11 +56168,11 @@ module.exports = class crex24 extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -56433,16 +56224,16 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); const marketId = this.safeString (ticker, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -56450,10 +56241,10 @@ module.exports = class crex24 extends Exchange { 'last': last, 'previousClose': undefined, // previous day close 'change': undefined, - 'percentage': this.safeFloat (ticker, 'percentChange'), + 'percentage': this.safeNumber (ticker, 'percentChange'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -56523,14 +56314,6 @@ module.exports = class crex24 extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - parseTrade (trade, market = undefined) { // // public fetchTrades @@ -56555,14 +56338,11 @@ module.exports = class crex24 extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'orderId'); @@ -56571,7 +56351,7 @@ module.exports = class crex24 extends Exchange { let fee = undefined; const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCode = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -56632,11 +56412,11 @@ module.exports = class crex24 extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -56705,50 +56485,19 @@ module.exports = class crex24 extends Exchange { const marketId = this.safeString (order, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remainingVolume'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remainingVolume'); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'lastUpdate')); - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = amount - remaining; - if (this.options['parseOrderToPrecision']) { - filled = parseFloat (this.amountToPrecision (symbol, filled)); - } - filled = Math.max (filled, 0.0); - if (price !== undefined) { - cost = price * filled; - } - } - } const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeString (order, 'side'); const fee = undefined; const trades = undefined; - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const average = undefined; const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -56762,14 +56511,14 @@ module.exports = class crex24 extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -56804,7 +56553,7 @@ module.exports = class crex24 extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -57223,8 +56972,8 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'createdAt')); const updated = this.parse8601 (this.safeString (transaction, 'processedAt')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); const fee = { 'cost': feeCost, 'currency': code, @@ -57349,14 +57098,15 @@ module.exports = class crex24 extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],75:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],74:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -57444,6 +57194,7 @@ module.exports = class currencycom extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.002, @@ -57602,7 +57353,7 @@ module.exports = class currencycom extends Exchange { const filtersByType = this.indexBy (filters, 'filterType'); const precision = { 'amount': 1 / Math.pow (1, this.safeInteger (market, 'baseAssetPrecision')), - 'price': this.safeFloat (market, 'tickSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'TRADING'); @@ -57635,14 +57386,14 @@ module.exports = class currencycom extends Exchange { 'max': undefined, }, 'cost': { - 'min': -1 * Math.log10 (precision['amount']), + 'min': -Math.log10 (precision['amount']), 'max': undefined, }, }, }; - const exchangeFee = this.safeFloat2 (market, 'exchangeFee', 'tradingFee'); - const makerFee = this.safeFloat (market, 'makerFee', exchangeFee); - const takerFee = this.safeFloat (market, 'takerFee', exchangeFee); + const exchangeFee = this.safeNumber2 (market, 'exchangeFee', 'tradingFee'); + const makerFee = this.safeNumber (market, 'makerFee', exchangeFee); + const takerFee = this.safeNumber (market, 'takerFee', exchangeFee); if (makerFee !== undefined) { entry['maker'] = makerFee / 100; } @@ -57651,65 +57402,44 @@ module.exports = class currencycom extends Exchange { } if ('PRICE_FILTER' in filtersByType) { const filter = this.safeValue (filtersByType, 'PRICE_FILTER', {}); - entry['precision']['price'] = this.safeFloat (filter, 'tickSize'); + entry['precision']['price'] = this.safeNumber (filter, 'tickSize'); // PRICE_FILTER reports zero values for maxPrice // since they updated filter types in November 2018 // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } } if ('LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'LOT_SIZE', {}); - entry['precision']['amount'] = this.safeFloat (filter, 'stepSize'); + entry['precision']['amount'] = this.safeNumber (filter, 'stepSize'); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat (filter, 'minNotional'); + entry['limits']['cost']['min'] = this.safeNumber (filter, 'minNotional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { const response = await this.privateGetAccount (params); // @@ -57756,8 +57486,8 @@ module.exports = class currencycom extends Exchange { const response = await this.privateGetAccount (params); return { 'info': response, - 'maker': this.safeFloat (response, 'makerCommission'), - 'taker': this.safeFloat (response, 'takerCommission'), + 'maker': this.safeNumber (response, 'makerCommission'), + 'taker': this.safeNumber (response, 'takerCommission'), }; } @@ -57791,11 +57521,11 @@ module.exports = class currencycom extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -57894,8 +57624,8 @@ module.exports = class currencycom extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); - const open = this.safeFloat (ticker, 'openPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); let average = undefined; if ((open !== undefined) && (last !== undefined)) { average = this.sum (open, last) / 2; @@ -57904,22 +57634,22 @@ module.exports = class currencycom extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), 'open': open, 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -57954,14 +57684,6 @@ module.exports = class currencycom extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24hr (params); @@ -57994,11 +57716,11 @@ module.exports = class currencycom extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -58064,8 +57786,11 @@ module.exports = class currencycom extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -58081,7 +57806,7 @@ module.exports = class currencycom extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -58103,7 +57828,7 @@ module.exports = class currencycom extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': fee, }; } @@ -58179,66 +57904,21 @@ module.exports = class currencycom extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); + const remaining = undefined; + const cost = this.safeNumber (order, 'cummulativeQuoteQty'); const id = this.safeString (order, 'orderId'); const type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeStringLower (order, 'side'); - let fee = undefined; let trades = undefined; const fills = this.safeValue (order, 'fills'); if (fills !== undefined) { trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'timestamp': timestamp, @@ -58252,13 +57932,13 @@ module.exports = class currencycom extends Exchange { 'stopPrice': undefined, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -58470,7 +58150,7 @@ module.exports = class currencycom extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],76:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],75:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -58478,6 +58158,7 @@ module.exports = class currencycom extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, BadRequest, BadSymbol, InvalidOrder, AuthenticationError, ArgumentsRequired, OrderNotFound, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -58731,14 +58412,14 @@ module.exports = class delta extends Exchange { 'name': this.safeString (currency, 'name'), 'info': currency, // the original payload 'active': active, - 'fee': this.safeFloat (currency, 'base_withdrawal_fee'), + 'fee': this.safeNumber (currency, 'base_withdrawal_fee'), 'precision': 1 / Math.pow (10, precision), 'limits': { 'amount': { 'min': undefined, 'max': undefined }, 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal_amount'), + 'min': this.safeNumber (currency, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -58872,26 +58553,26 @@ module.exports = class delta extends Exchange { } const precision = { 'amount': 1.0, // number of contracts - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; const limits = { 'amount': { 'min': 1.0, - 'max': this.safeFloat (market, 'position_size_limit'), + 'max': this.safeNumber (market, 'position_size_limit'), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; const state = this.safeString (market, 'state'); const active = (state === 'live'); - const maker = this.safeFloat (market, 'maker_commission_rate'); - const taker = this.safeFloat (market, 'taker_commission_rate'); + const maker = this.safeNumber (market, 'maker_commission_rate'); + const taker = this.safeNumber (market, 'taker_commission_rate'); result.push ({ 'id': id, 'numericId': numericId, @@ -58939,8 +58620,8 @@ module.exports = class delta extends Exchange { const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.001); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; let percentage = undefined; @@ -58951,15 +58632,15 @@ module.exports = class delta extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'turnover'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'turnover'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -59129,12 +58810,11 @@ module.exports = class delta extends Exchange { const orderId = this.safeString (trade, 'order_id'); let timestamp = this.parse8601 (this.safeString (trade, 'created_at')); timestamp = this.safeIntegerProduct (trade, 'timestamp', 0.001, timestamp); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const product = this.safeValue (trade, 'product', {}); const marketId = this.safeString (product, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -59153,7 +58833,7 @@ module.exports = class delta extends Exchange { if (type !== undefined) { type = type.replace ('_order', ''); } - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { const settlingAsset = this.safeValue (product, 'settling_asset', {}); @@ -59220,11 +58900,11 @@ module.exports = class delta extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -59294,11 +58974,11 @@ module.exports = class delta extends Exchange { const currency = this.safeValue (currenciesByNumericId, currencyId); const code = (currency === undefined) ? currencyId : currency['code']; const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchPosition (symbol, params = undefined) { @@ -59322,7 +59002,7 @@ module.exports = class delta extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPositionsMargined (params); // @@ -59403,20 +59083,12 @@ module.exports = class delta extends Exchange { const side = this.safeString (order, 'side'); let type = this.safeString (order, 'order_type'); type = type.replace ('_order', ''); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'unfilled_size'); - let filled = undefined; - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let cost = undefined; - const average = this.safeFloat (order, 'average_fill_price'); - if ((average !== undefined) && filled) { - cost = average * filled; - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'unfilled_size'); + const average = this.safeNumber (order, 'average_fill_price'); let fee = undefined; - const feeCost = this.safeFloat (order, 'paid_commission'); + const feeCost = this.safeNumber (order, 'paid_commission'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -59429,7 +59101,7 @@ module.exports = class delta extends Exchange { 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -59441,14 +59113,14 @@ module.exports = class delta extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -59847,9 +59519,9 @@ module.exports = class delta extends Exchange { const currenciesByNumericId = this.safeValue (this.options, 'currenciesByNumericId'); currency = this.safeValue (currenciesByNumericId, currencyId, currency); const code = (currency === undefined) ? undefined : currency['code']; - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'created_at')); - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const before = Math.max (0, after - amount); const status = 'ok'; return { @@ -59955,7 +59627,7 @@ module.exports = class delta extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],77:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],76:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -59963,6 +59635,7 @@ module.exports = class delta extends Exchange { const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -60393,8 +60066,8 @@ module.exports = class deribit extends Exchange { const future = (type === 'future'); const option = (type === 'option'); const active = this.safeValue (market, 'is_active'); - const minTradeAmount = this.safeFloat (market, 'min_trade_amount'); - const tickSize = this.safeFloat (market, 'tick_size'); + const minTradeAmount = this.safeNumber (market, 'min_trade_amount'); + const tickSize = this.safeNumber (market, 'tick_size'); const precision = { 'amount': minTradeAmount, 'price': tickSize, @@ -60406,8 +60079,8 @@ module.exports = class deribit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_commission'), - 'maker': this.safeFloat (market, 'maker_commission'), + 'taker': this.safeNumber (market, 'taker_commission'), + 'maker': this.safeNumber (market, 'maker_commission'), 'limits': { 'amount': { 'min': minTradeAmount, @@ -60490,11 +60163,11 @@ module.exports = class deribit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const currencyCode = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableFunds'); - account['used'] = this.safeFloat (balance, 'maintenanceMargin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'maintenanceMargin'); + account['total'] = this.safeString (balance, 'equity'); result[currencyCode] = account; - return this.parseBalance (result); + return this.parseBalance (result, false); } async createDepositAddress (code, params = {}) { @@ -60612,18 +60285,18 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger2 (ticker, 'timestamp', 'creation_timestamp'); const marketId = this.safeString (ticker, 'instrument_name'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat2 (ticker, 'last_price', 'last'); + const last = this.safeNumber2 (ticker, 'last_price', 'last'); const stats = this.safeValue (ticker, 'stats', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (stats, 'high', 'max_price'), - 'low': this.safeFloat2 (stats, 'low', 'min_price'), - 'bid': this.safeFloat2 (ticker, 'best_bid_price', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_amount'), - 'ask': this.safeFloat2 (ticker, 'best_ask_price', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_amount'), + 'high': this.safeNumber2 (stats, 'high', 'max_price'), + 'low': this.safeNumber2 (stats, 'low', 'min_price'), + 'bid': this.safeNumber2 (ticker, 'best_bid_price', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_amount'), + 'ask': this.safeNumber2 (ticker, 'best_ask_price', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_amount'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -60633,7 +60306,7 @@ module.exports = class deribit extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (stats, 'volume'), + 'quoteVolume': this.safeNumber (stats, 'volume'), 'info': ticker, }; } @@ -60820,21 +60493,18 @@ module.exports = class deribit extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const liquidity = this.safeString (trade, 'liquidity'); let takerOrMaker = undefined; if (liquidity !== undefined) { // M = maker, T = taker, MT = both takerOrMaker = (liquidity === 'M') ? 'maker' : 'taker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -61014,31 +60684,21 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger (order, 'creation_timestamp'); const lastUpdate = this.safeInteger (order, 'last_update_timestamp'); const id = this.safeString (order, 'order_id'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); let lastTradeTimestamp = undefined; if (filled !== undefined) { if (filled > 0) { lastTradeTimestamp = lastUpdate; } } - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = price * filled; - } - } const status = this.parseOrderStatus (this.safeString (order, 'order_state')); const marketId = this.safeString (order, 'instrument_name'); market = this.safeMarket (marketId, market); const side = this.safeStringLower (order, 'direction'); - let feeCost = this.safeFloat (order, 'commission'); + let feeCost = this.safeNumber (order, 'commission'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); @@ -61056,7 +60716,7 @@ module.exports = class deribit extends Exchange { const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); const stopPrice = this.safeValue (order, 'stop_price'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -61071,14 +60731,14 @@ module.exports = class deribit extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -61155,7 +60815,7 @@ module.exports = class deribit extends Exchange { } } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price or stopPrice param for a ' + type + ' order'); } else { @@ -61554,7 +61214,7 @@ module.exports = class deribit extends Exchange { const updated = this.safeInteger (transaction, 'updated_timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let type = 'deposit'; let fee = undefined; if (feeCost !== undefined) { @@ -61577,7 +61237,7 @@ module.exports = class deribit extends Exchange { 'tagTo': undefined, 'tagFrom': undefined, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -61623,7 +61283,7 @@ module.exports = class deribit extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.codeFromOptions ('fetchPositions'); const currency = this.currency (code); @@ -61744,13 +61404,14 @@ module.exports = class deribit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],78:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],77:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); -const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -61808,11 +61469,6 @@ module.exports = class digifinex extends Exchange { 'referral': 'https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp', }, 'api': { - 'v2': { - 'get': [ - 'ticker', - ], - }, 'public': { 'get': [ '{market}/symbols', @@ -61938,6 +61594,7 @@ module.exports = class digifinex extends Exchange { }, 'commonCurrencies': { 'BHT': 'Black House Test', + 'EPS': 'Epanus', 'MBN': 'Mobilian Coin', 'TEL': 'TEL666', }, @@ -61992,7 +61649,7 @@ module.exports = class digifinex extends Exchange { const depositStatus = this.safeValue (currency, 'deposit_status', 1); const withdrawStatus = this.safeValue (currency, 'withdraw_status', 1); const active = depositStatus && withdrawStatus; - const fee = this.safeFloat (currency, 'withdraw_fee_rate'); + const fee = this.safeNumber (currency, 'withdraw_fee_rate'); if (code in result) { if (Array.isArray (result[code]['info'])) { result[code]['info'].push (currency); @@ -62023,7 +61680,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw_amount'), + 'min': this.safeNumber (currency, 'min_withdraw_amount'), 'max': undefined, }, }, @@ -62077,7 +61734,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), 'max': undefined, }, 'price': { @@ -62085,7 +61742,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), + 'min': this.safeNumber (market, 'minimum_value'), 'max': undefined, }, }; @@ -62099,7 +61756,7 @@ module.exports = class digifinex extends Exchange { // const status = this.safeString (market, 'status'); // const active = (status === 'TRADING'); // - const isAllowed = this.safeValue (market, 'is_allow', 1); + const isAllowed = this.safeInteger (market, 'is_allow', 1); const active = isAllowed ? true : false; const type = 'spot'; const spot = (type === 'spot'); @@ -62155,7 +61812,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), + 'min': this.safeNumber (market, 'min_volume'), 'max': undefined, }, 'price': { @@ -62163,7 +61820,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, }; @@ -62208,12 +61865,12 @@ module.exports = class digifinex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -62247,87 +61904,67 @@ module.exports = class digifinex extends Exchange { } async fetchTickers (symbols = undefined, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTickers() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); - const request = { - 'apiKey': apiKey, - }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (params); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const result = {}; - const tickers = this.safeValue (response, 'ticker', {}); + const tickers = this.safeValue (response, 'ticker', []); const date = this.safeInteger (response, 'date'); - const reversedMarketIds = Object.keys (tickers); - for (let i = 0; i < reversedMarketIds.length; i++) { - const reversedMarketId = reversedMarketIds[i]; - const ticker = this.extend ({ + for (let i = 0; i < tickers.length; i++) { + const rawTicker = this.extend ({ 'date': date, - }, tickers[reversedMarketId]); - const [ quoteId, baseId ] = reversedMarketId.split ('_'); - const marketId = baseId.toUpperCase () + '_' + quoteId.toUpperCase (); - const market = this.safeMarket (marketId, undefined, '_'); - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); + }, tickers[i]); + const ticker = this.parseTicker (rawTicker); + const symbol = ticker['symbol']; + result[symbol] = ticker; } return this.filterByArray (result, 'symbol', symbols); } async fetchTicker (symbol, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTicker() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); const market = this.market (symbol); - // reversed base/quote in v2 - const marketId = market['quoteId'].toLowerCase () + '_' + market['baseId'].toLowerCase (); const request = { - 'symbol': marketId, - 'apiKey': apiKey, + 'symbol': market['id'], }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (this.extend (request, params)); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const date = this.safeInteger (response, 'date'); - const ticker = this.safeValue (response, 'ticker', {}); - let result = this.safeValue (ticker, marketId, {}); - result = this.extend ({ 'date': date }, result); + const tickers = this.safeValue (response, 'ticker', []); + const firstTicker = this.safeValue (tickers, 0, {}); + const result = this.extend ({ 'date': date }, firstTicker); return this.parseTicker (result, market); } @@ -62337,6 +61974,7 @@ module.exports = class digifinex extends Exchange { // // { // "last":0.021957, + // "symbol": "btc_usdt", // "base_vol":2249.3521732227, // "change":-0.6, // "vol":102443.5111, @@ -62347,22 +61985,20 @@ module.exports = class digifinex extends Exchange { // "date"1564518452, // injected from fetchTicker/fetchTickers // } // - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeStringUpper (ticker, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -62372,8 +62008,8 @@ module.exports = class digifinex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'base_vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'base_vol'), 'info': ticker, }; } @@ -62409,18 +62045,15 @@ module.exports = class digifinex extends Exchange { const orderId = this.safeString (trade, 'order_id'); const timestamp = this.safeTimestamp2 (trade, 'date', 'timestamp'); const side = this.safeString2 (trade, 'type', 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); const takerOrMaker = this.safeValue (trade, 'is_maker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -62522,11 +62155,11 @@ module.exports = class digifinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 5), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 1), // volume + this.safeNumber (ohlcv, 5), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 1), // volume ]; } @@ -62717,21 +62350,11 @@ module.exports = class digifinex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_price'); - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - return { + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -62747,13 +62370,13 @@ module.exports = class digifinex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'average': average, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -62947,7 +62570,7 @@ module.exports = class digifinex extends Exchange { const code = this.safeCurrencyCode (this.safeString (item, 'currency_mark'), currency); const timestamp = this.safeTimestamp (item, 'time'); const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -63010,16 +62633,6 @@ module.exports = class digifinex extends Exchange { return this.parseLedger (items, currency, since, limit); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -63172,8 +62785,8 @@ module.exports = class digifinex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_date')); const updated = this.parse8601 (this.safeString (transaction, 'finished_date')); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -63223,7 +62836,7 @@ module.exports = class digifinex extends Exchange { } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const version = (api === 'v2') ? api : this.version; + const version = this.version; let url = this.urls['api'] + '/' + version + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); const urlencoded = this.urlencode (this.keysort (query)); @@ -63275,1283 +62888,7 @@ module.exports = class digifinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],79:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, BadRequest, InsufficientFunds, PermissionDenied, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class dsx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'dsx', - 'name': 'DSX', - 'countries': [ 'UK' ], - 'rateLimit': 1500, - 'version': 'v3', - 'has': { - 'cancelOrder': true, - 'CORS': false, - 'createDepositAddress': true, - 'createMarketOrder': false, - 'createOrder': true, - 'fetchBalance': true, - 'fetchClosedOrders': false, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOHLCV': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchOrderBooks': true, - 'fetchOrders': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTransactions': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg', - 'api': { - 'public': 'https://dsxglobal.com/mapi', // market data - 'private': 'https://dsxglobal.com/tapi', // trading - 'dwapi': 'https://dsxglobal.com/dwapi', // deposit/withdraw - }, - 'www': 'https://dsxglobal.com', - 'doc': [ - 'https://dsxglobal.com/developers/publicApi', - ], - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'maker': 0.15 / 100, - 'taker': 0.25 / 100, - }, - }, - 'timeframes': { - '1m': 'm', - '1h': 'h', - '1d': 'd', - }, - 'api': { - // market data (public) - 'public': { - 'get': [ - 'barsFromMoment/{pair}/{period}/{start}', - 'depth/{pair}', - 'info', - 'lastBars/{pair}/{period}/{amount}', // period is 'm', 'h' or 'd' - 'periodBars/{pair}/{period}/{start}/{end}', - 'ticker/{pair}', - 'trades/{pair}', - ], - }, - // trading (private) - 'private': { - 'post': [ - 'info/account', - 'history/transactions', - 'history/trades', - 'history/orders', - 'orders', - 'order/cancel', - // 'order/cancel/all', - 'order/status', - 'order/new', - 'volume', - 'fees', // trading fee schedule - ], - }, - // deposit / withdraw (private) - 'dwapi': { - 'post': [ - 'deposit/cryptoaddress', - 'withdraw/crypto', - 'withdraw/fiat', - 'withdraw/submit', - // 'withdraw/cancel', - 'transaction/status', // see 'history/transactions' in private tapi above - ], - }, - }, - 'exceptions': { - 'exact': { - 'Sign is invalid': AuthenticationError, // {"success":0,"error":"Sign is invalid"} - 'Order was rejected. Incorrect price.': InvalidOrder, // {"success":0,"error":"Order was rejected. Incorrect price."} - "Order was rejected. You don't have enough money.": InsufficientFunds, // {"success":0,"error":"Order was rejected. You don't have enough money."} - 'This method is blocked for your pair of keys': PermissionDenied, // {"success":0,"error":"This method is blocked for your pair of keys"} - }, - 'broad': { - 'INVALID_PARAMETER': BadRequest, - 'Invalid pair name': ExchangeError, // {"success":0,"error":"Invalid pair name: btc_eth"} - 'invalid api key': AuthenticationError, - 'invalid sign': AuthenticationError, - 'api key dont have trade permission': AuthenticationError, - 'invalid parameter': InvalidOrder, - 'invalid order': InvalidOrder, - 'Requests too often': DDoSProtection, - 'not available': ExchangeNotAvailable, - 'data unavailable': ExchangeNotAvailable, - 'external service unavailable': ExchangeNotAvailable, - 'nonce is invalid': InvalidNonce, // {"success":0,"error":"Parameter: nonce is invalid"} - 'Incorrect volume': InvalidOrder, // {"success": 0,"error":"Order was rejected. Incorrect volume."} - }, - }, - 'options': { - 'fetchTickersMaxLength': 250, - }, - 'commonCurrencies': { - 'DSH': 'DASH', - }, - }); - } - - async fetchMarkets (params = {}) { - const response = await this.publicGetInfo (params); - // - // { - // "server_time": 1522057909, - // "pairs": { - // "ethusd": { - // "decimal_places": 5, - // "min_price": 100, - // "max_price": 1500, - // "min_amount": 0.01, - // "hidden": 0, - // "fee": 0, - // "amount_decimal_places": 4, - // "quoted_currency": "USD", - // "base_currency": "ETH" - // } - // } - // } - // - const markets = this.safeValue (response, 'pairs'); - const keys = Object.keys (markets); - const result = []; - for (let i = 0; i < keys.length; i++) { - const id = keys[i]; - const market = markets[id]; - const baseId = this.safeString (market, 'base_currency'); - const quoteId = this.safeString (market, 'quoted_currency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const precision = { - 'amount': this.safeInteger (market, 'decimal_places'), - 'price': this.safeInteger (market, 'decimal_places'), - }; - const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), - }; - const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), - }; - const costLimits = { - 'min': this.safeFloat (market, 'min_total'), - }; - const limits = { - 'amount': amountLimits, - 'price': priceLimits, - 'cost': costLimits, - }; - const hidden = this.safeInteger (market, 'hidden'); - const active = (hidden === 0); - // see parseMarket below - // https://github.com/ccxt/ccxt/pull/5786 - const otherId = base.toLowerCase () + quote.toLowerCase (); - result.push ({ - 'id': id, - 'otherId': otherId, // https://github.com/ccxt/ccxt/pull/5786 - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': active, - 'precision': precision, - 'limits': limits, - 'info': market, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostInfoAccount (); - // - // { - // "success" : 1, - // "return" : { - // "funds" : { - // "BTC" : { - // "total" : 0, - // "available" : 0 - // }, - // "USD" : { - // "total" : 0, - // "available" : 0 - // }, - // "USDT" : { - // "total" : 0, - // "available" : 0 - // } - // }, - // "rights" : { - // "info" : 1, - // "trade" : 1 - // }, - // "transactionCount" : 0, - // "openOrders" : 0, - // "serverTime" : 1537451465 - // } - // } - // - const balances = this.safeValue (response, 'return'); - const result = { 'info': response }; - const funds = this.safeValue (balances, 'funds'); - const currencyIds = Object.keys (funds); - for (let i = 0; i < currencyIds.length; i++) { - const currencyId = currencyIds[i]; - const code = this.safeCurrencyCode (currencyId); - const balance = this.safeValue (funds, currencyId, {}); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseTicker (ticker, market = undefined) { - // - // { high: 0.03492, - // low: 0.03245, - // avg: 29.46133, - // vol: 500.8661, - // vol_cur: 17.000797104, - // last: 0.03364, - // buy: 0.03362, - // sell: 0.03381, - // updated: 1537521993, - // pair: "ethbtc" } - // - const timestamp = this.safeTimestamp (ticker, 'updated'); - let symbol = undefined; - const marketId = this.safeString (ticker, 'pair'); - market = this.parseMarket (marketId); - if (market !== undefined) { - symbol = market['symbol']; - } - // dsx average is inverted, liqui average is not - let average = this.safeFloat (ticker, 'avg'); - if (average !== undefined) { - if (average > 0) { - average = 1 / average; - } - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_cur'), - 'info': ticker, - }; - } - - parseTrade (trade, market = undefined) { - // - // fetchTrades (public) - // - // { - // "amount" : 0.0128, - // "price" : 6483.99000, - // "timestamp" : 1540334614, - // "tid" : 35684364, - // "type" : "ask" - // } - // - // fetchMyTrades (private) - // - // { - // "number": "36635882", // <-- this is present if the trade has come from the '/order/status' call - // "id": "36635882", // <-- this may have been artifically added by the parseTrades method - // "pair": "btcusd", - // "type": "buy", - // "volume": 0.0595, - // "rate": 9750, - // "orderId": 77149299, - // "timestamp": 1519612317, - // "commission": 0.00020825, - // "commissionCurrency": "btc" - // } - // - const timestamp = this.safeTimestamp (trade, 'timestamp'); - let side = this.safeString (trade, 'type'); - if (side === 'ask') { - side = 'sell'; - } else if (side === 'bid') { - side = 'buy'; - } - const price = this.safeFloat2 (trade, 'rate', 'price'); - const id = this.safeString2 (trade, 'number', 'id'); - const orderId = this.safeString (trade, 'orderId'); - const marketId = this.safeString (trade, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const amount = this.safeFloat2 (trade, 'amount', 'volume'); - const type = 'limit'; // all trades are still limit trades - let takerOrMaker = undefined; - let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const isYourOrder = this.safeValue (trade, 'is_your_order'); - if (isYourOrder !== undefined) { - takerOrMaker = 'taker'; - if (isYourOrder) { - takerOrMaker = 'maker'; - } - if (fee === undefined) { - fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); - } - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - return { - 'id': id, - 'order': orderId, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': type, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - 'info': trade, - }; - } - - parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - let result = []; - if (Array.isArray (trades)) { - for (let i = 0; i < trades.length; i++) { - result.push (this.parseTrade (trades[i], market)); - } - } else { - const ids = Object.keys (trades); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const trade = this.parseTrade (trades[id], market); - result.push (this.extend (trade, { 'id': id }, params)); - } - } - result = this.sortBy (result, 'timestamp'); - const symbol = (market !== undefined) ? market['symbol'] : undefined; - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const market_id_in_reponse = (market['id'] in response); - if (!market_id_in_reponse) { - throw new ExchangeError (this.id + ' ' + market['symbol'] + ' order book is empty or not available'); - } - const orderbook = response[market['id']]; - return this.parseOrderBook (orderbook); - } - - async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let ids = undefined; - if (symbols === undefined) { - ids = this.ids.join ('-'); - // max URL length is 2083 symbols, including http schema, hostname, tld, etc... - if (ids.length > 2048) { - const numIds = this.ids.length; - throw new ExchangeError (this.id + ' has ' + numIds.toString () + ' symbols exceeding max URL length, you are required to specify a list of symbols in the first argument to fetchOrderBooks'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const result = {}; - ids = Object.keys (response); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let symbol = id; - if (id in this.markets_by_id) { - const market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseOrderBook (response[id]); - } - return result; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - let ids = this.ids; - if (symbols === undefined) { - const numIds = ids.length; - ids = ids.join ('-'); - const maxLength = this.safeInteger (this.options, 'fetchTickersMaxLength', 2048); - // max URL length is 2048 symbols, including http schema, hostname, tld, etc... - if (ids.length > this.options['fetchTickersMaxLength']) { - throw new ArgumentsRequired (this.id + ' has ' + numIds.toString () + ' markets exceeding max URL length for this endpoint (' + maxLength.toString () + ' characters), please, specify a list of symbols of interest in the first argument to fetchTickers'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - const tickers = await this.publicGetTickerPair (this.extend (request, params)); - // - // { - // "bchbtc" : { - // "high" : 0.02989, - // "low" : 0.02736, - // "avg" : 33.90585, - // "vol" : 0.65982205, - // "vol_cur" : 0.0194604180960, - // "last" : 0.03000, - // "buy" : 0.02980, - // "sell" : 0.03001, - // "updated" : 1568104614, - // "pair" : "bchbtc" - // }, - // "ethbtc" : { - // "high" : 0.01772, - // "low" : 0.01742, - // "avg" : 56.89082, - // "vol" : 229.247115044, - // "vol_cur" : 4.02959737298943, - // "last" : 0.01769, - // "buy" : 0.01768, - // "sell" : 0.01776, - // "updated" : 1568104614, - // "pair" : "ethbtc" - // } - // } - // - const result = {}; - const keys = Object.keys (tickers); - for (let k = 0; k < keys.length; k++) { - const id = keys[k]; - const ticker = tickers[id]; - let symbol = id; - let market = undefined; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseTicker (ticker, market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - const tickers = await this.fetchTickers ([ symbol ], params); - return tickers[symbol]; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; - } - const response = await this.publicGetTradesPair (this.extend (request, params)); - if (Array.isArray (response)) { - const numElements = response.length; - if (numElements === 0) { - return []; - } - } - return this.parseTrades (response[market['id']], market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // } - // - return [ - this.safeInteger (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - 'period': this.timeframes[timeframe], - }; - let method = 'publicGetLastBarsPairPeriodAmount'; - if (since === undefined) { - if (limit === undefined) { - limit = 100; // required, max 2000 - } - request['amount'] = limit; - } else { - method = 'publicGetPeriodBarsPairPeriodStartEnd'; - // in their docs they expect milliseconds - // but it returns empty arrays with milliseconds - // however, it does work properly with seconds - request['start'] = parseInt (since / 1000); - if (limit === undefined) { - request['end'] = this.seconds (); - } else { - const duration = this.parseTimeframe (timeframe) * 1000; - const end = this.sum (since, duration * limit); - request['end'] = parseInt (end / 1000); - } - } - const response = await this[method] (this.extend (request, params)); - // - // { - // "ethbtc": [ - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // }, - // { - // "high" : 0.01967, - // "open" : 0.01967, - // "low" : 0.01967, - // "close" : 0.01967, - // "amount" : 0, - // "timestamp" : 1565155680000 - // } - // ] - // } - // - const candles = this.safeValue (response, market['id'], []); - return this.parseOHLCVs (candles, market, timeframe, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (type === 'market' && price === undefined) { - throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument even for market orders, that is the worst price that you agree to fill your order for'); - } - const request = { - 'pair': market['id'], - 'type': side, - 'volume': this.amountToPrecision (symbol, amount), - 'rate': this.priceToPrecision (symbol, price), - 'orderType': type, - }; - price = parseFloat (price); - amount = parseFloat (amount); - const response = await this.privatePostOrderNew (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "received": 0, - // "remains": 10, - // "funds": { - // "BTC": { - // "total": 100, - // "available": 95 - // }, - // "USD": { - // "total": 10000, - // "available": 9995 - // }, - // "EUR": { - // "total": 1000, - // "available": 995 - // }, - // "LTC": { - // "total": 1000, - // "available": 995 - // } - // }, - // "orderId": 0, // https://github.com/ccxt/ccxt/issues/3677 - // } - // } - // - let status = 'open'; - let filled = 0.0; - let remaining = amount; - const responseReturn = this.safeValue (response, 'return'); - let id = this.safeString2 (responseReturn, 'orderId', 'order_id'); - if (id === '0') { - id = this.safeString (responseReturn, 'initOrderId', 'init_order_id'); - status = 'closed'; - } - filled = this.safeFloat (responseReturn, 'received', 0.0); - remaining = this.safeFloat (responseReturn, 'remains', amount); - const timestamp = this.milliseconds (); - return { - 'info': response, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'side': side, - 'price': price, - 'cost': price * filled, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'fee': undefined, - // 'trades': this.parseTrades (order['trades'], market), - }; - } - - parseOrderStatus (status) { - const statuses = { - '0': 'open', // Active - '1': 'closed', // Filled - '2': 'canceled', // Killed - '3': 'canceling', // Killing - '7': 'canceled', // Rejected - }; - return this.safeString (statuses, status, status); - } - - parseMarket (id) { - if (id in this.markets_by_id) { - return this.markets_by_id[id]; - } else { - // the following is a fix for - // https://github.com/ccxt/ccxt/pull/5786 - // https://github.com/ccxt/ccxt/issues/5770 - let markets_by_other_id = this.safeValue (this.options, 'markets_by_other_id'); - if (markets_by_other_id === undefined) { - this.options['markets_by_other_id'] = this.indexBy (this.markets, 'otherId'); - markets_by_other_id = this.options['markets_by_other_id']; - } - if (id in markets_by_other_id) { - return markets_by_other_id[id]; - } - } - return undefined; - } - - parseOrder (order, market = undefined) { - // - // fetchOrder - // - // { - // "number": 36635882, - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // - const id = this.safeString (order, 'id'); - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const timestamp = this.safeTimestamp (order, 'timestampCreated'); - const marketId = this.safeString (order, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const remaining = this.safeFloat (order, 'remainingVolume'); - const amount = this.safeFloat (order, 'volume'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } - } - const orderType = this.safeString (order, 'orderType'); - const side = this.safeString (order, 'type'); - let fee = undefined; - const deals = this.safeValue (order, 'deals', []); - const numDeals = deals.length; - let trades = undefined; - let lastTradeTimestamp = undefined; - if (numDeals > 0) { - trades = this.parseTrades (deals); - let feeCost = undefined; - let feeCurrency = undefined; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - if (feeCost === undefined) { - feeCost = 0; - } - feeCost = this.sum (feeCost, trade['fee']['cost']); - feeCurrency = trade['fee']['currency']; - lastTradeTimestamp = trade['timestamp']; - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'type': orderType, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': undefined, - 'cost': cost, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'status': status, - 'fee': fee, - 'trades': trades, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': parseInt (id), - }; - const response = await this.privatePostOrderStatus (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // } - // - return this.parseOrder (this.extend ({ - 'id': id, - }, response['return'])); - } - - parseOrdersById (orders, symbol = undefined, since = undefined, limit = undefined) { - const ids = Object.keys (orders); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.parseOrder (this.extend ({ - 'id': id.toString (), - }, orders[id])); - result.push (order); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - const response = await this.privatePostOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': id, - }; - const response = await this.privatePostOrderCancel (this.extend (request, params)); - return response; - } - - parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { - const result = []; - const ids = Object.keys (orders); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.extend ({ 'id': id }, orders[id]); - result.push (this.extend (this.parseOrder (order, market), params)); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - const orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterBy (orders, 'status', 'closed'); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let market = undefined; - // some derived classes use camelcase notation for request fields - const request = { - // 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field) - // 'count': 1000, // the number of trades for display numerical, default = 1000 - // 'from_id': trade ID, from which the display starts numerical 0 - // 'end_id': trade ID on which the display ends numerical ∞ - // 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last) - // 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field) - // 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field) - // 'pair': 'eth_btc', // default = all markets - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['pair'] = market['id']; - } - if (limit !== undefined) { - request['count'] = parseInt (limit); - } - if (since !== undefined) { - request['since'] = parseInt (since / 1000); - } - const response = await this.privatePostHistoryTrades (this.extend (request, params)); - let trades = []; - if ('return' in response) { - trades = response['return']; - } - return this.parseTrades (trades, market, since, limit); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let currency = undefined; - const request = {}; - if (code !== undefined) { - currency = this.currency (code); - request['currency'] = currency['id']; - } - if (since !== undefined) { - request['since'] = since; - } - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryTransactions (this.extend (request, params)); - // - // { - // "success": 1, - // "return": [ - // { - // "id": 1, - // "timestamp": 11, - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // ] - // } - // - const transactions = this.safeValue (response, 'return', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - '1': 'failed', - '2': 'ok', - '3': 'pending', - '4': 'failed', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // "id": 1, - // "timestamp": 11, // 11 in their docs ( - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // - const timestamp = this.safeTimestamp (transaction, 'timestamp'); - let type = this.safeString (transaction, 'type'); - if (type !== undefined) { - if (type === 'Incoming') { - type = 'deposit'; - } else if (type === 'Withdraw') { - type = 'withdrawal'; - } - } - const currencyId = this.safeString (transaction, 'currency'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - return { - 'id': this.safeString (transaction, 'id'), - 'txid': this.safeString (transaction, 'txid'), - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'address': this.safeString (transaction, 'address'), - 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), - 'currency': code, - 'status': status, - 'fee': { - 'currency': code, - 'cost': this.safeFloat (transaction, 'commission'), - 'rate': undefined, - }, - 'info': transaction, - }; - } - - async createDepositAddress (code, params = {}) { - const request = { - 'new': 1, - }; - const response = await this.fetchDepositAddress (code, this.extend (request, params)); - return response; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency': currency['id'], - }; - const response = await this.dwapiPostDepositCryptoaddress (this.extend (request, params)); - const result = this.safeValue (response, 'return', {}); - const address = this.safeString (result, 'address'); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, // not documented in DSX API - 'info': response, - }; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - const commission = this.safeValue (params, 'commission'); - if (commission === undefined) { - throw new ArgumentsRequired (this.id + ' withdraw() requires a `commission` (withdrawal fee) parameter (string)'); - } - params = this.omit (params, commission); - const request = { - 'currency': currency['id'], - 'amount': parseFloat (amount), - 'address': address, - 'commission': commission, - }; - if (tag !== undefined) { - request['address'] += ':' + tag; - } - const response = await this.dwapiPostWithdrawCrypto (this.extend (request, params)); - // - // [ - // { - // "success": 1, - // "return": { - // "transactionId": 2863073 - // } - // } - // ] - // - const data = this.safeValue (response, 'return', {}); - const id = this.safeString (data, 'transactionId'); - return { - 'info': response, - 'id': id, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'][api]; - const query = this.omit (params, this.extractParams (path)); - if (api === 'private' || api === 'dwapi') { - url += '/' + this.version + '/' + this.implodeParams (path, params); - this.checkRequiredCredentials (); - const nonce = this.nonce (); - body = this.urlencode (this.extend ({ - 'nonce': nonce, - }, query)); - const signature = this.hmac (this.encode (body), this.encode (this.secret), 'sha512', 'base64'); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': signature, - }; - } else if (api === 'public') { - url += '/' + this.implodeParams (path, params); - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - url += '/' + this.implodeParams (path, params); - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - if (Object.keys (query).length) { - body = this.json (query); - headers = { - 'Content-Type': 'application/json', - }; - } - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - if ('success' in response) { - // - // 1 - Liqui only returns the integer 'success' key from their private API - // - // { "success": 1, ... } httpCode === 200 - // { "success": 0, ... } httpCode === 200 - // - // 2 - However, exchanges derived from Liqui, can return non-integers - // - // It can be a numeric string - // { "sucesss": "1", ... } - // { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc) - // - // Or just a string - // { "success": "true", ... } - // { "success": "false", ... }, httpCode >= 200 - // - // Or a boolean - // { "success": true, ... } - // { "success": false, ... }, httpCode >= 200 - // - // 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types - // - // 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui - // - // To cover points 1, 2, 3 and 4 combined this handler should work like this: - // - let success = this.safeValue (response, 'success', false); - if (typeof success === 'string') { - if ((success === 'true') || (success === '1')) { - success = true; - } else { - success = false; - } - } - if (!success) { - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'error'); - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],80:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],78:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -64775,7 +63112,7 @@ module.exports = class equos extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeVol'), + 'min': this.safeNumber (market, 'minTradeVol'), 'max': undefined, }, 'price': { @@ -64841,7 +63178,7 @@ module.exports = class equos extends Exchange { const name = this.safeString (currency, 6); const status = this.safeInteger (currency, 4); const active = (status === 1); - const fee = this.safeFloat (currency, 5); // withdraw_fee + const fee = this.safeNumber (currency, 5); // withdraw_fee return { 'id': id, 'info': currency, @@ -64933,8 +63270,8 @@ module.exports = class equos extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); return [ this.convertFromScale (price, market['precision']['price']), this.convertFromScale (amount, market['precision']['amount']), @@ -65080,9 +63417,9 @@ module.exports = class equos extends Exchange { orderId = this.safeString (trade, 'orderId'); side = this.safeStringLower (trade, 'side'); type = this.parseOrderType (this.safeString (trade, 'ordType')); - price = this.safeFloat (trade, 'lastPx'); - amount = this.safeFloat (trade, 'quoteQty'); - let feeCost = this.safeFloat (trade, 'commission'); + price = this.safeNumber (trade, 'lastPx'); + amount = this.safeNumber (trade, 'quoteQty'); + let feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { feeCost = -feeCost; const feeCurrencyId = this.safeString (trade, 'commCurrency'); @@ -65153,8 +63490,8 @@ module.exports = class equos extends Exchange { if (assetType === 'ASSET') { const currencyId = this.safeString (position, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const quantity = this.safeFloat (position, 'quantity'); - const availableQuantity = this.safeFloat (position, 'availableQuantity'); + const quantity = this.safeNumber (position, 'quantity'); + const availableQuantity = this.safeNumber (position, 'availableQuantity'); const scale = this.safeInteger (position, 'quantity_scale'); const account = this.account (); account['free'] = this.convertFromScale (availableQuantity, scale); @@ -65200,7 +63537,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -65297,7 +63634,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -65670,7 +64007,7 @@ module.exports = class equos extends Exchange { address = undefined; } const type = this.safeString (transaction, 'type'); - let amount = this.safeFloat (transaction, 'balance_change'); + let amount = this.safeNumber (transaction, 'balance_change'); if (amount === undefined) { amount = this.safeInteger (transaction, 'quantity'); const amountScale = this.safeInteger (transaction, 'quantity_scale'); @@ -65753,8 +64090,8 @@ module.exports = class equos extends Exchange { for (let i = 0; i < tradingFees.length; i++) { const tradingFee = tradingFees[i]; if (this.safeString (tradingFee, 'tier') !== undefined) { - taker[tradingFee['tier']] = this.safeFloat (tradingFee, 'taker'); - maker[tradingFee['tier']] = this.safeFloat (tradingFee, 'maker'); + taker[tradingFee['tier']] = this.safeNumber (tradingFee, 'taker'); + maker[tradingFee['tier']] = this.safeNumber (tradingFee, 'maker'); } } return { @@ -65885,28 +64222,6 @@ module.exports = class equos extends Exchange { let remaining = this.safeInteger (order, 'leavesQty'); const remainingScale = this.safeInteger (order, 'leavesQty_scale'); remaining = this.convertFromScale (remaining, remainingScale); - if (remaining <= 0) { - if ((filled !== undefined) && (amount !== undefined) && (filled < amount)) { - remaining = undefined; - } - } - if ((remaining === undefined) && (amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0); - } - let average = this.safeInteger (order, 'price', 0); - if (average === 0) { - average = undefined; - } - const averageScale = this.safeInteger (order, 'price_scale'); - average = this.convertFromScale (average, averageScale); - let cost = undefined; - if (filled !== 0) { - if (average > 0) { - cost = average * filled; - } else if (price > 0) { - cost = price * filled; - } - } let fee = undefined; const currencyId = this.safeInteger (order, 'feeInstrumentId'); const feeCurrencyCode = this.safeCurrencyCode (currencyId); @@ -65929,7 +64244,7 @@ module.exports = class equos extends Exchange { } const stopPriceScale = this.safeInteger (order, 'stopPx_scale', 0); const stopPrice = this.convertFromScale (this.safeInteger (order, 'stopPx'), stopPriceScale); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -65944,14 +64259,14 @@ module.exports = class equos extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -66101,7 +64416,7 @@ module.exports = class equos extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],81:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],79:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -66109,6 +64424,7 @@ module.exports = class equos extends Exchange { const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, InvalidOrder, ExchangeError, BadRequest, BadSymbol } = require ('./base/errors'); const { TRUNCATE, SIGNIFICANT_DIGITS } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -66321,7 +64637,7 @@ module.exports = class eterbase extends Exchange { const rule = rules[i]; const attribute = this.safeString (rule, 'attribute'); const condition = this.safeString (rule, 'condition'); - const value = this.safeFloat (rule, 'value'); + const value = this.safeNumber (rule, 'value'); if ((attribute === 'Qty') && (condition === 'Min')) { minAmount = value; } else if ((attribute === 'Qty') && (condition === 'Max')) { @@ -66411,7 +64727,7 @@ module.exports = class eterbase extends Exchange { 'type': type, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -66427,8 +64743,8 @@ module.exports = class eterbase extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMin'), - 'max': this.safeFloat (currency, 'withdrawalMax'), + 'min': this.safeNumber (currency, 'withdrawalMin'), + 'max': this.safeNumber (currency, 'withdrawalMax'), }, }, }; @@ -66455,17 +64771,17 @@ module.exports = class eterbase extends Exchange { const marketId = this.safeString (ticker, 'marketId'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const last = this.safeFloat (ticker, 'price'); - const baseVolume = this.safeFloat (ticker, 'volumeBase'); - const quoteVolume = this.safeFloat (ticker, 'volume'); + const last = this.safeNumber (ticker, 'price'); + const baseVolume = this.safeNumber (ticker, 'volumeBase'); + const quoteVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const percentage = this.safeFloat (ticker, 'change'); + const percentage = this.safeNumber (ticker, 'change'); const result = { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -66507,14 +64823,6 @@ module.exports = class eterbase extends Exchange { return this.parseTicker (response, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { @@ -66569,10 +64877,12 @@ module.exports = class eterbase extends Exchange { // "filledAt": 1556355722341 // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -66581,9 +64891,9 @@ module.exports = class eterbase extends Exchange { 'currency': feeCurrencyCode, }; } - let cost = this.safeFloat (trade, 'qty'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + let cost = this.safeNumber (trade, 'qty'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger2 (trade, 'executedAt', 'filledAt'); const tradeSide = this.safeString (trade, 'side'); @@ -66681,11 +64991,11 @@ module.exports = class eterbase extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -66748,14 +65058,13 @@ module.exports = class eterbase extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetId'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'reserved'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -66882,18 +65191,18 @@ module.exports = class eterbase extends Exchange { } else { type = 'stoplimit'; } - let price = this.safeFloat (order, 'limitPrice'); - const amount = this.safeFloat (order, 'qty'); - let remaining = this.safeFloat (order, 'remainingQty'); + let price = this.safeNumber (order, 'limitPrice'); + const amount = this.safeNumber (order, 'qty'); + let remaining = this.safeNumber (order, 'remainingQty'); let filled = undefined; - const remainingCost = this.safeFloat (order, 'remainingCost'); + const remainingCost = this.safeNumber (order, 'remainingCost'); if ((remainingCost !== undefined) && (remainingCost === 0.0)) { remaining = 0; } if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); } - const cost = this.safeFloat (order, 'cost'); + const cost = this.safeNumber (order, 'cost'); if (type === 'market') { if (price === 0.0) { if ((cost !== undefined) && (filled !== undefined)) { @@ -66910,7 +65219,7 @@ module.exports = class eterbase extends Exchange { } } const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -67083,7 +65392,7 @@ module.exports = class eterbase extends Exchange { } if ((uppercaseType === 'MARKET') && (uppercaseSide === 'BUY')) { // for market buy it requires the amount of quote currency to spend - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); if (this.options['createMarketBuyOrderRequiresPrice']) { if (cost === undefined) { if (price !== undefined) { @@ -67246,7 +65555,7 @@ module.exports = class eterbase extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],82:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],80:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -67361,6 +65670,7 @@ module.exports = class exmo extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.2 / 100, @@ -67830,18 +66140,18 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = marketId.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const maxAmount = this.safeFloat (limit, 'max_q'); - const maxPrice = this.safeFloat (limit, 'max_p'); - const maxCost = this.safeFloat (limit, 'max_a'); - const minAmount = this.safeFloat (limit, 'min_q'); - const minPrice = this.safeFloat (limit, 'min_p'); - const minCost = this.safeFloat (limit, 'min_a'); - minAmounts[base] = Math.min (this.safeFloat (minAmounts, base, minAmount), minAmount); - maxAmounts[base] = Math.max (this.safeFloat (maxAmounts, base, maxAmount), maxAmount); - minPrices[quote] = Math.min (this.safeFloat (minPrices, quote, minPrice), minPrice); - minCosts[quote] = Math.min (this.safeFloat (minCosts, quote, minCost), minCost); - maxPrices[quote] = Math.max (this.safeFloat (maxPrices, quote, maxPrice), maxPrice); - maxCosts[quote] = Math.max (this.safeFloat (maxCosts, quote, maxCost), maxCost); + const maxAmount = this.safeNumber (limit, 'max_q'); + const maxPrice = this.safeNumber (limit, 'max_p'); + const maxCost = this.safeNumber (limit, 'max_a'); + const minAmount = this.safeNumber (limit, 'min_q'); + const minPrice = this.safeNumber (limit, 'min_p'); + const minCost = this.safeNumber (limit, 'min_a'); + minAmounts[base] = Math.min (this.safeNumber (minAmounts, base, minAmount), minAmount); + maxAmounts[base] = Math.max (this.safeNumber (maxAmounts, base, maxAmount), maxAmount); + minPrices[quote] = Math.min (this.safeNumber (minPrices, quote, minPrice), minPrice); + minCosts[quote] = Math.min (this.safeNumber (minCosts, quote, minCost), minCost); + maxPrices[quote] = Math.max (this.safeNumber (maxPrices, quote, maxPrice), maxPrice); + maxCosts[quote] = Math.max (this.safeNumber (maxCosts, quote, maxCost), maxCost); } const result = {}; for (let i = 0; i < ids.length; i++) { @@ -67858,16 +66168,16 @@ module.exports = class exmo extends Exchange { 'precision': 8, 'limits': { 'amount': { - 'min': this.safeFloat (minAmounts, code), - 'max': this.safeFloat (maxAmounts, code), + 'min': this.safeNumber (minAmounts, code), + 'max': this.safeNumber (maxAmounts, code), }, 'price': { - 'min': this.safeFloat (minPrices, code), - 'max': this.safeFloat (maxPrices, code), + 'min': this.safeNumber (minPrices, code), + 'max': this.safeNumber (maxPrices, code), }, 'cost': { - 'min': this.safeFloat (minCosts, code), - 'max': this.safeFloat (maxCosts, code), + 'min': this.safeNumber (minCosts, code), + 'max': this.safeNumber (maxCosts, code), }, }, 'info': id, @@ -67902,8 +66212,8 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = symbol.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const taker = this.safeFloat (market, 'commission_taker_percent'); - const maker = this.safeFloat (market, 'commission_maker_percent'); + const taker = this.safeNumber (market, 'commission_taker_percent'); + const maker = this.safeNumber (market, 'commission_maker_percent'); result.push ({ 'id': id, 'symbol': symbol, @@ -67916,16 +66226,16 @@ module.exports = class exmo extends Exchange { 'maker': maker / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, }, 'precision': { @@ -67998,11 +66308,11 @@ module.exports = class exmo extends Exchange { // return [ this.safeInteger (ohlcv, 't'), - this.safeFloat (ohlcv, 'o'), - this.safeFloat (ohlcv, 'h'), - this.safeFloat (ohlcv, 'l'), - this.safeFloat (ohlcv, 'c'), - this.safeFloat (ohlcv, 'v'), + this.safeNumber (ohlcv, 'o'), + this.safeNumber (ohlcv, 'h'), + this.safeNumber (ohlcv, 'l'), + this.safeNumber (ohlcv, 'c'), + this.safeNumber (ohlcv, 'v'), ]; } @@ -68018,14 +66328,14 @@ module.exports = class exmo extends Exchange { const currencyId = this.currencyId (code); const account = this.account (); if (currencyId in free) { - account['free'] = this.safeFloat (free, currencyId); + account['free'] = this.safeString (free, currencyId); } if (currencyId in used) { - account['used'] = this.safeFloat (used, currencyId); + account['used'] = this.safeString (used, currencyId); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -68083,16 +66393,16 @@ module.exports = class exmo extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -68101,9 +66411,9 @@ module.exports = class exmo extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_curr'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'vol_curr'), 'info': ticker, }; } @@ -68164,9 +66474,9 @@ module.exports = class exmo extends Exchange { let symbol = undefined; const id = this.safeString (trade, 'trade_id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'quantity'); + const cost = this.safeNumber (trade, 'amount'); const side = this.safeString (trade, 'type'); const type = undefined; const marketId = this.safeString (trade, 'pair'); @@ -68185,11 +66495,11 @@ module.exports = class exmo extends Exchange { } const takerOrMaker = this.safeString (trade, 'exec_type'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission_amount'); + const feeCost = this.safeNumber (trade, 'commission_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commission_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (trade, 'commission_percent'); + let feeRate = this.safeNumber (trade, 'commission_percent'); if (feeRate !== undefined) { feeRate /= 1000; } @@ -68488,13 +66798,13 @@ module.exports = class exmo extends Exchange { market = this.markets_by_id[marketId]; } } - let amount = this.safeFloat (order, 'quantity'); + let amount = this.safeNumber (order, 'quantity'); if (amount === undefined) { const amountField = (side === 'buy') ? 'in_amount' : 'out_amount'; - amount = this.safeFloat (order, amountField); + amount = this.safeNumber (order, amountField); } - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'amount'); + let price = this.safeNumber (order, 'price'); + let cost = this.safeNumber (order, 'amount'); let filled = 0.0; const trades = []; const transactions = this.safeValue (order, 'trades', []); @@ -68615,24 +66925,6 @@ module.exports = class exmo extends Exchange { return undefined; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -68677,7 +66969,7 @@ module.exports = class exmo extends Exchange { // } // const timestamp = this.safeTimestamp (transaction, 'dt'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -68707,7 +66999,7 @@ module.exports = class exmo extends Exchange { // fixed funding fees only (for now) if (!this.fees['funding']['percentage']) { const key = (type === 'withdrawal') ? 'withdraw' : 'deposit'; - let feeCost = this.safeFloat (this.options['fundingFees'][key], code); + let feeCost = this.safeNumber (this.options['fundingFees'][key], code); // users don't pay for cashbacks, no fees for that const provider = this.safeString (transaction, 'provider'); if (provider === 'cashback') { @@ -68854,13 +67146,14 @@ module.exports = class exmo extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],83:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],81:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ExchangeNotAvailable, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -69005,26 +67298,26 @@ module.exports = class exx extends Exchange { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); ticker = ticker['ticker']; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'riseRate'), + 'change': this.safeNumber (ticker, 'riseRate'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -69074,14 +67367,11 @@ module.exports = class exx extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -69126,14 +67416,13 @@ module.exports = class exx extends Exchange { const currencyId = currencies[i]; const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'balance'), - 'used': this.safeFloat (balance, 'freeze'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -69153,11 +67442,10 @@ module.exports = class exx extends Exchange { // const symbol = market['symbol']; const timestamp = parseInt (order['trade_date']); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'trade_money'); - const amount = this.safeFloat (order, 'total_amount'); - const filled = this.safeFloat (order, 'trade_amount', 0.0); - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'trade_money'); + const amount = this.safeNumber (order, 'total_amount'); + const filled = this.safeNumber (order, 'trade_amount', 0.0); let status = this.safeInteger (order, 'status'); if (status === 1) { status = 'canceled'; @@ -69169,11 +67457,11 @@ module.exports = class exx extends Exchange { let fee = undefined; if ('fees' in order) { fee = { - 'cost': this.safeFloat (order, 'fees'), + 'cost': this.safeNumber (order, 'fees'), 'currency': market['quote'], }; } - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -69190,12 +67478,12 @@ module.exports = class exx extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -69320,13 +67608,14 @@ module.exports = class exx extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],84:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],82:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, ArgumentsRequired, InsufficientFunds, InvalidOrder, RateLimitExceeded, InvalidNonce, AuthenticationError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -69546,8 +67835,8 @@ module.exports = class fcoin extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'limit_amount_min'), - 'max': this.safeFloat (market, 'limit_amount_max'), + 'min': this.safeNumber (market, 'limit_amount_min'), + 'max': this.safeNumber (market, 'limit_amount_max'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -69642,12 +67931,12 @@ module.exports = class fcoin extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidsAsks (orders, priceKey = 0, amountKey = 1) { @@ -69660,8 +67949,8 @@ module.exports = class fcoin extends Exchange { const priceField = this.sum (index, priceKey); const amountField = this.sum (index, amountKey); result.push ([ - this.safeFloat (orders, priceField), - this.safeFloat (orders, amountField), + this.safeNumber (orders, priceField), + this.safeNumber (orders, amountField), ]); } return result; @@ -69709,17 +67998,17 @@ module.exports = class fcoin extends Exchange { } } const values = ticker['ticker']; - const last = this.safeFloat (values, 0); + const last = this.safeNumber (values, 0); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (values, 7), - 'low': this.safeFloat (values, 8), - 'bid': this.safeFloat (values, 2), - 'bidVolume': this.safeFloat (values, 3), - 'ask': this.safeFloat (values, 4), - 'askVolume': this.safeFloat (values, 5), + 'high': this.safeNumber (values, 7), + 'low': this.safeNumber (values, 8), + 'bid': this.safeNumber (values, 2), + 'bidVolume': this.safeNumber (values, 3), + 'ask': this.safeNumber (values, 4), + 'askVolume': this.safeNumber (values, 5), 'vwap': undefined, 'open': undefined, 'close': last, @@ -69728,8 +68017,8 @@ module.exports = class fcoin extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (values, 9), - 'quoteVolume': this.safeFloat (values, 10), + 'baseVolume': this.safeNumber (values, 9), + 'quoteVolume': this.safeNumber (values, 10), 'info': ticker, }; } @@ -69742,14 +68031,11 @@ module.exports = class fcoin extends Exchange { const timestamp = this.safeInteger (trade, 'ts'); const side = this.safeStringLower (trade, 'side'); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = undefined; return { 'id': id, @@ -69874,38 +68160,25 @@ module.exports = class fcoin extends Exchange { const symbol = market['symbol']; const orderType = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'created_at'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'executed_value'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'executed_value'); let feeCurrency = undefined; let feeCost = undefined; - const feeRebate = this.safeFloat (order, 'fees_income'); + const feeRebate = this.safeNumber (order, 'fees_income'); if ((feeRebate !== undefined) && (feeRebate > 0)) { if (market !== undefined) { feeCurrency = (side === 'buy') ? market['quote'] : market['base']; } feeCost = -feeRebate; } else { - feeCost = this.safeFloat (order, 'fill_fees'); + feeCost = this.safeNumber (order, 'fill_fees'); if (market !== undefined) { feeCurrency = (side === 'buy') ? market['base'] : market['quote']; } } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -69921,7 +68194,7 @@ module.exports = class fcoin extends Exchange { 'stopPrice': undefined, 'cost': cost, 'amount': amount, - 'remaining': remaining, + 'remaining': undefined, 'filled': filled, 'average': undefined, 'status': status, @@ -69930,7 +68203,7 @@ module.exports = class fcoin extends Exchange { 'currency': feeCurrency, }, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -69972,11 +68245,11 @@ module.exports = class fcoin extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_vol'), ]; } @@ -70065,7 +68338,7 @@ module.exports = class fcoin extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],85:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],83:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -70091,13 +68364,14 @@ module.exports = class fcoinjp extends fcoin { } }; -},{"./fcoin.js":84}],86:[function(require,module,exports){ +},{"./fcoin.js":82}],84:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70225,11 +68499,11 @@ module.exports = class flowbtc extends Exchange { const currencyId = balance['name']; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['total'] = this.safeFloat (balance, 'hold'); + account['free'] = this.safeString (balance, 'balance'); + account['total'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -70250,16 +68524,16 @@ module.exports = class flowbtc extends Exchange { }; const ticker = await this.publicPostGetTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -70269,8 +68543,8 @@ module.exports = class flowbtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume24hr'), - 'quoteVolume': this.safeFloat (ticker, 'volume24hrProduct2'), + 'baseVolume': this.safeNumber (ticker, 'volume24hr'), + 'quoteVolume': this.safeNumber (ticker, 'volume24hrProduct2'), 'info': ticker, }; } @@ -70279,14 +68553,11 @@ module.exports = class flowbtc extends Exchange { const timestamp = this.safeTimestamp (trade, 'unixtime'); const side = (trade['incomingOrderSide'] === 0) ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'px'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'px'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'timestamp': timestamp, @@ -70377,13 +68648,14 @@ module.exports = class flowbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],87:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],85:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70469,11 +68741,11 @@ module.exports = class foxbit extends Exchange { // otherwise we will lose the info if the currency balance has been funded or traded or not if (currencyId in balances) { const account = this.account (); - let used = this.safeFloat (balances, currencyId + '_locked'); + let used = this.safeNumber (balances, currencyId + '_locked'); if (used !== undefined) { used *= 1e-8; } - let total = this.safeFloat (balances, currencyId); + let total = this.safeNumber (balances, currencyId); if (total !== undefined) { total *= 1e-8; } @@ -70508,16 +68780,16 @@ module.exports = class foxbit extends Exchange { const timestamp = this.milliseconds (); const lowercaseQuote = market['quote'].toLowerCase (); const quoteVolume = 'vol_' + lowercaseQuote; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -70527,8 +68799,8 @@ module.exports = class foxbit extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -70541,14 +68813,11 @@ module.exports = class foxbit extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -70642,14 +68911,15 @@ module.exports = class foxbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],88:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],86:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending } = require ('./base/errors'); +const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending, ArgumentsRequired, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70888,6 +69158,7 @@ module.exports = class ftx extends Exchange { 'An unexpected error occurred': ExchangeNotAvailable, // {"error":"An unexpected error occurred, please try again later (58BC21C795).","success":false} 'Please retry request': ExchangeNotAvailable, // {"error":"Please retry request","success":false} 'Please try again': ExchangeNotAvailable, // {"error":"Please try again","success":false} + 'Only have permissions for subaccount': PermissionDenied, // {"success":false,"error":"Only have permissions for subaccount *sub_name*"} }, }, 'precisionMode': TICK_SIZE, @@ -71011,8 +69282,8 @@ module.exports = class ftx extends Exchange { // check if a market is a spot or future market const symbol = (type === 'future') ? this.safeString (market, 'name') : (base + '/' + quote); const active = this.safeValue (market, 'enabled'); - const sizeIncrement = this.safeFloat (market, 'sizeIncrement'); - const priceIncrement = this.safeFloat (market, 'priceIncrement'); + const sizeIncrement = this.safeNumber (market, 'sizeIncrement'); + const priceIncrement = this.safeNumber (market, 'priceIncrement'); const precision = { 'amount': sizeIncrement, 'price': priceIncrement, @@ -71090,28 +69361,28 @@ module.exports = class ftx extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); const timestamp = this.safeTimestamp (ticker, 'time', this.milliseconds ()); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'change24h'), + 'percentage': this.safeNumber (ticker, 'change24h'), 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24h'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24h'), 'info': ticker, }; } @@ -71151,14 +69422,6 @@ module.exports = class ftx extends Exchange { return this.parseTicker (result, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetMarkets (params); @@ -71237,11 +69500,11 @@ module.exports = class ftx extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -71362,6 +69625,45 @@ module.exports = class ftx extends Exchange { // "type": "otc" // } // + // with -ve fee + // { + // "id": 1171258927, + // "fee": -0.0000713875, + // "side": "sell", + // "size": 1, + // "time": "2021-03-11T13:34:35.523627+00:00", + // "type": "order", + // "price": 14.2775, + // "future": null, + // "market": "SOL/USD", + // "feeRate": -0.000005, + // "orderId": 33182929044, + // "tradeId": 582936801, + // "liquidity": "maker", + // "feeCurrency": "USD", + // "baseCurrency": "SOL", + // "quoteCurrency": "USD" + // } + // + // // from OTC order + // { + // "id": 1172129651, + // "fee": 0, + // "side": "sell", + // "size": 1.47568846, + // "time": "2021-03-11T15:04:46.893383+00:00", + // "type": "otc", + // "price": 14.60932598, + // "future": null, + // "market": null, + // "feeRate": 0, + // "orderId": null, + // "tradeId": null, + // "liquidity": "taker", + // "feeCurrency": "USD", + // "baseCurrency": "BCHA", + // "quoteCurrency": "USD" + // } const id = this.safeString (trade, 'id'); const takerOrMaker = this.safeString (trade, 'liquidity'); const marketId = this.safeString (trade, 'market'); @@ -71379,25 +69681,24 @@ module.exports = class ftx extends Exchange { } } const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } const orderId = this.safeString (trade, 'orderId'); @@ -71503,8 +69804,8 @@ module.exports = class ftx extends Exchange { const result = this.safeValue (response, 'result', {}); return { 'info': response, - 'maker': this.safeFloat (result, 'makerFee'), - 'taker': this.safeFloat (result, 'takerFee'), + 'maker': this.safeNumber (result, 'makerFee'), + 'taker': this.safeNumber (result, 'takerFee'), }; } @@ -71531,11 +69832,11 @@ module.exports = class ftx extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'coin')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -71658,9 +69959,9 @@ module.exports = class ftx extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); let status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filledSize'); - let remaining = this.safeFloat (order, 'remainingSize'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filledSize'); + let remaining = this.safeNumber (order, 'remainingSize'); if ((remaining === 0.0) && (amount !== undefined) && (filled !== undefined)) { remaining = Math.max (amount - filled, 0); if (remaining > 0) { @@ -71684,15 +69985,15 @@ module.exports = class ftx extends Exchange { } const side = this.safeString (order, 'side'); const type = this.safeString (order, 'type'); - const average = this.safeFloat (order, 'avgFillPrice'); - const price = this.safeFloat2 (order, 'price', 'triggerPrice', average); + const average = this.safeNumber (order, 'avgFillPrice'); + const price = this.safeNumber2 (order, 'price', 'triggerPrice', average); let cost = undefined; if (filled !== undefined && price !== undefined) { cost = filled * price; } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'triggeredAt')); const clientOrderId = this.safeString (order, 'clientId'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -71738,22 +70039,28 @@ module.exports = class ftx extends Exchange { request['clientId'] = clientOrderId; params = this.omit (params, [ 'clientId', 'clientOrderId' ]); } - let priceToPrecision = undefined; - if (price !== undefined) { - priceToPrecision = parseFloat (this.priceToPrecision (symbol, price)); - } - let method = 'privatePostConditionalOrders'; + let method = undefined; if (type === 'limit') { method = 'privatePostOrders'; - request['price'] = priceToPrecision; + request['price'] = parseFloat (this.priceToPrecision (symbol, price)); } else if (type === 'market') { method = 'privatePostOrders'; request['price'] = null; } else if ((type === 'stop') || (type === 'takeProfit')) { - request['triggerPrice'] = priceToPrecision; - // request['orderPrice'] = number; // optional, order type is limit if this is specified, otherwise market + method = 'privatePostConditionalOrders'; + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerPrice'); + if (stopPrice === undefined) { + throw new ArgumentsRequired (this.id + ' createOrder () requires a stopPrice parameter or a triggerPrice parameter for ' + type + ' orders'); + } else { + params = this.omit (params, [ 'stopPrice', 'triggerPrice' ]); + request['triggerPrice'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + } + if (price !== undefined) { + request['orderPrice'] = parseFloat (this.priceToPrecision (symbol, price)); // optional, order type is limit if this is specified, otherwise market + } } else if (type === 'trailingStop') { - request['trailValue'] = priceToPrecision; // negative for "sell", positive for "buy" + method = 'privatePostConditionalOrders'; + request['trailValue'] = parseFloat (this.priceToPrecision (symbol, price)); // negative for "sell", positive for "buy" } else { throw new InvalidOrder (this.id + ' createOrder () does not support order type ' + type + ', only limit, market, stop, trailingStop, or takeProfit orders are supported'); } @@ -71819,9 +70126,9 @@ module.exports = class ftx extends Exchange { const request = {}; let method = undefined; const clientOrderId = this.safeString2 (params, 'client_order_id', 'clientOrderId'); - const triggerPrice = this.safeFloat (params, 'triggerPrice'); - const orderPrice = this.safeFloat (params, 'orderPrice'); - const trailValue = this.safeFloat (params, 'trailValue'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); + const orderPrice = this.safeNumber (params, 'orderPrice'); + const trailValue = this.safeNumber (params, 'trailValue'); params = this.omit (params, [ 'client_order_id', 'clientOrderId', 'triggerPrice', 'orderPrice', 'trailValue' ]); const triggerPriceIsDefined = (triggerPrice !== undefined); const orderPriceIsDefined = (orderPrice !== undefined); @@ -72184,7 +70491,7 @@ module.exports = class ftx extends Exchange { return this.parseTransaction (result, currency); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetAccount (params); // @@ -72317,7 +70624,7 @@ module.exports = class ftx extends Exchange { // const code = this.safeCurrencyCode (this.safeString (transaction, 'coin')); const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'size'); + const amount = this.safeNumber (transaction, 'size'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const txid = this.safeString (transaction, 'txid'); @@ -72334,7 +70641,7 @@ module.exports = class ftx extends Exchange { address = notes.slice (12); } } - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -72469,13 +70776,14 @@ module.exports = class ftx extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],89:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],87:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, ArgumentsRequired, InvalidAddress, OrderNotFound, NotSupported, DDoSProtection, InsufficientFunds, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -72636,9 +70944,12 @@ module.exports = class gateio extends Exchange { }, }, 'commonCurrencies': { + '88MPH': 'MPH', + 'BIFI': 'Bitcoin File', 'BOX': 'DefiBox', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', + 'MPH': 'Morpher', // conflict with 88MPH 'SBTC': 'Super Bitcoin', 'TNC': 'Trinity Network Credit', }, @@ -72685,9 +70996,9 @@ module.exports = class gateio extends Exchange { const currency = coin[id]; const code = this.safeCurrencyCode (id); const delisted = this.safeValue (currency, 'delisted', 0); - const withdrawDisabled = this.safeValue (currency, 'withdraw_disabled', 0); - const depositDisabled = this.safeValue (currency, 'deposit_disabled', 0); - const tradeDisabled = this.safeValue (currency, 'trade_disabled', 0); + const withdrawDisabled = this.safeInteger2 (currency, 'withdraw_disabled', 0); + const depositDisabled = this.safeInteger2 (currency, 'deposit_disabled', 0); + const tradeDisabled = this.safeInteger2 (currency, 'trade_disabled', 0); const listed = (delisted === 0); const withdrawEnabled = (withdrawDisabled === 0); const depositEnabled = (depositDisabled === 0); @@ -72776,7 +71087,7 @@ module.exports = class gateio extends Exchange { 'price': this.safeInteger (details, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (details, 'min_amount'), + 'min': this.safeNumber (details, 'min_amount'), 'max': undefined, }; const priceLimits = { @@ -72784,7 +71095,7 @@ module.exports = class gateio extends Exchange { 'max': undefined, }; const defaultCost = amountLimits['min'] * priceLimits['min']; - const minCost = this.safeFloat (this.options['limits']['cost']['min'], quote, defaultCost); + const minCost = this.safeNumber (this.options['limits']['cost']['min'], quote, defaultCost); const costLimits = { 'min': minCost, 'max': undefined, @@ -72794,10 +71105,10 @@ module.exports = class gateio extends Exchange { 'price': priceLimits, 'cost': costLimits, }; - const disabled = this.safeValue (details, 'trade_disabled'); + const disabled = this.safeInteger (details, 'trade_disabled'); const active = !disabled; const uppercaseId = id.toUpperCase (); - const fee = this.safeFloat (details, 'fee'); + const fee = this.safeNumber (details, 'fee'); result.push ({ 'id': id, 'uppercaseId': uppercaseId, @@ -72831,11 +71142,11 @@ module.exports = class gateio extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (available, currencyId); - account['used'] = this.safeFloat (locked, currencyId); + account['free'] = this.safeString (available, currencyId); + account['used'] = this.safeString (locked, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -72851,11 +71162,11 @@ module.exports = class gateio extends Exchange { // they return [ Timestamp, Volume, Close, High, Low, Open ] return [ this.safeInteger (ohlcv, 0), // t - this.safeFloat (ohlcv, 5), // o - this.safeFloat (ohlcv, 3), // h - this.safeFloat (ohlcv, 4), // l - this.safeFloat (ohlcv, 2), // c - this.safeFloat (ohlcv, 1), // v + this.safeNumber (ohlcv, 5), // o + this.safeNumber (ohlcv, 3), // h + this.safeNumber (ohlcv, 4), // l + this.safeNumber (ohlcv, 2), // c + this.safeNumber (ohlcv, 1), // v ]; } @@ -72867,11 +71178,11 @@ module.exports = class gateio extends Exchange { 'group_sec': this.timeframes[timeframe], }; // max limit = 1001 - if (limit !== undefined) { - const periodDurationInSeconds = this.parseTimeframe (timeframe); - const hours = parseInt ((periodDurationInSeconds * limit) / 3600); - request['range_hour'] = Math.max (0, hours - 1); - } + // if (limit !== undefined) { + // const periodDurationInSeconds = this.parseTimeframe (timeframe); + // const hours = parseInt ((periodDurationInSeconds * limit) / 3600); + // request['range_hour'] = Math.max (1, hours - 1); + // } const response = await this.publicGetCandlestick2Id (this.extend (request, params)); // // { @@ -72895,8 +71206,8 @@ module.exports = class gateio extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'percentChange'); let open = undefined; let change = undefined; let average = undefined; @@ -72906,17 +71217,17 @@ module.exports = class gateio extends Exchange { change = last - open; average = this.sum (last, open) / 2; } - open = this.safeFloat (ticker, 'open', open); - change = this.safeFloat (ticker, 'change', change); + open = this.safeNumber (ticker, 'open', open); + change = this.safeNumber (ticker, 'change', change); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high24hr', 'high'), - 'low': this.safeFloat2 (ticker, 'low24hr', 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber2 (ticker, 'high24hr', 'high'), + 'low': this.safeNumber2 (ticker, 'low24hr', 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -72926,8 +71237,8 @@ module.exports = class gateio extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), // gateio has them reversed - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), // gateio has them reversed + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -72973,27 +71284,24 @@ module.exports = class gateio extends Exchange { const id = this.safeString2 (trade, 'tradeID', 'id'); // take either of orderid or orderId const orderId = this.safeString2 (trade, 'orderid', 'orderNumber'); - const price = this.safeFloat2 (trade, 'rate', 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString2 (trade, 'rate', 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'role'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } let fee = undefined; let feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee_coin')); - let feeCost = this.safeFloat (trade, 'point_fee'); + let feeCost = this.safeNumber (trade, 'point_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'gt_fee'); + feeCost = this.safeNumber (trade, 'gt_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'fee'); + feeCost = this.safeNumber (trade, 'fee'); } else { feeCurrency = this.safeCurrencyCode ('GT'); } @@ -73137,23 +71445,20 @@ module.exports = class gateio extends Exchange { } else if (side === '2') { side = 'buy'; } - const price = this.safeFloat2 (order, 'initialRate', 'rate'); - const average = this.safeFloat (order, 'filledRate'); - const amount = this.safeFloat2 (order, 'initialAmount', 'amount'); - const filled = this.safeFloat (order, 'filledAmount'); + const price = this.safeNumber2 (order, 'initialRate', 'rate'); + const average = this.safeNumber (order, 'filledRate'); + const amount = this.safeNumber2 (order, 'initialAmount', 'amount'); + const filled = this.safeNumber (order, 'filledAmount'); // In the order status response, this field has a different name. - let remaining = this.safeFloat2 (order, 'leftAmount', 'left'); - if (remaining === undefined) { - remaining = amount - filled; - } - const feeCost = this.safeFloat (order, 'feeValue'); + const remaining = this.safeNumber2 (order, 'leftAmount', 'left'); + const feeCost = this.safeNumber (order, 'feeValue'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (order, 'feePercentage'); + let feeRate = this.safeNumber (order, 'feePercentage'); if (feeRate !== undefined) { feeRate = feeRate / 100; } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -73179,7 +71484,7 @@ module.exports = class gateio extends Exchange { 'rate': feeRate, }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -73370,7 +71675,7 @@ module.exports = class gateio extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'txid'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); if (address === 'false') { address = undefined; @@ -73378,7 +71683,7 @@ module.exports = class gateio extends Exchange { const timestamp = this.safeTimestamp (transaction, 'timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.parseTransactionType (id[0]); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -73467,7 +71772,7 @@ module.exports = class gateio extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],90:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],88:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -73475,6 +71780,7 @@ module.exports = class gateio extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidOrder, InvalidNonce, InsufficientFunds, AuthenticationError, PermissionDenied, NotSupported, OnMaintenance, RateLimitExceeded, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -73691,16 +71997,16 @@ module.exports = class gemini extends Exchange { // const base = this.safeCurrencyCode (baseId); const minAmountString = cells[1].replace ('', ''); const minAmountParts = minAmountString.split (' '); - const minAmount = this.safeFloat (minAmountParts, 0); + const minAmount = this.safeNumber (minAmountParts, 0); const amountPrecisionString = cells[2].replace ('', ''); const amountPrecisionParts = amountPrecisionString.split (' '); - const amountPrecision = this.safeFloat (amountPrecisionParts, 0); + const amountPrecision = this.safeNumber (amountPrecisionParts, 0); const idLength = marketId.length - 0; const quoteId = marketId.slice (idLength - 3, idLength); const quote = this.safeCurrencyCode (quoteId); const pricePrecisionString = cells[3].replace ('', ''); const pricePrecisionParts = pricePrecisionString.split (' '); - const pricePrecision = this.safeFloat (pricePrecisionParts, 0); + const pricePrecision = this.safeNumber (pricePrecisionParts, 0); const baseId = marketId.replace (quoteId, ''); const base = this.safeCurrencyCode (baseId); const symbol = base + '/' + quote; @@ -73928,11 +72234,11 @@ module.exports = class gemini extends Exchange { base = market['base']; quote = market['quote']; } - const price = this.safeFloat (ticker, 'price'); - const last = this.safeFloat2 (ticker, 'last', 'close', price); - let percentage = this.safeFloat (ticker, 'percentChange24h'); + const price = this.safeNumber (ticker, 'price'); + const last = this.safeNumber2 (ticker, 'last', 'close', price); + let percentage = this.safeNumber (ticker, 'percentChange24h'); let change = undefined; - let open = this.safeFloat (ticker, 'open'); + let open = this.safeNumber (ticker, 'open'); let average = undefined; if (last !== undefined) { if (open !== undefined) { @@ -73949,18 +72255,18 @@ module.exports = class gemini extends Exchange { average = this.sum (last, open) / 2; } } - const baseVolume = this.safeFloat (volume, baseId); - const quoteVolume = this.safeFloat (volume, quoteId); + const baseVolume = this.safeNumber (volume, baseId); + const quoteVolume = this.safeNumber (volume, quoteId); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -73976,14 +72282,6 @@ module.exports = class gemini extends Exchange { }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetV1Pricefeed (params); @@ -74024,17 +72322,14 @@ module.exports = class gemini extends Exchange { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); const fee = { - 'cost': this.safeFloat (trade, 'fee_amount'), + 'cost': this.safeNumber (trade, 'fee_amount'), 'currency': feeCurrencyCode, }; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeStringLower (trade, 'type'); const symbol = this.safeSymbol (undefined, market); @@ -74087,18 +72382,18 @@ module.exports = class gemini extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'timestampms'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const filled = this.safeFloat (order, 'executed_amount'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const filled = this.safeNumber (order, 'executed_amount'); let status = 'closed'; if (order['is_live']) { status = 'open'; @@ -74106,14 +72401,8 @@ module.exports = class gemini extends Exchange { if (order['is_cancelled']) { status = 'canceled'; } - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_execution_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_execution_price'); let type = this.safeString (order, 'type'); if (type === 'exchange limit') { type = 'limit'; @@ -74128,7 +72417,7 @@ module.exports = class gemini extends Exchange { const id = this.safeString (order, 'order_id'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'client_order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -74144,13 +72433,13 @@ module.exports = class gemini extends Exchange { 'price': price, 'stopPrice': undefined, 'average': average, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -74265,7 +72554,7 @@ module.exports = class gemini extends Exchange { status = 'ok'; } let fee = undefined; - const feeAmount = this.safeFloat (transaction, 'feeAmount'); + const feeAmount = this.safeNumber (transaction, 'feeAmount'); if (feeAmount !== undefined) { fee = { 'cost': feeAmount, @@ -74281,7 +72570,7 @@ module.exports = class gemini extends Exchange { 'address': address, 'tag': undefined, // or is it defined? 'type': type, // direction of the transaction, ('deposit' | 'withdraw') - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': undefined, @@ -74380,7 +72669,7 @@ module.exports = class gemini extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],91:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],89:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -74388,6 +72677,7 @@ module.exports = class gemini extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound, InvalidAddress, BadRequest } = require ('./base/errors'); const { TRUNCATE, ROUND, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -74601,8 +72891,8 @@ module.exports = class gopax extends Exchange { const minimums = this.safeValue (market, 'restApiOrderAmountMin', {}); const marketAsk = this.safeValue (minimums, 'marketAsk', {}); const marketBid = this.safeValue (minimums, 'marketBid', {}); - const takerFeePercent = this.safeFloat (market, 'takerFeePercent'); - const makerFeePercent = this.safeFloat (market, 'makerFeePercent'); + const takerFeePercent = this.safeNumber (market, 'takerFeePercent'); + const makerFeePercent = this.safeNumber (market, 'makerFeePercent'); const taker = parseFloat (this.decimalToPrecision (takerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); const maker = parseFloat (this.decimalToPrecision (makerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); result.push ({ @@ -74620,15 +72910,15 @@ module.exports = class gopax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (marketAsk, 'amount'), + 'min': this.safeNumber (marketAsk, 'amount'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'priceMin'), + 'min': this.safeNumber (market, 'priceMin'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (marketBid, 'amount'), + 'min': this.safeNumber (marketBid, 'amount'), 'max': undefined, }, }, @@ -74663,8 +72953,8 @@ module.exports = class gopax extends Exchange { const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'name'); - const fee = this.safeFloat (currency, 'withdrawalFee'); - const precision = this.safeFloat (currency, 'scale'); + const fee = this.safeNumber (currency, 'withdrawalFee'); + const precision = this.safeNumber (currency, 'scale'); result[code] = { 'id': id, 'info': currency, @@ -74687,7 +72977,7 @@ module.exports = class gopax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalAmountMin'), + 'min': this.safeNumber (currency, 'withdrawalAmountMin'), 'max': undefined, }, }, @@ -74755,8 +73045,8 @@ module.exports = class gopax extends Exchange { const marketId = this.safeString (ticker, 'name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (ticker, 'time')); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat2 (ticker, 'price', 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'price', 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -74767,20 +73057,20 @@ module.exports = class gopax extends Exchange { percentage = change / open * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidVolume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askVolume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidVolume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askVolume'), 'vwap': vwap, 'open': open, 'close': last, @@ -74816,14 +73106,6 @@ module.exports = class gopax extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTradingPairsStats (params); @@ -74845,8 +73127,8 @@ module.exports = class gopax extends Exchange { parsePublicTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let symbol = undefined; if ('symbol' in market) { symbol = this.safeString (market, 'symbol'); @@ -74872,14 +73154,14 @@ module.exports = class gopax extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const symbol = this.safeString (trade, 'tradingPairName').replace ('-', '/'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'baseAmount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'baseAmount'); let feeCurrency = symbol.slice (0, 3); if (side === 'sell') { feeCurrency = symbol.slice (4); } const fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': feeCurrency, 'rate': undefined, }; @@ -74961,15 +73243,15 @@ module.exports = class gopax extends Exchange { } else if (type === '2') { type = 'market'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'baseAmount'); - let cost = this.safeFloat (trade, 'quoteAmount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'baseAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteAmount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -75036,11 +73318,11 @@ module.exports = class gopax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -75080,14 +73362,14 @@ module.exports = class gopax extends Exchange { const balance = response[i]; const currencyId = this.safeString2 (balance, 'asset', 'isoAlpha3'); const code = this.safeCurrencyCode (currencyId); - const hold = this.safeFloat (balance, 'hold'); - const pendingWithdrawal = this.safeFloat (balance, 'pendingWithdrawal'); + const hold = this.safeString (balance, 'hold'); + const pendingWithdrawal = this.safeString (balance, 'pendingWithdrawal'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.sum (hold, pendingWithdrawal); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = Precise.stringAdd (hold, pendingWithdrawal); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -75164,42 +73446,36 @@ module.exports = class gopax extends Exchange { const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); const timeInForce = this.safeStringUpper (order, 'timeInForce'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - const remaining = this.safeFloat (order, 'remaining'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const stopPrice = this.safeNumber (order, 'stopPrice'); + const remaining = this.safeNumber (order, 'remaining'); const marketId = this.safeString (order, 'tradingPairName'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const balanceChange = this.safeValue (order, 'balanceChange', {}); - let filled = this.safeFloat (balanceChange, 'baseNet'); - let cost = this.safeFloat (balanceChange, 'quoteNet'); + const filled = this.safeNumber (balanceChange, 'baseNet'); + let cost = this.safeNumber (balanceChange, 'quoteNet'); if (cost !== undefined) { cost = Math.abs (cost); } let updated = undefined; - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } if ((filled !== undefined) && (filled > 0)) { updated = this.parse8601 (this.safeString (order, 'updatedAt')); } - if ((cost === undefined) && (price !== undefined) && (filled !== undefined)) { - cost = filled * price; - } let fee = undefined; if (side === 'buy') { const baseFee = this.safeValue (balanceChange, 'baseFee', {}); - const taking = this.safeFloat (baseFee, 'taking'); - const making = this.safeFloat (baseFee, 'making'); + const taking = this.safeNumber (baseFee, 'taking'); + const making = this.safeNumber (baseFee, 'making'); fee = { 'currency': market['base'], 'cost': this.sum (taking, making), }; } else { const quoteFee = this.safeValue (balanceChange, 'quoteFee', {}); - const taking = this.safeFloat (quoteFee, 'taking'); - const making = this.safeFloat (quoteFee, 'making'); + const taking = this.safeNumber (quoteFee, 'taking'); + const making = this.safeNumber (quoteFee, 'making'); fee = { 'currency': market['quote'], 'cost': this.sum (taking, making), @@ -75209,7 +73485,7 @@ module.exports = class gopax extends Exchange { if (timeInForce !== undefined) { postOnly = (timeInForce === 'PO'); } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'datetime': this.iso8601 (timestamp), @@ -75231,7 +73507,7 @@ module.exports = class gopax extends Exchange { 'trades': undefined, 'fee': fee, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -75379,7 +73655,7 @@ module.exports = class gopax extends Exchange { request['clientOrderId'] = clientOrderId; params = this.omit (params, 'clientOrderId'); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -75508,18 +73784,6 @@ module.exports = class gopax extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetCryptoDepositAddresses (params); @@ -75584,8 +73848,8 @@ module.exports = class gopax extends Exchange { } else if ((type === 'crypto_deposit' || type === 'fiat_deposit')) { type = 'deposit'; } - const amount = this.safeFloat (transaction, 'netAmount'); - const feeCost = this.safeFloat (transaction, 'feeAmount'); + const amount = this.safeNumber (transaction, 'netAmount'); + const feeCost = this.safeNumber (transaction, 'feeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -75729,7 +73993,7 @@ module.exports = class gopax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],92:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],90:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -75737,6 +74001,7 @@ module.exports = class gopax extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, OrderNotFound, ArgumentsRequired, BadSymbol, BadRequest, NullResponse, InvalidOrder, BadResponse, NotSupported, ExchangeNotAvailable, RequestTimeout, RateLimitExceeded, PermissionDenied, InsufficientFunds, InvalidAddress } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -76036,23 +74301,23 @@ module.exports = class hbtc extends Exchange { const filter = filters[j]; const filterType = this.safeString (filter, 'filterType'); if (filterType === 'LOT_SIZE') { - amountMin = this.safeFloat (filter, 'minQty'); - amountMax = this.safeFloat (filter, 'maxQty'); + amountMin = this.safeNumber (filter, 'minQty'); + amountMax = this.safeNumber (filter, 'maxQty'); } if (filterType === 'PRICE_FILTER') { - priceMin = this.safeFloat (filter, 'minPrice'); - priceMax = this.safeFloat (filter, 'maxPrice'); + priceMin = this.safeNumber (filter, 'minPrice'); + priceMax = this.safeNumber (filter, 'maxPrice'); } if (filterType === 'MIN_NOTIONAL') { - costMin = this.safeFloat (filter, 'minNotional'); + costMin = this.safeNumber (filter, 'minNotional'); } } if ((costMin === undefined) && (amountMin !== undefined) && (priceMin !== undefined)) { costMin = amountMin * priceMin; } const precision = { - 'price': this.safeFloat2 (market, 'quotePrecision', 'quoteAssetPrecision'), - 'amount': this.safeFloat (market, 'baseAssetPrecision'), + 'price': this.safeNumber2 (market, 'quotePrecision', 'quoteAssetPrecision'), + 'amount': this.safeNumber (market, 'baseAssetPrecision'), }; const limits = { 'amount': { @@ -76290,14 +74555,6 @@ module.exports = class hbtc extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidAsk (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -76449,8 +74706,8 @@ module.exports = class hbtc extends Exchange { const currencyId = this.safeString2 (balance, 'asset', 'tokenName'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -76460,12 +74717,12 @@ module.exports = class hbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = response[currencyId]; const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableMargin'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'availableMargin'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTrades (symbol, since = undefined, limit = 50, params = {}) { @@ -76506,11 +74763,11 @@ module.exports = class hbtc extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -77196,8 +75453,8 @@ module.exports = class hbtc extends Exchange { // const currencyId = this.safeString (item, 'tokenId'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'change'); - const after = this.safeFloat (item, 'total'); + const amount = this.safeNumber (item, 'change'); + const after = this.safeNumber (item, 'total'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -77337,8 +75594,8 @@ module.exports = class hbtc extends Exchange { } else { type = 'withdrawal'; } - const amount = this.safeFloat (transaction, 'quantity'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'quantity'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'feeTokenId'); @@ -77399,8 +75656,8 @@ module.exports = class hbtc extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'openPrice'); - const close = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; let average = undefined; @@ -77411,19 +75668,19 @@ module.exports = class hbtc extends Exchange { percentage = (change / open) * 100; } } - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat2 (ticker, 'bestBidPrice', 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat2 (ticker, 'bestAskPrice', 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber2 (ticker, 'bestBidPrice', 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber2 (ticker, 'bestAskPrice', 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': vwap, 'open': open, 'close': close, @@ -77473,17 +75730,14 @@ module.exports = class hbtc extends Exchange { // } // const id = this.safeString (trade, 'id'); - const timestamp = this.safeFloat (trade, 'time'); + const timestamp = this.safeNumber (trade, 'time'); const type = undefined; const orderId = this.safeString (trade, 'orderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let side = undefined; let takerOrMaker = undefined; if ('isBuyerMaker' in trade) { @@ -77497,7 +75751,7 @@ module.exports = class hbtc extends Exchange { side = isBuyer ? 'buy' : 'sell'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -77603,30 +75857,30 @@ module.exports = class hbtc extends Exchange { const symbol = this.safeSymbol (marketId, market); let type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'avgPrice'); + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'avgPrice'); let amount = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); + let cost = this.safeNumber (order, 'cummulativeQuoteQty'); let filled = undefined; let remaining = undefined; if (type === undefined) { type = this.safeStringLower (order, 'orderType'); if ((market !== undefined) && market['inverse']) { - cost = this.safeFloat (order, 'executedQty'); + cost = this.safeNumber (order, 'executedQty'); amount = undefined; } if (cost === 0.0) { filled = 0; } } else { - amount = this.safeFloat (order, 'origQty'); + amount = this.safeNumber (order, 'origQty'); if (type === 'market') { price = undefined; if (side === 'buy') { amount = undefined; } } - filled = this.safeFloat (order, 'executedQty'); + filled = this.safeNumber (order, 'executedQty'); if (filled !== undefined) { if (amount !== undefined) { remaining = amount - filled; @@ -77638,7 +75892,7 @@ module.exports = class hbtc extends Exchange { } const status = this.parseOrderStatus (this.safeString (order, 'status')); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const result = { 'info': order, 'id': id, @@ -77667,7 +75921,7 @@ module.exports = class hbtc extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'fee'); + const feeCost = this.safeNumber (fees[i], 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'feeToken'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -77740,7 +75994,7 @@ module.exports = class hbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],93:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],91:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -77748,6 +76002,7 @@ module.exports = class hbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, PermissionDenied, ExchangeError, ExchangeNotAvailable, OrderNotFound, InsufficientFunds, InvalidOrder, RequestTimeout, AuthenticationError } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -77787,6 +76042,7 @@ module.exports = class hitbtc extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': 'M1', @@ -77824,10 +76080,10 @@ module.exports = class hitbtc extends Exchange { 'api': { 'public': { 'get': [ - 'symbol', // Available Currency Symbols - 'symbol/{symbol}', // Get symbol info 'currency', // Available Currencies 'currency/{currency}', // Get currency info + 'symbol', // Available Currency Symbols + 'symbol/{symbol}', // Get symbol info 'ticker', // Ticker list for all symbols 'ticker/{symbol}', // Ticker for symbol 'trades', @@ -77845,11 +76101,20 @@ module.exports = class hitbtc extends Exchange { 'order/{clientOrderId}', // Get a single order by clientOrderId 'trading/fee/all', // Get trading fee rate 'trading/fee/{symbol}', // Get trading fee rate + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', 'history/order', // Get historical orders 'history/trades', // Get historical trades 'history/order/{orderId}/trades', // Get historical trades by specified order 'account/balance', // Get main acccount balance - 'account/crypto/address/{currency}', // Get deposit crypro address + 'account/crypto/address/{currency}', // Get current address + 'account/crypto/addresses/{currency}', // Get last 10 deposit addresses for currency + 'account/crypto/used-addresses/{currency}', // Get last 10 unique addresses used for withdraw by currency + 'account/crypto/estimate-withdraw', 'account/crypto/is-mine/{address}', 'account/transactions', // Get account transactions 'account/transactions/{id}', // Get account transaction by id @@ -77860,23 +76125,33 @@ module.exports = class hitbtc extends Exchange { ], 'post': [ 'order', // Create new order - 'account/crypto/address/{currency}', // Create new deposit crypro address - 'account/crypto/withdraw', // Withdraw crypro + 'margin/order', + 'account/crypto/address/{currency}', // Create new crypto deposit address + 'account/crypto/withdraw', // Withdraw crypto 'account/crypto/transfer-convert', - 'account/transfer', // Transfer amount to trading + 'account/transfer', // Transfer amount to trading account or to main account + 'account/transfer/internal', 'sub-acc/freeze', 'sub-acc/activate', 'sub-acc/transfer', ], 'put': [ 'order/{clientOrderId}', // Create new order - 'account/crypto/withdraw/{id}', // Commit withdraw crypro + 'margin/account/{symbol}', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Commit crypto withdrawal 'sub-acc/acl/{subAccountUserId}', ], 'delete': [ 'order', // Cancel all open orders 'order/{clientOrderId}', // Cancel order - 'account/crypto/withdraw/{id}', // Rollback withdraw crypro + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Rollback crypto withdrawal ], // outdated? 'patch': [ @@ -77895,8 +76170,20 @@ module.exports = class hitbtc extends Exchange { }, 'options': { 'defaultTimeInForce': 'FOK', + 'accountsByType': { + 'bank': 'bank', + 'exchange': 'exchange', + 'main': 'bank', // alias of the above + 'trading': 'exchange', + }, + 'fetchBalanceMethod': { + 'account': 'account', + 'main': 'account', + 'trading': 'trading', + }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BCC': 'BCC', // initial symbol for Bitcoin Cash, now inactive 'BET': 'DAO.Casino', 'BOX': 'BOX Token', @@ -77923,7 +76210,6 @@ module.exports = class hitbtc extends Exchange { '20002': OrderNotFound, // canceling non-existent order '20001': InsufficientFunds, // {"error":{"code":20001,"message":"Insufficient funds","description":"Check that the funds are sufficient, given commissions"}} }, - 'orders': {}, // orders cache / emulation }); } @@ -77960,14 +76246,14 @@ module.exports = class hitbtc extends Exchange { if (id.indexOf ('_') >= 0) { symbol = id; } - const lot = this.safeFloat (market, 'quantityIncrement'); - const step = this.safeFloat (market, 'tickSize'); + const lot = this.safeNumber (market, 'quantityIncrement'); + const step = this.safeNumber (market, 'tickSize'); const precision = { 'price': step, 'amount': lot, }; - const taker = this.safeFloat (market, 'takeLiquidityRate'); - const maker = this.safeFloat (market, 'provideLiquidityRate'); + const taker = this.safeNumber (market, 'takeLiquidityRate'); + const maker = this.safeNumber (market, 'provideLiquidityRate'); const feeCurrencyId = this.safeString (market, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); result.push (this.extend (this.fees['trading'], { @@ -78002,6 +76288,49 @@ module.exports = class hitbtc extends Exchange { return result; } + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // account can be "exchange" or "bank", with aliases "main" or "trading" respectively + await this.loadMarkets (); + const currency = this.currency (code); + const requestAmount = this.currencyToPrecision (code, amount); + const request = { + 'currency': currency['id'], + 'amount': requestAmount, + }; + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + const keys = Object.keys (accountsByType); + if (fromId === undefined) { + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ') + ' instead of ' + fromId); + } + if (toId === undefined) { + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ') + ' instead of ' + toId); + } + if (fromId === toId) { + throw new ExchangeError (this.id + ' from and to cannot be the same account'); + } + type = fromId + 'To' + this.capitalize (toId); + } + request['type'] = type; + const response = await this.privatePostAccountTransfer (this.extend (request, params)); + // { id: '2db6ebab-fb26-4537-9ef8-1a689472d236' } + const id = this.safeString (response, 'id'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'amount': requestAmount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': undefined, + }; + } + async fetchCurrencies (params = {}) { const response = await this.publicGetCurrency (params); // @@ -78057,7 +76386,7 @@ module.exports = class hitbtc extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'payoutFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'payoutFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -78097,15 +76426,20 @@ module.exports = class hitbtc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } async fetchBalance (params = {}) { await this.loadMarkets (); const type = this.safeString (params, 'type', 'trading'); - const method = 'privateGet' + this.capitalize (type) + 'Balance'; + const fetchBalanceAccounts = this.safeValue (this.options, 'fetchBalanceMethod', {}); + const typeId = this.safeString (fetchBalanceAccounts, type); + if (typeId === undefined) { + throw new ExchangeError (this.id + ' fetchBalance account type must be either main or trading'); + } + const method = 'privateGet' + this.capitalize (typeId) + 'Balance'; const query = this.omit (params, 'type'); const response = await this[method] (query); const result = { 'info': response }; @@ -78114,11 +76448,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -78135,11 +76469,11 @@ module.exports = class hitbtc extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'max'), - this.safeFloat (ohlcv, 'min'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'max'), + this.safeNumber (ohlcv, 'min'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -78185,10 +76519,10 @@ module.exports = class hitbtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); let change = undefined; let percentage = undefined; let average = undefined; @@ -78204,11 +76538,11 @@ module.exports = class hitbtc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -78284,7 +76618,7 @@ module.exports = class hitbtc extends Exchange { market = this.safeMarket (marketId, market); const symbol = market['symbol']; let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = market ? market['feeCurrency'] : undefined; fee = { @@ -78296,9 +76630,11 @@ module.exports = class hitbtc extends Exchange { // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const orderId = this.safeString (trade, 'clientOrderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); const id = this.safeString (trade, 'id'); return { @@ -78397,11 +76733,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'hash'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -78589,66 +76925,25 @@ module.exports = class hitbtc extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'cumQuantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'cumQuantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); // we use clientOrderId as the order id with this exchange intentionally // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const id = this.safeString (order, 'clientOrderId'); const clientOrderId = id; - let price = this.safeFloat (order, 'price'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - if (price !== undefined) { - cost = filled * price; - } - } - } + const price = this.safeNumber (order, 'price'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); let trades = this.safeValue (order, 'tradesReport'); - let fee = undefined; - let average = this.safeValue (order, 'avgPrice'); + const fee = undefined; + const average = this.safeNumber (order, 'avgPrice'); if (trades !== undefined) { trades = this.parseTrades (trades, market); - let feeCost = undefined; - const numTrades = trades.length; - let tradesCost = 0; - for (let i = 0; i < numTrades; i++) { - if (feeCost === undefined) { - feeCost = 0; - } - tradesCost = this.sum (tradesCost, trades[i]['cost']); - const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); - if (tradeFeeCost !== undefined) { - feeCost = this.sum (feeCost, tradeFeeCost); - } - } - cost = tradesCost; - if ((filled !== undefined) && (filled > 0)) { - if (average === undefined) { - average = cost / filled; - } - if (type === 'market') { - if (price === undefined) { - price = average; - } - } - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, // https://github.com/ccxt/ccxt/issues/5674 'timestamp': created, @@ -78663,13 +76958,13 @@ module.exports = class hitbtc extends Exchange { 'stopPrice': undefined, 'average': average, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -78930,7 +77225,7 @@ module.exports = class hitbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],94:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],92:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -78938,6 +77233,7 @@ module.exports = class hitbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { BadRequest, AuthenticationError, NetworkError, ArgumentsRequired, OrderNotFound, InsufficientFunds } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -78948,7 +77244,7 @@ module.exports = class hollaex extends Exchange { 'name': 'HollaEx', 'countries': [ 'KR' ], 'rateLimit': 333, - 'version': 'v1', + 'version': 'v2', 'has': { 'CORS': false, 'fetchMarkets': true, @@ -78968,13 +77264,13 @@ module.exports = class hollaex extends Exchange { 'cancelOrder': true, 'cancelAllOrders': true, 'fetchOpenOrders': true, - 'fetchClosedOrders': false, + 'fetchClosedOrders': true, 'fetchOpenOrder': true, 'fetchOrder': false, 'fetchDeposits': true, 'fetchWithdrawals': true, 'fetchTransactions': false, - 'fetchOrders': false, + 'fetchOrders': true, 'fetchMyTrades': true, 'withdraw': true, 'fetchDepositAddress': true, @@ -78999,13 +77295,17 @@ module.exports = class hollaex extends Exchange { 'public': { 'get': [ 'health', - 'constant', + 'constants', + 'kit', + 'tiers', 'ticker', - 'ticker/all', + 'tickers', + 'orderbook', 'orderbooks', 'trades', 'chart', - // TradingView data + 'charts', + // TradingView 'udf/config', 'udf/history', 'udf/symbols', @@ -79015,20 +77315,20 @@ module.exports = class hollaex extends Exchange { 'get': [ 'user', 'user/balance', - 'user/trades', - 'user/orders', - 'user/orders/{order_id}', 'user/deposits', 'user/withdrawals', - 'user/withdraw/{currency}/fee', + 'user/withdrawal/fee', + 'user/trades', + 'orders', + 'orders/{order_id}', ], 'post': [ 'user/request-withdrawal', 'order', ], 'delete': [ - 'user/orders', - 'user/orders/{order_id}', + 'order/all', + 'order', ], }, }, @@ -79063,7 +77363,7 @@ module.exports = class hollaex extends Exchange { } async fetchMarkets (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); // // { // coins: { @@ -79130,17 +77430,17 @@ module.exports = class hollaex extends Exchange { 'quoteId': quoteId, 'active': active, 'precision': { - 'price': this.safeFloat (market, 'increment_price'), - 'amount': this.safeFloat (market, 'increment_size'), + 'price': this.safeNumber (market, 'increment_price'), + 'amount': this.safeNumber (market, 'increment_size'), }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, 'max': undefined }, }, @@ -79151,7 +77451,7 @@ module.exports = class hollaex extends Exchange { } async fetchCurrencies (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); const coins = this.safeValue (response, 'coins', {}); const keys = Object.keys (coins); const result = {}; @@ -79163,8 +77463,8 @@ module.exports = class hollaex extends Exchange { const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'fullname'); const active = this.safeValue (currency, 'active'); - const fee = this.safeFloat (currency, 'withdrawal_fee'); - const precision = this.safeFloat (currency, 'increment_unit'); + const fee = this.safeNumber (currency, 'withdrawal_fee'); + const precision = this.safeNumber (currency, 'increment_unit'); const withdrawalLimits = this.safeValue (currency, 'withdrawal_limits', []); result[code] = { 'id': id, @@ -79177,8 +77477,8 @@ module.exports = class hollaex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min'), - 'max': this.safeFloat (currency, 'max'), + 'min': this.safeNumber (currency, 'min'), + 'max': this.safeNumber (currency, 'max'), }, 'price': { 'min': undefined, @@ -79267,7 +77567,7 @@ module.exports = class hollaex extends Exchange { async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.publicGetTickerAll (this.extend (params)); + const response = await this.publicGetTickers (this.extend (params)); // // { // "bch-usdt": { @@ -79330,27 +77630,27 @@ module.exports = class hollaex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString2 (ticker, 'time', 'timestamp')); - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const result = { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, - 'last': this.safeFloat (ticker, 'last', close), + 'last': this.safeNumber (ticker, 'last', close), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, }; return result; @@ -79408,15 +77708,12 @@ module.exports = class hollaex extends Exchange { const datetime = this.safeString (trade, 'timestamp'); const timestamp = this.parse8601 (datetime); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const quote = market['quote']; @@ -79501,11 +77798,11 @@ module.exports = class hollaex extends Exchange { // return [ this.parse8601 (this.safeString (response, 'time')), - this.safeFloat (response, 'open'), - this.safeFloat (response, 'high'), - this.safeFloat (response, 'low'), - this.safeFloat (response, 'close'), - this.safeFloat (response, 'volume'), + this.safeNumber (response, 'open'), + this.safeNumber (response, 'high'), + this.safeNumber (response, 'low'), + this.safeNumber (response, 'close'), + this.safeNumber (response, 'volume'), ]; } @@ -79530,11 +77827,11 @@ module.exports = class hollaex extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (response, currencyId + '_available'); - account['total'] = this.safeFloat (response, currencyId + '_balance'); + account['free'] = this.safeString (response, currencyId + '_available'); + account['total'] = this.safeString (response, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrder (id, symbol = undefined, params = {}) { @@ -79542,67 +77839,146 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateGetUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateGetOrdersOrderId (this.extend (request, params)); // // { - // "created_at": "2018-03-23T04:14:08.663Z", - // "title": "string", - // "side": "sell", - // "type": "limit", - // "price": 0, - // "size": 0, - // "symbol": "xht-usdt", // "id": "string", - // "created_by": 1, - // "filled": 0 + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } // } // return this.parseOrder (response); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'open': true, + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'status': 'filled', + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); let market = undefined; - const request = {}; + const request = { + // 'symbol': market['id'], + // 'side': 'buy', // 'sell' + // 'status': 'new', // 'filled', 'pfilled', 'canceled' + // 'open': true, + // 'limit': limit, // default 50, max 100 + // 'page': 1, + // 'order_by': 'created_at', // id, ... + // 'order': 'asc', // 'desc' + // 'start_date': this.iso8601 (since), + // 'end_date': this.iso8601 (this.milliseconds ()), + }; if (symbol !== undefined) { market = this.market (symbol); request['symbol'] = market['id']; } - const response = await this.privateGetUserOrders (this.extend (request, params)); + if (since !== undefined) { + request['start_date'] = this.iso8601 (since); + } + if (limit !== undefined) { + request['limit'] = limit; // default 50, max 100 + } + const response = await this.privateGetOrders (this.extend (request, params)); // - // [ - // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 - // } - // ] + // { + // "count": 1, + // "data": [ + // { + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } + // } + // ] + // } // - return this.parseOrders (response, market); + const data = this.safeValue (response, 'data', []); + return this.parseOrders (data, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'new': 'open', + 'pfilled': 'open', + 'filled': 'closed', + 'canceled': 'canceled', + }; + return this.safeString (statuses, status, status); } parseOrder (order, market = undefined) { // - // fetchOpenOrder, fetchOpenOrders + // createOrder, fetchOpenOrder, fetchOpenOrders // // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // }, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, // } // const marketId = this.safeString (order, 'symbol'); @@ -79611,21 +77987,11 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filled'); - let cost = undefined; - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = filled * price; - } - } - const status = (type === 'market') ? 'closed' : 'open'; - const result = { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filled'); + const status = this.parseOrderStatus (this.safeString (order, 'status')); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -79641,40 +78007,56 @@ module.exports = class hollaex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; - return result; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); - const order = { + const request = { 'symbol': market['id'], 'side': side, 'size': amount, 'type': type, + // 'stop': parseFloat (this.priceToPrecision (symbol, stopPrice)), + // 'meta': {}, // other options such as post_only }; if (type !== 'market') { - order['price'] = price; + request['price'] = price; } - const response = await this.privatePostOrder (this.extend (order, params)); + const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop'); + if (stopPrice !== undefined) { + request['stop'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + params = this.omit (params, [ 'stopPrice', 'stop' ]); + } + const response = await this.privatePostOrder (this.extend (request, params)); // // { + // "fee": 0, + // "meta": {}, // "symbol": "xht-usdt", // "side": "sell", - // "size": 1, + // "size": 0.1, // "type": "limit", - // "price": 0.1, + // "price": 1, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, + // "fee_coin": "usdt", // "id": "string", - // "created_by": 34, + // "created_by": 116, // "filled": 0, - // "status": "pending" + // "status": "new", + // "updated_at": "2021-02-17T03:03:19.231Z", + // "created_at": "2021-02-17T03:03:19.231Z", + // "stop": null // } // return this.parseOrder (response, market); @@ -79685,7 +78067,7 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateDeleteUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateDeleteOrder (this.extend (request, params)); // // { // "title": "string", @@ -79710,7 +78092,7 @@ module.exports = class hollaex extends Exchange { market = this.markets (symbol); request['symbol'] = market['id']; } - const response = await this.privateDeleteUserOrders (this.extend (request, params)); + const response = await this.privateDeleteOrderAll (this.extend (request, params)); // // [ // { @@ -79976,7 +78358,7 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_at')); const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const type = this.safeString (transaction, 'type'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); let addressTo = undefined; const addressFrom = undefined; @@ -80006,7 +78388,7 @@ module.exports = class hollaex extends Exchange { } const fee = { 'currency': code, - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), }; return { 'info': transaction, @@ -80105,7 +78487,7 @@ module.exports = class hollaex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],95:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],93:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -80146,7 +78528,7 @@ module.exports = class huobijp extends huobipro { } }; -},{"./base/errors":8,"./huobipro.js":96}],96:[function(require,module,exports){ +},{"./base/errors":9,"./huobipro.js":94}],94:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -80154,6 +78536,7 @@ module.exports = class huobijp extends huobipro { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, ArgumentsRequired, BadSymbol, BadRequest, RequestTimeout, NetworkError } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -80171,7 +78554,9 @@ module.exports = class huobipro extends Exchange { 'hostname': 'api.huobi.pro', // api.testnet.huobi.pro 'pro': true, 'has': { + 'cancelAllOrders': true, 'cancelOrder': true, + 'cancelOrders': true, 'CORS': false, 'createOrder': true, 'fetchBalance': true, @@ -80338,6 +78723,7 @@ module.exports = class huobipro extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.002, @@ -80401,6 +78787,7 @@ module.exports = class huobipro extends Exchange { // https://en.cryptonomist.ch/blog/eidoo/the-edo-to-pnt-upgrade-what-you-need-to-know-updated/ 'PNT': 'Penta', 'SBTC': 'Super Bitcoin', + 'BIFI': 'Bitcoin File', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706 }, }); } @@ -80465,8 +78852,8 @@ module.exports = class huobipro extends Exchange { 'info': limits, 'limits': { 'amount': { - 'min': this.safeFloat (limits, 'limit-order-must-greater-than'), - 'max': this.safeFloat (limits, 'limit-order-must-less-than'), + 'min': this.safeNumber (limits, 'limit-order-must-greater-than'), + 'max': this.safeNumber (limits, 'limit-order-must-less-than'), }, }, }; @@ -80500,9 +78887,9 @@ module.exports = class huobipro extends Exchange { }; const maker = (base === 'OMG') ? 0 : 0.2 / 100; const taker = (base === 'OMG') ? 0 : 0.2 / 100; - const minAmount = this.safeFloat (market, 'min-order-amt', Math.pow (10, -precision['amount'])); - const maxAmount = this.safeFloat (market, 'max-order-amt'); - const minCost = this.safeFloat (market, 'min-order-value', 0); + const minAmount = this.safeNumber (market, 'min-order-amt', Math.pow (10, -precision['amount'])); + const maxAmount = this.safeNumber (market, 'max-order-amt'); + const minCost = this.safeNumber (market, 'min-order-value', 0); const state = this.safeString (market, 'state'); const active = (state === 'online'); result.push ({ @@ -80581,24 +78968,24 @@ module.exports = class huobipro extends Exchange { let askVolume = undefined; if ('bid' in ticker) { if (Array.isArray (ticker['bid'])) { - bid = this.safeFloat (ticker['bid'], 0); - bidVolume = this.safeFloat (ticker['bid'], 1); + bid = this.safeNumber (ticker['bid'], 0); + bidVolume = this.safeNumber (ticker['bid'], 1); } else { - bid = this.safeFloat (ticker, 'bid'); + bid = this.safeNumber (ticker, 'bid'); bidVolume = this.safeValue (ticker, 'bidSize'); } } if ('ask' in ticker) { if (Array.isArray (ticker['ask'])) { - ask = this.safeFloat (ticker['ask'], 0); - askVolume = this.safeFloat (ticker['ask'], 1); + ask = this.safeNumber (ticker['ask'], 0); + askVolume = this.safeNumber (ticker['ask'], 1); } else { - ask = this.safeFloat (ticker, 'ask'); + ask = this.safeNumber (ticker, 'ask'); askVolume = this.safeValue (ticker, 'askSize'); } } - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -80609,15 +78996,15 @@ module.exports = class huobipro extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -80706,7 +79093,7 @@ module.exports = class huobipro extends Exchange { // } // const ticker = this.parseTicker (response['tick'], market); - const timestamp = this.safeValue (response, 'ts'); + const timestamp = this.safeInteger (response, 'ts'); ticker['timestamp'] = timestamp; ticker['datetime'] = this.iso8601 (timestamp); return ticker; @@ -80775,21 +79162,18 @@ module.exports = class huobipro extends Exchange { type = typeParts[1]; } const takerOrMaker = this.safeString (trade, 'role'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'filled-amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'filled-amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - let feeCost = this.safeFloat (trade, 'filled-fees'); + let feeCost = this.safeNumber (trade, 'filled-fees'); let feeCurrency = undefined; if (market !== undefined) { feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee-currency')); } - const filledPoints = this.safeFloat (trade, 'filled-points'); + const filledPoints = this.safeNumber (trade, 'filled-points'); if (filledPoints !== undefined) { if ((feeCost === undefined) || (feeCost === 0.0)) { feeCost = filledPoints; @@ -80903,11 +79287,11 @@ module.exports = class huobipro extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -81004,11 +79388,11 @@ module.exports = class huobipro extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'deposit-min-amount'), + 'min': this.safeNumber (currency, 'deposit-min-amount'), 'max': Math.pow (10, precision), }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw-min-amount'), + 'min': this.safeNumber (currency, 'withdraw-min-amount'), 'max': Math.pow (10, precision), }, }, @@ -81039,14 +79423,14 @@ module.exports = class huobipro extends Exchange { account = this.account (); } if (balance['type'] === 'trade') { - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); } if (balance['type'] === 'frozen') { - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrdersByStates (states, symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -81221,28 +79605,14 @@ module.exports = class huobipro extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (order, 'created-at'); - let amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount - if ((type === 'market') && (side === 'buy')) { - amount = (status === 'closed') ? filled : undefined; - } - let price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - const cost = this.safeFloat2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - // if cost is defined and filled is not zero - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - const feeCost = this.safeFloat2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees + const cost = this.safeNumber2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo + const feeCost = this.safeNumber2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -81254,7 +79624,7 @@ module.exports = class huobipro extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -81268,15 +79638,15 @@ module.exports = class huobipro extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -81350,26 +79720,82 @@ module.exports = class huobipro extends Exchange { }); } - currencyToPrecision (currency, fee) { - return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); + async cancelOrders (ids, symbol = undefined, params = {}) { + await this.loadMarkets (); + const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); + params = this.omit (params, [ 'clientOrderIds', 'client-order-ids' ]); + const request = {}; + if (clientOrderIds === undefined) { + request['order-ids'] = ids; + } else { + request['client-order-ids'] = clientOrderIds; + } + const response = await this.privatePostOrderOrdersBatchcancel (this.extend (request, params)); + // + // { + // "status": "ok", + // "data": { + // "success": [ + // "5983466" + // ], + // "failed": [ + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "first" + // }, + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "second" + // }, + // { + // "err-msg": "The record is not found.", + // "order-id": "", + // "err-code": "base-not-found", + // "client-order-id": "third" + // } + // ] + // } + // } + // + return response; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (market[key], cost)), + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'account-id' string false NA The account id used for this cancel Refer to GET /v1/account/accounts + // 'symbol': market['id'], // a list of comma-separated symbols, all symbols by default + // 'types' 'string', buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-stop-limit, sell-stop-limit, buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok + // 'side': 'buy', // or 'sell' + // 'size': 100, // the number of orders to cancel 1-100 }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.privatePostOrderOrdersBatchCancelOpenOrders (this.extend (request, params)); + // + // { + // code: 200, + // data: { + // "success-count": 2, + // "failed-count": 0, + // "next-id": 5454600 + // } + // } + // + return response; + } + + currencyToPrecision (currency, fee) { + return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); } parseDepositAddress (depositAddress, currency = undefined) { @@ -81511,7 +79937,7 @@ module.exports = class huobipro extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const tag = this.safeString (transaction, 'address-tag'); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -81524,7 +79950,7 @@ module.exports = class huobipro extends Exchange { 'address': this.safeString (transaction, 'address'), 'tag': tag, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -81654,504 +80080,7 @@ module.exports = class huobipro extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],97:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class ice3x extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'ice3x', - 'name': 'ICE3X', - 'countries': [ 'ZA' ], // South Africa - 'rateLimit': 1000, - 'version': 'v1', - 'has': { - 'cancelOrder': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchCurrencies': true, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTrades': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg', - 'api': 'https://ice3x.com/api', - 'www': 'https://ice3x.com', // 'https://ice3x.co.za', - 'doc': 'https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017', - 'fees': [ - 'https://help.ice3.com/support/solutions/articles/11000033293-trading-fees', - 'https://help.ice3.com/support/solutions/articles/11000033288-fees-explained', - 'https://help.ice3.com/support/solutions/articles/11000008131-what-are-your-fiat-deposit-and-withdrawal-fees-', - 'https://help.ice3.com/support/solutions/articles/11000033289-deposit-fees', - ], - 'referral': 'https://ice3x.com?ref=14341802', - }, - 'api': { - 'public': { - 'get': [ - 'currency/list', - 'currency/info', - 'pair/list', - 'pair/info', - 'stats/marketdepthfull', - 'stats/marketdepthbtcav', - 'stats/marketdepth', - 'orderbook/info', - 'trade/list', - 'trade/info', - ], - }, - 'private': { - 'post': [ - 'balance/list', - 'balance/info', - 'order/new', - 'order/cancel', - 'order/list', - 'order/info', - 'trade/list', - 'trade/info', - 'transaction/list', - 'transaction/info', - 'invoice/list', - 'invoice/info', - 'invoice/pdf', - ], - }, - }, - 'fees': { - 'trading': { - 'maker': 0.005, - 'taker': 0.005, - }, - }, - 'precision': { - 'amount': 8, - 'price': 8, - }, - }); - } - - async fetchCurrencies (params = {}) { - const response = await this.publicGetCurrencyList (params); - const currencies = response['response']['entities']; - const precision = this.precision['amount']; - const result = {}; - for (let i = 0; i < currencies.length; i++) { - const currency = currencies[i]; - const id = this.safeString (currency, 'currency_id'); - const currencyId = this.safeString (currency, 'iso'); - const code = this.safeCurrencyCode (currencyId); - result[code] = { - 'id': id, - 'code': code, - 'name': currency['name'], - 'active': true, - 'precision': precision, - 'limits': { - 'amount': { - 'min': undefined, - 'max': Math.pow (10, precision), - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': Math.pow (10, precision), - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - }, - 'info': currency, - 'fee': undefined, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - if (this.currencies_by_id === undefined) { - this.currencies = await this.fetchCurrencies (); - this.currencies_by_id = this.indexBy (this.currencies, 'id'); - } - const response = await this.publicGetPairList (params); - const markets = this.safeValue (response['response'], 'entities'); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = this.safeString (market, 'pair_id'); - const baseId = this.safeString (market, 'currency_id_from'); - const quoteId = this.safeString (market, 'currency_id_to'); - const baseCurrency = this.currencies_by_id[baseId]; - const quoteCurrency = this.currencies_by_id[quoteId]; - const base = baseCurrency['code']; - const quote = quoteCurrency['code']; - const symbol = base + '/' + quote; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': undefined, - 'info': market, - 'precision': this.precision, - 'limits': this.limits, - }); - } - return result; - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.milliseconds (); - const symbol = market['symbol']; - const last = this.safeFloat (ticker, 'last_price'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'max_bid'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'min_ask'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'vol'), - 'info': ticker, - }; - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetStatsMarketdepthfull (this.extend (request, params)); - const ticker = this.safeValue (response['response'], 'entity'); - return this.parseTicker (ticker, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetStatsMarketdepthfull (params); - const tickers = this.safeValue (response['response'], 'entities'); - const result = {}; - for (let i = 0; i < tickers.length; i++) { - const ticker = tickers[i]; - const marketId = this.safeString (ticker, 'pair_id'); - const market = this.safeValue (this.marketsById, marketId); - if (market !== undefined) { - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); - } - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'pair_id': this.marketId (symbol), - }; - if (limit !== undefined) { - const type = this.safeString (params, 'type'); - if ((type !== 'ask') && (type !== 'bid')) { - // eslint-disable-next-line quotes - throw new ArgumentsRequired (this.id + " fetchOrderBook() requires an exchange-specific extra 'type' param ('bid' or 'ask') when used with a limit"); - } else { - request['items_per_page'] = limit; - } - } - const response = await this.publicGetOrderbookInfo (this.extend (request, params)); - const orderbook = this.safeValue (response['response'], 'entities'); - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'price', 'amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.safeTimestamp (trade, 'created'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } - const type = 'limit'; - const side = this.safeString (trade, 'type'); - const id = this.safeString (trade, 'trade_id'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'id': id, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': type, - 'side': side, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetTradeList (this.extend (request, params)); - const trades = this.safeValue (response['response'], 'entities'); - return this.parseTrades (trades, market, since, limit); - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostBalanceList (params); - const result = { 'info': response }; - const balances = this.safeValue (response['response'], 'entities', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - // currency ids are numeric strings - const currencyId = this.safeString (balance, 'currency_id'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseOrder (order, market = undefined) { - const pairId = this.safeInteger (order, 'pair_id'); - let symbol = undefined; - if (pairId && !market && (pairId in this.marketsById)) { - market = this.marketsById[pairId]; - symbol = market['symbol']; - } - const timestamp = this.safeTimestamp (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - let status = this.safeInteger (order, 'active'); - let remaining = this.safeFloat (order, 'remaining'); - let filled = undefined; - if (status === 1) { - status = 'open'; - } else { - status = 'closed'; - remaining = 0; - filled = amount; - } - let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - }; - if (market !== undefined) { - fee['currency'] = market['quote']; - } - } - return { - 'id': this.safeString (order, 'order_id'), - 'clientOrderId': undefined, - 'datetime': this.iso8601 (timestamp), - 'timestamp': timestamp, - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': 'limit', - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': this.safeString (order, 'type'), - 'price': price, - 'stopPrice': undefined, - 'cost': undefined, - 'amount': amount, - 'filled': filled, - 'remaining': remaining, - 'trades': undefined, - 'fee': fee, - 'info': order, - 'average': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - 'type': side, - 'amount': amount, - 'price': price, - }; - const response = await this.privatePostOrderNew (this.extend (request, params)); - const order = this.parseOrder ({ - 'order_id': response['response']['entity']['order_id'], - 'created': this.seconds (), - 'active': 1, - 'type': side, - 'price': price, - 'volume': amount, - 'remaining': amount, - 'info': response, - }, market); - return order; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - const request = { - 'order_id': id, - }; - return await this.privatePostOrderCancel (this.extend (request, params)); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'order _id': id, - }; - const response = await this.privatePostOrderInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const order = this.safeValue (data, 'entity'); - return this.parseOrder (order); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.privatePostOrderList (params); - const data = this.safeValue (response, 'response', {}); - const orders = this.safeValue (data, 'entities', []); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - return this.parseOrders (orders, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - if (limit !== undefined) { - request['items_per_page'] = limit; - } - if (since !== undefined) { - request['date_from'] = parseInt (since / 1000); - } - const response = await this.privatePostTradeList (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const trades = this.safeValue (data, 'entities', []); - return this.parseTrades (trades, market, since, limit); - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency_id': currency['id'], - }; - const response = await this.privatePostBalanceInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const balance = this.safeValue (data, 'entity', {}); - const address = this.safeString (balance, 'address'); - const status = address ? 'ok' : 'none'; - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'status': status, - 'info': response, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/' + this.version + '/' + path; - if (api === 'public') { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } - } else { - this.checkRequiredCredentials (); - body = this.urlencode (this.extend ({ - 'nonce': this.nonce (), - }, params)); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const response = await this.fetch2 (path, api, method, params, headers, body); - const errors = this.safeValue (response, 'errors'); - const data = this.safeValue (response, 'response'); - if (errors || !data) { - const authErrorKeys = [ 'Key', 'user_id', 'Sign' ]; - for (let i = 0; i < authErrorKeys.length; i++) { - const errorKey = authErrorKeys[i]; - const errorMessage = this.safeString (errors, errorKey); - if (!errorMessage) { - continue; - } - if (errorKey === 'user_id' && errorMessage.indexOf ('authorization') < 0) { - continue; - } - throw new AuthenticationError (errorMessage); - } - throw new ExchangeError (this.json (errors)); - } - return response; - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],98:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],95:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -82159,6 +80088,7 @@ module.exports = class ice3x extends Exchange { const Exchange = require ('./base/Exchange'); const { PAD_WITH_ZERO } = require ('./base/functions/number'); const { InvalidOrder, InsufficientFunds, ExchangeError, ExchangeNotAvailable, DDoSProtection, BadRequest, NotSupported, InvalidAddress, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -82395,14 +80325,6 @@ module.exports = class idex extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // { // market: 'DIL-ETH', @@ -82422,16 +80344,16 @@ module.exports = class idex extends Exchange { // } const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'baseVolume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'baseVolume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'open'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const close = this.safeFloat (ticker, 'close'); - const ask = this.safeFloat (ticker, 'ask'); - const bid = this.safeFloat (ticker, 'bid'); - let percentage = this.safeFloat (ticker, 'percentChange'); + const open = this.safeNumber (ticker, 'open'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const close = this.safeNumber (ticker, 'close'); + const ask = this.safeNumber (ticker, 'ask'); + const bid = this.safeNumber (ticker, 'bid'); + let percentage = this.safeNumber (ticker, 'percentChange'); if (percentage !== undefined) { percentage = 1 + percentage / 100; } @@ -82507,11 +80429,11 @@ module.exports = class idex extends Exchange { // sequence: 3853 // } const timestamp = this.safeInteger (ohlcv, 'start'); - const open = this.safeFloat (ohlcv, 'open'); - const high = this.safeFloat (ohlcv, 'high'); - const low = this.safeFloat (ohlcv, 'low'); - const close = this.safeFloat (ohlcv, 'close'); - const volume = this.safeFloat (ohlcv, 'volume'); + const open = this.safeNumber (ohlcv, 'open'); + const high = this.safeNumber (ohlcv, 'high'); + const low = this.safeNumber (ohlcv, 'low'); + const close = this.safeNumber (ohlcv, 'close'); + const volume = this.safeNumber (ohlcv, 'volume'); return [ timestamp, open, high, low, close, volume ]; } @@ -82573,9 +80495,14 @@ module.exports = class idex extends Exchange { // txStatus: 'mined' // } const id = this.safeString (trade, 'fillId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'quoteQuantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteQuantity'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const timestamp = this.safeInteger (trade, 'time'); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); @@ -82584,7 +80511,7 @@ module.exports = class idex extends Exchange { const oppositeSide = (makerSide === 'buy') ? 'sell' : 'buy'; const side = this.safeString (trade, 'side', oppositeSide); const takerOrMaker = this.safeString (trade, 'liquidity', 'taker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); @@ -82657,8 +80584,8 @@ module.exports = class idex extends Exchange { const result = []; for (let i = 0; i < bookSide.length; i++) { const order = bookSide[i]; - const price = this.safeFloat (order, 0); - const amount = this.safeFloat (order, 1); + const price = this.safeNumber (order, 0); + const amount = this.safeNumber (order, 1); const orderCount = this.safeInteger (order, 2); result.push ([ price, amount, orderCount ]); } @@ -82745,16 +80672,13 @@ module.exports = class idex extends Exchange { const entry = response[i]; const currencyId = this.safeString (entry, 'asset'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (entry, 'quantity'); - const free = this.safeFloat (entry, 'availableForTrade'); - const used = this.safeFloat (entry, 'locked'); - result[code] = { - 'free': free, - 'used': used, - 'total': total, - }; + const account = this.account (); + account['total'] = this.safeString (entry, 'quantity'); + account['free'] = this.safeString (entry, 'availableForTrade'); + account['used'] = this.safeString (entry, 'locked'); + result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -82975,10 +80899,10 @@ module.exports = class idex extends Exchange { const symbol = this.safeSymbol (marketId, market, '-'); const trades = this.parseTrades (fills, market); const type = this.safeString (order, 'type'); - const amount = this.safeFloat (order, 'originalQuantity'); - const filled = this.safeFloat (order, 'executedQuantity'); - const average = this.safeFloat (order, 'avgExecutionPrice'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'originalQuantity'); + const filled = this.safeNumber (order, 'executedQuantity'); + const average = this.safeNumber (order, 'avgExecutionPrice'); + const price = this.safeNumber (order, 'price'); const rawStatus = this.safeString (order, 'status'); const status = this.parseOrderStatus (rawStatus); const fee = { @@ -83087,7 +81011,7 @@ module.exports = class idex extends Exchange { throw new NotSupported (this.id + ' quoteOrderQuantity is not supported for ' + type + ' orders, only supported for market orders'); } amountEnum = 1; - amount = this.safeFloat (params, 'quoteOrderQuantity'); + amount = this.safeNumber (params, 'quoteOrderQuantity'); } const sideEnum = (side === 'buy') ? 0 : 1; const walletBytes = this.remove0xPrefix (this.walletAddress); @@ -83390,13 +81314,13 @@ module.exports = class idex extends Exchange { } const id = this.safeString2 (transaction, 'depositId', 'withdrawId'); const code = this.safeCurrencyCode (this.safeString (transaction, 'asset'), currency); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const txid = this.safeString (transaction, 'txId'); const timestamp = this.safeInteger (transaction, 'txTime'); let fee = undefined; if ('fee' in transaction) { fee = { - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), 'currency': 'ETH', }; } @@ -83454,12 +81378,13 @@ module.exports = class idex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],99:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],96:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -83583,11 +81508,11 @@ module.exports = class independentreserve extends Exchange { const currencyId = this.safeString (balance, 'CurrencyCode'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'AvailableBalance'); - account['total'] = this.safeFloat (balance, 'TotalBalance'); + account['free'] = this.safeString (balance, 'AvailableBalance'); + account['total'] = this.safeString (balance, 'TotalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -83608,16 +81533,16 @@ module.exports = class independentreserve extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'LastPrice'); + const last = this.safeNumber (ticker, 'LastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'DayHighestPrice'), - 'low': this.safeFloat (ticker, 'DayLowestPrice'), - 'bid': this.safeFloat (ticker, 'CurrentHighestBidPrice'), + 'high': this.safeNumber (ticker, 'DayHighestPrice'), + 'low': this.safeNumber (ticker, 'DayLowestPrice'), + 'bid': this.safeNumber (ticker, 'CurrentHighestBidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'CurrentLowestOfferPrice'), + 'ask': this.safeNumber (ticker, 'CurrentLowestOfferPrice'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -83626,8 +81551,8 @@ module.exports = class independentreserve extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'DayAvgPrice'), - 'baseVolume': this.safeFloat (ticker, 'DayVolumeXbtInSecondaryCurrrency'), + 'average': this.safeNumber (ticker, 'DayAvgPrice'), + 'baseVolume': this.safeNumber (ticker, 'DayVolumeXbtInSecondaryCurrrency'), 'quoteVolume': undefined, 'info': ticker, }; @@ -83706,20 +81631,10 @@ module.exports = class independentreserve extends Exchange { orderType = 'limit'; } const timestamp = this.parse8601 (this.safeString (order, 'CreatedTimestampUtc')); - const amount = this.safeFloat2 (order, 'VolumeOrdered', 'Volume'); - let filled = this.safeFloat (order, 'VolumeFilled'); - let remaining = this.safeFloat (order, 'Outstanding'); - if (filled === undefined) { - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (0, amount - remaining); - } - } - if (remaining === undefined) { - if ((filled !== undefined) && (amount !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const feeRate = this.safeFloat (order, 'FeePercent'); + const amount = this.safeNumber2 (order, 'VolumeOrdered', 'Volume'); + const filled = this.safeNumber (order, 'VolumeFilled'); + const remaining = this.safeNumber (order, 'Outstanding'); + const feeRate = this.safeNumber (order, 'FeePercent'); let feeCost = undefined; if (feeRate !== undefined) { feeCost = feeRate * filled; @@ -83731,10 +81646,10 @@ module.exports = class independentreserve extends Exchange { }; const id = this.safeString (order, 'OrderGuid'); const status = this.parseOrderStatus (this.safeString (order, 'Status')); - const cost = this.safeFloat (order, 'Value'); - const average = this.safeFloat (order, 'AvgPrice'); - const price = this.safeFloat (order, 'Price', average); - return { + const cost = this.safeNumber (order, 'Value'); + const average = this.safeNumber (order, 'AvgPrice'); + const price = this.safeNumber (order, 'Price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -83756,7 +81671,7 @@ module.exports = class independentreserve extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -83844,14 +81759,11 @@ module.exports = class independentreserve extends Exchange { const timestamp = this.parse8601 (trade['TradeTimestampUtc']); const id = this.safeString (trade, 'TradeGuid'); const orderId = this.safeString (trade, 'OrderGuid'); - const price = this.safeFloat2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); - const amount = this.safeFloat2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); + const amountString = this.safeString2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const baseId = this.safeString (trade, 'PrimaryCurrencyCode'); const quoteId = this.safeString (trade, 'SecondaryCurrencyCode'); let marketId = undefined; @@ -83964,13 +81876,14 @@ module.exports = class independentreserve extends Exchange { } }; -},{"./base/Exchange":6}],100:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],97:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -84131,7 +82044,7 @@ module.exports = class indodax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const taker = this.safeFloat (market, 'trade_fee_percent'); + const taker = this.safeNumber (market, 'trade_fee_percent'); const isMaintenance = this.safeInteger (market, 'is_maintenance'); const active = (isMaintenance) ? false : true; const pricePrecision = this.safeInteger (market, 'price_round'); @@ -84141,11 +82054,11 @@ module.exports = class indodax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'trade_min_traded_currency'), + 'min': this.safeNumber (market, 'trade_min_traded_currency'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'trade_min_base_currency'), + 'min': this.safeNumber (market, 'trade_min_base_currency'), 'max': undefined, }, 'cost': { @@ -84183,11 +82096,11 @@ module.exports = class indodax extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (used, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (used, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -84224,16 +82137,16 @@ module.exports = class indodax extends Exchange { const timestamp = this.safeTimestamp (ticker, 'server_time'); const baseVolume = 'vol_' + market['baseId'].toLowerCase (); const quoteVolume = 'vol_' + market['quoteId'].toLowerCase (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -84243,8 +82156,8 @@ module.exports = class indodax extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, baseVolume), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, baseVolume), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -84258,14 +82171,11 @@ module.exports = class indodax extends Exchange { } const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -84320,7 +82230,7 @@ module.exports = class indodax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status', 'open')); let symbol = undefined; let cost = undefined; - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let amount = undefined; let remaining = undefined; let filled = undefined; @@ -84334,18 +82244,18 @@ module.exports = class indodax extends Exchange { if ((market['baseId'] === 'idr') && ('remain_rp' in order)) { baseId = 'rp'; } - cost = this.safeFloat (order, 'order_' + quoteId); + cost = this.safeNumber (order, 'order_' + quoteId); if (cost) { amount = cost / price; - const remainingCost = this.safeFloat (order, 'remain_' + quoteId); + const remainingCost = this.safeNumber (order, 'remain_' + quoteId); if (remainingCost !== undefined) { remaining = remainingCost / price; filled = amount - remaining; } } else { - amount = this.safeFloat (order, 'order_' + baseId); + amount = this.safeNumber (order, 'order_' + baseId); cost = price * amount; - remaining = this.safeFloat (order, 'remain_' + baseId); + remaining = this.safeNumber (order, 'remain_' + baseId); filled = amount - remaining; } } @@ -84585,13 +82495,14 @@ module.exports = class indodax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],101:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],98:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -84702,25 +82613,25 @@ module.exports = class itbit extends Exchange { throw new ExchangeError (this.id + ' fetchTicker returned a bad response: ' + this.json (ticker)); } const timestamp = this.parse8601 (serverTimeUTC); - const vwap = this.safeFloat (ticker, 'vwap24h'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); + const vwap = this.safeNumber (ticker, 'vwap24h'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'openToday'), + 'open': this.safeNumber (ticker, 'openToday'), 'close': last, 'last': last, 'previousClose': undefined, @@ -84767,23 +82678,20 @@ module.exports = class itbit extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const side = this.safeString (trade, 'direction'); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'commissionPaid'); + let feeCost = this.safeNumber (trade, 'commissionPaid'); const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - let rebatesApplied = this.safeFloat (trade, 'rebatesApplied'); + let rebatesApplied = this.safeNumber (trade, 'rebatesApplied'); if (rebatesApplied !== undefined) { rebatesApplied = -rebatesApplied; } const rebateCurrencyId = this.safeString (trade, 'rebateCurrency'); const rebateCurrency = this.safeCurrencyCode (rebateCurrencyId); - const price = this.safeFloat2 (trade, 'price', 'rate'); - const amount = this.safeFloat2 (trade, 'currency1Amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'price', 'rate'); + const amountString = this.safeString2 (trade, 'currency1Amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; const marketId = this.safeString (trade, 'instrument'); if (marketId !== undefined) { @@ -84905,7 +82813,7 @@ module.exports = class itbit extends Exchange { 'txid': txnHash, 'type': transactionType, 'status': status, - 'amount': this.safeFloat (item, 'amount'), + 'amount': this.safeNumber (item, 'amount'), 'fee': undefined, 'info': item, }); @@ -85005,11 +82913,11 @@ module.exports = class itbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchWallets (params = {}) { @@ -85100,26 +83008,16 @@ module.exports = class itbit extends Exchange { const type = this.safeString (order, 'type'); const symbol = this.markets_by_id[order['instrument']]['symbol']; const timestamp = this.parse8601 (order['createdTime']); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'amountFilled'); - let remaining = undefined; - let cost = undefined; + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'amountFilled'); const fee = undefined; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'volumeWeightedAveragePrice'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'volumeWeightedAveragePrice'); const clientOrderId = this.safeString (order, 'clientOrderIdentifier'); const id = this.safeString (order, 'id'); const postOnlyString = this.safeString (order, 'postOnly'); const postOnly = (postOnlyString === 'True'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -85134,15 +83032,15 @@ module.exports = class itbit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, // 'trades': this.parseTrades (order['trades'], market), 'trades': undefined, - }; + }); } nonce () { @@ -85240,7 +83138,7 @@ module.exports = class itbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],102:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],99:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -85248,6 +83146,7 @@ module.exports = class itbit extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeNotAvailable, ArgumentsRequired, PermissionDenied, AuthenticationError, ExchangeError, OrderNotFound, DDoSProtection, InvalidNonce, InsufficientFunds, CancelPending, InvalidOrder, InvalidAddress, RateLimitExceeded } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -85540,26 +83439,38 @@ module.exports = class kraken extends Exchange { // } // } // - const keys = Object.keys (response['result']); + const markets = this.safeValue (response, 'result', {}); + const keys = Object.keys (markets); let result = []; for (let i = 0; i < keys.length; i++) { const id = keys[i]; - const market = response['result'][id]; - const baseId = market['base']; - const quoteId = market['quote']; + const market = markets[id]; + const baseId = this.safeString (market, 'base'); + const quoteId = this.safeString (market, 'quote'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const darkpool = id.indexOf ('.d') >= 0; - const symbol = darkpool ? market['altname'] : (base + '/' + quote); + const altname = this.safeString (market, 'altname'); + const symbol = darkpool ? altname : (base + '/' + quote); + const makerFees = this.safeValue (market, 'fees_maker', []); + const firstMakerFee = this.safeValue (makerFees, 0, []); + const firstMakerFeeRate = this.safeNumber (firstMakerFee, 1); let maker = undefined; - if ('fees_maker' in market) { - maker = parseFloat (market['fees_maker'][0][1]) / 100; + if (firstMakerFeeRate !== undefined) { + maker = parseFloat (firstMakerFeeRate) / 100; + } + const takerFees = this.safeValue (market, 'fees', []); + const firstTakerFee = this.safeValue (takerFees, 0, []); + const firstTakerFeeRate = this.safeNumber (firstTakerFee, 1); + let taker = undefined; + if (firstTakerFeeRate !== undefined) { + taker = parseFloat (firstTakerFeeRate) / 100; } const precision = { - 'amount': market['lot_decimals'], - 'price': market['pair_decimals'], + 'amount': this.safeInteger (market, 'lot_decimals'), + 'price': this.safeInteger (market, 'pair_decimals'), }; - const minAmount = this.safeFloat (market, 'ordermin'); + const minAmount = this.safeNumber (market, 'ordermin'); result.push ({ 'id': id, 'symbol': symbol, @@ -85571,7 +83482,7 @@ module.exports = class kraken extends Exchange { 'info': market, 'altname': market['altname'], 'maker': maker, - 'taker': parseFloat (market['fees'][0][1]) / 100, + 'taker': taker, 'active': true, 'precision': precision, 'limits': { @@ -85694,7 +83605,7 @@ module.exports = class kraken extends Exchange { await this.loadMarkets (); this.checkRequiredCredentials (); const response = await this.privatePostTradeVolume (params); - const tradedVolume = this.safeFloat (response['result'], 'volume'); + const tradedVolume = this.safeNumber (response['result'], 'volume'); const tiers = this.fees['trading']['tiers']; let taker = tiers['taker'][1]; let maker = tiers['maker'][1]; @@ -85716,8 +83627,8 @@ module.exports = class kraken extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); const timestamp = this.safeInteger (bidask, 2); return [ price, amount, timestamp ]; } @@ -85755,7 +83666,14 @@ module.exports = class kraken extends Exchange { // } // const result = this.safeValue (response, 'result', {}); - const orderbook = this.safeValue (result, market['id']); + let orderbook = this.safeValue (result, market['id']); + // sometimes kraken returns wsname instead of market id + // https://github.com/ccxt/ccxt/issues/8662 + const marketInfo = this.safeValue (market, 'info', {}); + const wsName = this.safeValue (marketInfo, 'wsname'); + if (wsName !== undefined) { + orderbook = this.safeValue (result, wsName, orderbook); + } return this.parseOrderBook (orderbook); } @@ -85783,7 +83701,7 @@ module.exports = class kraken extends Exchange { 'ask': parseFloat (ticker['a'][0]), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'o'), + 'open': this.safeNumber (ticker, 'o'), 'close': last, 'last': last, 'previousClose': undefined, @@ -85854,11 +83772,11 @@ module.exports = class kraken extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 6), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 6), ]; } @@ -85925,24 +83843,24 @@ module.exports = class kraken extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'asset'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); } else { direction = 'in'; } - const time = this.safeFloat (item, 'time'); + const time = this.safeNumber (item, 'time'); let timestamp = undefined; if (time !== undefined) { timestamp = parseInt (time * 1000); } const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -86066,9 +83984,8 @@ module.exports = class kraken extends Exchange { let timestamp = undefined; let side = undefined; let type = undefined; - let price = undefined; - let amount = undefined; - let cost = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; let orderId = undefined; let fee = undefined; @@ -86077,8 +83994,8 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 2); side = (trade[3] === 's') ? 'sell' : 'buy'; type = (trade[4] === 'l') ? 'limit' : 'market'; - price = this.safeFloat (trade, 0); - amount = this.safeFloat (trade, 1); + priceString = this.safeString (trade, 0); + amountString = this.safeString (trade, 1); const tradeLength = trade.length; if (tradeLength > 6) { id = this.safeString (trade, 6); // artificially added as per #1794 @@ -86099,15 +84016,15 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 'time'); side = this.safeString (trade, 'type'); type = this.safeString (trade, 'ordertype'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'vol'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'vol'); if ('fee' in trade) { let currency = undefined; if (market !== undefined) { currency = market['quote']; } fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': currency, }; } @@ -86115,11 +84032,9 @@ module.exports = class kraken extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': orderId, @@ -86194,10 +84109,10 @@ module.exports = class kraken extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -86226,15 +84141,15 @@ module.exports = class kraken extends Exchange { if (type === 'limit') { request['price'] = this.priceToPrecision (symbol, price); } else if ((type === 'stop-loss') || (type === 'take-profit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice', price); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice', price); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument or a price/stopPrice parameter for a ' + type + ' order'); } else { request['price'] = this.priceToPrecision (symbol, stopPrice); } } else if ((type === 'stop-loss-limit') || (type === 'take-profit-limit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice'); - const limitPrice = this.safeFloat (params, 'price2'); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice'); + const limitPrice = this.safeNumber (params, 'price2'); const stopPriceDefined = (stopPrice !== undefined); const limitPriceDefined = (limitPrice !== undefined); if (stopPriceDefined && limitPriceDefined) { @@ -86343,10 +84258,10 @@ module.exports = class kraken extends Exchange { if (orderDescription !== undefined) { const parts = orderDescription.split (' '); side = this.safeString (parts, 0); - amount = this.safeFloat (parts, 1); + amount = this.safeNumber (parts, 1); marketId = this.safeString (parts, 2); type = this.safeString (parts, 4); - price = this.safeFloat (parts, 5); + price = this.safeNumber (parts, 5); } side = this.safeString (description, 'type', side); type = this.safeString (description, 'ordertype', type); @@ -86360,27 +84275,23 @@ module.exports = class kraken extends Exchange { market = this.getDelistedMarketById (marketId); } const timestamp = this.safeTimestamp (order, 'opentm'); - amount = this.safeFloat (order, 'vol', amount); - const filled = this.safeFloat (order, 'vol_exec'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = amount - filled; - } + amount = this.safeNumber (order, 'vol', amount); + const filled = this.safeNumber (order, 'vol_exec'); let fee = undefined; - const cost = this.safeFloat (order, 'cost'); - price = this.safeFloat (description, 'price', price); + const cost = this.safeNumber (order, 'cost'); + price = this.safeNumber (description, 'price', price); if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (description, 'price2'); + price = this.safeNumber (description, 'price2'); } if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (order, 'price', price); + price = this.safeNumber (order, 'price', price); } - const average = this.safeFloat (order, 'price'); + const average = this.safeNumber (order, 'price'); if (market !== undefined) { symbol = market['symbol']; if ('fee' in order) { const flags = order['oflags']; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); fee = { 'cost': feeCost, 'rate': undefined, @@ -86404,8 +84315,8 @@ module.exports = class kraken extends Exchange { if (rawTrades !== undefined) { trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id }); } - const stopPrice = this.safeFloat (order, 'stopprice'); - return { + const stopPrice = this.safeNumber (order, 'stopprice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -86424,10 +84335,10 @@ module.exports = class kraken extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -86777,10 +84688,10 @@ module.exports = class kraken extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const address = this.safeString (transaction, 'info'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.safeString (transaction, 'type'); // injected from the outside - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost === undefined) { if (type === 'deposit') { feeCost = 0; @@ -86957,7 +84868,7 @@ module.exports = class kraken extends Exchange { throw new ExchangeError (this.id + " withdraw() requires a 'key' parameter (withdrawal key name, as set up on your account)"); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { // 'txid': 'comma delimited list of transaction ids to restrict output to', @@ -87091,13 +85002,14 @@ module.exports = class kraken extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],103:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],100:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, InvalidNonce, NotSupported, BadRequest, AuthenticationError, BadSymbol, RateLimitExceeded, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -87139,6 +85051,7 @@ module.exports = class kucoin extends Exchange { 'fetchTrades': true, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, }, 'urls': { 'logo': 'https://user-images.githubusercontent.com/51840849/87295558-132aaf80-c50e-11ea-9801-a2fb0c57c799.jpg', @@ -87146,6 +85059,7 @@ module.exports = class kucoin extends Exchange { 'api': { 'public': 'https://openapi-v2.kucoin.com', 'private': 'https://openapi-v2.kucoin.com', + 'futuresPrivate': 'https://api-futures.kucoin.com', }, 'test': { 'public': 'https://openapi-sandbox.kucoin.com', @@ -87254,6 +85168,15 @@ module.exports = class kucoin extends Exchange { 'stop-order/cancel', ], }, + 'futuresPrivate': { + 'get': [ + 'account-overview', + 'positions', + ], + 'post': [ + 'transfer-out', + ], + }, }, 'timeframes': { '1m': '1min', @@ -87278,6 +85201,7 @@ module.exports = class kucoin extends Exchange { 'order_not_exist_or_not_allow_to_cancel': InvalidOrder, // {"code":"400100","msg":"order_not_exist_or_not_allow_to_cancel"} 'Order size below the minimum requirement.': InvalidOrder, // {"code":"400100","msg":"Order size below the minimum requirement."} 'The withdrawal amount is below the minimum requirement.': ExchangeError, // {"code":"400100","msg":"The withdrawal amount is below the minimum requirement."} + 'Unsuccessful! Exceeded the max. funds out-transfer limit': InsufficientFunds, // {"code":"200000","msg":"Unsuccessful! Exceeded the max. funds out-transfer limit"} '400': BadRequest, '401': AuthenticationError, '403': NotSupported, @@ -87334,9 +85258,7 @@ module.exports = class kucoin extends Exchange { 'version': 'v1', 'symbolSeparator': '-', 'fetchMyTradesMethod': 'private_get_fills', - 'fetchBalance': { - 'type': 'trade', // or 'main' - }, + 'fetchBalance': 'trade', // endpoint versions 'versions': { 'public': { @@ -87356,6 +85278,25 @@ module.exports = class kucoin extends Exchange { 'accounts/sub-transfer': 'v2', }, }, + 'futuresPrivate': { + 'GET': { + 'account-overview': 'v1', + 'positions': 'v1', + }, + 'POST': { + 'transfer-out': 'v2', + }, + }, + }, + 'accountsByType': { + 'trade': 'trade', + 'trading': 'trade', + 'margin': 'margin', + 'main': 'main', + 'futures': 'contract', + 'contract': 'contract', + 'pool': 'pool', + 'pool-x': 'pool', }, }, }); @@ -87436,11 +85377,11 @@ module.exports = class kucoin extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const active = this.safeValue (market, 'enableTrading'); - const baseMaxSize = this.safeFloat (market, 'baseMaxSize'); - const baseMinSize = this.safeFloat (market, 'baseMinSize'); - const quoteMaxSize = this.safeFloat (market, 'quoteMaxSize'); - const quoteMinSize = this.safeFloat (market, 'quoteMinSize'); - // const quoteIncrement = this.safeFloat (market, 'quoteIncrement'); + const baseMaxSize = this.safeNumber (market, 'baseMaxSize'); + const baseMinSize = this.safeNumber (market, 'baseMinSize'); + const quoteMaxSize = this.safeNumber (market, 'quoteMaxSize'); + const quoteMinSize = this.safeNumber (market, 'quoteMinSize'); + // const quoteIncrement = this.safeNumber (market, 'quoteIncrement'); const precision = { 'amount': this.precisionFromString (this.safeString (market, 'baseIncrement')), 'price': this.precisionFromString (this.safeString (market, 'priceIncrement')), @@ -87451,7 +85392,7 @@ module.exports = class kucoin extends Exchange { 'max': baseMaxSize, }, 'price': { - 'min': this.safeFloat (market, 'priceIncrement'), + 'min': this.safeNumber (market, 'priceIncrement'), 'max': quoteMaxSize / baseMinSize, }, 'cost': { @@ -87502,7 +85443,7 @@ module.exports = class kucoin extends Exchange { const precision = this.safeInteger (entry, 'precision'); const isWithdrawEnabled = this.safeValue (entry, 'isWithdrawEnabled', false); const isDepositEnabled = this.safeValue (entry, 'isDepositEnabled', false); - const fee = this.safeFloat (entry, 'withdrawalMinFee'); + const fee = this.safeNumber (entry, 'withdrawalMinFee'); const active = (isWithdrawEnabled && isDepositEnabled); result[code] = { 'id': id, @@ -87569,7 +85510,7 @@ module.exports = class kucoin extends Exchange { const response = await this.privateGetWithdrawalsQuotas (this.extend (request, params)); const data = response['data']; const withdrawFees = {}; - withdrawFees[code] = this.safeFloat (data, 'withdrawMinFee'); + withdrawFees[code] = this.safeNumber (data, 'withdrawMinFee'); return { 'info': response, 'withdraw': withdrawFees, @@ -87616,35 +85557,35 @@ module.exports = class kucoin extends Exchange { // "mark": 0 // } // - let percentage = this.safeFloat (ticker, 'changeRate'); + let percentage = this.safeNumber (ticker, 'changeRate'); if (percentage !== undefined) { percentage = percentage * 100; } - const last = this.safeFloat2 (ticker, 'last', 'lastTradedPrice'); + const last = this.safeNumber2 (ticker, 'last', 'lastTradedPrice'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'vol'); - const quoteVolume = this.safeFloat (ticker, 'volValue'); + const baseVolume = this.safeNumber (ticker, 'vol'); + const quoteVolume = this.safeNumber (ticker, 'volValue'); const vwap = this.vwap (baseVolume, quoteVolume); const timestamp = this.safeInteger2 (ticker, 'time', 'datetime'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'changePrice'), + 'change': this.safeNumber (ticker, 'changePrice'), 'percentage': percentage, - 'average': this.safeFloat (ticker, 'averagePrice'), + 'average': this.safeNumber (ticker, 'averagePrice'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -87728,11 +85669,11 @@ module.exports = class kucoin extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -87930,16 +85871,18 @@ module.exports = class kucoin extends Exchange { // 'marginMode': 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned // 'autoBorrow': false, // The system will first borrow you funds at the optimal interest rate and then place an order for you }; - if (type !== 'market') { - request['price'] = this.priceToPrecision (symbol, price); - request['size'] = this.amountToPrecision (symbol, amount); - } else { - if (this.safeValue (params, 'quoteAmount')) { - // used to create market order by quote amount - https://github.com/ccxt/ccxt/issues/4876 - request['funds'] = this.amountToPrecision (symbol, amount); + const quoteAmount = this.safeNumber2 (params, 'cost', 'funds'); + if (type === 'market') { + if (quoteAmount !== undefined) { + params = this.omit (params, [ 'cost', 'funds' ]); + // kucoin uses base precision even for quote values + request['funds'] = this.amountToPrecision (symbol, quoteAmount); } else { request['size'] = this.amountToPrecision (symbol, amount); } + } else { + request['price'] = this.priceToPrecision (symbol, price); + request['size'] = this.amountToPrecision (symbol, amount); } const response = await this.privatePostOrders (this.extend (request, params)); // @@ -87973,8 +85916,10 @@ module.exports = class kucoin extends Exchange { 'fee': undefined, 'trades': undefined, }; - if (!this.safeValue (params, 'quoteAmount')) { + if (quoteAmount === undefined) { order['amount'] = amount; + } else { + order['cost'] = quoteAmount; } return order; } @@ -88150,15 +86095,18 @@ module.exports = class kucoin extends Exchange { const type = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'createdAt'); const datetime = this.iso8601 (timestamp); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); + if (price === 0.0) { + // market orders + price = undefined; + } const side = this.safeString (order, 'side'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (order, 'fee'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'dealSize'); - const cost = this.safeFloat (order, 'dealFunds'); - const remaining = amount - filled; + const feeCost = this.safeNumber (order, 'fee'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'dealSize'); + const cost = this.safeNumber (order, 'dealFunds'); // bool const isActive = this.safeValue (order, 'isActive', false); const cancelExist = this.safeValue (order, 'cancelExist', false); @@ -88168,20 +86116,11 @@ module.exports = class kucoin extends Exchange { 'currency': feeCurrency, 'cost': feeCost, }; - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const clientOrderId = this.safeString (order, 'clientOid'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': orderId, 'clientOrderId': clientOrderId, 'symbol': symbol, @@ -88194,7 +86133,7 @@ module.exports = class kucoin extends Exchange { 'stopPrice': stopPrice, 'cost': cost, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'timestamp': timestamp, 'datetime': datetime, 'fee': fee, @@ -88203,7 +86142,7 @@ module.exports = class kucoin extends Exchange { 'lastTradeTimestamp': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -88404,7 +86343,6 @@ module.exports = class kucoin extends Exchange { const id = this.safeString2 (trade, 'tradeId', 'id'); const orderId = this.safeString (trade, 'orderId'); const takerOrMaker = this.safeString (trade, 'liquidity'); - const amount = this.safeFloat2 (trade, 'size', 'amount'); let timestamp = this.safeInteger (trade, 'time'); if (timestamp !== undefined) { timestamp = parseInt (timestamp / 1000000); @@ -88415,10 +86353,13 @@ module.exports = class kucoin extends Exchange { timestamp = timestamp * 1000; } } - const price = this.safeFloat2 (trade, 'price', 'dealPrice'); + const priceString = this.safeString2 (trade, 'price', 'dealPrice'); + const amountString = this.safeString2 (trade, 'size', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const side = this.safeString (trade, 'side'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); let feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -88430,20 +86371,16 @@ module.exports = class kucoin extends Exchange { fee = { 'cost': feeCost, 'currency': feeCurrency, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } let type = this.safeString (trade, 'type'); if (type === 'match') { type = undefined; } - let cost = this.safeFloat2 (trade, 'funds', 'dealValue'); + let cost = this.safeNumber2 (trade, 'funds', 'dealValue'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'info': trade, @@ -88539,7 +86476,7 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); let address = this.safeString (transaction, 'address'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let txid = this.safeString (transaction, 'walletTxId'); if (txid !== undefined) { const txidParts = txid.split ('@'); @@ -88557,7 +86494,7 @@ module.exports = class kucoin extends Exchange { const rawStatus = this.safeString (transaction, 'status'); const status = this.parseTransactionStatus (rawStatus); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { let rate = undefined; if (amount !== undefined) { @@ -88738,45 +86675,180 @@ module.exports = class kucoin extends Exchange { async fetchBalance (params = {}) { await this.loadMarkets (); - let type = undefined; - const request = {}; - if ('type' in params) { - type = params['type']; - if (type !== undefined) { - request['type'] = type; - } - params = this.omit (params, 'type'); + const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'trade'); + const requestedType = this.safeString (params, 'type', defaultType); + const accountsByType = this.safeValue (this.options, 'accountsByType'); + const type = this.safeString (accountsByType, requestedType); + if (type === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' type must be one of ' + keys.join (', ')); + } + params = this.omit (params, 'type'); + if (type === 'contract') { + // futures api requires a futures apiKey + // only fetches one balance at a time + // by default it will only fetch the BTC balance of the futures account + // you can send 'currency' in params to fetch other currencies + // fetchBalance ({ 'type': 'futures', 'currency': 'USDT' }) + const response = await this.futuresPrivateGetAccountOverview (params); + // + // { + // code: '200000', + // data: { + // accountEquity: 0.00005, + // unrealisedPNL: 0, + // marginBalance: 0.00005, + // positionMargin: 0, + // orderMargin: 0, + // frozenFunds: 0, + // availableBalance: 0.00005, + // currency: 'XBT' + // } + // } + // + const data = this.safeValue (response, 'data'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (data, 'availableBalance'); + account['total'] = this.safeString (data, 'accountEquity'); + const result = { 'info': response }; + result[code] = account; + return this.parseBalance (result, false); } else { - const options = this.safeValue (this.options, 'fetchBalance', {}); - type = this.safeString (options, 'type', 'trade'); - } - const response = await this.privateGetAccounts (this.extend (request, params)); - // - // { - // "code":"200000", - // "data":[ - // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, - // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, - // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - const result = { 'info': response }; - for (let i = 0; i < data.length; i++) { - const balance = data[i]; - const balanceType = this.safeString (balance, 'type'); - if (balanceType === type) { - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'holds'); - result[code] = account; + const request = { + 'type': type, + }; + const response = await this.privateGetAccounts (this.extend (request, params)); + // + // { + // "code":"200000", + // "data":[ + // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, + // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, + // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + const result = { 'info': response }; + for (let i = 0; i < data.length; i++) { + const balance = data[i]; + const balanceType = this.safeString (balance, 'type'); + if (balanceType === type) { + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'holds'); + result[code] = account; + } } + return this.parseBalance (result, false); + } + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const requestedAmount = this.currencyToPrecision (code, amount); + const accountsById = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsById, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsById, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + if (fromId === 'contract') { + if (toId !== 'main') { + throw new ExchangeError (this.id + ' only supports transferring from futures account to main account'); + } + const request = { + 'currency': currency['id'], + 'amount': requestedAmount, + }; + if (!('bizNo' in params)) { + // it doesn't like more than 24 characters + request['bizNo'] = this.uuid22 (); + } + const response = await this.futuresPrivatePostTransferOut (this.extend (request, params)); + // + // { + // code: '200000', + // data: { + // applyId: '605a87217dff1500063d485d', + // bizNo: 'bcd6e5e1291f4905af84dc', + // payAccountType: 'CONTRACT', + // payTag: 'DEFAULT', + // remark: '', + // recAccountType: 'MAIN', + // recTag: 'DEFAULT', + // recRemark: '', + // recSystem: 'KUCOIN', + // status: 'PROCESSING', + // currency: 'XBT', + // amount: '0.00001', + // fee: '0', + // sn: '573688685663948', + // reason: '', + // createdAt: 1616545569000, + // updatedAt: 1616545569000 + // } + // } + // + const data = this.safeValue (response, 'data'); + const timestamp = this.safeInteger (data, 'createdAt'); + const id = this.safeString (data, 'applyId'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const amount = this.safeNumber (data, 'amount'); + const rawStatus = this.safeString (data, 'status'); + let status = undefined; + if (rawStatus === 'PROCESSING') { + status = 'pending'; + } + return { + 'info': response, + 'currency': code, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'amount': amount, + 'fromAccount': fromId, + 'toAccount': toId, + 'id': id, + 'status': status, + }; + } else { + const request = { + 'currency': currency['id'], + 'from': fromId, + 'to': toId, + 'amount': requestedAmount, + }; + if (!('clientOid' in params)) { + request['clientOid'] = this.uuid (); + } + const response = await this.privatePostAccountsInnerTransfer (this.extend (request, params)); + // { code: '200000', data: { orderId: '605a6211e657f00006ad0ad6' } } + const data = this.safeValue (response, 'data'); + const id = this.safeString (data, 'orderId'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'currency': code, + 'amount': requestedAmount, + 'fromAccount': fromId, + 'toAccount': toId, + 'status': undefined, + }; } - return this.parseBalance (result); } async fetchLedger (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -88864,11 +86936,11 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'code': code, }; - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'balance'); const direction = this.safeString (item, 'direction'); let before = undefined; if (after !== undefined && amount !== undefined) { @@ -88918,6 +86990,94 @@ module.exports = class kucoin extends Exchange { return this.safeString (types, type, type); } + async fetchPositions (symbols = undefined, params = {}) { + const response = await this.futuresPrivateGetPositions (params); + // + // { + // code: '200000', + // data: [ + // { + // id: '605a9772a229ab0006408258', + // symbol: 'XBTUSDTM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746099, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54371.92, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'USDT', + // isInverse: false + // }, + // { + // id: '605a9772026ac900066550df', + // symbol: 'XBTUSDM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746110, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54354.76, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'XBT', + // isInverse: true + // } + // ] + // } + // + return this.safeValue (response, 'data', response); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { // // the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint @@ -88934,16 +87094,16 @@ module.exports = class kucoin extends Exchange { let endpart = ''; headers = (headers !== undefined) ? headers : {}; if (Object.keys (query).length) { - if (method !== 'GET') { + if ((method === 'GET') || (method === 'DELETE')) { + endpoint += '?' + this.urlencode (query); + } else { body = this.json (query); endpart = body; headers['Content-Type'] = 'application/json'; - } else { - endpoint += '?' + this.urlencode (query); } } const url = this.urls['api'][api] + endpoint; - if (api === 'private') { + if ((api === 'private') || (api === 'futuresPrivate')) { this.checkRequiredCredentials (); const timestamp = this.nonce ().toString (); headers = this.extend ({ @@ -88986,23 +87146,24 @@ module.exports = class kucoin extends Exchange { // { code: '200000', data: { ... }} // const errorCode = this.safeString (response, 'code'); - const message = this.safeString (response, 'msg'); - this.throwExactlyMatchedException (this.exceptions['exact'], message, message); - this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, message); + const message = this.safeString (response, 'msg', ''); + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, this.id + ' ' + message); } }; -},{"./base/Exchange":6,"./base/errors":8}],104:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],101:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- -const acx = require ('./acx.js'); -const { ArgumentsRequired } = require ('./base/errors'); +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, InsufficientFunds, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class kuna extends acx { +module.exports = class kuna extends Exchange { describe () { return this.deepExtend (super.describe (), { 'id': 'kuna', @@ -89012,14 +87173,24 @@ module.exports = class kuna extends acx { 'version': 'v2', 'has': { 'CORS': false, - 'fetchTickers': true, + 'cancelOrder': true, + 'createOrder': true, + 'fetchBalance': true, + 'fetchMarkets': true, + 'fetchMyTrades': true, 'fetchOHLCV': 'emulated', 'fetchOpenOrders': true, - 'fetchMyTrades': true, + 'fetchOrder': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchTime': true, + 'fetchTrades': true, 'withdraw': false, }, 'timeframes': undefined, 'urls': { + 'extension': '.json', 'referral': 'https://kuna.io?r=kunaid-gvfihe8az7o4', 'logo': 'https://user-images.githubusercontent.com/51840849/87153927-f0578b80-c2c0-11ea-84b6-74612568e9e1.jpg', 'api': 'https://kuna.io', @@ -89027,8 +87198,47 @@ module.exports = class kuna extends acx { 'doc': 'https://kuna.io/documents/api', 'fees': 'https://kuna.io/documents/api', }, + 'api': { + 'public': { + 'get': [ + 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. + 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator + 'k', // Get OHLC(k line) of specific market + 'markets', // Get all available markets + 'order_book', // Get the order book of specified market + 'order_book/{market}', + 'tickers', // Get ticker of all markets + 'tickers/{market}', // Get ticker of specific market + 'timestamp', // Get server current time, in seconds since Unix epoch + 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. + 'trades/{market}', + ], + }, + 'private': { + 'get': [ + 'members/me', // Get your profile and accounts info + 'deposits', // Get your deposits history + 'deposit', // Get details of specific deposit + 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. + 'orders', // Get your orders, results is paginated + 'order', // Get information of specified order + 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. + 'withdraws', // Get your cryptocurrency withdraws + 'withdraw', // Get your cryptocurrency withdraw + ], + 'post': [ + 'orders', // Create a Sell/Buy order + 'orders/multi', // Create multiple sell/buy orders + 'orders/clear', // Cancel all my orders + 'order/delete', // Cancel an order + 'withdraw', // Create a withdraw + ], + }, + }, 'fees': { 'trading': { + 'tierBased': false, + 'percentage': true, 'taker': 0.25 / 100, 'maker': 0.25 / 100, }, @@ -89051,9 +87261,24 @@ module.exports = class kuna extends acx { }, }, }, + 'commonCurrencies': { + 'PLA': 'Plair', + }, + 'exceptions': { + '2002': InsufficientFunds, + '2003': OrderNotFound, + }, }); } + async fetchTime (params = {}) { + const response = await this.publicGetTimestamp (params); + // + // 1594911427 + // + return response * 1000; + } + async fetchMarkets (params = {}) { const quotes = [ 'btc', 'eth', 'eurs', 'rub', 'uah', 'usd', 'usdt', 'gol' ]; const pricePrecisions = { @@ -89109,24 +87334,100 @@ module.exports = class kuna extends acx { return markets; } - async fetchL3OrderBook (symbol, limit = undefined, params = {}) { - return await this.fetchOrderBook (symbol, limit, params); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); - } + async fetchOrderBook (symbol, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); const request = { 'market': market['id'], }; - const response = await this.privateGetOrders (this.extend (request, params)); - // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder - // with order cache + fetchOpenOrders - // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX - return this.parseOrders (response, market, since, limit); + if (limit !== undefined) { + request['limit'] = limit; // default = 300 + } + const orderbook = await this.publicGetDepth (this.extend (request, params)); + const timestamp = this.safeTimestamp (orderbook, 'timestamp'); + return this.parseOrderBook (orderbook, timestamp); + } + + parseTicker (ticker, market = undefined) { + const timestamp = this.safeTimestamp (ticker, 'at'); + ticker = ticker['ticker']; + let symbol = undefined; + if (market) { + symbol = market['symbol']; + } + const last = this.safeNumber (ticker, 'last'); + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'bidVolume': undefined, + 'ask': this.safeNumber (ticker, 'sell'), + 'askVolume': undefined, + 'vwap': undefined, + 'open': this.safeNumber (ticker, 'open'), + 'close': last, + 'last': last, + 'previousClose': undefined, + 'change': undefined, + 'percentage': undefined, + 'average': undefined, + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const response = await this.publicGetTickers (params); + const ids = Object.keys (response); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + let market = undefined; + let symbol = id; + if (id in this.markets_by_id) { + market = this.markets_by_id[id]; + symbol = market['symbol']; + } else { + let base = id.slice (0, 3); + let quote = id.slice (3, 6); + base = base.toUpperCase (); + quote = quote.toUpperCase (); + base = this.safeCurrencyCode (base); + quote = this.safeCurrencyCode (quote); + symbol = base + '/' + quote; + } + result[symbol] = this.parseTicker (response[id], market); + } + return this.filterByArray (result, 'symbol', symbols); + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTickersMarket (this.extend (request, params)); + return this.parseTicker (response, market); + } + + async fetchL3OrderBook (symbol, limit = undefined, params = {}) { + return await this.fetchOrderBook (symbol, limit, params); + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTrades (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); } parseTrade (trade, market = undefined) { @@ -89143,9 +87444,14 @@ module.exports = class kuna extends acx { }; side = this.safeString (sideMap, side, side); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_id'); const id = this.safeString (trade, 'id'); return { @@ -89165,29 +87471,6 @@ module.exports = class kuna extends acx { }; } - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); - } - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.privateGetTradesMy (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const trades = await this.fetchTrades (symbol, since, limit, params); @@ -89206,15 +87489,210 @@ module.exports = class kuna extends acx { } return result; } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + const response = await this.privateGetMembersMe (params); + const balances = this.safeValue (response, 'accounts'); + const result = { 'info': balances }; + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'market': this.marketId (symbol), + 'side': side, + 'volume': amount.toString (), + 'ord_type': type, + }; + if (type === 'limit') { + request['price'] = price.toString (); + } + const response = await this.privatePostOrders (this.extend (request, params)); + const marketId = this.safeValue (response, 'market'); + const market = this.safeValue (this.markets_by_id, marketId); + return this.parseOrder (response, market); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': id, + }; + const response = await this.privatePostOrderDelete (this.extend (request, params)); + const order = this.parseOrder (response); + const status = order['status']; + if (status === 'closed' || status === 'canceled') { + throw new OrderNotFound (this.id + ' ' + this.json (order)); + } + return order; + } + + parseOrderStatus (status) { + const statuses = { + 'done': 'closed', + 'wait': 'open', + 'cancel': 'canceled', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + const marketId = this.safeString (order, 'market'); + const symbol = this.safeSymbol (marketId, market); + const timestamp = this.parse8601 (this.safeString (order, 'created_at')); + const status = this.parseOrderStatus (this.safeString (order, 'state')); + const type = this.safeString (order, 'type'); + const side = this.safeString (order, 'side'); + const id = this.safeString (order, 'id'); + return this.safeOrder ({ + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': undefined, + 'status': status, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': this.safeNumber (order, 'price'), + 'stopPrice': undefined, + 'amount': this.safeNumber (order, 'volume'), + 'filled': this.safeNumber (order, 'executed_volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'trades': undefined, + 'fee': undefined, + 'info': order, + 'cost': undefined, + 'average': undefined, + }); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': parseInt (id), + }; + const response = await this.privateGetOrder (this.extend (request, params)); + return this.parseOrder (response); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetOrders (this.extend (request, params)); + // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder + // with order cache + fetchOpenOrders + // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX + return this.parseOrders (response, market, since, limit); + } + + async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetTradesMy (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); + } + + nonce () { + return this.milliseconds (); + } + + encodeParams (params) { + if ('orders' in params) { + const orders = params['orders']; + let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); + for (let i = 0; i < orders.length; i++) { + const order = orders[i]; + const keys = Object.keys (order); + for (let k = 0; k < keys.length; k++) { + const key = keys[k]; + const value = order[key]; + query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); + } + } + return query; + } + return this.urlencode (this.keysort (params)); + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let request = '/api/' + this.version + '/' + this.implodeParams (path, params); + if ('extension' in this.urls) { + request += this.urls['extension']; + } + const query = this.omit (params, this.extractParams (path)); + let url = this.urls['api'] + request; + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const nonce = this.nonce ().toString (); + const query = this.encodeParams (this.extend ({ + 'access_key': this.apiKey, + 'tonce': nonce, + }, params)); + const auth = method + '|' + request + '|' + query; + const signed = this.hmac (this.encode (auth), this.encode (this.secret)); + const suffix = query + '&signature=' + signed; + if (method === 'GET') { + url += '?' + suffix; + } else { + body = suffix; + headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; + } + } + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; + } + if (code === 400) { + const error = this.safeValue (response, 'error'); + const errorCode = this.safeString (error, 'code'); + const feedback = this.id + ' ' + this.json (response); + this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); + // fallback to default error handler + } + } }; -},{"./acx.js":4,"./base/errors":8}],105:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],102:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, BadSymbol, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89323,10 +87801,10 @@ module.exports = class lakebtc extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -89344,16 +87822,16 @@ module.exports = class lakebtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -89363,7 +87841,7 @@ module.exports = class lakebtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -89394,14 +87872,11 @@ module.exports = class lakebtc extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -89538,14 +88013,14 @@ module.exports = class lakebtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],106:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],103:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, DDoSProtection, BadRequest, AuthenticationError } = require ('./base/errors'); -const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89626,6 +88101,7 @@ module.exports = class latoken extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.1 / 100, @@ -89710,7 +88186,7 @@ module.exports = class latoken extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minQty'), + 'min': this.safeNumber (market, 'minQty'), 'max': undefined, }, 'price': { @@ -89760,7 +88236,7 @@ module.exports = class latoken extends Exchange { const numericId = this.safeInteger (currency, 'currencyId'); const code = this.safeCurrencyCode (id); const precision = this.safeInteger (currency, 'precission'); - const fee = this.safeFloat (currency, 'fee'); + const fee = this.safeNumber (currency, 'fee'); const active = undefined; result[code] = { 'id': id, @@ -89794,27 +88270,6 @@ module.exports = class latoken extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const response = await this.privateGetAccountBalances (params); @@ -89838,17 +88293,15 @@ module.exports = class latoken extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const frozen = this.safeFloat (balance, 'frozen'); - const pending = this.safeFloat (balance, 'pending'); - const used = this.sum (frozen, pending); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': used, - 'total': this.safeFloat (balance, 'amount'), - }; + const frozen = this.safeString (balance, 'frozen'); + const pending = this.safeString (balance, 'pending'); + const account = this.account (); + account['used'] = Precise.stringAdd (frozen, pending); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -89893,20 +88346,20 @@ module.exports = class latoken extends Exchange { // const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; if (open !== undefined && close !== undefined) { change = close - open; } - const percentage = this.safeFloat (ticker, 'priceChange'); + const percentage = this.safeNumber (ticker, 'priceChange'); const timestamp = this.nonce (); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'low': this.safeFloat (ticker, 'low'), - 'high': this.safeFloat (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -89920,7 +88373,7 @@ module.exports = class latoken extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -90004,22 +88457,19 @@ module.exports = class latoken extends Exchange { timestamp *= 1000; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'orderId'); - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -90154,29 +88604,17 @@ module.exports = class latoken extends Exchange { const symbol = this.safeSymbol (marketId, market); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executedAmount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executedAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderStatus')); - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const timeFilled = this.safeTimestamp (order, 'timeFilled'); let lastTradeTimestamp = undefined; if ((timeFilled !== undefined) && (timeFilled > 0)) { lastTradeTimestamp = timeFilled; } const clientOrderId = this.safeString (order, 'cliOrdId'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -90191,14 +88629,14 @@ module.exports = class latoken extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'average': undefined, - 'remaining': remaining, + 'remaining': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -90428,13 +88866,14 @@ module.exports = class latoken extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],107:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],104:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, DDoSProtection, AuthenticationError, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -90632,8 +89071,8 @@ module.exports = class lbank extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const info = ticker; ticker = info['ticker']; - const last = this.safeFloat (ticker, 'latest'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'latest'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; if (percentage !== undefined) { const relativeChange = this.sum (1, percentage / 100); @@ -90654,8 +89093,8 @@ module.exports = class lbank extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -90668,8 +89107,8 @@ module.exports = class lbank extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'turnover'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'turnover'), 'info': info, }; } @@ -90719,17 +89158,15 @@ module.exports = class lbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (trade, 'date_ms'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'tid'); const type = undefined; - const side = this.safeString (trade, 'type'); + let side = this.safeString (trade, 'type'); + side = side.replace ('_market', ''); return { 'id': id, 'info': this.safeValue (trade, 'info', trade), @@ -90777,11 +89214,11 @@ module.exports = class lbank extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -90846,12 +89283,12 @@ module.exports = class lbank extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (freeze, currencyId); - account['total'] = this.safeFloat (asset, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (freeze, currencyId); + account['total'] = this.safeString (asset, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -90879,35 +89316,20 @@ module.exports = class lbank extends Exchange { // "status":2 // } // - let symbol = undefined; - const responseMarket = this.safeValue (this.marketsById, order['symbol']); - if (responseMarket !== undefined) { - symbol = responseMarket['symbol']; - } else if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeInteger (order, 'create_time'); // Limit Order Request Returns: Order Price // Market Order Returns: cny amount of market order - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount', 0.0); - const filled = this.safeFloat (order, 'deal_amount', 0.0); - const av_price = this.safeFloat (order, 'avg_price'); - let cost = undefined; - if (av_price !== undefined) { - cost = filled * av_price; - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount', 0.0); + const filled = this.safeNumber (order, 'deal_amount', 0.0); + const average = this.safeNumber (order, 'avg_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'order_id'); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -90921,15 +89343,15 @@ module.exports = class lbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': this.safeValue (order, 'info', order), - 'average': undefined, - }; + 'average': average, + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -91129,14 +89551,15 @@ module.exports = class lbank extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],108:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],105:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported } = require ('./base/errors'); +const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -91240,7 +89663,7 @@ module.exports = class liquid extends Exchange { 'trading': { 'tierBased': true, 'percentage': true, - 'taker': 0.0015, + 'taker': 0.0030, 'maker': 0.0000, 'tiers': { 'perpetual': { @@ -91259,48 +89682,52 @@ module.exports = class liquid extends Exchange { [ 300000000, -0.00025 ], ], 'taker': [ - [ 0, 0.000600 ], - [ 25000, 0.000575 ], - [ 50000, 0.000550 ], - [ 100000, 0.000525 ], - [ 1000000, 0.000500 ], - [ 10000000, 0.000475 ], - [ 25000000, 0.000450 ], - [ 50000000, 0.000425 ], - [ 75000000, 0.000400 ], - [ 100000000, 0.000375 ], - [ 200000000, 0.000350 ], - [ 300000000, 0.000325 ], + [ 0, 0.00120 ], + [ 25000, 0.00115 ], + [ 50000, 0.00110 ], + [ 100000, 0.00105 ], + [ 1000000, 0.00100 ], + [ 10000000, 0.00095 ], + [ 25000000, 0.00090 ], + [ 50000000, 0.00085 ], + [ 75000000, 0.00080 ], + [ 100000000, 0.00075 ], + [ 200000000, 0.00070 ], + [ 300000000, 0.00065 ], ], }, 'spot': { 'taker': [ - [ 0, 0.0015 ], - [ 10000, 0.0015 ], - [ 20000, 0.0014 ], - [ 50000, 0.0013 ], - [ 100000, 0.0010 ], - [ 1000000, 0.0008 ], - [ 5000000, 0.0006 ], - [ 10000000, 0.0005 ], - [ 25000000, 0.0005 ], - [ 50000000, 0.00045 ], - [ 100000000, 0.0004 ], - [ 200000000, 0.0003 ], + [ 0, 0.003 ], + [ 10000, 0.0029 ], + [ 20000, 0.0028 ], + [ 50000, 0.0026 ], + [ 100000, 0.0020 ], + [ 1000000, 0.0016 ], + [ 5000000, 0.0012 ], + [ 10000000, 0.0010 ], + [ 25000000, 0.0009 ], + [ 50000000, 0.0008 ], + [ 100000000, 0.0007 ], + [ 200000000, 0.0006 ], + [ 500000000, 0.0004 ], + [ 1000000000, 0.0003 ], ], 'maker': [ [ 0, 0.0000 ], - [ 10000, 0.0015 ], - [ 20000, 0.1400 ], - [ 50000, 0.1300 ], - [ 100000, 0.0800 ], - [ 1000000, 0.0004 ], - [ 5000000, 0.00035 ], - [ 10000000, 0.00025 ], + [ 10000, 0.0020 ], + [ 20000, 0.0019 ], + [ 50000, 0.0018 ], + [ 100000, 0.0016 ], + [ 1000000, 0.0008 ], + [ 5000000, 0.0007 ], + [ 10000000, 0.0005 ], [ 25000000, 0.0000 ], [ 50000000, 0.0000 ], [ 100000000, 0.0000 ], [ 200000000, 0.0000 ], + [ 500000000, 0.0000 ], + [ 1000000000, 0.0000 ], ], }, }, @@ -91319,6 +89746,7 @@ module.exports = class liquid extends Exchange { 'less_than_order_size': InvalidOrder, 'price_too_high': InvalidOrder, 'price_too_small': InvalidOrder, // {"errors":{"order":["price_too_small"]}} + 'product_disabled': BadSymbol, // {"errors":{"order":["product_disabled"]}} }, 'commonCurrencies': { 'WIN': 'WCOIN', @@ -91368,7 +89796,7 @@ module.exports = class liquid extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': decimalPrecision, 'limits': { 'amount': { @@ -91384,7 +89812,7 @@ module.exports = class liquid extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal'), + 'min': this.safeNumber (currency, 'minimum_withdrawal'), 'max': undefined, }, }, @@ -91509,19 +89937,19 @@ module.exports = class liquid extends Exchange { let maker = this.fees['trading']['maker']; let taker = this.fees['trading']['taker']; if (type === 'swap') { - maker = this.safeFloat (market, 'maker_fee', this.fees['trading']['maker']); - taker = this.safeFloat (market, 'taker_fee', this.fees['trading']['taker']); + maker = this.safeNumber (market, 'maker_fee', this.fees['trading']['maker']); + taker = this.safeNumber (market, 'taker_fee', this.fees['trading']['taker']); } const disabled = this.safeValue (market, 'disabled', false); const active = !disabled; const baseCurrency = this.safeValue (currenciesByCode, base); const precision = { 'amount': 0.00000001, - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; let minAmount = undefined; if (baseCurrency !== undefined) { - minAmount = this.safeFloat (baseCurrency['info'], 'minimum_order_quantity'); + minAmount = this.safeNumber (baseCurrency['info'], 'minimum_order_quantity'); } const limits = { 'amount': { @@ -91603,8 +90031,8 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } for (let i = 0; i < fiat.length; i++) { @@ -91612,11 +90040,11 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -91635,7 +90063,7 @@ module.exports = class liquid extends Exchange { if (ticker['last_traded_price']) { const length = ticker['last_traded_price'].length; if (length > 0) { - last = this.safeFloat (ticker, 'last_traded_price'); + last = this.safeNumber (ticker, 'last_traded_price'); } } } @@ -91660,7 +90088,7 @@ module.exports = class liquid extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'last_price_24h'); + const open = this.safeNumber (ticker, 'last_price_24h'); if (open !== undefined && last !== undefined) { change = last - open; average = this.sum (last, open) / 2; @@ -91672,11 +90100,11 @@ module.exports = class liquid extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_market_ask'), - 'low': this.safeFloat (ticker, 'low_market_bid'), - 'bid': this.safeFloat (ticker, 'market_bid'), + 'high': this.safeNumber (ticker, 'high_market_ask'), + 'low': this.safeNumber (ticker, 'low_market_bid'), + 'bid': this.safeNumber (ticker, 'market_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'market_ask'), + 'ask': this.safeNumber (ticker, 'market_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -91686,7 +90114,7 @@ module.exports = class liquid extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'volume_24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -91732,14 +90160,11 @@ module.exports = class liquid extends Exchange { if (mySide !== undefined) { takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; } - let cost = undefined; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -91942,9 +90367,9 @@ module.exports = class liquid extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeValue (this.markets_by_id, marketId); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'filled_quantity'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + let filled = this.safeNumber (order, 'filled_quantity'); + const price = this.safeNumber (order, 'price'); let symbol = undefined; let feeCurrency = undefined; if (market !== undefined) { @@ -91954,7 +90379,7 @@ module.exports = class liquid extends Exchange { const type = this.safeString (order, 'order_type'); let tradeCost = 0; let tradeFilled = 0; - let average = this.safeFloat (order, 'average_price'); + let average = this.safeNumber (order, 'average_price'); const trades = this.parseTrades (this.safeValue (order, 'executions', []), market, undefined, undefined, { 'order': orderId, 'type': type, @@ -92011,7 +90436,7 @@ module.exports = class liquid extends Exchange { 'trades': trades, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'order_fee'), + 'cost': this.safeNumber (order, 'order_fee'), }, 'info': order, }; @@ -92166,7 +90591,7 @@ module.exports = class liquid extends Exchange { const updated = this.safeTimestamp (transaction, 'updated_at'); const type = 'withdrawal'; const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); return { 'info': transaction, 'id': id, @@ -92267,13 +90692,14 @@ module.exports = class liquid extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],109:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],106:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -92349,6 +90775,10 @@ module.exports = class luno extends Exchange { 'quotes/{id}', 'withdrawals', 'withdrawals/{id}', + 'transfers', + // GET /api/exchange/2/listorders + // GET /api/exchange/2/orders/{id} + // GET /api/exchange/3/order ], 'post': [ 'accounts', @@ -92423,12 +90853,12 @@ module.exports = class luno extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), - 'max': this.safeFloat (market, 'max_volume'), + 'min': this.safeNumber (market, 'min_volume'), + 'max': this.safeNumber (market, 'max_volume'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -92479,20 +90909,22 @@ module.exports = class luno extends Exchange { const wallet = wallets[i]; const currencyId = this.safeString (wallet, 'asset'); const code = this.safeCurrencyCode (currencyId); - const reserved = this.safeFloat (wallet, 'reserved'); - const unconfirmed = this.safeFloat (wallet, 'unconfirmed'); - const balance = this.safeFloat (wallet, 'balance'); + const reserved = this.safeString (wallet, 'reserved'); + const unconfirmed = this.safeString (wallet, 'unconfirmed'); + const balance = this.safeString (wallet, 'balance'); + const reservedUnconfirmed = Precise.stringAdd (reserved, unconfirmed); + const balanceUnconfirmed = Precise.stringAdd (balance, unconfirmed); if (code in result) { - result[code]['used'] = this.sum (result[code]['used'], reserved, unconfirmed); - result[code]['total'] = this.sum (result[code]['total'], balance, unconfirmed); + result[code]['used'] = Precise.stringAdd (result[code]['used'], reservedUnconfirmed); + result[code]['total'] = Precise.stringAdd (result[code]['total'], balanceUnconfirmed); } else { const account = this.account (); - account['used'] = this.sum (reserved, unconfirmed); - account['total'] = this.sum (balance, unconfirmed); + account['used'] = reservedUnconfirmed; + account['total'] = balanceUnconfirmed; result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -92543,18 +90975,12 @@ module.exports = class luno extends Exchange { const side = (order['type'] === 'ASK') ? 'sell' : 'buy'; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'limit_volume'); - const quoteFee = this.safeFloat (order, 'fee_counter'); - const baseFee = this.safeFloat (order, 'fee_base'); - const filled = this.safeFloat (order, 'base'); - const cost = this.safeFloat (order, 'counter'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'limit_volume'); + const quoteFee = this.safeNumber (order, 'fee_counter'); + const baseFee = this.safeNumber (order, 'fee_base'); + const filled = this.safeNumber (order, 'base'); + const cost = this.safeNumber (order, 'counter'); const fee = { 'currency': undefined }; if (quoteFee) { fee['cost'] = quoteFee; @@ -92568,7 +90994,7 @@ module.exports = class luno extends Exchange { } } const id = this.safeString (order, 'order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -92585,12 +91011,12 @@ module.exports = class luno extends Exchange { 'amount': amount, 'filled': filled, 'cost': cost, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -92636,16 +91062,16 @@ module.exports = class luno extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -92655,7 +91081,7 @@ module.exports = class luno extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'rolling_24_hour_volume'), + 'baseVolume': this.safeNumber (ticker, 'rolling_24_hour_volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -92706,8 +91132,8 @@ module.exports = class luno extends Exchange { } else { side = trade['is_buy'] ? 'buy' : 'sell'; } - const feeBase = this.safeFloat (trade, 'fee_base'); - const feeCounter = this.safeFloat (trade, 'fee_counter'); + const feeBase = this.safeNumber (trade, 'fee_base'); + const feeCounter = this.safeNumber (trade, 'fee_counter'); let feeCurrency = undefined; let feeCost = undefined; if (feeBase !== undefined) { @@ -92732,10 +91158,10 @@ module.exports = class luno extends Exchange { 'type': undefined, 'side': side, 'takerOrMaker': takerOrMaker, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), // Does not include potential fee costs - 'cost': this.safeFloat (trade, 'counter'), + 'cost': this.safeNumber (trade, 'counter'), 'fee': { 'cost': feeCost, 'currency': feeCurrency, @@ -92782,8 +91208,8 @@ module.exports = class luno extends Exchange { const response = await this.privateGetFeeInfo (params); return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } @@ -92917,9 +91343,9 @@ module.exports = class luno extends Exchange { const timestamp = this.safeValue (entry, 'timestamp'); const currencyId = this.safeString (entry, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - const available_delta = this.safeFloat (entry, 'available_delta'); - const balance_delta = this.safeFloat (entry, 'balance_delta'); - const after = this.safeFloat (entry, 'balance'); + const available_delta = this.safeNumber (entry, 'available_delta'); + const balance_delta = this.safeNumber (entry, 'balance_delta'); + const after = this.safeNumber (entry, 'balance'); const comment = this.safeString (entry, 'description'); let before = after; let amount = 0.0; @@ -92988,12 +91414,13 @@ module.exports = class luno extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],110:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],107:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -93175,18 +91602,16 @@ module.exports = class lykke extends Exchange { const id = this.safeString2 (trade, 'id', 'Id'); const orderId = this.safeString (trade, 'OrderId'); const timestamp = this.parse8601 (this.safeString2 (trade, 'dateTime', 'DateTime')); - const price = this.safeFloat2 (trade, 'price', 'Price'); - let amount = this.safeFloat2 (trade, 'volume', 'Amount'); + const priceString = this.safeString2 (trade, 'price', 'Price'); + let amountString = this.safeString2 (trade, 'volume', 'Amount'); let side = this.safeStringLower (trade, 'action'); if (side === undefined) { - if (amount < 0) { - side = 'sell'; - } else { - side = 'buy'; - } + side = (amountString[0] === '-') ? 'sell' : 'buy'; } - amount = Math.abs (amount); - const cost = price * amount; + amountString = (amountString[0] === '-') ? amountString.slice (1) : amountString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = { 'cost': 0, // There are no fees for trading. https://www.lykke.com/wallet-fees-and-limits/ 'currency': market['quote'], @@ -93247,11 +91672,11 @@ module.exports = class lykke extends Exchange { const currencyId = this.safeString (balance, 'AssetId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Balance'); - account['used'] = this.safeFloat (balance, 'Reserved'); + account['total'] = this.safeString (balance, 'Balance'); + account['used'] = this.safeString (balance, 'Reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -93298,7 +91723,7 @@ module.exports = class lykke extends Exchange { // } // const id = this.safeString (result, 'Id'); - price = this.safeFloat (result, 'Price'); + price = this.safeNumber (result, 'Price'); return { 'id': id, 'info': result, @@ -93389,16 +91814,16 @@ module.exports = class lykke extends Exchange { if (market) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'lastPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -93409,7 +91834,7 @@ module.exports = class lykke extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume24H'), + 'quoteVolume': this.safeNumber (ticker, 'volume24H'), 'info': ticker, }; } @@ -93467,20 +91892,18 @@ module.exports = class lykke extends Exchange { } else if (('CreatedAt' in order) && (order['CreatedAt'])) { timestamp = this.parse8601 (order['CreatedAt']); } - const price = this.safeFloat (order, 'Price'); + const price = this.safeNumber (order, 'Price'); let side = undefined; - let amount = this.safeFloat (order, 'Volume'); + let amount = this.safeNumber (order, 'Volume'); if (amount < 0) { side = 'sell'; amount = Math.abs (amount); } else { side = 'buy'; } - const remaining = Math.abs (this.safeFloat (order, 'RemainingVolume')); - const filled = amount - remaining; - const cost = filled * price; + const remaining = Math.abs (this.safeNumber (order, 'RemainingVolume')); const id = this.safeString (order, 'Id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -93494,15 +91917,15 @@ module.exports = class lykke extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -93563,8 +91986,8 @@ module.exports = class lykke extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - let amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + let amount = this.safeNumber (bidask, amountKey); if (amount < 0) { amount = -amount; } @@ -93604,13 +92027,14 @@ module.exports = class lykke extends Exchange { } }; -},{"./base/Exchange":6}],111:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],108:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -93767,7 +92191,7 @@ module.exports = class mercado extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, baseId), + 'min': this.safeNumber (amountLimits, baseId), 'max': undefined, }, 'price': { @@ -93803,16 +92227,16 @@ module.exports = class mercado extends Exchange { const response = await this.publicGetCoinTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'ticker', {}); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -93822,7 +92246,7 @@ module.exports = class mercado extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -93837,15 +92261,12 @@ module.exports = class mercado extends Exchange { const id = this.safeString2 (trade, 'tid', 'operation_id'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee_rate'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee_rate'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -93902,12 +92323,12 @@ module.exports = class mercado extends Exchange { if (currencyId in balances) { const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -94014,32 +92435,31 @@ module.exports = class mercado extends Exchange { // } // const id = this.safeString (order, 'order_id'); + const order_type = this.safeString (order, 'order_type'); let side = undefined; if ('order_type' in order) { - side = (order['order_type'] === 1) ? 'buy' : 'sell'; + side = (order_type === '1') ? 'buy' : 'sell'; } const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'coin_pair'); market = this.safeMarket (marketId, market); const timestamp = this.safeTimestamp (order, 'created_timestamp'); const fee = { - 'cost': this.safeFloat (order, 'fee'), + 'cost': this.safeNumber (order, 'fee'), 'currency': market['quote'], }; - const price = this.safeFloat (order, 'limit_price'); - // price = this.safeFloat (order, 'executed_price_avg', price); - const average = this.safeFloat (order, 'executed_price_avg'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'executed_quantity'); - const remaining = amount - filled; - const cost = filled * average; + const price = this.safeNumber (order, 'limit_price'); + // price = this.safeNumber (order, 'executed_price_avg', price); + const average = this.safeNumber (order, 'executed_price_avg'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const lastTradeTimestamp = this.safeTimestamp (order, 'updated_timestamp'); const rawTrades = this.safeValue (order, 'operations', []); const trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'side': side, 'order': id, }); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -94053,15 +92473,15 @@ module.exports = class mercado extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -94119,11 +92539,11 @@ module.exports = class mercado extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -94244,13 +92664,14 @@ module.exports = class mercado extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],112:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],109:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -94319,11 +92740,11 @@ module.exports = class mixcoins extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.safeFloat (balance, 'lock'); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = this.safeString (balance, 'lock'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -94343,16 +92764,16 @@ module.exports = class mixcoins extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'result'); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -94362,7 +92783,7 @@ module.exports = class mixcoins extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -94375,14 +92796,11 @@ module.exports = class mixcoins extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -94475,7 +92893,7 @@ module.exports = class mixcoins extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],113:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],110:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -94483,6 +92901,7 @@ module.exports = class mixcoins extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -94722,7 +93141,7 @@ module.exports = class ndax extends Exchange { const name = this.safeString (currency, 'ProductFullName'); const type = this.safeString (currency, 'ProductType'); const code = this.safeCurrencyCode (this.safeString (currency, 'Product')); - const precision = this.safeFloat (currency, 'TickSize'); + const precision = this.safeNumber (currency, 'TickSize'); const isDisabled = this.safeValue (currency, 'IsDisabled'); const active = !isDisabled; result[code] = { @@ -94803,8 +93222,8 @@ module.exports = class ndax extends Exchange { const quote = this.safeCurrencyCode (this.safeString (market, 'Product2Symbol')); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'QuantityIncrement'), - 'price': this.safeFloat (market, 'PriceIncrement'), + 'amount': this.safeNumber (market, 'QuantityIncrement'), + 'price': this.safeNumber (market, 'PriceIncrement'), }; const sessionStatus = this.safeString (market, 'SessionStatus'); const isDisable = this.safeValue (market, 'IsDisable'); @@ -94822,11 +93241,11 @@ module.exports = class ndax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinimumQuantity'), + 'min': this.safeNumber (market, 'MinimumQuantity'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'MinimumPrice'), + 'min': this.safeNumber (market, 'MinimumPrice'), 'max': undefined, }, 'cost': { @@ -94947,27 +93366,27 @@ module.exports = class ndax extends Exchange { const timestamp = this.safeInteger (ticker, 'TimeStamp'); const marketId = this.safeString (ticker, 'InstrumentId'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'LastTradedPx'); - const percentage = this.safeFloat (ticker, 'Rolling24HrPxChangePercent'); - const change = this.safeFloat (ticker, 'Rolling24HrPxChange'); - const open = this.safeFloat (ticker, 'SessionOpen'); + const last = this.safeNumber (ticker, 'LastTradedPx'); + const percentage = this.safeNumber (ticker, 'Rolling24HrPxChangePercent'); + const change = this.safeNumber (ticker, 'Rolling24HrPxChange'); + const open = this.safeNumber (ticker, 'SessionOpen'); let average = undefined; if ((last !== undefined) && (change !== undefined)) { average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'Rolling24HrVolume'); - const quoteVolume = this.safeFloat (ticker, 'Rolling24HrNotional'); + const baseVolume = this.safeNumber (ticker, 'Rolling24HrVolume'); + const quoteVolume = this.safeNumber (ticker, 'Rolling24HrNotional'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'SessionHigh'), - 'low': this.safeFloat (ticker, 'SessionLow'), - 'bid': this.safeFloat (ticker, 'BestBid'), - 'bidVolume': undefined, // this.safeFloat (ticker, 'BidQty'), always shows 0 - 'ask': this.safeFloat (ticker, 'BestOffer'), - 'askVolume': undefined, // this.safeFloat (ticker, 'AskQty'), always shows 0 + 'high': this.safeNumber (ticker, 'SessionHigh'), + 'low': this.safeNumber (ticker, 'SessionLow'), + 'bid': this.safeNumber (ticker, 'BestBid'), + 'bidVolume': undefined, // this.safeNumber (ticker, 'BidQty'), always shows 0 + 'ask': this.safeNumber (ticker, 'BestOffer'), + 'askVolume': undefined, // this.safeNumber (ticker, 'AskQty'), always shows 0 'vwap': vwap, 'open': open, 'close': last, @@ -95040,11 +93459,11 @@ module.exports = class ndax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -95192,8 +93611,8 @@ module.exports = class ndax extends Exchange { // "OMSId":1 // } // - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let cost = undefined; let timestamp = undefined; let id = undefined; @@ -95204,11 +93623,8 @@ module.exports = class ndax extends Exchange { let fee = undefined; let type = undefined; if (Array.isArray (trade)) { - price = this.safeFloat (trade, 3); - amount = this.safeFloat (trade, 2); - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + priceString = this.safeString (trade, 3); + amountString = this.safeString (trade, 2); timestamp = this.safeInteger (trade, 6); id = this.safeString (trade, 0); marketId = this.safeInteger (trade, 1); @@ -95220,13 +93636,13 @@ module.exports = class ndax extends Exchange { id = this.safeString (trade, 'TradeId'); orderId = this.safeString2 (trade, 'OrderId', 'OrigOrderId'); marketId = this.safeString2 (trade, 'InstrumentId', 'Instrument'); - price = this.safeFloat (trade, 'Price'); - amount = this.safeFloat (trade, 'Quantity'); - cost = this.safeFloat2 (trade, 'Value', 'GrossValueExecuted'); + priceString = this.safeString (trade, 'Price'); + amountString = this.safeString (trade, 'Quantity'); + cost = this.safeNumber2 (trade, 'Value', 'GrossValueExecuted'); takerOrMaker = this.safeStringLower (trade, 'MakerTaker'); side = this.safeStringLower (trade, 'Side'); type = this.safeStringLower (trade, 'OrderType'); - const feeCost = this.safeFloat (trade, 'Fee'); + const feeCost = this.safeNumber (trade, 'Fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'FeeProductId'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -95236,6 +93652,11 @@ module.exports = class ndax extends Exchange { }; } } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const symbol = this.safeSymbol (marketId, market); return { 'info': trade, @@ -95350,11 +93771,11 @@ module.exports = class ndax extends Exchange { const currencyId = this.safeString (balance, 'ProductId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Amount'); - account['used'] = this.safeFloat (balance, 'Hold'); + account['total'] = this.safeString (balance, 'Amount'); + account['used'] = this.safeString (balance, 'Hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseLedgerEntryType (type) { @@ -95400,8 +93821,8 @@ module.exports = class ndax extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'ReferenceType')); const currencyId = this.safeString (item, 'ProductId'); const code = this.safeCurrencyCode (currencyId, currency); - const credit = this.safeFloat (item, 'CR'); - const debit = this.safeFloat (item, 'DR'); + const credit = this.safeNumber (item, 'CR'); + const debit = this.safeNumber (item, 'DR'); let amount = undefined; let direction = undefined; if (credit > 0) { @@ -95413,7 +93834,7 @@ module.exports = class ndax extends Exchange { } const timestamp = this.safeInteger (item, 'TimeStamp'); let before = undefined; - const after = this.safeFloat (item, 'Balance'); + const after = this.safeNumber (item, 'Balance'); if (direction === 'out') { before = this.sum (after, amount); } else if (direction === 'in') { @@ -95561,36 +93982,26 @@ module.exports = class ndax extends Exchange { // const id = this.safeString2 (order, 'ReplacementOrderId', 'OrderId'); const timestamp = this.safeInteger (order, 'ReceiveTime'); - let lastTradeTimestamp = undefined; + const lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); const marketId = this.safeString (order, 'Instrument'); const symbol = this.safeSymbol (marketId, market); const side = this.safeStringLower (order, 'Side'); const type = this.safeStringLower (order, 'OrderType'); const clientOrderId = this.safeString2 (order, 'ReplacementClOrdId', 'ClientOrderId'); - let price = this.safeFloat (order, 'Price', 0.0); + let price = this.safeNumber (order, 'Price', 0.0); price = (price > 0.0) ? price : undefined; - const amount = this.safeFloat (order, 'OrigQuantity'); - const filled = this.safeFloat (order, 'QuantityExecuted'); - const cost = this.safeFloat (order, 'GrossValueExecuted'); - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (filled > 0) { - lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); - average = this.safeFloat (order, 'AvgPrice', 0.0); - average = (average > 0) ? average : undefined; - } - } - let stopPrice = this.safeFloat (order, 'StopPrice', 0.0); + const amount = this.safeNumber (order, 'OrigQuantity'); + const filled = this.safeNumber (order, 'QuantityExecuted'); + const cost = this.safeNumber (order, 'GrossValueExecuted'); + let average = this.safeNumber (order, 'AvgPrice', 0.0); + average = (average > 0) ? average : undefined; + let stopPrice = this.safeNumber (order, 'StopPrice', 0.0); stopPrice = (stopPrice > 0.0) ? stopPrice : undefined; const timeInForce = undefined; const status = this.parseOrderStatus (this.safeString (order, 'OrderState')); const fee = undefined; const trades = undefined; - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -95609,10 +94020,10 @@ module.exports = class ndax extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -96410,8 +94821,8 @@ module.exports = class ndax extends Exchange { } const addressTo = address; const status = this.parseTransactionStatusByType (this.safeString (transaction, 'TicketStatus'), type); - const amount = this.safeFloat (transaction, 'Amount'); - const feeCost = this.safeFloat (transaction, 'FeeAmount'); + const amount = this.safeNumber (transaction, 'Amount'); + const feeCost = this.safeNumber (transaction, 'FeeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -96492,7 +94903,7 @@ module.exports = class ndax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],114:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],111:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -96500,6 +94911,7 @@ module.exports = class ndax extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, BadRequest, CancelPending, OrderNotFound, InsufficientFunds, RateLimitExceeded, InvalidOrder, AccountSuspended, BadSymbol, OnMaintenance } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -96692,7 +95104,7 @@ module.exports = class novadax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -96700,7 +95112,7 @@ module.exports = class novadax extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderValue'), + 'min': this.safeNumber (market, 'minOrderValue'), 'max': undefined, }, }; @@ -96742,8 +95154,8 @@ module.exports = class novadax extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const open = this.safeFloat (ticker, 'open24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'open24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let percentage = undefined; let change = undefined; let average = undefined; @@ -96752,18 +95164,18 @@ module.exports = class novadax extends Exchange { percentage = change / open * 100; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'baseVolume24h'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume24h'); + const baseVolume = this.safeNumber (ticker, 'baseVolume24h'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -96919,11 +95331,13 @@ module.exports = class novadax extends Exchange { const orderId = this.safeString (trade, 'orderId'); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeStringLower (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - cost = amount * price; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'volume'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); @@ -96935,7 +95349,7 @@ module.exports = class novadax extends Exchange { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { - 'cost': this.safeFloat (parts, 0), + 'cost': this.safeNumber (parts, 0), 'currency': feeCurrencyCode, }; } @@ -97043,11 +95457,11 @@ module.exports = class novadax extends Exchange { const volumeField = this.safeString (options, 'volume', 'amount'); // or vol return [ this.safeTimestamp (ohlcv, 'score'), - this.safeFloat (ohlcv, 'openPrice'), - this.safeFloat (ohlcv, 'highPrice'), - this.safeFloat (ohlcv, 'lowPrice'), - this.safeFloat (ohlcv, 'closePrice'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'openPrice'), + this.safeNumber (ohlcv, 'highPrice'), + this.safeNumber (ohlcv, 'lowPrice'), + this.safeNumber (ohlcv, 'closePrice'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -97075,12 +95489,12 @@ module.exports = class novadax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'available'); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); + account['total'] = this.safeString (balance, 'available'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -97103,7 +95517,7 @@ module.exports = class novadax extends Exchange { if (uppercaseSide === 'SELL') { request['amount'] = this.amountToPrecision (symbol, amount); } else if (uppercaseSide === 'BUY') { - let value = this.safeFloat (params, 'value'); + let value = this.safeNumber (params, 'value'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -97333,21 +95747,17 @@ module.exports = class novadax extends Exchange { // } // const id = this.safeString (order, 'id'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'filledValue'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'filledValue'); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeInteger (order, 'timestamp'); - const average = this.safeFloat (order, 'averagePrice'); - const filled = this.safeFloat (order, 'filledAmount'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } + const average = this.safeNumber (order, 'averagePrice'); + const filled = this.safeNumber (order, 'filledAmount'); let fee = undefined; - const feeCost = this.safeFloat (order, 'filledFee'); + const feeCost = this.safeNumber (order, 'filledFee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -97356,7 +95766,7 @@ module.exports = class novadax extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -97374,11 +95784,11 @@ module.exports = class novadax extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async withdraw (code, amount, address, tag = undefined, params = {}) { @@ -97541,7 +95951,7 @@ module.exports = class novadax extends Exchange { } else if (type === 'COIN_OUT') { type = 'withdraw'; } - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'addressTag'); const txid = this.safeString (transaction, 'txHash'); @@ -97683,7 +96093,7 @@ module.exports = class novadax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],115:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],112:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -97833,10 +96243,10 @@ module.exports = class oceanex extends Exchange { 'active': true, 'info': market, 'precision': { - 'amount': this.safeValue (market, 'amount_precision'), - 'price': this.safeValue (market, 'price_precision'), - 'base': this.safeValue (market, 'ask_precision'), - 'quote': this.safeValue (market, 'bid_precision'), + 'amount': this.safeInteger (market, 'amount_precision'), + 'price': this.safeInteger (market, 'price_precision'), + 'base': this.safeInteger (market, 'ask_precision'), + 'quote': this.safeInteger (market, 'bid_precision'), }, 'limits': { 'amount': { @@ -97848,7 +96258,7 @@ module.exports = class oceanex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeValue (market, 'minimum_trading_amount'), + 'min': this.safeNumber (market, 'minimum_trading_amount'), 'max': undefined, }, }, @@ -97942,21 +96352,21 @@ module.exports = class oceanex extends Exchange { 'symbol': market['symbol'], 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (ticker, 'last'), - 'last': this.safeFloat (ticker, 'last'), + 'close': this.safeNumber (ticker, 'last'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -98081,8 +96491,8 @@ module.exports = class oceanex extends Exchange { 'type': 'limit', 'takerOrMaker': undefined, 'side': side, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), 'cost': undefined, 'fee': undefined, }; @@ -98109,8 +96519,8 @@ module.exports = class oceanex extends Exchange { result[symbol] = { 'info': group, 'symbol': symbol, - 'maker': this.safeFloat (maker, 'value'), - 'taker': this.safeFloat (taker, 'value'), + 'maker': this.safeNumber (maker, 'value'), + 'taker': this.safeNumber (taker, 'value'), }; } return result; @@ -98132,11 +96542,11 @@ module.exports = class oceanex extends Exchange { const currencyId = this.safeValue (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -98244,12 +96654,12 @@ module.exports = class oceanex extends Exchange { // const status = this.parseOrderStatus (this.safeValue (order, 'state')); const marketId = this.safeString2 (order, 'market', 'market_id'); - const symbol = this.safeSymbol (marketId); + const symbol = this.safeSymbol (marketId, market); let timestamp = this.safeTimestamp (order, 'created_on'); if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'created_at')); } - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, @@ -98261,17 +96671,17 @@ module.exports = class oceanex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeValue (order, 'side'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_price'), - 'amount': this.safeFloat (order, 'volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'filled': this.safeFloat (order, 'executed_volume'), + 'average': this.safeNumber (order, 'avg_price'), + 'amount': this.safeNumber (order, 'volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'filled': this.safeNumber (order, 'executed_volume'), 'status': status, 'cost': undefined, 'trades': undefined, 'fee': undefined, - }; + }); } parseOrderStatus (status) { @@ -98364,12 +96774,12 @@ module.exports = class oceanex extends Exchange { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['codes'], errorCode, feedback); this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - throw new ExchangeError (response); + throw new ExchangeError (feedback); } } }; -},{"./base/Exchange":6,"./base/errors":8}],116:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],113:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -98406,7 +96816,7 @@ module.exports = class okcoin extends okex { } }; -},{"./okex.js":117}],117:[function(require,module,exports){ +},{"./okex.js":114}],114:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -98414,6 +96824,7 @@ module.exports = class okcoin extends okex { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -99207,7 +97618,7 @@ module.exports = class okex extends Exchange { let option = false; let baseId = this.safeString (market, 'base_currency'); let quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { if ('option_type' in market) { marketType = 'option'; @@ -99233,12 +97644,12 @@ module.exports = class okex extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = spot ? (base + '/' + quote) : id; - const lotSize = this.safeFloat2 (market, 'lot_size', 'trade_increment'); + const lotSize = this.safeNumber2 (market, 'lot_size', 'trade_increment'); const precision = { - 'amount': this.safeFloat (market, 'size_increment', lotSize), - 'price': this.safeFloat (market, 'tick_size'), + 'amount': this.safeNumber (market, 'size_increment', lotSize), + 'price': this.safeNumber (market, 'tick_size'), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const active = true; const fees = this.safeValue2 (this.fees, marketType, 'trading', {}); return this.extend (fees, { @@ -99413,7 +97824,7 @@ module.exports = class okex extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal'), + 'min': this.safeNumber (currency, 'min_withdrawal'), 'max': undefined, }, }, @@ -99488,18 +97899,18 @@ module.exports = class okex extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open_24h'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open_24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_24h'), - 'low': this.safeFloat (ticker, 'low_24h'), - 'bid': this.safeFloat (ticker, 'best_bid'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (ticker, 'best_ask'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber (ticker, 'high_24h'), + 'low': this.safeNumber (ticker, 'low_24h'), + 'bid': this.safeNumber (ticker, 'best_bid'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (ticker, 'best_ask'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': undefined, 'open': open, 'close': last, @@ -99508,8 +97919,8 @@ module.exports = class okex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'base_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'quote_volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'base_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'quote_volume_24h'), 'info': ticker, }; } @@ -99646,9 +98057,12 @@ module.exports = class okex extends Exchange { quote = market['quote']; } const timestamp = this.parse8601 (this.safeString2 (trade, 'timestamp', 'created_at')); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'size', 'qty'); - amount = this.safeFloat (trade, 'order_qty', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'size', 'qty'); + amountString = this.safeString (trade, 'order_qty', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -99656,13 +98070,7 @@ module.exports = class okex extends Exchange { takerOrMaker = 'taker'; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -99771,22 +98179,22 @@ module.exports = class okex extends Exchange { } return [ timestamp, // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets ]; } else { return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, 'volume'), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, 'volume'), // Base Volume ]; } } @@ -99932,9 +98340,9 @@ module.exports = class okex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeNumber (balance, 'balance'); + account['used'] = this.safeNumber (balance, 'hold'); + account['free'] = this.safeNumber (balance, 'available'); result[code] = account; } return this.parseBalance (result); @@ -100004,9 +98412,9 @@ module.exports = class okex extends Exchange { const currencyId = parts[1]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (marketBalance, 'balance'); - account['used'] = this.safeFloat (marketBalance, 'hold'); - account['free'] = this.safeFloat (marketBalance, 'available'); + account['total'] = this.safeNumber (marketBalance, 'balance'); + account['used'] = this.safeNumber (marketBalance, 'hold'); + account['free'] = this.safeNumber (marketBalance, 'available'); accounts[code] = account; } else { throw new NotSupported (this.id + ' margin balance response format has changed!'); @@ -100059,29 +98467,29 @@ module.exports = class okex extends Exchange { const code = this.safeCurrencyCode (id); const balance = this.safeValue (info, id, {}); const account = this.account (); - const totalAvailBalance = this.safeFloat (balance, 'total_avail_balance'); + const totalAvailBalance = this.safeNumber (balance, 'total_avail_balance'); if (this.safeString (balance, 'margin_mode') === 'fixed') { const contracts = this.safeValue (balance, 'contracts', []); let free = totalAvailBalance; for (let i = 0; i < contracts.length; i++) { const contract = contracts[i]; - const fixedBalance = this.safeFloat (contract, 'fixed_balance'); - const realizedPnl = this.safeFloat (contract, 'realized_pnl'); - const marginFrozen = this.safeFloat (contract, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (contract, 'margin_for_unfilled'); + const fixedBalance = this.safeNumber (contract, 'fixed_balance'); + const realizedPnl = this.safeNumber (contract, 'realized_pnl'); + const marginFrozen = this.safeNumber (contract, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (contract, 'margin_for_unfilled'); const margin = this.sum (fixedBalance, realizedPnl) - marginFrozen - marginForUnfilled; free = this.sum (free, margin); } account['free'] = free; } else { - const realizedPnl = this.safeFloat (balance, 'realized_pnl'); - const unrealizedPnl = this.safeFloat (balance, 'unrealized_pnl'); - const marginFrozen = this.safeFloat (balance, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (balance, 'margin_for_unfilled'); + const realizedPnl = this.safeNumber (balance, 'realized_pnl'); + const unrealizedPnl = this.safeNumber (balance, 'unrealized_pnl'); + const marginFrozen = this.safeNumber (balance, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (balance, 'margin_for_unfilled'); account['free'] = this.sum (totalAvailBalance, realizedPnl, unrealizedPnl) - marginFrozen - marginForUnfilled; } // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); + account['total'] = this.safeNumber (balance, 'equity'); result[code] = account; } return this.parseBalance (result); @@ -100119,8 +98527,8 @@ module.exports = class okex extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeNumber (balance, 'equity'); + account['free'] = this.safeNumber (balance, 'total_avail_balance'); result[symbol] = account; } return this.parseBalance (result); @@ -100324,7 +98732,7 @@ module.exports = class okex extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -100534,8 +98942,8 @@ module.exports = class okex extends Exchange { symbol = market['symbol']; } } - let amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat2 (order, 'filled_size', 'filled_qty'); + let amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber2 (order, 'filled_size', 'filled_qty'); let remaining = undefined; if (amount !== undefined) { if (filled !== undefined) { @@ -100546,9 +98954,9 @@ module.exports = class okex extends Exchange { if (type === 'market') { remaining = 0; } - let cost = this.safeFloat2 (order, 'filled_notional', 'funds'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); + let cost = this.safeNumber2 (order, 'filled_notional', 'funds'); + const price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'price_avg'); if (cost === undefined) { if (filled !== undefined && average !== undefined) { cost = average * filled; @@ -100559,7 +98967,7 @@ module.exports = class okex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'state')); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -100572,7 +98980,7 @@ module.exports = class okex extends Exchange { if ((clientOrderId !== undefined) && (clientOrderId.length < 1)) { clientOrderId = undefined; // fix empty clientOrderId string } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); return { 'info': order, 'id': id, @@ -100816,16 +99224,6 @@ module.exports = class okex extends Exchange { return await this.fetchOrdersByState ('7', symbol, since, limit, params); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -100853,7 +99251,8 @@ module.exports = class okex extends Exchange { async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); - const currency = this.currency (code); + const parts = code.split ('-'); + const currency = this.currency (parts[0]); const request = { 'currency': currency['id'], }; @@ -100866,8 +99265,8 @@ module.exports = class okex extends Exchange { // } // ] // - const addresses = this.parseDepositAddresses (response); - const address = this.safeValue (addresses, code); + const addressesByCode = this.parseDepositAddresses (response); + const address = this.safeValue (addressesByCode, code); if (address === undefined) { throw new InvalidAddress (this.id + ' fetchDepositAddress cannot return nonexistent addresses, you should create withdrawal addresses with the exchange website first'); } @@ -101042,7 +99441,7 @@ module.exports = class okex extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const txid = this.safeString (transaction, 'txid'); const timestamp = this.parse8601 (this.safeString (transaction, 'timestamp')); @@ -101105,19 +99504,19 @@ module.exports = class okex extends Exchange { let feeCurrencyId = undefined; if (receivedCurrencyId === quoteId) { side = this.safeString (otherTrade, 'side'); - amount = this.safeFloat (otherTrade, 'size'); - cost = this.safeFloat (userTrade, 'size'); + amount = this.safeNumber (otherTrade, 'size'); + cost = this.safeNumber (userTrade, 'size'); feeCurrencyId = this.safeString (otherTrade, 'currency'); } else { side = this.safeString (userTrade, 'side'); - amount = this.safeFloat (userTrade, 'size'); - cost = this.safeFloat (otherTrade, 'size'); + amount = this.safeNumber (userTrade, 'size'); + cost = this.safeNumber (otherTrade, 'size'); feeCurrencyId = this.safeString (userTrade, 'currency'); } const id = this.safeString (userTrade, 'trade_id'); - const price = this.safeFloat (userTrade, 'price'); - const feeCostFirst = this.safeFloat (otherTrade, 'fee'); - const feeCostSecond = this.safeFloat (userTrade, 'fee'); + const price = this.safeNumber (userTrade, 'price'); + const feeCostFirst = this.safeNumber (otherTrade, 'fee'); + const feeCostSecond = this.safeNumber (userTrade, 'fee'); const feeCurrencyCodeFirst = this.safeCurrencyCode (this.safeString (otherTrade, 'currency')); const feeCurrencyCodeSecond = this.safeCurrencyCode (this.safeString (userTrade, 'currency')); let fee = undefined; @@ -101549,7 +99948,7 @@ module.exports = class okex extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); let method = undefined; const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType'); @@ -101931,14 +100330,14 @@ module.exports = class okex extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'timestamp')); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; const marketId = this.safeString (item, 'instrument_id'); let symbol = undefined; @@ -102048,13 +100447,14 @@ module.exports = class okex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],118:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],115:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -102147,12 +100547,12 @@ module.exports = class paymium extends Exchange { if (free in response) { const account = this.account (); const used = 'locked_' + currencyId; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -102171,30 +100571,30 @@ module.exports = class paymium extends Exchange { }; const ticker = await this.publicGetDataCurrencyTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'at'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'price'); + const last = this.safeNumber (ticker, 'price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'variation'), + 'percentage': this.safeNumber (ticker, 'variation'), 'average': undefined, 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, @@ -102210,15 +100610,12 @@ module.exports = class paymium extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); + const priceString = this.safeString (trade, 'price'); const amountField = 'traded_' + market['base'].toLowerCase (); - const amount = this.safeFloat (trade, amountField); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const amountString = this.safeString (trade, amountField); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -102313,7 +100710,7 @@ module.exports = class paymium extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],119:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],116:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -102621,13 +101018,13 @@ module.exports = class phemex extends Exchange { }); } - parseSafeFloat (value = undefined) { + parseSafeNumber (value = undefined) { if (value === undefined) { return value; } value = value.replace (',', ''); const parts = value.split (' '); - return this.safeFloat (parts, 0); + return this.safeNumber (parts, 0); } parseSwapMarket (market) { @@ -102651,7 +101048,9 @@ module.exports = class phemex extends Exchange { // "minPriceEp":5000, // "maxPriceEp":10000000000, // "maxOrderQty":1000000, - // "type":"Perpetual" + // "type":"Perpetual", + // "status":"Listed", + // "tipOrderQty":1000000, // "steps":"50", // "riskLimits":[ // {"limit":100,"initialMargin":"1.0%","initialMarginEr":1000000,"maintenanceMargin":"0.5%","maintenanceMarginEr":500000}, @@ -102676,7 +101075,7 @@ module.exports = class phemex extends Exchange { // } // const id = this.safeString (market, 'symbol'); - const baseId = this.safeString (market, 'baseCurrency', 'contractUnderlyingAssets'); + const baseId = this.safeString2 (market, 'baseCurrency', 'contractUnderlyingAssets'); const quoteId = this.safeString (market, 'quoteCurrency'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); @@ -102693,16 +101092,16 @@ module.exports = class phemex extends Exchange { } const linear = !inverse; const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const priceScale = this.safeInteger (market, 'priceScale'); const ratioScale = this.safeInteger (market, 'ratioScale'); const valueScale = this.safeInteger (market, 'valueScale'); - const minPriceEp = this.safeFloat (market, 'minPriceEp'); - const maxPriceEp = this.safeFloat (market, 'maxPriceEp'); - const makerFeeRateEr = this.safeFloat (market, 'makerFeeRateEr'); - const takerFeeRateEr = this.safeFloat (market, 'takerFeeRateEr'); + const minPriceEp = this.safeNumber (market, 'minPriceEp'); + const maxPriceEp = this.safeNumber (market, 'maxPriceEp'); + const makerFeeRateEr = this.safeNumber (market, 'makerFeeRateEr'); + const takerFeeRateEr = this.safeNumber (market, 'takerFeeRateEr'); if (makerFeeRateEr !== undefined) { maker = this.fromEn (makerFeeRateEr, ratioScale, 0.00000001); } @@ -102720,10 +101119,11 @@ module.exports = class phemex extends Exchange { }, 'cost': { 'min': undefined, - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderQty')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderQty')), }, }; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -102772,7 +101172,9 @@ module.exports = class phemex extends Exchange { // "defaultMakerFee":"0.001", // "defaultMakerFeeEr":100000, // "baseQtyPrecision":6, - // "quoteQtyPrecision":2 + // "quoteQtyPrecision":2, + // "status":"Listed", + // "tipOrderQty":20 // } // const type = this.safeStringLower (market, 'type'); @@ -102783,30 +101185,31 @@ module.exports = class phemex extends Exchange { const inverse = undefined; const spot = true; const swap = false; - const taker = this.safeFloat (market, 'defaultTakerFee'); - const maker = this.safeFloat (market, 'defaultMakerFee'); + const taker = this.safeNumber (market, 'defaultTakerFee'); + const maker = this.safeNumber (market, 'defaultMakerFee'); const precision = { - 'amount': this.parseSafeFloat (this.safeString (market, 'baseTickSize')), - 'price': this.parseSafeFloat (this.safeString (market, 'quoteTickSize')), + 'amount': this.parseSafeNumber (this.safeString (market, 'baseTickSize')), + 'price': this.parseSafeNumber (this.safeString (market, 'quoteTickSize')), }; const limits = { 'amount': { 'min': precision['amount'], - 'max': this.parseSafeFloat (this.safeString (market, 'maxBaseOrderSize')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxBaseOrderSize')), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.parseSafeFloat (this.safeString (market, 'minOrderValue')), - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderValue')), + 'min': this.parseSafeNumber (this.safeString (market, 'minOrderValue')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderValue')), }, }; const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -102996,8 +101399,8 @@ module.exports = class phemex extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const valueScale = this.safeInteger (currency, 'valueScale'); - const minValueEv = this.safeFloat (currency, 'minValueEv'); - const maxValueEv = this.safeFloat (currency, 'maxValueEv'); + const minValueEv = this.safeNumber (currency, 'minValueEv'); + const maxValueEv = this.safeNumber (currency, 'maxValueEv'); let minAmount = undefined; let maxAmount = undefined; let precision = undefined; @@ -103047,12 +101450,12 @@ module.exports = class phemex extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - let amount = this.safeFloat (bidask, amountKey); + let amount = this.safeNumber (bidask, amountKey); if (market['spot']) { amount = this.fromEv (amount, market); } return [ - this.fromEp (this.safeFloat (bidask, priceKey), market), + this.fromEp (this.safeNumber (bidask, priceKey), market), amount, ]; } @@ -103186,16 +101589,16 @@ module.exports = class phemex extends Exchange { // let baseVolume = undefined; if ((market !== undefined) && market['spot']) { - baseVolume = this.fromEv (this.safeFloat (ohlcv, 7), market); + baseVolume = this.fromEv (this.safeNumber (ohlcv, 7), market); } else { baseVolume = this.safeInteger (ohlcv, 7); } return [ this.safeTimestamp (ohlcv, 0), - this.fromEp (this.safeFloat (ohlcv, 3), market), - this.fromEp (this.safeFloat (ohlcv, 4), market), - this.fromEp (this.safeFloat (ohlcv, 5), market), - this.fromEp (this.safeFloat (ohlcv, 6), market), + this.fromEp (this.safeNumber (ohlcv, 3), market), + this.fromEp (this.safeNumber (ohlcv, 4), market), + this.fromEp (this.safeNumber (ohlcv, 5), market), + this.fromEp (this.safeNumber (ohlcv, 6), market), baseVolume, ]; } @@ -103288,11 +101691,11 @@ module.exports = class phemex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.000001); - const last = this.fromEp (this.safeFloat (ticker, 'lastEp'), market); - const quoteVolume = this.fromEp (this.safeFloat (ticker, 'turnoverEv'), market); - let baseVolume = this.safeFloat (ticker, 'volume'); + const last = this.fromEp (this.safeNumber (ticker, 'lastEp'), market); + const quoteVolume = this.fromEp (this.safeNumber (ticker, 'turnoverEv'), market); + let baseVolume = this.safeNumber (ticker, 'volume'); if (baseVolume === undefined) { - baseVolume = this.fromEv (this.safeFloat (ticker, 'volumeEv')); + baseVolume = this.fromEv (this.safeNumber (ticker, 'volumeEv')); } let vwap = undefined; if ((market !== undefined) && (market['spot'])) { @@ -103301,7 +101704,7 @@ module.exports = class phemex extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.fromEp (this.safeFloat (ticker, 'openEp'), market); + const open = this.fromEp (this.safeNumber (ticker, 'openEp'), market); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -103313,11 +101716,11 @@ module.exports = class phemex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.fromEp (this.safeFloat (ticker, 'highEp'), market), - 'low': this.fromEp (this.safeFloat (ticker, 'lowEp'), market), - 'bid': this.fromEp (this.safeFloat (ticker, 'bidEp'), market), + 'high': this.fromEp (this.safeNumber (ticker, 'highEp'), market), + 'low': this.fromEp (this.safeNumber (ticker, 'lowEp'), market), + 'bid': this.fromEp (this.safeNumber (ticker, 'bidEp'), market), 'bidVolume': undefined, - 'ask': this.fromEp (this.safeFloat (ticker, 'askEp'), market), + 'ask': this.fromEp (this.safeNumber (ticker, 'askEp'), market), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -103508,8 +101911,8 @@ module.exports = class phemex extends Exchange { id = this.safeString (trade, tradeLength - 4); } side = this.safeStringLower (trade, tradeLength - 3); - price = this.fromEp (this.safeFloat (trade, tradeLength - 2), market); - amount = this.fromEv (this.safeFloat (trade, tradeLength - 1), market); + price = this.fromEp (this.safeNumber (trade, tradeLength - 2), market); + amount = this.fromEv (this.safeNumber (trade, tradeLength - 1), market); if (market['spot']) { if ((price !== undefined) && (amount !== undefined)) { cost = price * amount; @@ -103525,14 +101928,14 @@ module.exports = class phemex extends Exchange { if (execStatus === 'MakerFill') { takerOrMaker = 'maker'; } - price = this.fromEp (this.safeFloat (trade, 'execPriceEp'), market); - amount = this.fromEv (this.safeFloat (trade, 'execBaseQtyEv'), market); - amount = this.safeFloat (trade, 'execQty', amount); - cost = this.fromEv (this.safeFloat2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); - const feeCost = this.fromEv (this.safeFloat (trade, 'execFeeEv'), market); + price = this.fromEp (this.safeNumber (trade, 'execPriceEp'), market); + amount = this.fromEv (this.safeNumber (trade, 'execBaseQtyEv'), market); + amount = this.safeNumber (trade, 'execQty', amount); + cost = this.fromEv (this.safeNumber2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); + const feeCost = this.fromEv (this.safeNumber (trade, 'execFeeEv'), market); if (feeCost !== undefined) { let feeRate = undefined; - let feeRateEr = this.safeFloat (trade, 'feeRateEr'); + let feeRateEr = this.safeNumber (trade, 'feeRateEr'); if (feeRateEr < 0) { feeRateEr = Math.abs (feeRateEr); feeRate = this.fromEr (feeRateEr, market); @@ -103608,9 +102011,9 @@ module.exports = class phemex extends Exchange { const currency = this.safeValue (this.currencies, code, {}); const scale = this.safeInteger (currency, 'valueScale', 8); const account = this.account (); - const balanceEv = this.safeFloat (balance, 'balanceEv'); - const lockedTradingBalanceEv = this.safeFloat (balance, 'lockedTradingBalanceEv'); - const lockedWithdrawEv = this.safeFloat (balance, 'lockedWithdrawEv'); + const balanceEv = this.safeNumber (balance, 'balanceEv'); + const lockedTradingBalanceEv = this.safeNumber (balance, 'lockedTradingBalanceEv'); + const lockedWithdrawEv = this.safeNumber (balance, 'lockedWithdrawEv'); const total = this.fromEn (balanceEv, scale, scale, DECIMAL_PLACES); const lockedTradingBalance = this.fromEn (lockedTradingBalanceEv, scale, scale, DECIMAL_PLACES); const lockedWithdraw = this.fromEn (lockedWithdrawEv, scale, scale, DECIMAL_PLACES); @@ -103704,8 +102107,8 @@ module.exports = class phemex extends Exchange { const code = this.safeCurrencyCode (currencyId); const currency = this.currency (code); const account = this.account (); - const accountBalanceEv = this.safeFloat (balance, 'accountBalanceEv'); - const totalUsedBalanceEv = this.safeFloat (balance, 'totalUsedBalanceEv'); + const accountBalanceEv = this.safeNumber (balance, 'accountBalanceEv'); + const totalUsedBalanceEv = this.safeNumber (balance, 'totalUsedBalanceEv'); const valueScale = this.safeInteger (currency, 'valueScale', 8); account['total'] = this.fromEn (accountBalanceEv, valueScale, valueScale, DECIMAL_PLACES); account['used'] = this.fromEn (totalUsedBalanceEv, valueScale, valueScale, DECIMAL_PLACES); @@ -103937,21 +102340,21 @@ module.exports = class phemex extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let price = this.fromEp (this.safeFloat (order, 'priceEp'), market); + let price = this.fromEp (this.safeNumber (order, 'priceEp'), market); if (price === 0) { price = undefined; } - const amount = this.fromEv (this.safeFloat (order, 'baseQtyEv'), market); - const remaining = this.fromEv (this.safeFloat (order, 'leavesBaseQtyEv'), market); - let filled = this.fromEv (this.safeFloat (order, 'cumBaseQtyEv'), market); - const cost = this.fromEv (this.safeFloat (order, 'quoteQtyEv'), market); - const average = this.fromEp (this.safeFloat (order, 'avgPriceEp'), market); + const amount = this.fromEv (this.safeNumber (order, 'baseQtyEv'), market); + const remaining = this.fromEv (this.safeNumber (order, 'leavesBaseQtyEv'), market); + let filled = this.fromEv (this.safeNumber (order, 'cumBaseQtyEv'), market); + const cost = this.fromEv (this.safeNumber (order, 'quoteQtyEv'), market); + const average = this.fromEp (this.safeNumber (order, 'avgPriceEp'), market); const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'ordType')); const timestamp = this.safeIntegerProduct2 (order, 'actionTimeNs', 'createTimeNs', 0.000001); let fee = undefined; - const feeCost = this.fromEv (this.safeFloat (order, 'cumFeeEv'), market); + const feeCost = this.fromEv (this.safeNumber (order, 'cumFeeEv'), market); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -103964,7 +102367,7 @@ module.exports = class phemex extends Exchange { } } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.fromEp (this.safeFloat (order, 'stopPxEp', market)); + const stopPrice = this.fromEp (this.safeNumber (order, 'stopPxEp', market)); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -104037,18 +102440,18 @@ module.exports = class phemex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'orderType')); - const price = this.fromEp (this.safeFloat (order, 'priceEp'), market); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); + const price = this.fromEp (this.safeNumber (order, 'priceEp'), market); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); const timestamp = this.safeIntegerProduct (order, 'actionTimeNs', 0.000001); - const cost = this.safeFloat (order, 'cumValue'); + const cost = this.safeNumber (order, 'cumValue'); let lastTradeTimestamp = this.safeIntegerProduct (order, 'transactTimeNs', 0.000001); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -104123,7 +102526,7 @@ module.exports = class phemex extends Exchange { } request['qtyType'] = qtyType; if (qtyType === 'ByQuote') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); params = this.omit (params, 'cost'); if (this.options['createOrderByQuoteRequiresPrice']) { if (price !== undefined) { @@ -104143,7 +102546,7 @@ module.exports = class phemex extends Exchange { if (type === 'Limit') { request['priceEp'] = this.toEp (price, market); } - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice !== undefined) { request['stopPxEp'] = this.toEp (stopPrice, market); } @@ -104651,7 +103054,7 @@ module.exports = class phemex extends Exchange { const code = currency['code']; const timestamp = this.safeInteger2 (transaction, 'createdAt', 'submitedAt'); let type = this.safeStringLower (transaction, 'type'); - const feeCost = this.fromEn (this.safeFloat (transaction, 'feeEv'), currency['valueScale'], currency['precision']); + const feeCost = this.fromEn (this.safeNumber (transaction, 'feeEv'), currency['valueScale'], currency['precision']); let fee = undefined; if (feeCost !== undefined) { type = 'withdrawal'; @@ -104661,7 +103064,7 @@ module.exports = class phemex extends Exchange { }; } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.fromEn (this.safeFloat (transaction, 'amountEv'), currency['valueScale'], currency['precision']); + const amount = this.fromEn (this.safeNumber (transaction, 'amountEv'), currency['valueScale'], currency['precision']); return { 'info': transaction, 'id': id, @@ -104683,7 +103086,7 @@ module.exports = class phemex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.safeString (params, 'code'); const request = {}; @@ -104836,13 +103239,14 @@ module.exports = class phemex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],120:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],117:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, PermissionDenied, DDoSProtection, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, CancelPending, InvalidNonce, OnMaintenance, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -104952,6 +103356,7 @@ module.exports = class poloniex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', // starting from Jan 8 2020 'maker': 0.0009, 'taker': 0.0009, @@ -105046,24 +103451,6 @@ module.exports = class poloniex extends Exchange { }); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - parseOHLCV (ohlcv, market = undefined) { // // { @@ -105079,11 +103466,11 @@ module.exports = class poloniex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'date'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'quoteVolume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'quoteVolume'), ]; } @@ -105176,11 +103563,11 @@ module.exports = class poloniex extends Exchange { const balance = this.safeValue (response, currencyId, {}); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onOrders'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFees (params = {}) { @@ -105198,8 +103585,8 @@ module.exports = class poloniex extends Exchange { // return { 'info': fees, - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), 'withdraw': {}, 'deposit': {}, }; @@ -105257,8 +103644,8 @@ module.exports = class poloniex extends Exchange { let open = undefined; let change = undefined; let average = undefined; - const last = this.safeFloat (ticker, 'last'); - const relativeChange = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const relativeChange = this.safeNumber (ticker, 'percentChange'); if (relativeChange !== -1) { open = last / this.sum (1, relativeChange); change = last - open; @@ -105268,11 +103655,11 @@ module.exports = class poloniex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24hr'), - 'low': this.safeFloat (ticker, 'low24hr'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high24hr'), + 'low': this.safeNumber (ticker, 'low24hr'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -105282,8 +103669,8 @@ module.exports = class poloniex extends Exchange { 'change': change, 'percentage': relativeChange * 100, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -105324,7 +103711,7 @@ module.exports = class poloniex extends Exchange { const code = this.safeCurrencyCode (id); const active = (currency['delisted'] === 0) && !currency['disabled']; const numericId = this.safeInteger (currency, 'id'); - const fee = this.safeFloat (currency, 'txFee'); + const fee = this.safeNumber (currency, 'txFee'); result[code] = { 'id': id, 'numericId': numericId, @@ -105415,13 +103802,18 @@ module.exports = class poloniex extends Exchange { } const side = this.safeString (trade, 'type'); let fee = undefined; - const price = this.safeFloat (trade, 'rate'); - const cost = this.safeFloat (trade, 'total'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const feeDisplay = this.safeString (trade, 'feeDisplay'); if (feeDisplay !== undefined) { const parts = feeDisplay.split (' '); - const feeCost = this.safeFloat (parts, 0); + const feeCost = this.safeNumber (parts, 0); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -105440,7 +103832,7 @@ module.exports = class poloniex extends Exchange { } } let takerOrMaker = undefined; - const takerAdjustment = this.safeFloat (trade, 'takerAdjustment'); + const takerAdjustment = this.safeNumber (trade, 'takerAdjustment'); if (takerAdjustment !== undefined) { takerOrMaker = 'taker'; } @@ -105686,9 +104078,9 @@ module.exports = class poloniex extends Exchange { if (resultingTrades !== undefined) { trades = this.parseTrades (resultingTrades, market); } - const price = this.safeFloat2 (order, 'price', 'rate'); - let remaining = this.safeFloat (order, 'amount'); - let amount = this.safeFloat (order, 'startingAmount'); + const price = this.safeNumber2 (order, 'price', 'rate'); + let remaining = this.safeNumber (order, 'amount'); + let amount = this.safeNumber (order, 'startingAmount'); let filled = undefined; let cost = 0; if (amount !== undefined) { @@ -105738,7 +104130,7 @@ module.exports = class poloniex extends Exchange { } const id = this.safeString (order, 'orderNumber'); let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -106235,11 +104627,11 @@ module.exports = class poloniex extends Exchange { const defaultType = ('withdrawalNumber' in transaction) ? 'withdrawal' : 'deposit'; const type = this.safeString (transaction, 'type', defaultType); const id = this.safeString2 (transaction, 'withdrawalNumber', 'depositNumber'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'paymentID'); // according to https://poloniex.com/fees/ - const feeCost = this.safeFloat (transaction, 'fee', 0); + const feeCost = this.safeNumber (transaction, 'fee', 0); if (type === 'withdrawal') { // poloniex withdrawal amount includes the fee amount = amount - feeCost; @@ -106323,7 +104715,7 @@ module.exports = class poloniex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],121:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],118:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -106331,6 +104723,7 @@ module.exports = class poloniex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, BadResponse, BadRequest, InvalidOrder, InsufficientFunds, AuthenticationError, ArgumentsRequired, InvalidAddress, RateLimitExceeded, DDoSProtection, BadSymbol } = require ('./base/errors'); const { TRUNCATE, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -106466,9 +104859,11 @@ module.exports = class probit extends Exchange { }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', 'CBC': 'CryptoBharatCoin', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'HBC': 'Hybrid Bank Cash', 'UNI': 'UNICORN Token', }, @@ -106517,11 +104912,11 @@ module.exports = class probit extends Exchange { const costPrecision = this.safeInteger (market, 'cost_precision'); const precision = { 'amount': 1 / Math.pow (10, amountPrecision), - 'price': this.safeFloat (market, 'price_increment'), + 'price': this.safeNumber (market, 'price_increment'), 'cost': 1 / Math.pow (10, costPrecision), }; - const takerFeeRate = this.safeFloat (market, 'taker_fee_rate'); - const makerFeeRate = this.safeFloat (market, 'maker_fee_rate'); + const takerFeeRate = this.safeNumber (market, 'taker_fee_rate'); + const makerFeeRate = this.safeNumber (market, 'maker_fee_rate'); result.push ({ 'id': id, 'info': market, @@ -106536,16 +104931,16 @@ module.exports = class probit extends Exchange { 'maker': makerFeeRate / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_cost'), - 'max': this.safeFloat (market, 'max_cost'), + 'min': this.safeNumber (market, 'min_cost'), + 'max': this.safeNumber (market, 'max_cost'), }, }, }); @@ -106632,7 +105027,7 @@ module.exports = class probit extends Exchange { // [ { 'amount': '0.015', 'priority': 1, 'currency_id': 'ETH' }, {} ] for (let j = 0; j < withdrawalFees.length; j++) { const withdrawalFee = withdrawalFees[j]; - const amount = this.safeFloat (withdrawalFee, 'amount'); + const amount = this.safeNumber (withdrawalFee, 'amount'); const priority = this.safeInteger (withdrawalFee, 'priority'); if ((amount !== undefined) && (priority !== undefined)) { fees.push (withdrawalFee); @@ -106640,7 +105035,7 @@ module.exports = class probit extends Exchange { } const withdrawalFeesByPriority = this.sortBy (fees, 'priority'); const withdrawalFee = this.safeValue (withdrawalFeesByPriority, 0, {}); - const fee = this.safeFloat (withdrawalFee, 'amount'); + const fee = this.safeNumber (withdrawalFee, 'amount'); result[code] = { 'id': id, 'code': code, @@ -106663,11 +105058,11 @@ module.exports = class probit extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (platform, 'min_deposit_amount'), + 'min': this.safeNumber (platform, 'min_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (platform, 'min_withdrawal_amount'), + 'min': this.safeNumber (platform, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -106697,11 +105092,11 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (balance, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'total'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -106753,14 +105148,6 @@ module.exports = class probit extends Exchange { return this.parseTickers (data, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -106808,8 +105195,8 @@ module.exports = class probit extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); - const close = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); + const close = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); let percentage = undefined; let open = undefined; if (change !== undefined) { @@ -106818,15 +105205,15 @@ module.exports = class probit extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -106968,16 +105355,13 @@ module.exports = class probit extends Exchange { marketId = this.safeString (trade, 'market_id', marketId); const symbol = this.safeSymbol (marketId, market, '-'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'order_id'); - const feeCost = this.safeFloat (trade, 'fee_amount'); + const feeCost = this.safeNumber (trade, 'fee_amount'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency_id'); @@ -107121,11 +105505,11 @@ module.exports = class probit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'start_time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_volume'), ]; } @@ -107224,37 +105608,24 @@ module.exports = class probit extends Exchange { const marketId = this.safeString (order, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'time')); - let price = this.safeFloat (order, 'limit_price'); - const filled = this.safeFloat (order, 'filled_quantity'); - let remaining = this.safeFloat (order, 'open_quantity'); - const canceledAmount = this.safeFloat (order, 'cancelled_quantity'); + let price = this.safeNumber (order, 'limit_price'); + const filled = this.safeNumber (order, 'filled_quantity'); + let remaining = this.safeNumber (order, 'open_quantity'); + const canceledAmount = this.safeNumber (order, 'cancelled_quantity'); if (canceledAmount !== undefined) { remaining = this.sum (remaining, canceledAmount); } - const amount = this.safeFloat (order, 'quantity', this.sum (filled, remaining)); - let cost = this.safeFloat2 (order, 'filled_cost', 'cost'); + const amount = this.safeNumber (order, 'quantity', this.sum (filled, remaining)); + const cost = this.safeNumber2 (order, 'filled_cost', 'cost'); if (type === 'market') { price = undefined; } - let average = undefined; - if (filled !== undefined) { - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if (cost !== undefined) { - if (filled > 0) { - average = cost / filled; - } - } - } let clientOrderId = this.safeString (order, 'client_order_id'); if (clientOrderId === '') { clientOrderId = undefined; } const timeInForce = this.safeStringUpper (order, 'time_in_force'); - return { + return this.safeOrder ({ 'id': id, 'info': order, 'clientOrderId': clientOrderId, @@ -107271,11 +105642,11 @@ module.exports = class probit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'average': average, + 'average': undefined, 'cost': cost, 'fee': undefined, 'trades': undefined, - }; + }); } costToPrecision (symbol, cost) { @@ -107305,7 +105676,7 @@ module.exports = class probit extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -107430,16 +105801,6 @@ module.exports = class probit extends Exchange { return this.parseDepositAddresses (data); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { // In order to use this method // you need to allow API withdrawal from the API Settings Page, and @@ -107470,7 +105831,7 @@ module.exports = class probit extends Exchange { parseTransaction (transaction, currency = undefined) { const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'destination_tag'); const txid = this.safeString (transaction, 'hash'); @@ -107479,7 +105840,7 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (transaction, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined && feeCost !== 0) { fee = { @@ -107609,13 +105970,14 @@ module.exports = class probit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],122:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],119:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -107791,11 +106153,11 @@ module.exports = class qtrade extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_buy_value'), + 'min': this.safeNumber (market, 'minimum_buy_value'), 'max': undefined, }, 'price': { @@ -107876,12 +106238,12 @@ module.exports = class qtrade extends Exchange { 'info': currency, 'type': type, 'name': name, - 'fee': this.safeFloat (config, 'withdraw_fee'), + 'fee': this.safeNumber (config, 'withdraw_fee'), 'precision': this.safeInteger (currency, 'precision'), 'active': active, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimum_order'), + 'min': this.safeNumber (currency, 'minimum_order'), 'max': undefined, }, 'price': { @@ -107916,11 +106278,11 @@ module.exports = class qtrade extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'market_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'market_volume'), ]; } @@ -107982,8 +106344,8 @@ module.exports = class qtrade extends Exchange { const result = []; for (let j = 0; j < prices.length; j++) { const priceAsString = prices[j]; - const price = this.safeFloat (prices, j); - const amount = this.safeFloat (bidasks, priceAsString); + const price = this.safeNumber (prices, j); + const amount = this.safeNumber (bidasks, priceAsString); result.push ([ price, amount ]); } orderbook[side] = result; @@ -108015,12 +106377,12 @@ module.exports = class qtrade extends Exchange { const marketId = this.safeString (ticker, 'id_hr'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeIntegerProduct (ticker, 'last_change', 0.001); - const previous = this.safeFloat (ticker, 'day_open'); - const last = this.safeFloat (ticker, 'last'); - const day_change = this.safeFloat (ticker, 'day_change'); + const previous = this.safeNumber (ticker, 'day_open'); + const last = this.safeNumber (ticker, 'last'); + const day_change = this.safeNumber (ticker, 'day_change'); let percentage = undefined; let change = undefined; - let average = this.safeFloat (ticker, 'day_avg_price'); + let average = this.safeNumber (ticker, 'day_avg_price'); if (day_change !== undefined) { percentage = day_change * 100; if (previous !== undefined) { @@ -108030,18 +106392,18 @@ module.exports = class qtrade extends Exchange { if ((average === undefined) && (last !== undefined) && (previous !== undefined)) { average = this.sum (last, previous) / 2; } - const baseVolume = this.safeFloat (ticker, 'day_volume_market'); - const quoteVolume = this.safeFloat (ticker, 'day_volume_base'); + const baseVolume = this.safeNumber (ticker, 'day_volume_market'); + const quoteVolume = this.safeNumber (ticker, 'day_volume_base'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'day_high'), - 'low': this.safeFloat (ticker, 'day_low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'day_high'), + 'low': this.safeNumber (ticker, 'day_low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': previous, @@ -108249,16 +106611,16 @@ module.exports = class qtrade extends Exchange { const side = this.safeString (trade, 'side'); const marketId = this.safeString (trade, 'market_string'); const symbol = this.safeSymbol (marketId, market, '_'); - let cost = this.safeFloat2 (trade, 'base_volume', 'base_amount'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'market_amount', 'amount'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - if (price !== undefined) { - cost = price * amount; - } + let cost = this.safeNumber2 (trade, 'base_volume', 'base_amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'market_amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'base_fee'); + const feeCost = this.safeNumber (trade, 'base_fee'); if (feeCost !== undefined) { const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; fee = { @@ -108315,7 +106677,7 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); account['used'] = 0; result[code] = account; } @@ -108325,10 +106687,10 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -108457,10 +106819,9 @@ module.exports = class qtrade extends Exchange { side = this.safeString (parts, 0); orderType = this.safeString (parts, 1); } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'market_amount'); - let remaining = this.safeFloat (order, 'market_amount_remaining'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'market_amount'); + const remaining = this.safeNumber (order, 'market_amount_remaining'); const open = this.safeValue (order, 'open', false); const closeReason = this.safeString (order, 'close_reason'); let status = undefined; @@ -108472,58 +106833,21 @@ module.exports = class qtrade extends Exchange { status = 'closed'; } const marketId = this.safeString (order, 'market_string'); - const symbol = this.safeSymbol (marketId, market, '_'); + market = this.safeMarket (marketId, market, '_'); + const symbol = market['symbol']; const rawTrades = this.safeValue (order, 'trades', []); const parsedTrades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id, 'side': side, 'type': orderType, }); - const numTrades = parsedTrades.length; - let lastTradeTimestamp = undefined; - let feeCost = undefined; - let cost = undefined; - if (numTrades > 0) { - feeCost = 0; - cost = 0; - filled = 0; - remaining = amount; - for (let i = 0; i < parsedTrades.length; i++) { - const trade = parsedTrades[i]; - feeCost = this.sum (trade['fee']['cost'], feeCost); - lastTradeTimestamp = this.safeInteger (trade, 'timestamp'); - cost = this.sum (trade['cost'], cost); - filled = this.sum (trade['amount'], filled); - remaining = Math.max (0, remaining - trade['amount']); - } - } - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; - fee = { - 'currency': feeCurrencyCode, - 'cost': feeCost, - }; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let average = undefined; - if (filled !== undefined) { - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': orderType, 'timeInForce': undefined, @@ -108531,15 +106855,16 @@ module.exports = class qtrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, - 'fee': fee, - 'cost': cost, + 'fee': undefined, + 'fees': undefined, + 'cost': undefined, 'trades': parsedTrades, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -109008,7 +107333,7 @@ module.exports = class qtrade extends Exchange { const tagTo = tag; const cancelRequested = this.safeValue (transaction, 'cancel_requested'); const type = (cancelRequested === undefined) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); let status = this.parseTransactionStatus (this.safeString (transaction, 'status')); @@ -109152,7 +107477,7 @@ module.exports = class qtrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],123:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],120:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); @@ -109340,8 +107665,8 @@ module.exports = class rightbtc extends Exchange { return result; } - divideSafeFloat (x, key, divisor) { - const value = this.safeFloat (x, key); + divideSafeNumber (x, key, divisor) { + const value = this.safeNumber (x, key); if (value !== undefined) { return value / divisor; } @@ -109351,12 +107676,12 @@ module.exports = class rightbtc extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); - const last = this.divideSafeFloat (ticker, 'last', 1e8); - const high = this.divideSafeFloat (ticker, 'high', 1e8); - const low = this.divideSafeFloat (ticker, 'low', 1e8); - const bid = this.divideSafeFloat (ticker, 'buy', 1e8); - const ask = this.divideSafeFloat (ticker, 'sell', 1e8); - const baseVolume = this.divideSafeFloat (ticker, 'vol24h', 1e8); + const last = this.divideSafeNumber (ticker, 'last', 1e8); + const high = this.divideSafeNumber (ticker, 'high', 1e8); + const low = this.divideSafeNumber (ticker, 'low', 1e8); + const bid = this.divideSafeNumber (ticker, 'buy', 1e8); + const ask = this.divideSafeNumber (ticker, 'sell', 1e8); + const baseVolume = this.divideSafeNumber (ticker, 'vol24h', 1e8); return { 'symbol': symbol, 'timestamp': timestamp, @@ -109460,9 +107785,9 @@ module.exports = class rightbtc extends Exchange { let id = this.safeString (trade, 'tid'); id = this.safeString (trade, 'trade_id', id); const orderId = this.safeString (trade, 'order_id'); - const price = this.divideSafeFloat (trade, 'price', 1e8); - let amount = this.safeFloat (trade, 'amount'); - amount = this.safeFloat (trade, 'quantity', amount); + const price = this.divideSafeNumber (trade, 'price', 1e8); + let amount = this.safeNumber (trade, 'amount'); + amount = this.safeNumber (trade, 'quantity', amount); if (amount !== undefined) { amount = amount / 1e8; } @@ -109559,8 +107884,8 @@ module.exports = class rightbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); // https://github.com/ccxt/ccxt/issues/3873 - account['free'] = this.divideSafeFloat (balance, 'balance', 1e8); - account['used'] = this.divideSafeFloat (balance, 'frozen', 1e8); + account['free'] = this.divideSafeNumber (balance, 'balance', 1e8); + account['used'] = this.divideSafeNumber (balance, 'frozen', 1e8); result[code] = account; } return this.parseBalance (result); @@ -109649,30 +107974,18 @@ module.exports = class rightbtc extends Exchange { } else if ('transactTime' in order) { timestamp = order['transactTime']; } - let price = this.safeFloat2 (order, 'limit', 'price'); + let price = this.safeNumber2 (order, 'limit', 'price'); if (price !== undefined) { price = price / 1e8; } - const amount = this.divideSafeFloat (order, 'quantity', 1e8); - let filled = this.divideSafeFloat (order, 'filled_quantity', 1e8); - let remaining = this.divideSafeFloat (order, 'rest', 1e8); - const cost = this.divideSafeFloat (order, 'cost', 1e8); + const amount = this.divideSafeNumber (order, 'quantity', 1e8); + const filled = this.divideSafeNumber (order, 'filled_quantity', 1e8); + const remaining = this.divideSafeNumber (order, 'rest', 1e8); + const cost = this.divideSafeNumber (order, 'cost', 1e8); // lines 483-494 should be generalized into a base class method - if (amount !== undefined) { - if (remaining === undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - if (filled === undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } - } const type = 'limit'; const side = this.safeStringLower (order, 'side'); - const feeCost = this.divideSafeFloat (order, 'min_fee', 1e8); + const feeCost = this.divideSafeNumber (order, 'min_fee', 1e8); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -109680,13 +107993,13 @@ module.exports = class rightbtc extends Exchange { feeCurrency = market['quote']; } fee = { - 'rate': this.safeFloat (order, 'fee'), + 'rate': this.safeNumber (order, 'fee'), 'cost': feeCost, 'currency': feeCurrency, }; } const trades = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -109708,7 +108021,7 @@ module.exports = class rightbtc extends Exchange { 'fee': fee, 'trades': trades, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -109912,7 +108225,7 @@ module.exports = class rightbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],124:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],121:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -109920,6 +108233,7 @@ module.exports = class rightbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, BadSymbol, BadRequest, InvalidOrder, ArgumentsRequired, OrderNotFound, InsufficientFunds, DDoSProtection } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110064,12 +108378,12 @@ module.exports = class ripio extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'min_amount'), - 'price': this.safeFloat (market, 'price_tick'), + 'amount': this.safeNumber (market, 'min_amount'), + 'price': this.safeNumber (market, 'price_tick'), }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -110077,15 +108391,15 @@ module.exports = class ripio extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_value'), + 'min': this.safeNumber (market, 'min_value'), 'max': undefined, }, }; const active = this.safeValue (market, 'enabled', true); const fees = this.safeValue (market, 'fees', []); const firstFee = this.safeValue (fees, 0, {}); - const maker = this.safeFloat (firstFee, 'maker_fee', 0.0); - const taker = this.safeFloat (firstFee, 'taker_fee', 0.0); + const maker = this.safeNumber (firstFee, 'maker_fee', 0.0); + const taker = this.safeNumber (firstFee, 'taker_fee', 0.0); result.push ({ 'id': id, 'symbol': symbol, @@ -110192,18 +108506,18 @@ module.exports = class ripio extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); const marketId = this.safeString (ticker, 'pair'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const average = this.safeFloat (ticker, 'avg'); + const last = this.safeNumber (ticker, 'last_price'); + const average = this.safeNumber (ticker, 'avg'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bid_volume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'ask_volume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bid_volume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'ask_volume'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -110345,15 +108659,14 @@ module.exports = class ripio extends Exchange { if (side !== undefined) { side = side.toLowerCase (); } - const price = this.safeFloat2 (trade, 'price', 'match_price'); - const amount = this.safeFloat2 (trade, 'amount', 'exchanged'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString2 (trade, 'price', 'match_price'); + const amountString = this.safeString2 (trade, 'amount', 'exchanged'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'pair'); market = this.safeMarket (marketId, market); - const feeCost = this.safeFloat (trade, takerOrMaker + '_fee'); + const feeCost = this.safeNumber (trade, takerOrMaker + '_fee'); const orderId = this.safeString (trade, takerOrMaker); let fee = undefined; if (feeCost !== undefined) { @@ -110427,11 +108740,11 @@ module.exports = class ripio extends Exchange { const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -110690,16 +109003,16 @@ module.exports = class ripio extends Exchange { // } // const id = this.safeString (order, 'order_id'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat (order, 'notional'); + const amount = this.safeNumber (order, 'amount'); + let cost = this.safeNumber (order, 'notional'); const type = this.safeStringLower (order, 'order_type'); const priceField = (type === 'market') ? 'fill_price' : 'limit_price'; - const price = this.safeFloat (order, priceField); + const price = this.safeNumber (order, priceField); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeTimestamp (order, 'created_at'); let average = this.safeValue (order, 'fill_price'); - let filled = this.safeFloat (order, 'filled'); + let filled = this.safeNumber (order, 'filled'); let remaining = undefined; const fills = this.safeValue (order, 'fills'); let trades = undefined; @@ -110734,7 +109047,7 @@ module.exports = class ripio extends Exchange { } const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); return { 'id': id, 'clientOrderId': undefined, @@ -110860,13 +109173,14 @@ module.exports = class ripio extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],125:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],122:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110977,14 +109291,14 @@ module.exports = class southxchange extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const deposited = this.safeFloat (balance, 'Deposited'); - const unconfirmed = this.safeFloat (balance, 'Unconfirmed'); + const deposited = this.safeString (balance, 'Deposited'); + const unconfirmed = this.safeString (balance, 'Unconfirmed'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'Available'); - account['total'] = this.sum (deposited, unconfirmed); + account['free'] = this.safeString (balance, 'Available'); + account['total'] = Precise.stringAdd (deposited, unconfirmed); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -111002,16 +109316,16 @@ module.exports = class southxchange extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'Last'); + const last = this.safeNumber (ticker, 'Last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'Bid'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -111019,9 +109333,9 @@ module.exports = class southxchange extends Exchange { 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'Variation24Hr'), + 'percentage': this.safeNumber (ticker, 'Variation24Hr'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume24Hr'), + 'baseVolume': this.safeNumber (ticker, 'Volume24Hr'), 'quoteVolume': undefined, 'info': ticker, }; @@ -111055,14 +109369,11 @@ module.exports = class southxchange extends Exchange { parseTrade (trade, market) { const timestamp = this.safeTimestamp (trade, 'At'); - const price = this.safeFloat (trade, 'Price'); - const amount = this.safeFloat (trade, 'Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'Price'); + const amountString = this.safeString (trade, 'Amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'Type'); let symbol = undefined; if (market !== undefined) { @@ -111103,21 +109414,13 @@ module.exports = class southxchange extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const timestamp = undefined; - const price = this.safeFloat (order, 'LimitPrice'); - const amount = this.safeFloat (order, 'OriginalAmount'); - const remaining = this.safeFloat (order, 'Amount'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - cost = price * amount; - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'LimitPrice'); + const amount = this.safeNumber (order, 'OriginalAmount'); + const remaining = this.safeNumber (order, 'Amount'); const type = 'limit'; const side = this.safeStringLower (order, 'Type'); const id = this.safeString (order, 'Code'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -111132,15 +109435,14 @@ module.exports = class southxchange extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'filled': filled, + 'cost': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -111273,8 +109575,8 @@ module.exports = class southxchange extends Exchange { const type = this.safeString (item, 'Type'); const ledgerEntryType = this.parseLedgerEntryType (type); const code = this.safeCurrencyCode (this.safeString (item, 'CurrencyCode'), currency); - let amount = this.safeFloat (item, 'Amount'); - const after = this.safeFloat (item, 'TotalBalance'); + let amount = this.safeNumber (item, 'Amount'); + const after = this.safeNumber (item, 'TotalBalance'); let before = undefined; if (amount !== undefined) { if (after !== undefined) { @@ -111445,7 +109747,7 @@ module.exports = class southxchange extends Exchange { // } // const id = this.safeString (transaction, 'MovementId'); - const amount = this.safeFloat (transaction, 'Amount'); + const amount = this.safeNumber (transaction, 'Amount'); const address = this.safeString (transaction, 'Address'); const addressTo = address; const addressFrom = undefined; @@ -111560,7 +109862,7 @@ module.exports = class southxchange extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],126:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],123:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -115088,7 +113390,7 @@ module.exports = class southxchange extends Exchange { }; })(typeof module === 'undefined' || module, this); -},{"buffer":188}],127:[function(require,module,exports){ +},{"buffer":184}],124:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -121077,7 +119379,7 @@ module.exports = class southxchange extends Exchange { return CryptoJS; })); -},{}],128:[function(require,module,exports){ +},{}],125:[function(require,module,exports){ 'use strict'; var elliptic = exports; @@ -121101,7 +119403,7 @@ elliptic.curves = require('./elliptic/curves'); elliptic.ec = require('./elliptic/ec'); elliptic.eddsa = require('./elliptic/eddsa'); -},{"./elliptic/curve":131,"./elliptic/curves":134,"./elliptic/ec":135,"./elliptic/eddsa":138,"./elliptic/utils":142}],129:[function(require,module,exports){ +},{"./elliptic/curve":128,"./elliptic/curves":131,"./elliptic/ec":132,"./elliptic/eddsa":135,"./elliptic/utils":139}],126:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -121478,7 +119780,7 @@ BasePoint.prototype.dblp = function dblp(k) { return r; }; -},{"../../../../BN/bn":126,"../../elliptic":128}],130:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],127:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -121913,7 +120215,7 @@ Point.prototype.eqXToP = function eqXToP(x) { Point.prototype.toP = Point.prototype.normalize; Point.prototype.mixedAdd = Point.prototype.add; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],131:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],128:[function(require,module,exports){ 'use strict'; var curve = exports; @@ -121923,7 +120225,7 @@ curve.short = require('./short'); curve.mont = require('./mont'); curve.edwards = require('./edwards'); -},{"./base":129,"./edwards":130,"./mont":132,"./short":133}],132:[function(require,module,exports){ +},{"./base":126,"./edwards":127,"./mont":129,"./short":130}],129:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -122105,7 +120407,7 @@ Point.prototype.getX = function getX() { return this.x.fromRed(); }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],133:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],130:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -123045,7 +121347,7 @@ JPoint.prototype.isInfinity = function isInfinity() { return this.z.cmpn(0) === 0; }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],134:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],131:[function(require,module,exports){ 'use strict'; var curves = exports; @@ -123251,7 +121553,7 @@ defineCurve('secp256k1', { ] }); -},{"../elliptic":128,"./precomputed/secp256k1":141}],135:[function(require,module,exports){ +},{"../elliptic":125,"./precomputed/secp256k1":138}],132:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123493,7 +121795,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { throw new Error('Unable to find valid recovery factor'); }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../../hmac-drbg/hmac-drbg":143,"./key":136,"./signature":137}],136:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../../hmac-drbg/hmac-drbg":140,"./key":133,"./signature":134}],133:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123614,7 +121916,7 @@ KeyPair.prototype.inspect = function inspect() { ' pub: ' + (this.pub && this.pub.inspect()) + ' >'; }; -},{"../../../../BN/bn":126,"../../elliptic":128}],137:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],134:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123640,7 +121942,7 @@ function Signature(options, enc) { } module.exports = Signature; -},{"../../../../BN/bn":126,"../../elliptic":128}],138:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],135:[function(require,module,exports){ 'use strict'; var curves = require('../curves'); @@ -123787,7 +122089,7 @@ EDDSA.prototype.isPoint = function isPoint(val) { return val instanceof this.pointClass; }; -},{"../../../../../base/functions/encode":11,"../../../../BN/bn.js":126,"../../../../crypto-js/crypto-js":127,"../curves":134,"../utils":142,"./key":139,"./signature":140}],139:[function(require,module,exports){ +},{"../../../../../base/functions/encode":12,"../../../../BN/bn.js":123,"../../../../crypto-js/crypto-js":124,"../curves":131,"../utils":139,"./key":136,"./signature":137}],136:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -123889,7 +122191,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) { module.exports = KeyPair; -},{"../utils":142}],140:[function(require,module,exports){ +},{"../utils":139}],137:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123956,7 +122258,7 @@ Signature.prototype.toHex = function toHex() { module.exports = Signature; -},{"../../../../BN/bn":126,"../utils":142}],141:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../utils":139}],138:[function(require,module,exports){ module.exports = { doubles: { step: 4, @@ -124738,7 +123040,7 @@ module.exports = { } }; -},{}],142:[function(require,module,exports){ +},{}],139:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -124954,7 +123256,7 @@ utils.encode = function encode(arr, enc) { return arr; }; -},{"../../../BN/bn":126}],143:[function(require,module,exports){ +},{"../../../BN/bn":123}],140:[function(require,module,exports){ 'use strict'; var CryptoJS = require('../../../crypto-js/crypto-js'); @@ -125070,7 +123372,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { return utils.wordArrayToBuffer(res); }; -},{"../../../../base/functions/encode":11,"../../../crypto-js/crypto-js":127,"../elliptic/utils":142}],144:[function(require,module,exports){ +},{"../../../../base/functions/encode":12,"../../../crypto-js/crypto-js":124,"../elliptic/utils":139}],141:[function(require,module,exports){ 'use strict'; var fetch = require('../node-fetch/index'); @@ -125111,7 +123413,7 @@ module.exports = function (context) { }; }; -},{"../node-fetch/index":145}],145:[function(require,module,exports){ +},{"../node-fetch/index":142}],142:[function(require,module,exports){ (function (global,Buffer){ 'use strict'; @@ -126679,7 +124981,7 @@ exports.Response = Response; exports.FetchError = FetchError; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"buffer":188,"http":230,"https":193,"stream":229,"url":236,"zlib":187}],146:[function(require,module,exports){ +},{"buffer":184,"http":226,"https":189,"stream":225,"url":232,"zlib":183}],143:[function(require,module,exports){ (function (Buffer){ /*! * RSA library for Node.js @@ -126906,7 +125208,7 @@ module.exports = (function () { })(); }).call(this,require("buffer").Buffer) -},{"./formats/formats.js":153,"./libs/rsa.js":157,"./schemes/schemes.js":159,"./utils":160,"buffer":188}],147:[function(require,module,exports){ +},{"./formats/formats.js":150,"./libs/rsa.js":154,"./schemes/schemes.js":156,"./utils":157,"buffer":184}],144:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. @@ -126921,7 +125223,7 @@ module.exports = { }; -},{}],148:[function(require,module,exports){ +},{}],145:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. var errors = require('./errors'); @@ -126944,7 +125246,7 @@ for (var e in errors) { module.exports[e] = errors[e]; } -},{"./errors":147,"./reader":149,"./types":150}],149:[function(require,module,exports){ +},{"./errors":144,"./reader":146,"./types":147}],146:[function(require,module,exports){ (function (Buffer){ // Copyright 2011 Mark Cavage All rights reserved. @@ -127210,7 +125512,7 @@ Reader.prototype._readTag = function (tag) { module.exports = Reader; }).call(this,require("buffer").Buffer) -},{"./errors":147,"./types":150,"assert":183,"buffer":188}],150:[function(require,module,exports){ +},{"./errors":144,"./types":147,"assert":179,"buffer":184}],147:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. @@ -127248,7 +125550,7 @@ module.exports = { Context: 128 }; -},{}],151:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. // If you have no idea what ASN.1 or BER is, see this: @@ -127267,7 +125569,7 @@ module.exports = { BerReader: Ber.Reader, }; -},{"./ber/index":148}],152:[function(require,module,exports){ +},{"./ber/index":145}],149:[function(require,module,exports){ var _ = require('../utils')._; var utils = require('../utils'); @@ -127340,7 +125642,7 @@ module.exports = { } }; -},{"../utils":160}],153:[function(require,module,exports){ +},{"../utils":157}],150:[function(require,module,exports){ var _ = require('../utils')._; module.exports = { @@ -127373,7 +125675,7 @@ module.exports = { }, }; -},{"../utils":160,"./components":152,"./pkcs1":154,"./pkcs8":155}],154:[function(require,module,exports){ +},{"../utils":157,"./components":149,"./pkcs1":151,"./pkcs8":152}],151:[function(require,module,exports){ (function (Buffer){ var ber = require('../asn1/index').Ber; var _ = require('../utils')._; @@ -127525,7 +125827,7 @@ module.exports = { }; }).call(this,require("buffer").Buffer) -},{"../asn1/index":151,"../utils":160,"buffer":188}],155:[function(require,module,exports){ +},{"../asn1/index":148,"../utils":157,"buffer":184}],152:[function(require,module,exports){ (function (Buffer){ var ber = require('../asn1/index').Ber; var _ = require('../utils')._; @@ -127716,7 +126018,7 @@ module.exports = { }; }).call(this,require("buffer").Buffer) -},{"../asn1/index":151,"../utils":160,"buffer":188}],156:[function(require,module,exports){ +},{"../asn1/index":148,"../utils":157,"buffer":184}],153:[function(require,module,exports){ (function (Buffer){ /* * Basic JavaScript BN library - subset useful for RSA encryption. @@ -128972,7 +127274,7 @@ BigInteger.prototype.square = bnSquare; module.exports = BigInteger; }).call(this,require("buffer").Buffer) -},{"../utils":160,"buffer":188}],157:[function(require,module,exports){ +},{"../utils":157,"buffer":184}],154:[function(require,module,exports){ /* * RSA Encryption / Decryption with PKCS1 v2 Padding. * @@ -129121,7 +127423,7 @@ module.exports.Key = (function () { })(); -},{"../schemes/schemes.js":159,"../utils":160,"../utils.js":160,"./jsbn.js":156}],158:[function(require,module,exports){ +},{"../schemes/schemes.js":156,"../utils":157,"../utils.js":157,"./jsbn.js":153}],155:[function(require,module,exports){ (function (Buffer){ /** * PKCS1 padding and signature scheme @@ -129301,7 +127603,7 @@ function wordArrayToBuffer(wordArray) { } }).call(this,require("buffer").Buffer) -},{"../../crypto-js/crypto-js":127,"../libs/jsbn":156,"buffer":188,"constants":190}],159:[function(require,module,exports){ +},{"../../crypto-js/crypto-js":124,"../libs/jsbn":153,"buffer":184,"constants":186}],156:[function(require,module,exports){ module.exports = { pkcs1: require('./pkcs1'), @@ -129324,7 +127626,7 @@ module.exports = { } }; -},{"./pkcs1":158}],160:[function(require,module,exports){ +},{"./pkcs1":155}],157:[function(require,module,exports){ /* * Utils functions * @@ -129424,7 +127726,7 @@ module.exports.trimSurroundingText = function (data, opening, closing) { return data.substring(trimStartIndex, trimEndIndex); } -},{}],161:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ 'use strict'; var replace = String.prototype.replace; @@ -129444,7 +127746,7 @@ module.exports = { RFC3986: 'RFC3986' }; -},{}],162:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); @@ -129457,7 +127759,7 @@ module.exports = { stringify: stringify }; -},{"./formats":161,"./parse":163,"./stringify":164}],163:[function(require,module,exports){ +},{"./formats":158,"./parse":160,"./stringify":161}],160:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -129701,7 +128003,7 @@ module.exports = function (str, opts) { return utils.compact(obj); }; -},{"./utils":165}],164:[function(require,module,exports){ +},{"./utils":162}],161:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -129972,7 +128274,7 @@ module.exports = function (object, opts) { return joined.length > 0 ? prefix + joined : ''; }; -},{"./formats":161,"./utils":165}],165:[function(require,module,exports){ +},{"./formats":158,"./utils":162}],162:[function(require,module,exports){ 'use strict'; var has = Object.prototype.hasOwnProperty; @@ -130204,13 +128506,14 @@ module.exports = { merge: merge }; -},{}],166:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, OrderNotFound, PermissionDenied, BadRequest, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -130393,6 +128696,7 @@ module.exports = class stex extends Exchange { 'BITSW': 'BITS', 'BHD': 'Bithold', 'BTH': 'Bithereum', + 'MPH': 'Chasyr Token', 'SBTC': 'SBTCT', // SiamBitcoin }, 'options': { @@ -130456,7 +128760,7 @@ module.exports = class stex extends Exchange { // differentiated fees for each particular method const code = this.safeCurrencyCode (this.safeString (currency, 'code')); const precision = this.safeInteger (currency, 'precision'); - const fee = this.safeFloat (currency, 'withdrawal_fee_const'); // todo: redesign + const fee = this.safeNumber (currency, 'withdrawal_fee_const'); // todo: redesign const active = this.safeValue (currency, 'active', true); result[code] = { 'id': id, @@ -130473,11 +128777,11 @@ module.exports = class stex extends Exchange { 'price': { 'min': Math.pow (10, -precision), 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (currency, 'minimum_deposit_amount'), + 'min': this.safeNumber (currency, 'minimum_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal_amount'), + 'min': this.safeNumber (currency, 'minimum_withdrawal_amount'), 'max': undefined, }, }, @@ -130538,11 +128842,11 @@ module.exports = class stex extends Exchange { 'price': this.safeInteger (market, 'market_precision'), }; const active = this.safeValue (market, 'active'); - const minBuyPrice = this.safeFloat (market, 'min_buy_price'); - const minSellPrice = this.safeFloat (market, 'min_sell_price'); + const minBuyPrice = this.safeNumber (market, 'min_buy_price'); + const minSellPrice = this.safeNumber (market, 'min_sell_price'); const minPrice = Math.max (minBuyPrice, minSellPrice); - const buyFee = this.safeFloat (market, 'buy_fee_percent') / 100; - const sellFee = this.safeFloat (market, 'sell_fee_percent') / 100; + const buyFee = this.safeNumber (market, 'buy_fee_percent') / 100; + const sellFee = this.safeNumber (market, 'sell_fee_percent') / 100; const fee = Math.max (buyFee, sellFee); result.push ({ 'id': id, @@ -130561,7 +128865,7 @@ module.exports = class stex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_order_amount'), + 'min': this.safeNumber (market, 'min_order_amount'), 'max': undefined, }, 'price': { 'min': minPrice, 'max': undefined }, @@ -130725,8 +129029,8 @@ module.exports = class stex extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString2 (ticker, 'id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -130739,11 +129043,11 @@ module.exports = class stex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -130753,20 +129057,12 @@ module.exports = class stex extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volumeQuote'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volumeQuote'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -130832,11 +129128,11 @@ module.exports = class stex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -130911,12 +129207,11 @@ module.exports = class stex extends Exchange { // const id = this.safeString (trade, 'id'); const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; @@ -131029,11 +129324,11 @@ module.exports = class stex extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'currency_id')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen_balance'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -131092,9 +129387,9 @@ module.exports = class stex extends Exchange { const marketId = this.safeString2 (order, 'currency_pair_id', 'currency_pair_name'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (order, 'timestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'initial_amount'); - const filled = this.safeFloat (order, 'processed_amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'initial_amount'); + const filled = this.safeNumber (order, 'processed_amount'); let remaining = undefined; let cost = undefined; if (filled !== undefined) { @@ -131124,7 +129419,7 @@ module.exports = class stex extends Exchange { 'order': id, }); } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); const result = { 'info': order, 'id': id, @@ -131155,7 +129450,7 @@ module.exports = class stex extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'amount'); + const feeCost = this.safeNumber (fees[i], 'amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -131739,13 +130034,13 @@ module.exports = class stex extends Exchange { code = currency['code']; } const type = ('deposit_status_id' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeStringLower (transaction, 'status')); const timestamp = this.safeTimestamp2 (transaction, 'timestamp', 'created_ts'); const updated = this.safeTimestamp (transaction, 'updated_ts'); const txid = this.safeString (transaction, 'txid'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'fee_currency_id', 'deposit_fee_currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -131981,8 +130276,8 @@ module.exports = class stex extends Exchange { for (let i = 0; i < data.length; i++) { const id = this.safeString (data[i], 'id'); const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (data[i], 'withdrawal_fee_const'); - depositFees[code] = this.safeFloat (data[i], 'deposit_fee_const'); + withdrawFees[code] = this.safeNumber (data[i], 'withdrawal_fee_const'); + depositFees[code] = this.safeNumber (data[i], 'deposit_fee_const'); } return { 'withdraw': withdrawFees, @@ -132011,7 +130306,7 @@ module.exports = class stex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],167:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],164:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -132045,13 +130340,14 @@ module.exports = class surbitcoin extends foxbit { } }; -},{"./foxbit.js":87}],168:[function(require,module,exports){ +},{"./foxbit.js":85}],165:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -132219,8 +130515,8 @@ module.exports = class therock extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const buy_fee = this.safeFloat (market, 'buy_fee'); - const sell_fee = this.safeFloat (market, 'sell_fee'); + const buy_fee = this.safeNumber (market, 'buy_fee'); + const sell_fee = this.safeNumber (market, 'sell_fee'); let taker = Math.max (buy_fee, sell_fee); taker = taker / 100; const maker = taker; @@ -132241,11 +130537,11 @@ module.exports = class therock extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_quantity_offer'), + 'min': this.safeNumber (market, 'minimum_quantity_offer'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'minimum_price_offer'), + 'min': this.safeNumber (market, 'minimum_price_offer'), 'max': undefined, }, 'cost': { @@ -132269,11 +130565,11 @@ module.exports = class therock extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'trading_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'trading_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -132292,27 +130588,27 @@ module.exports = class therock extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'close'), // previous day close, if any + 'previousClose': this.safeNumber (ticker, 'close'), // previous day close, if any 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_traded'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume_traded'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -132387,14 +130683,11 @@ module.exports = class therock extends Exchange { const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; let feeCost = undefined; const transactions = this.safeValue (trade, 'transactions', []); @@ -132404,7 +130697,7 @@ module.exports = class therock extends Exchange { if (feeCost === undefined) { feeCost = 0; } - feeCost = this.sum (feeCost, this.safeFloat (feeTransactions[i], 'price')); + feeCost = this.sum (feeCost, this.safeNumber (feeTransactions[i], 'price')); } if (feeCost !== undefined) { fee = { @@ -132559,7 +130852,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (item, 'price'); + const amount = this.safeNumber (item, 'price'); const timestamp = this.parse8601 (this.safeString (item, 'date')); const status = 'ok'; return { @@ -132791,7 +131084,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'price'); + const amount = this.safeNumber (transaction, 'price'); const timestamp = this.parse8601 (this.safeString (transaction, 'date')); const status = 'ok'; // todo parse tags @@ -132966,15 +131259,15 @@ module.exports = class therock extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'date')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'amount_unfilled'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amount_unfilled'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let trades = this.safeValue (order, 'trades'); let cost = undefined; let average = undefined; @@ -133001,7 +131294,7 @@ module.exports = class therock extends Exchange { cost = 0; } } - const stopPrice = this.safeFloat (order, 'conditional_price'); + const stopPrice = this.safeNumber (order, 'conditional_price'); return { 'id': id, 'clientOrderId': undefined, @@ -133279,13 +131572,14 @@ module.exports = class therock extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],169:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],166:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, OrderNotFound, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -133464,11 +131758,11 @@ module.exports = class tidebit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -133493,15 +131787,15 @@ module.exports = class tidebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'ask': this.safeFloat (ticker, 'sell'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'ask': this.safeNumber (ticker, 'sell'), 'bidVolume': undefined, 'askVolume': undefined, 'vwap': undefined, @@ -133512,7 +131806,7 @@ module.exports = class tidebit extends Exchange { 'percentage': undefined, 'previousClose': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -133546,9 +131840,14 @@ module.exports = class tidebit extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -133593,11 +131892,11 @@ module.exports = class tidebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -133683,18 +131982,12 @@ module.exports = class tidebit extends Exchange { const id = this.safeString (order, 'id'); const type = this.safeString (order, 'ord_type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const filled = this.safeFloat (order, 'executed_volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - let cost = undefined; - if (price !== undefined) { - if (filled !== undefined) { - cost = price * filled; - } - } - const average = this.safeFloat (order, 'avg_price'); - return { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const filled = this.safeNumber (order, 'executed_volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -133711,12 +132004,12 @@ module.exports = class tidebit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': average, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -133824,11 +132117,12 @@ module.exports = class tidebit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],170:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],167:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class tidex extends Exchange { describe () { @@ -133910,6 +132204,7 @@ module.exports = class tidex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.1 / 100, @@ -133954,19 +132249,48 @@ module.exports = class tidex extends Exchange { async fetchCurrencies (params = {}) { const response = await this.webGetCurrency (params); + // + // [ + // { + // "id":2, + // "symbol":"BTC", + // "type":2, + // "name":"Bitcoin", + // "amountPoint":8, + // "depositEnable":true, + // "depositMinAmount":0.0005, + // "withdrawEnable":true, + // "withdrawFee":0.0004, + // "withdrawMinAmount":0.0005, + // "settings":{ + // "Blockchain":"https://blockchair.com/bitcoin/", + // "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}", + // "AddrUrl":"https://blockchair.com/bitcoin/address/{0}", + // "ConfirmationCount":3, + // "NeedMemo":false + // }, + // "visible":true, + // "isDelisted":false + // } + // ] + // const result = {}; for (let i = 0; i < response.length; i++) { const currency = response[i]; const id = this.safeString (currency, 'symbol'); - const precision = currency['amountPoint']; + const precision = this.safeInteger (currency, 'amountPoint'); const code = this.safeCurrencyCode (id); - let active = currency['visible'] === true; - const canWithdraw = currency['withdrawEnable'] === true; - const canDeposit = currency['depositEnable'] === true; + const visible = this.safeValue (currency, 'visible'); + let active = visible === true; + const withdrawEnable = this.safeValue (currency, 'withdrawEnable'); + const depositEnable = this.safeValue (currency, 'depositEnable'); + const canWithdraw = withdrawEnable === true; + const canDeposit = depositEnable === true; if (!canWithdraw || !canDeposit) { active = false; } const name = this.safeString (currency, 'name'); + const fee = this.safeNumber (currency, 'withdrawFee'); result[code] = { 'id': id, 'code': code, @@ -133976,7 +132300,7 @@ module.exports = class tidex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': currency['withdrawFee'], + 'fee': fee, }, 'deposit': { 'active': canDeposit, @@ -133997,11 +132321,11 @@ module.exports = class tidex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawMinAmount'), + 'min': this.safeNumber (currency, 'withdrawMinAmount'), 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'depositMinAmount'), + 'min': this.safeNumber (currency, 'depositMinAmount'), 'max': undefined, }, }, @@ -134011,26 +132335,25 @@ module.exports = class tidex extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615861869, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":3.0, + // "min_amount":0.001, + // "max_amount":1000000.0, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.1, + // }, + // }, + // } + // const markets = response['pairs']; const keys = Object.keys (markets); const result = []; @@ -134047,19 +132370,20 @@ module.exports = class tidex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }, }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -134068,7 +132392,7 @@ module.exports = class tidex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -134089,11 +132413,11 @@ module.exports = class tidex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (funds, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'value'); - account['used'] = this.safeFloat (balance, 'inOrders'); + account['free'] = this.safeString (balance, 'value'); + account['used'] = this.safeString (balance, 'inOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -134165,16 +132489,16 @@ module.exports = class tidex extends Exchange { timestamp = undefined; } } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -134183,9 +132507,9 @@ module.exports = class tidex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -134233,16 +132557,19 @@ module.exports = class tidex extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const orderId = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = 'limit'; // all trades are still limit trades let takerOrMaker = undefined; let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -134261,12 +132588,6 @@ module.exports = class tidex extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': orderId, @@ -134322,17 +132643,18 @@ module.exports = class tidex extends Exchange { let status = 'open'; let filled = 0.0; let remaining = amount; - if ('return' in response) { - id = this.safeString (response['return'], 'order_id'); + const returnResult = this.safeValue (response, 'return'); + if (returnResult !== undefined) { + id = this.safeString (returnResult, 'order_id'); if (id === '0') { - id = this.safeString (response['return'], 'init_order_id'); + id = this.safeString (returnResult, 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (returnResult, 'received', filled); + remaining = this.safeNumber (returnResult, 'remains', amount); } const timestamp = this.milliseconds (); - return { + return this.safeOrder ({ 'id': id, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -134342,7 +132664,7 @@ module.exports = class tidex extends Exchange { 'type': type, 'side': side, 'price': price, - 'cost': price * filled, + 'cost': undefined, 'amount': amount, 'remaining': remaining, 'filled': filled, @@ -134352,7 +132674,7 @@ module.exports = class tidex extends Exchange { 'clientOrderId': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -134381,23 +132703,15 @@ module.exports = class tidex extends Exchange { const symbol = this.safeSymbol (marketId, market); let remaining = undefined; let amount = undefined; - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; + const price = this.safeNumber (order, 'rate'); if ('start_amount' in order) { - amount = this.safeFloat (order, 'start_amount'); - remaining = this.safeFloat (order, 'amount'); + amount = this.safeNumber (order, 'start_amount'); + remaining = this.safeNumber (order, 'amount'); } else { - remaining = this.safeFloat (order, 'amount'); - } - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } + remaining = this.safeNumber (order, 'amount'); } const fee = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -134411,15 +132725,15 @@ module.exports = class tidex extends Exchange { 'side': this.safeString (order, 'type'), 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -134609,11 +132923,12 @@ module.exports = class tidex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],171:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],168:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, PermissionDenied, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, RateLimitExceeded, NotSupported, BadRequest, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class timex extends Exchange { describe () { @@ -135062,11 +133377,11 @@ module.exports = class timex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'totalBalance'); - account['used'] = this.safeFloat (balance, 'lockedBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + account['used'] = this.safeString (balance, 'lockedBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -135427,7 +133742,7 @@ module.exports = class timex extends Exchange { const result = this.safeValue (response, 0, {}); return { 'info': response, - 'maker': this.safeFloat (result, 'fee'), + 'maker': this.safeNumber (result, 'fee'), 'taker': undefined, }; } @@ -135464,18 +133779,18 @@ module.exports = class timex extends Exchange { 'amount': this.precisionFromString (this.safeString (market, 'quantityIncrement')), 'price': this.precisionFromString (this.safeString (market, 'tickSize')), }; - const amountIncrement = this.safeFloat (market, 'quantityIncrement'); - const minBase = this.safeFloat (market, 'baseMinSize'); + const amountIncrement = this.safeNumber (market, 'quantityIncrement'); + const minBase = this.safeNumber (market, 'baseMinSize'); const minAmount = Math.max (amountIncrement, minBase); - const priceIncrement = this.safeFloat (market, 'tickSize'); - const minCost = this.safeFloat (market, 'quoteMinSize'); + const priceIncrement = this.safeNumber (market, 'tickSize'); + const minCost = this.safeNumber (market, 'quoteMinSize'); const limits = { 'amount': { 'min': minAmount, 'max': undefined }, 'price': { 'min': priceIncrement, 'max': undefined }, 'cost': { 'min': Math.max (minCost, minAmount * priceIncrement), 'max': undefined }, }; - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); return { 'id': id, 'symbol': symbol, @@ -135536,7 +133851,7 @@ module.exports = class timex extends Exchange { const name = this.safeString (currency, 'name'); const precision = this.safeInteger (currency, 'decimals'); const active = this.safeValue (currency, 'active'); - // const fee = this.safeFloat (currency, 'withdrawalFee'); + // const fee = this.safeNumber (currency, 'withdrawalFee'); const feeString = this.safeString (currency, 'withdrawalFee'); const tradeDecimals = this.safeInteger (currency, 'tradeDecimals'); let fee = undefined; @@ -135573,14 +133888,6 @@ module.exports = class timex extends Exchange { }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // // { @@ -135600,8 +133907,8 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '/'); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -135617,11 +133924,11 @@ module.exports = class timex extends Exchange { 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -135631,8 +133938,8 @@ module.exports = class timex extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'volumeQuote'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volumeQuote'), }; } @@ -135651,23 +133958,27 @@ module.exports = class timex extends Exchange { // fetchMyTrades, fetchOrder (private) // // { - // "fee": "0.3", - // "id": 100, - // "makerOrTaker": "MAKER", - // "makerOrderId": "string", - // "price": "0.017", - // "quantity": "0.3", + // "id": "7613414", + // "makerOrderId": "0x8420af060722f560098f786a2894d4358079b6ea5d14b395969ed77bc87a623a", + // "takerOrderId": "0x1235ef158a361815b54c9988b6241c85aedcbc1fe81caf8df8587d5ab0373d1a", + // "symbol": "LTCUSDT", // "side": "BUY", - // "symbol": "TIMEETH", - // "takerOrderId": "string", - // "timestamp": "2019-12-08T04:54:11.171Z" - // } + // "quantity": "0.2", + // "fee": "0.22685", + // "feeToken": "USDT", + // "price": "226.85", + // "makerOrTaker": "TAKER", + // "timestamp": "2021-04-09T15:39:45.608" + // } // const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeStringLower2 (trade, 'direction', 'side'); const takerOrMaker = this.safeStringLower (trade, 'makerOrTaker'); @@ -135676,18 +133987,14 @@ module.exports = class timex extends Exchange { orderId = this.safeString (trade, takerOrMaker + 'OrderId'); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); + const feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'feeToken')); if (feeCost !== undefined) { - const feeCurrency = (market === undefined) ? undefined : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrency, }; } - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = this.costToPrecision (symbol, amount * price); - } return { 'info': trade, 'id': id, @@ -135719,11 +134026,11 @@ module.exports = class timex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -135754,14 +134061,12 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'filledQuantity'); - const canceledQuantity = this.safeFloat (order, 'cancelledQuantity'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'filledQuantity'); + const canceledQuantity = this.safeNumber (order, 'cancelledQuantity'); let status = undefined; if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0.0); if (filled >= amount) { status = 'closed'; } else if ((canceledQuantity !== undefined) && (canceledQuantity > 0)) { @@ -135770,30 +134075,19 @@ module.exports = class timex extends Exchange { status = 'open'; } } - const cost = parseFloat (this.costToPrecision (symbol, price * filled)); - const fee = undefined; - let lastTradeTimestamp = undefined; - let trades = undefined; - const rawTrades = this.safeValue (order, 'trades'); - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'order': id, - }); - } - if (trades !== undefined) { - const numTrades = trades.length; - if (numTrades > 0) { - lastTradeTimestamp = trades[numTrades - 1]['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'order': id, + 'type': type, + }); const clientOrderId = this.safeString (order, 'clientOrderId'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': undefined, @@ -135802,14 +134096,14 @@ module.exports = class timex extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { @@ -135850,13 +134144,14 @@ module.exports = class timex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],172:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],169:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, PermissionDenied, AddressPending } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -136082,9 +134377,9 @@ module.exports = class upbit extends Exchange { } else if ((locked !== undefined) && locked) { active = false; } - const maxOnetimeWithdrawal = this.safeFloat (withdrawLimits, 'onetime'); - const maxDailyWithdrawal = this.safeFloat (withdrawLimits, 'daily', maxOnetimeWithdrawal); - const remainingDailyWithdrawal = this.safeFloat (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); + const maxOnetimeWithdrawal = this.safeNumber (withdrawLimits, 'onetime'); + const maxDailyWithdrawal = this.safeNumber (withdrawLimits, 'daily', maxOnetimeWithdrawal); + const remainingDailyWithdrawal = this.safeNumber (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); let maxWithdrawLimit = undefined; if (remainingDailyWithdrawal > 0) { maxWithdrawLimit = remainingDailyWithdrawal; @@ -136100,11 +134395,11 @@ module.exports = class upbit extends Exchange { 'code': code, 'name': code, 'active': active, - 'fee': this.safeFloat (currencyInfo, 'withdraw_fee'), + 'fee': this.safeNumber (currencyInfo, 'withdraw_fee'), 'precision': precision, 'limits': { 'withdraw': { - 'min': this.safeFloat (withdrawLimits, 'minimum'), + 'min': this.safeNumber (withdrawLimits, 'minimum'), 'max': maxWithdrawLimit, }, }, @@ -136167,8 +134462,8 @@ module.exports = class upbit extends Exchange { }; const state = this.safeString (marketInfo, 'state'); const active = (state === 'active'); - const bidFee = this.safeFloat (response, 'bid_fee'); - const askFee = this.safeFloat (response, 'ask_fee'); + const bidFee = this.safeNumber (response, 'bid_fee'); + const askFee = this.safeNumber (response, 'ask_fee'); const fee = Math.max (bidFee, askFee); return { 'info': response, @@ -136184,7 +134479,7 @@ module.exports = class upbit extends Exchange { 'taker': fee, 'limits': { 'amount': { - 'min': this.safeFloat (ask, 'min_total'), + 'min': this.safeNumber (ask, 'min_total'), 'max': undefined, }, 'price': { @@ -136192,8 +134487,8 @@ module.exports = class upbit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (bid, 'min_total'), - 'max': this.safeFloat (marketInfo, 'max_total'), + 'min': this.safeNumber (bid, 'min_total'), + 'max': this.safeNumber (marketInfo, 'max_total'), }, }, }; @@ -136232,8 +134527,8 @@ module.exports = class upbit extends Exchange { 'price': 8, }; const active = true; - const makerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); - const takerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); + const makerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); + const takerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); result.push ({ 'id': id, 'symbol': symbol, @@ -136286,11 +134581,11 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { @@ -136393,30 +134688,30 @@ module.exports = class upbit extends Exchange { const timestamp = this.safeInteger (ticker, 'trade_timestamp'); const marketId = this.safeString2 (ticker, 'market', 'code'); const symbol = this.safeSymbol (marketId, market, '-'); - const previous = this.safeFloat (ticker, 'prev_closing_price'); - const last = this.safeFloat (ticker, 'trade_price'); - const change = this.safeFloat (ticker, 'signed_change_price'); - const percentage = this.safeFloat (ticker, 'signed_change_rate'); + const previous = this.safeNumber (ticker, 'prev_closing_price'); + const last = this.safeNumber (ticker, 'trade_price'); + const change = this.safeNumber (ticker, 'signed_change_price'); + const percentage = this.safeNumber (ticker, 'signed_change_rate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price'), - 'low': this.safeFloat (ticker, 'low_price'), + 'high': this.safeNumber (ticker, 'high_price'), + 'low': this.safeNumber (ticker, 'low_price'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'opening_price'), + 'open': this.safeNumber (ticker, 'opening_price'), 'close': last, 'last': last, 'previousClose': previous, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'acc_trade_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'acc_trade_price_24h'), + 'baseVolume': this.safeNumber (ticker, 'acc_trade_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'acc_trade_price_24h'), 'info': ticker, }; } @@ -136523,15 +134818,13 @@ module.exports = class upbit extends Exchange { } else if (askOrBid === 'bid') { side = 'buy'; } - let cost = this.safeFloat (trade, 'funds'); - const price = this.safeFloat2 (trade, 'trade_price', 'price'); - const amount = this.safeFloat2 (trade, 'trade_volume', 'volume'); + let cost = this.safeNumber (trade, 'funds'); + const priceString = this.safeString2 (trade, 'trade_price', 'price'); + const amountString = this.safeString2 (trade, 'trade_volume', 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString2 (trade, 'market', 'code'); market = this.safeMarket (marketId, market); @@ -136626,11 +134919,11 @@ module.exports = class upbit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'candle_date_time_utc')), - this.safeFloat (ohlcv, 'opening_price'), - this.safeFloat (ohlcv, 'high_price'), - this.safeFloat (ohlcv, 'low_price'), - this.safeFloat (ohlcv, 'trade_price'), - this.safeFloat (ohlcv, 'candle_acc_trade_volume'), // base volume + this.safeNumber (ohlcv, 'opening_price'), + this.safeNumber (ohlcv, 'high_price'), + this.safeNumber (ohlcv, 'low_price'), + this.safeNumber (ohlcv, 'trade_price'), + this.safeNumber (ohlcv, 'candle_acc_trade_volume'), // base volume ]; } @@ -136899,7 +135192,7 @@ module.exports = class upbit extends Exchange { // } // const id = this.safeString (transaction, 'uuid'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = undefined; // not present in the data structure received from the exchange const tag = undefined; // not present in the data structure received from the exchange const txid = this.safeString (transaction, 'txid'); @@ -136912,7 +135205,7 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -136997,10 +135290,10 @@ module.exports = class upbit extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const status = this.parseOrderStatus (this.safeString (order, 'state')); let lastTradeTimestamp = undefined; - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - const filled = this.safeFloat (order, 'executed_volume'); + let price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const filled = this.safeNumber (order, 'executed_volume'); let cost = undefined; if (type === 'price') { type = 'market'; @@ -137009,7 +135302,7 @@ module.exports = class upbit extends Exchange { } let average = undefined; let fee = undefined; - let feeCost = this.safeFloat (order, 'paid_fee'); + let feeCost = this.safeNumber (order, 'paid_fee'); const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); let trades = this.safeValue (order, 'trades', []); @@ -137032,7 +135325,7 @@ module.exports = class upbit extends Exchange { cost = this.sum (cost, trade['cost']); if (getFeesFromTrades) { const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); + const tradeFeeCost = this.safeNumber (tradeFee, 'cost'); if (tradeFeeCost !== undefined) { feeCost = this.sum (feeCost, tradeFeeCost); } @@ -137174,16 +135467,6 @@ module.exports = class upbit extends Exchange { return this.parseOrder (response); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetDepositsCoinAddresses (params); @@ -137381,212 +135664,7 @@ module.exports = class upbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],173:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); - -// --------------------------------------------------------------------------- - -module.exports = class vaultoro extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'vaultoro', - 'name': 'Vaultoro', - 'countries': [ 'CH' ], - 'rateLimit': 1000, - 'version': '1', - 'has': { - 'CORS': true, - 'fetchMarkets': true, - 'fetchOrderBook': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'fetchTrades': true, - 'fetchTicker': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg', - 'api': 'https://api.vaultoro.com', - 'www': 'https://www.vaultoro.com', - 'doc': 'https://api.vaultoro.com', - }, - 'commonCurrencies': { - 'GLD': 'Gold', - }, - 'api': { - 'public': { - 'get': [ - 'bidandask', - 'buyorders', - 'latest', - 'latesttrades', - 'markets', - 'orderbook', - 'sellorders', - 'transactions/day', - 'transactions/hour', - 'transactions/month', - ], - }, - 'private': { - 'get': [ - 'balance', - 'mytrades', - 'orders', - ], - 'post': [ - 'buy/{symbol}/{type}', - 'cancel/{id}', - 'sell/{symbol}/{type}', - 'withdraw', - ], - }, - }, - }); - } - - async fetchMarkets (params = {}) { - const result = []; - const response = await this.publicGetMarkets (params); - const market = this.safeValue (response, 'data'); - const baseId = this.safeString (market, 'MarketCurrency'); - const quoteId = this.safeString (market, 'BaseCurrency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const id = this.safeString (market, 'MarketName'); - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'active': undefined, - 'precision': this.precision, - 'limits': this.limits, - }); - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetBalance (params); - const balances = this.safeValue (response, 'data'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency_code'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'cash'); - account['used'] = this.safeFloat (balance, 'reserved'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetOrderbook (params); - const orderbook = { - 'bids': response['data'][0]['b'], - 'asks': response['data'][1]['s'], - }; - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'Gold_Price', 'Gold_Amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'Time')); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const price = this.safeFloat (trade, 'Gold_Price'); - const amount = this.safeFloat (trade, 'Gold_Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } - return { - 'id': undefined, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': undefined, - 'side': undefined, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const response = await this.publicGetTransactionsDay (params); - return this.parseTrades (response, market, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const method = 'privatePost' + this.capitalize (side) + 'SymbolType'; - const request = { - 'symbol': market['quoteId'].toLowerCase (), - 'type': type, - 'gld': amount, - 'price': price || 1, - }; - const response = await this[method] (this.extend (request, params)); - return { - 'info': response, - 'id': response['data']['Order_ID'], - }; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - return await this.privatePostCancelId (this.extend (request, params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/'; - if (api === 'public') { - url += path; - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce (); - url += this.version + '/' + this.implodeParams (path, params); - const query = this.extend ({ - 'nonce': nonce, - 'apikey': this.apiKey, - }, this.omit (params, this.extractParams (path))); - url += '?' + this.urlencode (query); - headers = { - 'Content-Type': 'application/json', - 'X-Signature': this.hmac (this.encode (url), this.encode (this.secret)), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } -}; - -},{"./base/Exchange":6}],174:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],170:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -137620,7 +135698,7 @@ module.exports = class vbtc extends foxbit { } }; -},{"./foxbit.js":87}],175:[function(require,module,exports){ +},{"./foxbit.js":85}],171:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -137628,6 +135706,7 @@ module.exports = class vbtc extends foxbit { const Exchange = require ('./base/Exchange'); const { ExchangeError, OrderNotFound, InvalidOrder, BadRequest, AuthenticationError, RateLimitExceeded, RequestTimeout, BadSymbol, AddressPending, PermissionDenied, InsufficientFunds } = require ('./base/errors'); const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -137819,15 +135898,15 @@ module.exports = class vcc extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, 'min'), + 'min': this.safeNumber (amountLimits, 'min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (priceLimits, 'min'), + 'min': this.safeNumber (priceLimits, 'min'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (costLimits, 'min'), + 'min': this.safeNumber (costLimits, 'min'), 'max': undefined, }, }, @@ -137874,12 +135953,12 @@ module.exports = class vcc extends Exchange { 'code': code, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': this.safeInteger (currency, 'decimal'), 'limits': { 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw'), - 'max': this.safeFloat (currency, 'max_withdraw'), + 'min': this.safeNumber (currency, 'min_withdraw'), + 'max': this.safeNumber (currency, 'max_withdraw'), }, }, }; @@ -137902,8 +135981,8 @@ module.exports = class vcc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } @@ -137929,11 +136008,11 @@ module.exports = class vcc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (data, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -137951,11 +136030,11 @@ module.exports = class vcc extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -138044,10 +136123,10 @@ module.exports = class vcc extends Exchange { // } // const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); - const open = this.safeFloat (ticker, 'open_price'); - const last = this.safeFloat (ticker, 'last_price'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); + const open = this.safeNumber (ticker, 'open_price'); + const last = this.safeNumber (ticker, 'last_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -138064,11 +136143,11 @@ module.exports = class vcc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -138182,17 +136261,17 @@ module.exports = class vcc extends Exchange { } market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'base_volume', 'quantity'); - let cost = this.safeFloat2 (trade, 'quote_volume', 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'base_volume', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber2 (trade, 'quote_volume', 'amount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const side = this.safeString2 (trade, 'type', 'trade_type'); const id = this.safeString2 (trade, 'trade_id', 'id'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -138377,7 +136456,7 @@ module.exports = class vcc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -138385,7 +136464,7 @@ module.exports = class vcc extends Exchange { const txid = this.safeString (transaction, 'transaction_id'); const tag = this.safeString (transaction, 'destination_tag'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -138630,46 +136709,27 @@ module.exports = class vcc extends Exchange { const marketId = baseId + '_' + quoteId; market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'executed_quantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - let cost = this.safeFloat (order, 'ceiling'); + const cost = this.safeNumber (order, 'ceiling'); const id = this.safeString (order, 'id'); - let average = undefined; - let price = this.safeFloat (order, 'price'); - // in case of market order - if (!price) { - price = this.safeFloat (order, 'executed_price'); - average = price; - } - let remaining = this.safeFloat (order, 'remaining'); - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if (filled !== undefined) { - if ((amount !== undefined) && (remaining === undefined)) { - remaining = Math.max (0, amount - filled); - } - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((average === undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'executed_price'); + const remaining = this.safeNumber (order, 'remaining'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'trade_type'); const fee = { 'currency': market['quote'], - 'cost': this.safeFloat (order, 'fee'), - 'rate': this.safeFloat (order, 'fee_rate'), + 'cost': this.safeNumber (order, 'fee'), + 'rate': this.safeNumber (order, 'fee_rate'), }; let lastTradeTimestamp = undefined; if (updated !== created) { lastTradeTimestamp = updated; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': id, 'timestamp': created, @@ -138691,7 +136751,7 @@ module.exports = class vcc extends Exchange { 'fee': fee, 'trades': undefined, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -138961,7 +137021,7 @@ module.exports = class vcc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],176:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],172:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -139529,13 +137589,13 @@ module.exports = class wavesexchange extends Exchange { symbol = market['symbol']; } const data = this.safeValue (ticker, 'data', {}); - const last = this.safeFloat (data, 'lastPrice'); - const low = this.safeFloat (data, 'low'); - const high = this.safeFloat (data, 'high'); - const vwap = this.safeFloat (data, 'weightedAveragePrice'); - const baseVolume = this.safeFloat (data, 'volume'); - const quoteVolume = this.safeFloat (data, 'quoteVolume'); - const open = this.safeValue (data, 'firstPrice'); + const last = this.safeNumber (data, 'lastPrice'); + const low = this.safeNumber (data, 'low'); + const high = this.safeNumber (data, 'high'); + const vwap = this.safeNumber (data, 'weightedAveragePrice'); + const baseVolume = this.safeNumber (data, 'volume'); + const quoteVolume = this.safeNumber (data, 'quoteVolume'); + const open = this.safeNumber (data, 'firstPrice'); let change = undefined; let average = undefined; let percentage = undefined; @@ -139689,11 +137749,11 @@ module.exports = class wavesexchange extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.parse8601 (this.safeString (data, 'time')), - this.safeFloat (data, 'open'), - this.safeFloat (data, 'high'), - this.safeFloat (data, 'low'), - this.safeFloat (data, 'close'), - this.safeFloat (data, 'volume', 0), + this.safeNumber (data, 'open'), + this.safeNumber (data, 'high'), + this.safeNumber (data, 'low'), + this.safeNumber (data, 'close'), + this.safeNumber (data, 'volume', 0), ]; } @@ -139908,7 +137968,7 @@ module.exports = class wavesexchange extends Exchange { } if (matcherFee === undefined) { const wavesPrecision = this.safeInteger (this.options, 'wavesPrecision', 8); - const rate = this.safeFloat (rates, matcherFeeAssetId); + const rate = this.safeNumber (rates, matcherFeeAssetId); const code = this.safeCurrencyCode (matcherFeeAssetId); const currency = this.currency (code); const newPrecison = Math.pow (10, wavesPrecision - currency['precision']); @@ -140318,7 +138378,7 @@ module.exports = class wavesexchange extends Exchange { const issueTransaction = this.safeValue (entry, 'issueTransaction'); const decimals = this.safeInteger (issueTransaction, 'decimals'); const currencyId = this.safeString (entry, 'assetId'); - const balance = this.safeFloat (entry, 'balance'); + const balance = this.safeNumber (entry, 'balance'); let code = undefined; if (currencyId in this.currencies_by_id) { code = this.safeCurrencyCode (currencyId); @@ -140348,7 +138408,7 @@ module.exports = class wavesexchange extends Exchange { if (!(code in result)) { result[code] = this.account (); } - const amount = this.safeFloat (reservedBalance, currencyId); + const amount = this.safeNumber (reservedBalance, currencyId); result[code]['used'] = this.currencyFromPrecision (code, amount); } const wavesRequest = { @@ -140361,7 +138421,7 @@ module.exports = class wavesexchange extends Exchange { // "balance": 909085978 // } result['WAVES'] = this.safeValue (result, 'WAVES', {}); - result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeFloat (wavesTotal, 'balance')); + result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeNumber (wavesTotal, 'balance')); const codes = Object.keys (result); for (let i = 0; i < codes.length; i++) { const code = codes[i]; @@ -140453,8 +138513,8 @@ module.exports = class wavesexchange extends Exchange { const datetime = this.safeString (data, 'timestamp'); const timestamp = this.parse8601 (datetime); const id = this.safeString (data, 'id'); - const price = this.safeFloat (data, 'price'); - const amount = this.safeFloat (data, 'amount'); + const price = this.safeNumber (data, 'price'); + const amount = this.safeNumber (data, 'amount'); const order1 = this.safeValue (data, 'order1'); const order2 = this.safeValue (data, 'order2'); let order = undefined; @@ -140478,7 +138538,7 @@ module.exports = class wavesexchange extends Exchange { cost = price * amount; } const fee = { - 'cost': this.safeFloat (data, 'fee'), + 'cost': this.safeNumber (data, 'fee'), 'currency': this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES')), }; return { @@ -140560,7 +138620,7 @@ module.exports = class wavesexchange extends Exchange { const withdrawAddress = await this.privateGetWithdrawAddressesCurrencyAddress (withdrawAddressRequest); const currency = this.safeValue (withdrawAddress, 'currency'); const allowedAmount = this.safeValue (currency, 'allowed_amount'); - const minimum = this.safeFloat (allowedAmount, 'min'); + const minimum = this.safeNumber (allowedAmount, 'min'); if (amount <= minimum) { throw new BadRequest (this.id + ' ' + code + ' withdraw failed, amount ' + amount.toString () + ' must be greater than the minimum allowed amount of ' + minimum.toString ()); } @@ -140630,13 +138690,14 @@ module.exports = class wavesexchange extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],177:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],173:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeNotAvailable, ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -140797,7 +138858,7 @@ module.exports = class whitebit extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -140805,7 +138866,7 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minTotal'), + 'min': this.safeNumber (market, 'minTotal'), 'max': undefined, }, }, @@ -140870,8 +138931,8 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -140883,8 +138944,8 @@ module.exports = class whitebit extends Exchange { const response = await this.publicV2GetFee (params); const fees = this.safeValue (response, 'result'); return { - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), }; } @@ -140954,8 +139015,8 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let change = undefined; if (percentage !== undefined) { change = this.numberToString (percentage * 0.01); @@ -140964,22 +139025,22 @@ module.exports = class whitebit extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'deal'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'deal'), 'info': ticker, }; } @@ -141147,8 +139208,11 @@ module.exports = class whitebit extends Exchange { } else { timestamp = parseInt (timestamp * 1000); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'volume'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'volume'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const id = this.safeString2 (trade, 'id', 'tradeId'); let side = this.safeString (trade, 'type'); if (side === undefined) { @@ -141159,10 +139223,6 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined && price !== undefined) { - cost = amount * price; - } return { 'info': trade, 'timestamp': timestamp, @@ -141232,11 +139292,11 @@ module.exports = class whitebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -141285,7 +139345,7 @@ module.exports = class whitebit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],178:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],174:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -141440,14 +139500,13 @@ module.exports = class xbtce extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'FreeAmount'), - 'used': this.safeFloat (balance, 'LockedAmount'), - 'total': this.safeFloat (balance, 'Amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'FreeAmount'); + account['used'] = this.safeString (balance, 'LockedAmount'); + account['total'] = this.safeString (balance, 'Amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -141559,11 +139618,11 @@ module.exports = class xbtce extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeInteger (ohlcv, 'Timestamp'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -141657,11 +139716,12 @@ module.exports = class xbtce extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],179:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],175:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, InsufficientFunds, InvalidAddress, BadSymbol, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class xena extends Exchange { describe () { @@ -141937,8 +139997,8 @@ module.exports = class xena extends Exchange { 'price': pricePrecision, 'amount': 0, }; - const maxCost = this.safeFloat (market, 'maxOrderQty'); - const minCost = this.safeFloat (market, 'minOrderQuantity'); + const maxCost = this.safeNumber (market, 'maxOrderQty'); + const minCost = this.safeNumber (market, 'minOrderQuantity'); const limits = { 'amount': { 'min': undefined, @@ -142023,7 +140083,7 @@ module.exports = class xena extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (withdraw, 'commission'), + 'fee': this.safeNumber (withdraw, 'commission'), 'precision': precision, 'limits': { 'amount': { @@ -142039,7 +140099,7 @@ module.exports = class xena extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'minAmount'), + 'min': this.safeNumber (withdraw, 'minAmount'), 'max': undefined, }, }, @@ -142067,8 +140127,8 @@ module.exports = class xena extends Exchange { const timestamp = this.milliseconds (); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPx'); - const open = this.safeFloat (ticker, 'firstPx'); + const last = this.safeNumber (ticker, 'lastPx'); + const open = this.safeNumber (ticker, 'firstPx'); let percentage = undefined; let change = undefined; let average = undefined; @@ -142079,18 +140139,18 @@ module.exports = class xena extends Exchange { percentage = change / open * 100; } } - const buyVolume = this.safeFloat (ticker, 'buyVolume'); - const sellVolume = this.safeFloat (ticker, 'sellVolume'); + const buyVolume = this.safeNumber (ticker, 'buyVolume'); + const sellVolume = this.safeNumber (ticker, 'sellVolume'); const baseVolume = this.sum (buyVolume, sellVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPx'), - 'low': this.safeFloat (ticker, 'lowPx'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'highPx'), + 'low': this.safeNumber (ticker, 'lowPx'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -142267,11 +140327,11 @@ module.exports = class xena extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onHold'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onHold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTrade (trade, market = undefined) { @@ -142325,20 +140385,17 @@ module.exports = class xena extends Exchange { const orderId = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat2 (trade, 'lastPx', 'mdEntryPx'); - const amount = this.safeFloat2 (trade, 'lastQty', 'mdEntrySize'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'lastPx', 'mdEntryPx'); + const amountString = this.safeString2 (trade, 'lastQty', 'mdEntrySize'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (trade, 'commRate'); + const feeRate = this.safeNumber (trade, 'commRate'); fee = { 'cost': feeCost, 'rate': feeRate, @@ -142453,15 +140510,15 @@ module.exports = class xena extends Exchange { // const transactTime = this.safeInteger (ohlcv, 'transactTime'); const timestamp = parseInt (transactTime / 1000000); - const buyVolume = this.safeFloat (ohlcv, 'buyVolume'); - const sellVolume = this.safeFloat (ohlcv, 'sellVolume'); + const buyVolume = this.safeNumber (ohlcv, 'buyVolume'); + const sellVolume = this.safeNumber (ohlcv, 'sellVolume'); const volume = this.sum (buyVolume, sellVolume); return [ timestamp, - this.safeFloat (ohlcv, 'firstPx'), - this.safeFloat (ohlcv, 'highPx'), - this.safeFloat (ohlcv, 'lowPx'), - this.safeFloat (ohlcv, 'lastPx'), + this.safeNumber (ohlcv, 'firstPx'), + this.safeNumber (ohlcv, 'highPx'), + this.safeNumber (ohlcv, 'lowPx'), + this.safeNumber (ohlcv, 'lastPx'), volume, ]; } @@ -142586,11 +140643,10 @@ module.exports = class xena extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); - let cost = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); let side = this.safeStringLower (order, 'side'); if (side === '1') { side = 'buy'; @@ -142607,12 +140663,7 @@ module.exports = class xena extends Exchange { } else if (type === '4') { type = 'stop-limit'; } - if (cost === undefined) { - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -142627,14 +140678,14 @@ module.exports = class xena extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -142687,7 +140738,7 @@ module.exports = class xena extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if ((type === 'stop') || (type === 'stop-limit')) { - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPx param for order type ' + type); } @@ -142766,12 +140817,12 @@ module.exports = class xena extends Exchange { if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); } - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx !== undefined) { request['stopPx'] = this.priceToPrecision (symbol, stopPx); params = this.omit (params, 'stopPx'); } - const capPrice = this.safeFloat (params, 'capPrice'); + const capPrice = this.safeNumber (params, 'capPrice'); if (capPrice !== undefined) { request['capPrice'] = this.priceToPrecision (symbol, capPrice); params = this.omit (params, 'capPrice'); @@ -143126,7 +141177,7 @@ module.exports = class xena extends Exchange { const address = this.safeString (transaction, 'address'); const addressFrom = undefined; const addressTo = address; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const fee = undefined; return { @@ -143223,7 +141274,7 @@ module.exports = class xena extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'kind')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); @@ -143235,11 +141286,11 @@ module.exports = class xena extends Exchange { timestamp = parseInt (timestamp / 1000000); } const fee = { - 'cost': this.safeFloat (item, 'commission'), + 'cost': this.safeNumber (item, 'commission'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -143379,13 +141430,14 @@ module.exports = class xena extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],180:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],176:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError, RateLimitExceeded } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -143520,6 +141572,7 @@ module.exports = class yobit extends Exchange { 'NAV': 'NavajoCoin', 'NBT': 'NiceBytes', 'OMG': 'OMGame', + 'ONX': 'Onix', 'PAC': '$PAC', 'PLAY': 'PlayCoin', 'PIVX': 'Darknet', @@ -143618,15 +141671,33 @@ module.exports = class yobit extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['total'] = this.safeFloat (total, currencyId); + account['free'] = this.safeString (free, currencyId); + account['total'] = this.safeString (total, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615856752, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":10000, + // "min_amount":0.0001, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.2, + // "fee_buyer":0.2, + // "fee_seller":0.2 + // }, + // }, + // } + // const markets = this.safeValue (response, 'pairs'); const keys = Object.keys (markets); const result = []; @@ -143644,15 +141715,15 @@ module.exports = class yobit extends Exchange { 'price': this.safeInteger (market, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }; const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }; const costLimits = { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }; const limits = { 'amount': amountLimits, @@ -143661,6 +141732,7 @@ module.exports = class yobit extends Exchange { }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -143669,7 +141741,7 @@ module.exports = class yobit extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -143745,16 +141817,16 @@ module.exports = class yobit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -143763,9 +141835,9 @@ module.exports = class yobit extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -143814,15 +141886,18 @@ module.exports = class yobit extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const order = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const type = 'limit'; // all trades are still limit trades let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -143837,12 +141912,6 @@ module.exports = class yobit extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, 'taker'); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': order, @@ -143904,8 +141973,8 @@ module.exports = class yobit extends Exchange { id = this.safeString (response['return'], 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (response['return'], 'received', 0.0); + remaining = this.safeNumber (response['return'], 'remains', amount); } const timestamp = this.milliseconds (); return { @@ -143955,21 +142024,13 @@ module.exports = class yobit extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp_created'); const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const remaining = this.safeFloat (order, 'amount'); - const amount = this.safeFloat (order, 'start_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - cost = price * filled; - } - } + const remaining = this.safeNumber (order, 'amount'); + const amount = this.safeNumber (order, 'start_amount'); + const price = this.safeNumber (order, 'rate'); const fee = undefined; const type = 'limit'; const side = this.safeString (order, 'type'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -143983,16 +142044,15 @@ module.exports = class yobit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -144203,13 +142263,14 @@ module.exports = class yobit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],181:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],177:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -144333,6 +142394,27 @@ module.exports = class zaif extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetCurrencyPairsAll (params); + // + // [ + // { + // "aux_unit_point": 0, + // "item_japanese": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3", + // "aux_unit_step": 5.0, + // "description": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30fb\u65e5\u672c\u5186\u306e\u53d6\u5f15\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059", + // "item_unit_min": 0.001, + // "event_number": 0, + // "currency_pair": "btc_jpy", + // "is_token": false, + // "aux_unit_min": 5.0, + // "aux_japanese": "\u65e5\u672c\u5186", + // "id": 1, + // "item_unit_step": 0.0001, + // "name": "BTC/JPY", + // "seq": 0, + // "title": "BTC/JPY" + // } + // ] + // const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -144343,8 +142425,8 @@ module.exports = class zaif extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': -Math.log10 (market['item_unit_step']), - 'price': market['aux_unit_point'], + 'amount': -Math.log10 (this.safeNumber (market, 'item_unit_step')), + 'price': this.safeInteger (market, 'aux_unit_point'), }; const fees = this.safeValue (this.options['fees'], symbol, this.fees['trading']); const taker = fees['taker']; @@ -144362,11 +142444,11 @@ module.exports = class zaif extends Exchange { 'maker': maker, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'item_unit_min'), + 'min': this.safeNumber (market, 'item_unit_min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'aux_unit_min'), + 'min': this.safeNumber (market, 'aux_unit_min'), 'max': undefined, }, 'cost': { @@ -144398,7 +142480,7 @@ module.exports = class zaif extends Exchange { }; if ('deposit' in balances) { if (currencyId in balances['deposit']) { - account['total'] = this.safeFloat (balances['deposit'], currencyId); + account['total'] = this.safeNumber (balances['deposit'], currencyId); account['used'] = account['total'] - account['free']; } } @@ -144423,22 +142505,22 @@ module.exports = class zaif extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.milliseconds (); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -144459,14 +142541,11 @@ module.exports = class zaif extends Exchange { side = (side === 'bid') ? 'buy' : 'sell'; const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString2 (trade, 'id', 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); return { @@ -144544,16 +142623,10 @@ module.exports = class zaif extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp'); const marketId = this.safeString (order, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -144567,7 +142640,7 @@ module.exports = class zaif extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': undefined, 'remaining': undefined, @@ -144575,7 +142648,7 @@ module.exports = class zaif extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -144694,13 +142767,14 @@ module.exports = class zaif extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],182:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],178:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadRequest, ExchangeError, ArgumentsRequired, AuthenticationError, InsufficientFunds, OrderNotFound, ExchangeNotAvailable, DDoSProtection, InvalidOrder, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -144786,8 +142860,8 @@ module.exports = class zb extends Exchange { 'urls': { 'logo': 'https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg', 'api': { - 'public': 'http://api.zb.cn/data', // no https for public API - 'private': 'https://trade.zb.cn/api', + 'public': 'https://api.zb.today/data', + 'private': 'https://trade.zb.today/api', }, 'www': 'https://www.zb.com', 'doc': 'https://www.zb.com/i/developer', @@ -144902,6 +142976,16 @@ module.exports = class zb extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetMarkets (params); + // + // { + // "zb_qc":{ + // "amountScale":2, + // "minAmount":0.01, + // "minSize":5, + // "priceScale":4, + // }, + // } + // const keys = Object.keys (markets); const result = []; for (let i = 0; i < keys.length; i++) { @@ -144965,11 +143049,11 @@ module.exports = class zb extends Exchange { const account = this.account (); const currencyId = this.safeString (balance, 'key'); const code = this.safeCurrencyCode (currencyId); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'freez'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'freez'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -145018,18 +143102,6 @@ module.exports = class zb extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetGetPayinAddress (params); @@ -145136,16 +143208,16 @@ module.exports = class zb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -145155,12 +143227,23 @@ module.exports = class zb extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; } + parseOHLCV (ohlcv, market = undefined) { + return [ + this.safeInteger (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + ]; + } + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -145185,14 +143268,12 @@ module.exports = class zb extends Exchange { let side = this.safeString (trade, 'trade_type'); side = (side === 'bid') ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const costString = Precise.stringMul (priceString, amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (costString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -145371,23 +143452,13 @@ module.exports = class zb extends Exchange { const timestamp = this.safeInteger (order, 'trade_date'); const marketId = this.safeString (order, 'currency'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'trade_amount'); - const amount = this.safeFloat (order, 'total_amount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'trade_money'); - let average = undefined; + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'trade_amount'); + const amount = this.safeNumber (order, 'total_amount'); + const cost = this.safeNumber (order, 'trade_money'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((cost !== undefined) && (filled !== undefined) && (filled > 0)) { - average = cost / filled; - } const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fees'); + const feeCost = this.safeNumber (order, 'fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -145402,7 +143473,7 @@ module.exports = class zb extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -145416,15 +143487,15 @@ module.exports = class zb extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -145487,7 +143558,7 @@ module.exports = class zb extends Exchange { // const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'hash'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let timestamp = this.parse8601 (this.safeString (transaction, 'submit_time')); timestamp = this.safeInteger (transaction, 'submitTime', timestamp); let address = this.safeString2 (transaction, 'toAddress', 'address'); @@ -145507,7 +143578,7 @@ module.exports = class zb extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -145540,7 +143611,7 @@ module.exports = class zb extends Exchange { if (password === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires exchange.password or a safePwd parameter'); } - const fees = this.safeFloat (params, 'fees'); + const fees = this.safeNumber (params, 'fees'); if (fees === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires a fees parameter'); } @@ -145731,7 +143802,7 @@ module.exports = class zb extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],183:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],179:[function(require,module,exports){ (function (global){ 'use strict'; @@ -146225,7 +144296,7 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":241}],184:[function(require,module,exports){ +},{"util/":237}],180:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -146341,9 +144412,9 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],185:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ -},{}],186:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ (function (process,Buffer){ 'use strict'; /* eslint camelcase: "off" */ @@ -146755,7 +144826,7 @@ Zlib.prototype._reset = function () { exports.Zlib = Zlib; }).call(this,require('_process'),require("buffer").Buffer) -},{"_process":210,"assert":183,"buffer":188,"pako/lib/zlib/constants":200,"pako/lib/zlib/deflate.js":202,"pako/lib/zlib/inflate.js":204,"pako/lib/zlib/zstream":208}],187:[function(require,module,exports){ +},{"_process":206,"assert":179,"buffer":184,"pako/lib/zlib/constants":196,"pako/lib/zlib/deflate.js":198,"pako/lib/zlib/inflate.js":200,"pako/lib/zlib/zstream":204}],183:[function(require,module,exports){ (function (process){ 'use strict'; @@ -147367,7 +145438,7 @@ util.inherits(DeflateRaw, Zlib); util.inherits(InflateRaw, Zlib); util.inherits(Unzip, Zlib); }).call(this,require('_process')) -},{"./binding":186,"_process":210,"assert":183,"buffer":188,"stream":229,"util":241}],188:[function(require,module,exports){ +},{"./binding":182,"_process":206,"assert":179,"buffer":184,"stream":225,"util":237}],184:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -149083,7 +147154,7 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":184,"ieee754":194}],189:[function(require,module,exports){ +},{"base64-js":180,"ieee754":190}],185:[function(require,module,exports){ module.exports = { "100": "Continue", "101": "Switching Protocols", @@ -149149,7 +147220,7 @@ module.exports = { "511": "Network Authentication Required" } -},{}],190:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ module.exports={ "O_RDONLY": 0, "O_WRONLY": 1, @@ -149360,7 +147431,7 @@ module.exports={ "UV_UDP_REUSEADDR": 4 } -},{}],191:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -149471,7 +147542,7 @@ function objectToString(o) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":196}],192:[function(require,module,exports){ +},{"../../is-buffer/index.js":192}],188:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -149775,7 +147846,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],193:[function(require,module,exports){ +},{}],189:[function(require,module,exports){ var http = require('http') var url = require('url') @@ -149808,7 +147879,7 @@ function validateParams (params) { return params } -},{"http":230,"url":236}],194:[function(require,module,exports){ +},{"http":226,"url":232}],190:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -149894,7 +147965,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],195:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -149919,7 +147990,7 @@ if (typeof Object.create === 'function') { } } -},{}],196:[function(require,module,exports){ +},{}],192:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -149942,14 +148013,14 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],197:[function(require,module,exports){ +},{}],193:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],198:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ 'use strict'; @@ -150056,7 +148127,7 @@ exports.setTyped = function (on) { exports.setTyped(TYPED_OK); -},{}],199:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ 'use strict'; // Note: adler32 takes 12% for level 0 and 2% for level 6. @@ -150109,7 +148180,7 @@ function adler32(adler, buf, len, pos) { module.exports = adler32; -},{}],200:[function(require,module,exports){ +},{}],196:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -150179,7 +148250,7 @@ module.exports = { //Z_NULL: null // Use -1 or null inline, depending on var type }; -},{}],201:[function(require,module,exports){ +},{}],197:[function(require,module,exports){ 'use strict'; // Note: we can't get significant speed boost here. @@ -150240,7 +148311,7 @@ function crc32(crc, buf, len, pos) { module.exports = crc32; -},{}],202:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -152116,7 +150187,7 @@ exports.deflatePrime = deflatePrime; exports.deflateTune = deflateTune; */ -},{"../utils/common":198,"./adler32":199,"./crc32":201,"./messages":206,"./trees":207}],203:[function(require,module,exports){ +},{"../utils/common":194,"./adler32":195,"./crc32":197,"./messages":202,"./trees":203}],199:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -152463,7 +150534,7 @@ module.exports = function inflate_fast(strm, start) { return; }; -},{}],204:[function(require,module,exports){ +},{}],200:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154021,7 +152092,7 @@ exports.inflateSyncPoint = inflateSyncPoint; exports.inflateUndermine = inflateUndermine; */ -},{"../utils/common":198,"./adler32":199,"./crc32":201,"./inffast":203,"./inftrees":205}],205:[function(require,module,exports){ +},{"../utils/common":194,"./adler32":195,"./crc32":197,"./inffast":199,"./inftrees":201}],201:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154366,7 +152437,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta return 0; }; -},{"../utils/common":198}],206:[function(require,module,exports){ +},{"../utils/common":194}],202:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154400,7 +152471,7 @@ module.exports = { '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ }; -},{}],207:[function(require,module,exports){ +},{}],203:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -155622,7 +153693,7 @@ exports._tr_flush_block = _tr_flush_block; exports._tr_tally = _tr_tally; exports._tr_align = _tr_align; -},{"../utils/common":198}],208:[function(require,module,exports){ +},{"../utils/common":194}],204:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -155671,7 +153742,7 @@ function ZStream() { module.exports = ZStream; -},{}],209:[function(require,module,exports){ +},{}],205:[function(require,module,exports){ (function (process){ 'use strict'; @@ -155718,7 +153789,7 @@ function nextTick(fn, arg1, arg2, arg3) { } }).call(this,require('_process')) -},{"_process":210}],210:[function(require,module,exports){ +},{"_process":206}],206:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -155904,7 +153975,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],211:[function(require,module,exports){ +},{}],207:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -156441,7 +154512,7 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],212:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156527,7 +154598,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],213:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156614,16 +154685,16 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],214:[function(require,module,exports){ +},{}],210:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":212,"./encode":213}],215:[function(require,module,exports){ +},{"./decode":208,"./encode":209}],211:[function(require,module,exports){ module.exports = require('./lib/_stream_duplex.js'); -},{"./lib/_stream_duplex.js":216}],216:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":212}],212:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156748,7 +154819,7 @@ function forEach(xs, f) { f(xs[i], i); } } -},{"./_stream_readable":218,"./_stream_writable":220,"core-util-is":191,"inherits":195,"process-nextick-args":209}],217:[function(require,module,exports){ +},{"./_stream_readable":214,"./_stream_writable":216,"core-util-is":187,"inherits":191,"process-nextick-args":205}],213:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156796,7 +154867,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":219,"core-util-is":191,"inherits":195}],218:[function(require,module,exports){ +},{"./_stream_transform":215,"core-util-is":187,"inherits":191}],214:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -157806,7 +155877,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":216,"./internal/streams/BufferList":221,"./internal/streams/destroy":222,"./internal/streams/stream":223,"_process":210,"core-util-is":191,"events":192,"inherits":195,"isarray":197,"process-nextick-args":209,"safe-buffer":228,"string_decoder/":234,"util":185}],219:[function(require,module,exports){ +},{"./_stream_duplex":212,"./internal/streams/BufferList":217,"./internal/streams/destroy":218,"./internal/streams/stream":219,"_process":206,"core-util-is":187,"events":188,"inherits":191,"isarray":193,"process-nextick-args":205,"safe-buffer":224,"string_decoder/":230,"util":181}],215:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -158021,7 +156092,7 @@ function done(stream, er, data) { return stream.push(null); } -},{"./_stream_duplex":216,"core-util-is":191,"inherits":195}],220:[function(require,module,exports){ +},{"./_stream_duplex":212,"core-util-is":187,"inherits":191}],216:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -158688,7 +156759,7 @@ Writable.prototype._destroy = function (err, cb) { cb(err); }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":216,"./internal/streams/destroy":222,"./internal/streams/stream":223,"_process":210,"core-util-is":191,"inherits":195,"process-nextick-args":209,"safe-buffer":228,"util-deprecate":238}],221:[function(require,module,exports){ +},{"./_stream_duplex":212,"./internal/streams/destroy":218,"./internal/streams/stream":219,"_process":206,"core-util-is":187,"inherits":191,"process-nextick-args":205,"safe-buffer":224,"util-deprecate":234}],217:[function(require,module,exports){ 'use strict'; /**/ @@ -158763,7 +156834,7 @@ module.exports = function () { return BufferList; }(); -},{"safe-buffer":228}],222:[function(require,module,exports){ +},{"safe-buffer":224}],218:[function(require,module,exports){ 'use strict'; /**/ @@ -158836,13 +156907,13 @@ module.exports = { destroy: destroy, undestroy: undestroy }; -},{"process-nextick-args":209}],223:[function(require,module,exports){ +},{"process-nextick-args":205}],219:[function(require,module,exports){ module.exports = require('events').EventEmitter; -},{"events":192}],224:[function(require,module,exports){ +},{"events":188}],220:[function(require,module,exports){ module.exports = require('./readable').PassThrough -},{"./readable":225}],225:[function(require,module,exports){ +},{"./readable":221}],221:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = exports; exports.Readable = exports; @@ -158851,13 +156922,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":216,"./lib/_stream_passthrough.js":217,"./lib/_stream_readable.js":218,"./lib/_stream_transform.js":219,"./lib/_stream_writable.js":220}],226:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":212,"./lib/_stream_passthrough.js":213,"./lib/_stream_readable.js":214,"./lib/_stream_transform.js":215,"./lib/_stream_writable.js":216}],222:[function(require,module,exports){ module.exports = require('./readable').Transform -},{"./readable":225}],227:[function(require,module,exports){ +},{"./readable":221}],223:[function(require,module,exports){ module.exports = require('./lib/_stream_writable.js'); -},{"./lib/_stream_writable.js":220}],228:[function(require,module,exports){ +},{"./lib/_stream_writable.js":216}],224:[function(require,module,exports){ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer @@ -158921,7 +156992,7 @@ SafeBuffer.allocUnsafeSlow = function (size) { return buffer.SlowBuffer(size) } -},{"buffer":188}],229:[function(require,module,exports){ +},{"buffer":184}],225:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -159050,7 +157121,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":192,"inherits":195,"readable-stream/duplex.js":215,"readable-stream/passthrough.js":224,"readable-stream/readable.js":225,"readable-stream/transform.js":226,"readable-stream/writable.js":227}],230:[function(require,module,exports){ +},{"events":188,"inherits":191,"readable-stream/duplex.js":211,"readable-stream/passthrough.js":220,"readable-stream/readable.js":221,"readable-stream/transform.js":222,"readable-stream/writable.js":223}],226:[function(require,module,exports){ (function (global){ var ClientRequest = require('./lib/request') var extend = require('xtend') @@ -159132,7 +157203,7 @@ http.METHODS = [ 'UNSUBSCRIBE' ] }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./lib/request":232,"builtin-status-codes":189,"url":236,"xtend":242}],231:[function(require,module,exports){ +},{"./lib/request":228,"builtin-status-codes":185,"url":232,"xtend":238}],227:[function(require,module,exports){ (function (global){ exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream) @@ -159205,7 +157276,7 @@ function isFunction (value) { xhr = null // Help gc }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],232:[function(require,module,exports){ +},{}],228:[function(require,module,exports){ (function (process,global,Buffer){ var capability = require('./capability') var inherits = require('inherits') @@ -159515,7 +157586,7 @@ var unsafeHeaders = [ ] }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"./capability":231,"./response":233,"_process":210,"buffer":188,"inherits":195,"readable-stream":225,"to-arraybuffer":235}],233:[function(require,module,exports){ +},{"./capability":227,"./response":229,"_process":206,"buffer":184,"inherits":191,"readable-stream":221,"to-arraybuffer":231}],229:[function(require,module,exports){ (function (process,global,Buffer){ var capability = require('./capability') var inherits = require('inherits') @@ -159701,7 +157772,7 @@ IncomingMessage.prototype._onXHRProgress = function () { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"./capability":231,"_process":210,"buffer":188,"inherits":195,"readable-stream":225}],234:[function(require,module,exports){ +},{"./capability":227,"_process":206,"buffer":184,"inherits":191,"readable-stream":221}],230:[function(require,module,exports){ 'use strict'; var Buffer = require('safe-buffer').Buffer; @@ -159974,7 +158045,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":228}],235:[function(require,module,exports){ +},{"safe-buffer":224}],231:[function(require,module,exports){ var Buffer = require('buffer').Buffer module.exports = function (buf) { @@ -160003,7 +158074,7 @@ module.exports = function (buf) { } } -},{"buffer":188}],236:[function(require,module,exports){ +},{"buffer":184}],232:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -160737,7 +158808,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":237,"punycode":211,"querystring":214}],237:[function(require,module,exports){ +},{"./util":233,"punycode":207,"querystring":210}],233:[function(require,module,exports){ 'use strict'; module.exports = { @@ -160755,7 +158826,7 @@ module.exports = { } }; -},{}],238:[function(require,module,exports){ +},{}],234:[function(require,module,exports){ (function (global){ /** @@ -160826,16 +158897,16 @@ function config (name) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],239:[function(require,module,exports){ -arguments[4][195][0].apply(exports,arguments) -},{"dup":195}],240:[function(require,module,exports){ +},{}],235:[function(require,module,exports){ +arguments[4][191][0].apply(exports,arguments) +},{"dup":191}],236:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],241:[function(require,module,exports){ +},{}],237:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -161425,7 +159496,7 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":240,"_process":210,"inherits":239}],242:[function(require,module,exports){ +},{"./support/isBuffer":236,"_process":206,"inherits":235}],238:[function(require,module,exports){ module.exports = extend var hasOwnProperty = Object.prototype.hasOwnProperty; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aax.js index 9c71e445f..3b8be7dc2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, ExchangeNotAvailable, OrderNotFound, InvalidOrder, CancelPending, RateLimitExceeded, InsufficientFunds, BadRequest, BadSymbol, PermissionDenied } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -35,6 +36,7 @@ module.exports = class aax extends Exchange { 'fetchOrder': true, 'fetchOrderBook': true, 'fetchOrders': true, + 'fetchStatus': true, 'fetchTicker': 'emulated', 'fetchTickers': true, 'fetchTrades': true, @@ -233,6 +235,37 @@ module.exports = class aax extends Exchange { }); } + async fetchStatus (params = {}) { + const response = await this.publicGetAnnouncementMaintenance (params); + // + // { + // "code": 1, + // "data": { + // "startTime":"2020-06-25T02:15:00.000Z", + // "endTime":"2020-06-25T02:45:00.000Z", + // "description":"Spot Trading :UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45),Futures Trading: UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45).We apologize for any inconvenience caused. Thank you for your patience and understanding.Should you have any enquiries, please do not hesitate our live chat support or via email at cs@aax.com." + // }, + // "message":"success", + // "ts":1593043237000 + // } + // + const data = this.safeValue (response, 'data', {}); + const timestamp = this.milliseconds (); + const startTime = this.parse8601 (this.safeString (data, 'startTime')); + const endTime = this.parse8601 (this.safeString (data, 'endTime')); + const update = { + 'updated': this.safeInteger (response, 'ts', timestamp), + }; + if (endTime !== undefined) { + const startTimeIsOk = (startTime === undefined) ? true : (timestamp < startTime); + const isOk = (timestamp > endTime) || startTimeIsOk; + update['eta'] = endTime; + update['status'] = isOk ? 'ok' : 'maintenance'; + } + this.status = this.extend (this.status, update); + return this.status; + } + async fetchMarkets (params = {}) { const response = await this.publicGetInstruments (params); // @@ -318,8 +351,8 @@ module.exports = class aax extends Exchange { const quote = this.safeCurrencyCode (quoteId); const status = this.safeString (market, 'status'); const active = (status === 'enable'); - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); const type = this.safeString (market, 'type'); let inverse = undefined; let linear = undefined; @@ -337,8 +370,8 @@ module.exports = class aax extends Exchange { symbol = base + '/' + quote; } const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; result.push ({ 'id': id, @@ -396,8 +429,8 @@ module.exports = class aax extends Exchange { const timestamp = this.safeInteger (ticker, 't'); const marketId = this.safeString (ticker, 's'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'c'); - const open = this.safeFloat (ticker, 'o'); + const last = this.safeNumber (ticker, 'c'); + const open = this.safeNumber (ticker, 'o'); let change = undefined; let percentage = undefined; let average = undefined; @@ -408,13 +441,13 @@ module.exports = class aax extends Exchange { } average = this.sum (last, open) / 2; } - const quoteVolume = this.safeFloat (ticker, 'v'); + const quoteVolume = this.safeNumber (ticker, 'v'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'h'), - 'low': this.safeFloat (ticker, 'l'), + 'high': this.safeNumber (ticker, 'h'), + 'low': this.safeNumber (ticker, 'l'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -561,8 +594,8 @@ module.exports = class aax extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let price = this.safeFloat2 (trade, 'p', 'filledPrice'); - const amount = this.safeFloat2 (trade, 'q', 'filledQty'); + let priceString = this.safeString2 (trade, 'p', 'filledPrice'); + const amountString = this.safeString2 (trade, 'q', 'filledQty'); const orderId = this.safeString (trade, 'orderID'); const isTaker = this.safeValue (trade, 'taker'); let takerOrMaker = undefined; @@ -576,17 +609,15 @@ module.exports = class aax extends Exchange { side = 'sell'; } if (side === undefined) { - side = (price > 0) ? 'buy' : 'sell'; - } - side = (price > 0) ? 'buy' : 'sell'; - price = Math.abs (price); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; + side = (priceString[0] === '-') ? 'sell' : 'buy'; } + priceString = (priceString[0] === '-') ? priceString.slice (1) : priceString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderType = this.parseOrderType (this.safeString (trade, 'orderType')); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -654,11 +685,11 @@ module.exports = class aax extends Exchange { // return [ this.safeTimestamp (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -743,12 +774,12 @@ module.exports = class aax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'unavailable'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'unavailable'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -776,7 +807,7 @@ module.exports = class aax extends Exchange { request['clOrdID'] = clientOrderId; params = this.omit (params, [ 'clOrdID', 'clientOrderId' ]); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { if ((orderType === 'STOP-LIMIT') || (orderType === 'STOP')) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders'); @@ -894,7 +925,7 @@ module.exports = class aax extends Exchange { // 'price': this.priceToPrecision (symbol, price), // 'stopPrice': this.priceToPrecision (symbol, stopPrice), }; - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1531,15 +1562,18 @@ module.exports = class aax extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const price = this.safeFloat (order, 'price'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const price = this.safeNumber (order, 'price'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'Post-Only'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeString (order, 'leavesQty'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + let remaining = this.safeNumber (order, 'leavesQty'); + if ((filled === 0) && (remaining === 0)) { + remaining = undefined; + } let cost = undefined; let lastTradeTimestamp = undefined; if (filled !== undefined) { @@ -1554,7 +1588,7 @@ module.exports = class aax extends Exchange { } } let fee = undefined; - const feeCost = this.safeFloat (order, 'commission'); + const feeCost = this.safeNumber (order, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/acx.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/acx.js deleted file mode 100644 index e10ec85ca..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/acx.js +++ /dev/null @@ -1,487 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { InsufficientFunds, OrderNotFound } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class acx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'acx', - 'name': 'ACX', - 'countries': [ 'AU' ], - 'rateLimit': 1000, - 'version': 'v2', - 'has': { - 'cancelOrder': true, - 'CORS': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchMarkets': true, - 'fetchOHLCV': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTime': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '12h': '720', - '1d': '1440', - '3d': '4320', - '1w': '10080', - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg', - 'extension': '.json', - 'api': 'https://acx.io/api', - 'www': 'https://acx.io', - 'doc': 'https://acx.io/documents/api_v2', - }, - 'api': { - 'public': { - 'get': [ - 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. - 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator - 'k', // Get OHLC(k line) of specific market - 'markets', // Get all available markets - 'order_book', // Get the order book of specified market - 'order_book/{market}', - 'tickers', // Get ticker of all markets - 'tickers/{market}', // Get ticker of specific market - 'timestamp', // Get server current time, in seconds since Unix epoch - 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. - 'trades/{market}', - ], - }, - 'private': { - 'get': [ - 'members/me', // Get your profile and accounts info - 'deposits', // Get your deposits history - 'deposit', // Get details of specific deposit - 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. - 'orders', // Get your orders, results is paginated - 'order', // Get information of specified order - 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. - 'withdraws', // Get your cryptocurrency withdraws - 'withdraw', // Get your cryptocurrency withdraw - ], - 'post': [ - 'orders', // Create a Sell/Buy order - 'orders/multi', // Create multiple sell/buy orders - 'orders/clear', // Cancel all my orders - 'order/delete', // Cancel an order - 'withdraw', // Create a withdraw - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': false, - 'percentage': true, - 'maker': 0.2 / 100, - 'taker': 0.2 / 100, - }, - 'funding': { - 'tierBased': false, - 'percentage': true, - 'withdraw': {}, // There is only 1% fee on withdrawals to your bank account. - }, - }, - 'commonCurrencies': { - 'PLA': 'Plair', - }, - 'exceptions': { - '2002': InsufficientFunds, - '2003': OrderNotFound, - }, - }); - } - - async fetchMarkets (params = {}) { - const markets = await this.publicGetMarkets (params); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = market['id']; - const symbol = market['name']; - let baseId = this.safeString (market, 'base_unit'); - let quoteId = this.safeString (market, 'quote_unit'); - if ((baseId === undefined) || (quoteId === undefined)) { - const ids = symbol.split ('/'); - baseId = ids[0].toLowerCase (); - quoteId = ids[1].toLowerCase (); - } - let base = baseId.toUpperCase (); - let quote = quoteId.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - // todo: find out their undocumented precision and limits - const precision = { - 'amount': 8, - 'price': 8, - }; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'precision': precision, - 'info': market, - 'active': undefined, - 'limits': this.limits, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetMembersMe (params); - const balances = this.safeValue (response, 'accounts'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 300 - } - const orderbook = await this.publicGetDepth (this.extend (request, params)); - const timestamp = this.safeTimestamp (orderbook, 'timestamp'); - return this.parseOrderBook (orderbook, timestamp); - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.safeTimestamp (ticker, 'at'); - ticker = ticker['ticker']; - let symbol = undefined; - if (market) { - symbol = market['symbol']; - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetTickers (params); - const ids = Object.keys (response); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let market = undefined; - let symbol = id; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } else { - let base = id.slice (0, 3); - let quote = id.slice (3, 6); - base = base.toUpperCase (); - quote = quote.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - symbol = base + '/' + quote; - } - result[symbol] = this.parseTicker (response[id], market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTickersMarket (this.extend (request, params)); - return this.parseTicker (response, market); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const id = this.safeString (trade, 'tid'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': undefined, - 'side': undefined, - 'order': undefined, - 'takerOrMaker': undefined, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), - 'cost': this.safeFloat (trade, 'funds'), - 'fee': undefined, - }; - } - - async fetchTime (params = {}) { - const response = await this.publicGetTimestamp (params); - // - // 1594911427 - // - return response * 1000; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - return [ - this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (limit === undefined) { - limit = 500; // default is 30 - } - const request = { - 'market': market['id'], - 'period': this.timeframes[timeframe], - 'limit': limit, - }; - if (since !== undefined) { - request['timestamp'] = parseInt (since / 1000); - } - const response = await this.publicGetK (this.extend (request, params)); - return this.parseOHLCVs (response, market, timeframe, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'done': 'closed', - 'wait': 'open', - 'cancel': 'canceled', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - const marketId = this.safeString (order, 'market'); - const symbol = this.safeSymbol (marketId, market); - const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const status = this.parseOrderStatus (this.safeString (order, 'state')); - const type = this.safeString (order, 'type'); - const side = this.safeString (order, 'side'); - const id = this.safeString (order, 'id'); - return { - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': this.safeFloat (order, 'price'), - 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'volume'), - 'filled': this.safeFloat (order, 'executed_volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'trades': undefined, - 'fee': undefined, - 'info': order, - 'cost': undefined, - 'average': undefined, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': parseInt (id), - }; - const response = await this.privateGetOrder (this.extend (request, params)); - return this.parseOrder (response); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'market': this.marketId (symbol), - 'side': side, - 'volume': amount.toString (), - 'ord_type': type, - }; - if (type === 'limit') { - request['price'] = price.toString (); - } - const response = await this.privatePostOrders (this.extend (request, params)); - const marketId = this.safeValue (response, 'market'); - const market = this.safeValue (this.markets_by_id, marketId); - return this.parseOrder (response, market); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - const response = await this.privatePostOrderDelete (this.extend (request, params)); - const order = this.parseOrder (response); - const status = order['status']; - if (status === 'closed' || status === 'canceled') { - throw new OrderNotFound (this.id + ' ' + this.json (order)); - } - return order; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - // they have XRP but no docs on memo/tag - const request = { - 'currency': currency['id'], - 'sum': amount, - 'address': address, - }; - const response = await this.privatePostWithdraw (this.extend (request, params)); - // withdrawal response is undocumented - return { - 'info': response, - 'id': undefined, - }; - } - - nonce () { - return this.milliseconds (); - } - - encodeParams (params) { - if ('orders' in params) { - const orders = params['orders']; - let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); - for (let i = 0; i < orders.length; i++) { - const order = orders[i]; - const keys = Object.keys (order); - for (let k = 0; k < keys.length; k++) { - const key = keys[k]; - const value = order[key]; - query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); - } - } - return query; - } - return this.urlencode (this.keysort (params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let request = '/api/' + this.version + '/' + this.implodeParams (path, params); - if ('extension' in this.urls) { - request += this.urls['extension']; - } - const query = this.omit (params, this.extractParams (path)); - let url = this.urls['api'] + request; - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce ().toString (); - const query = this.encodeParams (this.extend ({ - 'access_key': this.apiKey, - 'tonce': nonce, - }, params)); - const auth = method + '|' + request + '|' + query; - const signed = this.hmac (this.encode (auth), this.encode (this.secret)); - const suffix = query + '&signature=' + signed; - if (method === 'GET') { - url += '?' + suffix; - } else { - body = suffix; - headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; - } - if (code === 400) { - const error = this.safeValue (response, 'error'); - const errorCode = this.safeString (error, 'code'); - const feedback = this.id + ' ' + this.json (response); - this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); - // fallback to default error handler - } - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aofex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aofex.js index 7899f09d5..69264394e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aofex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/aofex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, BadSymbol, InvalidOrder, PermissionDenied, InvalidAddress, AuthenticationError, InvalidNonce, BadRequest, InsufficientFunds, OrderNotFound } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -193,8 +194,8 @@ module.exports = class aofex extends Exchange { const symbol = base + '/' + quote; const numericId = this.safeInteger (market, 'id'); const precision = this.safeValue (precisions, id, {}); - const makerFee = this.safeFloat (market, 'maker_fee'); - const takerFee = this.safeFloat (market, 'taker_fee'); + const makerFee = this.safeNumber (market, 'maker_fee'); + const takerFee = this.safeNumber (market, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -212,12 +213,12 @@ module.exports = class aofex extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -245,11 +246,11 @@ module.exports = class aofex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -328,11 +329,11 @@ module.exports = class aofex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -355,8 +356,8 @@ module.exports = class aofex extends Exchange { return { 'info': response, 'symbol': symbol, - 'maker': this.safeFloat (result, 'fromFee'), - 'taker': this.safeFloat (result, 'toFee'), + 'maker': this.safeNumber (result, 'fromFee'), + 'taker': this.safeNumber (result, 'toFee'), }; } @@ -413,8 +414,8 @@ module.exports = class aofex extends Exchange { if (market) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); let change = undefined; if (symbol !== undefined) { change = parseFloat (this.priceToPrecision (symbol, last - open)); @@ -423,8 +424,8 @@ module.exports = class aofex extends Exchange { } const average = this.sum (last, open) / 2; const percentage = change / open * 100; - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); let vwap = this.vwap (baseVolume, quoteVolume); if (vwap !== undefined) { vwap = parseFloat (this.priceToPrecision (symbol, vwap)); @@ -433,8 +434,8 @@ module.exports = class aofex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -552,13 +553,15 @@ module.exports = class aofex extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'number'); - let cost = this.safeFloat (trade, 'total_price'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'number'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total_price'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -702,21 +705,21 @@ module.exports = class aofex extends Exchange { const orderType = this.safeString (order, 'type'); const type = (orderType === '2') ? 'limit' : 'market'; const side = this.safeString (order, 'side'); - // const amount = this.safeFloat (order, 'number'); - // const price = this.safeFloat (order, 'price'); + // const amount = this.safeNumber (order, 'number'); + // const price = this.safeNumber (order, 'price'); let cost = undefined; let price = undefined; let amount = undefined; let average = undefined; - const number = this.safeFloat (order, 'number'); - const totalPrice = this.safeFloat (order, 'total_price'); + const number = this.safeNumber (order, 'number'); + const totalPrice = this.safeNumber (order, 'total_price'); if (type === 'limit') { amount = number; - price = this.safeFloat (order, 'price'); + price = this.safeNumber (order, 'price'); } else { - average = this.safeFloat (order, 'deal_price'); + average = this.safeNumber (order, 'deal_price'); if (side === 'buy') { - amount = this.safeFloat (order, 'deal_number'); + amount = this.safeNumber (order, 'deal_number'); } else { amount = number; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ascendex.js similarity index 93% rename from Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmax.js rename to Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ascendex.js index 62cbf55d5..753148db2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ascendex.js @@ -4,16 +4,17 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class bitmax extends Exchange { +module.exports = class ascendex extends Exchange { describe () { return this.deepExtend (super.describe (), { - 'id': 'bitmax', - 'name': 'BitMax', - 'countries': [ 'CN' ], // China + 'id': 'ascendex', + 'name': 'AscendEX', + 'countries': [ 'SG', 'CN' ], // Singapore, China 'rateLimit': 500, // new metainfo interface 'has': { @@ -55,14 +56,14 @@ module.exports = class bitmax extends Exchange { }, 'version': 'v1', 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg', - 'api': 'https://bitmax.io', + 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg', + 'api': 'https://ascendex.com', 'test': 'https://bitmax-test.io', - 'www': 'https://bitmax.io', + 'www': 'https://ascendex.com', 'doc': [ 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', ], - 'fees': 'https://bitmax.io/#/feeRate/tradeRate', + 'fees': 'https://ascendex.com/en/feerate/transactionfee-traderate', 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', }, 'api': { @@ -131,6 +132,7 @@ module.exports = class bitmax extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'taker': 0.002, @@ -212,6 +214,7 @@ module.exports = class bitmax extends Exchange { 'broad': {}, }, 'commonCurrencies': { + 'BOND': 'BONDED', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', }, @@ -294,7 +297,7 @@ module.exports = class bitmax extends Exchange { const code = this.safeCurrencyCode (id); const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); // why would the exchange API have different names for the same field - const fee = this.safeFloat2 (currency, 'withdrawFee', 'withdrawalFee'); + const fee = this.safeNumber2 (currency, 'withdrawFee', 'withdrawalFee'); const status = this.safeString2 (currency, 'status', 'statusCode'); const active = (status === 'Normal'); const margin = ('borrowAssetCode' in currency); @@ -322,7 +325,7 @@ module.exports = class bitmax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawalAmt'), + 'min': this.safeNumber (currency, 'minWithdrawalAmt'), 'max': undefined, }, }, @@ -423,8 +426,8 @@ module.exports = class bitmax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'Normal'); @@ -450,16 +453,16 @@ module.exports = class bitmax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minQty'), - 'max': this.safeFloat (market, 'maxQty'), + 'min': this.safeNumber (market, 'minQty'), + 'max': this.safeNumber (market, 'maxQty'), }, 'price': { - 'min': this.safeFloat (market, 'tickSize'), + 'min': this.safeNumber (market, 'tickSize'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minNotional'), - 'max': this.safeFloat (market, 'maxNotional'), + 'min': this.safeNumber (market, 'minNotional'), + 'max': this.safeNumber (market, 'maxNotional'), }, }, }); @@ -467,28 +470,6 @@ module.exports = class bitmax extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - // TODO: fee calculation here is incorrect, we need to support tiered fee calculation. - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { let accountGroup = this.safeString (this.options, 'account-group'); let response = undefined; @@ -593,11 +574,11 @@ module.exports = class bitmax extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -669,10 +650,10 @@ module.exports = class bitmax extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', []); const ask = this.safeValue (ticker, 'ask', []); - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; let average = undefined; @@ -687,12 +668,12 @@ module.exports = class bitmax extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 0), - 'bidVolume': this.safeFloat (bid, 1), - 'ask': this.safeFloat (ask, 0), - 'askVolume': this.safeFloat (ask, 1), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 0), + 'bidVolume': this.safeNumber (bid, 1), + 'ask': this.safeNumber (ask, 0), + 'askVolume': this.safeNumber (ask, 1), 'vwap': undefined, 'open': open, 'close': close, @@ -701,20 +682,12 @@ module.exports = class bitmax extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -791,11 +764,11 @@ module.exports = class bitmax extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.safeInteger (data, 'ts'), - this.safeFloat (data, 'o'), - this.safeFloat (data, 'h'), - this.safeFloat (data, 'l'), - this.safeFloat (data, 'c'), - this.safeFloat (data, 'v'), + this.safeNumber (data, 'o'), + this.safeNumber (data, 'h'), + this.safeNumber (data, 'l'), + this.safeNumber (data, 'c'), + this.safeNumber (data, 'v'), ]; } @@ -860,12 +833,11 @@ module.exports = class bitmax extends Exchange { // } // const timestamp = this.safeInteger (trade, 'ts'); - const price = this.safeFloat2 (trade, 'price', 'p'); - const amount = this.safeFloat (trade, 'q'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString2 (trade, 'price', 'p'); + const amountString = this.safeString (trade, 'q'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const buyerIsMaker = this.safeValue (trade, 'bm', false); const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; const side = buyerIsMaker ? 'buy' : 'sell'; @@ -989,26 +961,12 @@ module.exports = class bitmax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '/'); - let timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); - let lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const average = this.safeFloat (order, 'avgPx'); - const filled = this.safeFloat2 (order, 'cumFilledQty', 'cumQty'); - let remaining = undefined; - if (filled !== undefined) { - if (filled === 0) { - timestamp = lastTradeTimestamp; - lastTradeTimestamp = undefined; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - let cost = undefined; - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } + const timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); + const lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const average = this.safeNumber (order, 'avgPx'); + const filled = this.safeNumber2 (order, 'cumFilledQty', 'cumQty'); const id = this.safeString (order, 'orderId'); let clientOrderId = this.safeString (order, 'id'); if (clientOrderId !== undefined) { @@ -1018,7 +976,7 @@ module.exports = class bitmax extends Exchange { } const type = this.safeStringLower (order, 'orderType'); const side = this.safeStringLower (order, 'side'); - const feeCost = this.safeFloat (order, 'cumFee'); + const feeCost = this.safeNumber (order, 'cumFee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeAsset'); @@ -1028,8 +986,8 @@ module.exports = class bitmax extends Exchange { 'currency': feeCurrencyCode, }; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1044,14 +1002,14 @@ module.exports = class bitmax extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1088,7 +1046,7 @@ module.exports = class bitmax extends Exchange { request['orderPrice'] = this.priceToPrecision (symbol, price); } if ((type === 'stop_limit') || (type === 'stop_market')) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); } else { @@ -1624,7 +1582,7 @@ module.exports = class bitmax extends Exchange { // } // const id = this.safeString (transaction, 'requestId'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const destAddress = this.safeValue (transaction, 'destAddress', {}); const address = this.safeString (destAddress, 'address'); const tag = this.safeString (destAddress, 'destTag'); @@ -1634,7 +1592,7 @@ module.exports = class bitmax extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'commission'); + const feeCost = this.safeNumber (transaction, 'commission'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Exchange.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Exchange.js index eb017b5bf..0cf2c9fb0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Exchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Exchange.js @@ -44,6 +44,7 @@ const { // eslint-disable-line object-curly-newline const { TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING } = functions.precisionConstants const BN = require ('../static_dependencies/BN/bn') +const Precise = require ('./Precise') // ---------------------------------------------------------------------------- @@ -224,6 +225,11 @@ module.exports = class Exchange { this.minFundingAddressLength = 1 // used in checkAddress this.substituteCommonCurrencyCodes = true // reserved + this.quoteJsonNumbers = true // treat numbers in json as quoted precise strings + this.number = Number // or String (a pointer to a function) + + // whether fees should be summed by currency code + this.reduceFees = true // do not delete this line, it is needed for users to be able to define their own fetchImplementation this.fetchImplementation = defaultFetch @@ -519,7 +525,7 @@ module.exports = class Exchange { parseJson (jsonString) { try { if (this.isJsonEncodedObject (jsonString)) { - return JSON.parse (jsonString) + return JSON.parse (this.onJsonResponse (jsonString)) } } catch (e) { // SyntaxError @@ -598,7 +604,11 @@ module.exports = class Exchange { } onRestResponse (statusCode, statusText, url, method, responseHeaders, responseBody, requestHeaders, requestBody) { - return responseBody.trim ().replace (/:(\d{15,}),/g, ':"$1",'); + return responseBody.trim () + } + + onJsonResponse (responseBody) { + return this.quoteJsonNumbers ? responseBody.replace (/":([+.0-9eE-]+),/g, '":"$1",') : responseBody; } setMarkets (markets, currencies = undefined) { @@ -918,8 +928,8 @@ module.exports = class Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = parseFloat (bidask[priceKey]) - const amount = parseFloat (bidask[amountKey]) + const price = this.safeNumber (bidask, priceKey) + const amount = this.safeNumber (bidask, amountKey) return [ price, amount ] } @@ -945,7 +955,7 @@ module.exports = class Exchange { } } - parseBalance (balance) { + parseBalance (balance, legacy = true) { const codes = Object.keys (this.omit (balance, [ 'info', 'free', 'used', 'total' ])); @@ -957,20 +967,34 @@ module.exports = class Exchange { const code = codes[i] if (balance[code].total === undefined) { if (balance[code].free !== undefined && balance[code].used !== undefined) { - balance[code].total = this.sum (balance[code].free, balance[code].used) + if (legacy) { + balance[code].total = this.sum (balance[code].free, balance[code].used) + } else { + balance[code].total = Precise.stringAdd (balance[code].free, balance[code].used) + } } } if (balance[code].free === undefined) { if (balance[code].total !== undefined && balance[code].used !== undefined) { - balance[code].free = this.sum (balance[code].total, -balance[code].used) + if (legacy) { + balance[code].free = this.sum (balance[code].total, -balance[code].used) + } else { + balance[code].free = Precise.stringSub (balance[code].total, balance[code].used) + } } } if (balance[code].used === undefined) { if (balance[code].total !== undefined && balance[code].free !== undefined) { - balance[code].used = this.sum (balance[code].total, -balance[code].free) + if (legacy) { + balance[code].used = this.sum (balance[code].total, -balance[code].free) + } else { + balance[code].used = Precise.stringSub (balance[code].total, balance[code].free) + } } } - + balance[code].free = this.parseNumber (balance[code].free) + balance[code].used = this.parseNumber (balance[code].used) + balance[code].total = this.parseNumber (balance[code].total) balance.free[code] = balance[code].free balance.used[code] = balance[code].used balance.total[code] = balance[code].total @@ -979,6 +1003,10 @@ module.exports = class Exchange { return balance } + async fetchBalance (params = {}) { + throw new NotSupported (this.id + ' fetchBalance not supported yet') + } + async fetchPartialBalance (part, params = {}) { const balance = await this.fetchBalance (params) return balance[part] @@ -1088,11 +1116,27 @@ module.exports = class Exchange { return indexed ? indexBy (result, key) : result } + parseTickers (tickers, symbols = undefined) { + const result = []; + for (let i = 0; i < tickers.length; i++) { + result.push (this.parseTicker (tickers[i])); + } + return this.filterByArray (result, 'symbol', symbols); + } + + parseDepositAddresses (addresses, codes = undefined) { + let result = []; + for (let i = 0; i < addresses.length; i++) { + const address = this.parseDepositAddress (addresses[i]); + result.push (address); + } + if (codes) { + result = this.filterByArray (result, 'currency', codes); + } + return this.indexBy (result, 'currency'); + } + parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (trades)) { - // throw new ExchangeError (this.id + ' parseTrades expected an array in the trades argument, but got ' + typeof trades); - // } let result = Object.values (trades || []).map ((trade) => this.extend (this.parseTrade (trade, market), params)) result = sortBy (result, 'timestamp') const symbol = (market !== undefined) ? market['symbol'] : undefined @@ -1101,10 +1145,6 @@ module.exports = class Exchange { } parseTransactions (transactions, currency = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (transactions)) { - // throw new ExchangeError (this.id + ' parseTransactions expected an array in the transactions argument, but got ' + typeof transactions); - // } let result = Object.values (transactions || []).map ((transaction) => this.extend (this.parseTransaction (transaction, currency), params)) result = this.sortBy (result, 'timestamp'); const code = (currency !== undefined) ? currency['code'] : undefined; @@ -1112,6 +1152,14 @@ module.exports = class Exchange { return this.filterByCurrencySinceLimit (result, code, since, limit, tail); } + parseTransfers (transfers, currency = undefined, since = undefined, limit = undefined, params = {}) { + let result = Object.values (transfers || []).map ((transfer) => this.extend (this.parseTransfer (transfer, currency), params)) + result = this.sortBy (result, 'timestamp'); + const code = (currency !== undefined) ? currency['code'] : undefined; + const tail = since === undefined; + return this.filterByCurrencySinceLimit (result, code, since, limit, tail); + } + parseLedger (data, currency = undefined, since = undefined, limit = undefined, params = {}) { let result = []; const array = Object.values (data || []); @@ -1256,19 +1304,19 @@ module.exports = class Exchange { return this.createOrder (symbol, ...args) } - createLimitOrder (symbol, side, amount, price = undefined, params = {}) { + createLimitOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'limit', side, amount, price, params) } - createMarketOrder (symbol, side, amount, price = undefined, params = {}) { + createMarketOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'market', side, amount, price, params) } - createLimitBuyOrder (symbol, amount, price = undefined, params = {}) { + createLimitBuyOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'buy', amount, price, params) } - createLimitSellOrder (symbol, amount, price = undefined, params = {}) { + createLimitSellOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'sell', amount, price, params) } @@ -1301,15 +1349,43 @@ module.exports = class Exchange { } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol] - const rate = market[takerOrMaker] - const cost = parseFloat (this.costToPrecision (symbol, amount * price)) + const market = this.markets[symbol]; + const feeSide = this.safeString (market, 'feeSide', 'quote'); + let key = 'quote'; + let cost = undefined; + if (feeSide === 'quote') { + // the fee is always in quote currency + cost = amount * price; + } else if (feeSide === 'base') { + // the fee is always in base currency + cost = amount; + } else if (feeSide === 'get') { + // the fee is always in the currency you get + cost = amount; + if (side === 'sell') { + cost *= price; + } else { + key = 'base'; + } + } else if (feeSide === 'give') { + // the fee is always in the currency you give + cost = amount; + if (side === 'buy') { + cost *= price; + } else { + key = 'base'; + } + } + const rate = market[takerOrMaker]; + if (cost !== undefined) { + cost *= rate; + } return { 'type': takerOrMaker, - 'currency': market['quote'], + 'currency': market[key], 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, rate * cost)), - } + 'cost': cost, + }; } checkRequiredDependencies () { @@ -1393,6 +1469,25 @@ module.exports = class Exchange { return new BN (a).pow (new BN (b)) } + reduceFeesByCurrency (fees) { + const reduced = {}; + for (let i = 0; i < fees.length; i++) { + const fee = fees[i]; + const feeCurrencyCode = this.safeValue (fee, 'currency'); + if (feeCurrencyCode !== undefined) { + if (feeCurrencyCode in reduced) { + reduced[feeCurrencyCode]['cost'] = this.sum (reduced[feeCurrencyCode]['cost'], fee['cost']); + } else { + reduced[feeCurrencyCode] = { + 'cost': fee['cost'], + 'currency': feeCurrencyCode, + }; + } + } + } + return Object.values (reduced); + } + safeOrder (order) { // Cost // Remaining @@ -1401,65 +1496,143 @@ module.exports = class Exchange { // 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']) + // first we try to calculate the order fields from the trades + let amount = this.safeValue (order, 'amount'); + let remaining = this.safeValue (order, 'remaining'); + let filled = this.safeValue (order, 'filled'); + let cost = this.safeValue (order, 'cost'); + let average = this.safeValue (order, 'average'); + let price = this.safeValue (order, 'price'); + let lastTradeTimeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); + const parseFilled = (filled === undefined); + const parseCost = (cost === undefined); + const parseLastTradeTimeTimestamp = (lastTradeTimeTimestamp === undefined); + const parseFee = this.safeValue (order, 'fee') === undefined; + const parseFees = this.safeValue (order, 'fees') === undefined; + const shouldParseFees = parseFee || parseFees; + const fees = shouldParseFees ? [] : undefined; + if (parseFilled || parseCost || shouldParseFees) { + const trades = this.safeValue (order, 'trades'); + if (trades !== undefined) { + if (parseFilled) { + filled = 0; + } + if (parseCost) { + cost = 0; + } + for (let i = 0; i < trades.length; i++) { + const trade = trades[i]; + const tradeAmount = this.safeValue (trade, 'amount'); + if (parseFilled && (tradeAmount !== undefined)) { + filled = this.sum (filled, tradeAmount); } - if (parseCost) { - order['cost'] = this.sum (order['cost'], trade['cost']) + const tradeCost = this.safeValue (trade, 'cost'); + if (parseCost && (tradeCost !== undefined)) { + cost = this.sum (cost, tradeCost); + } + const tradeTimestamp = this.safeValue (trade, 'timestamp'); + if (parseLastTradeTimeTimestamp && (tradeTimestamp !== undefined)) { + if (lastTradeTimeTimestamp === undefined) { + lastTradeTimeTimestamp = tradeTimestamp; + } else { + lastTradeTimeTimestamp = Math.max (lastTradeTimeTimestamp, tradeTimestamp); + } + } + if (shouldParseFees) { + const tradeFees = this.safeValue (trade, 'fees'); + if (tradeFees !== undefined) { + for (let j = 0; j < tradeFees.length; j++) { + const tradeFee = tradeFees[j]; + fees.push (this.extend ({}, tradeFee)); + } + } else { + const tradeFee = this.safeValue (trade, 'fee'); + if (tradeFee !== undefined) { + fees.push (this.extend ({}, tradeFee)); + } + } } } } } - // 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 (shouldParseFees) { + const reducedFees = this.reduceFees ? this.reduceFeesByCurrency (fees) : fees; + const reducedLength = reducedFees.length; + if (!parseFee && (reducedLength === 0)) { + reducedFees.push (order['fee']); + } + if (parseFees) { + order['fees'] = reducedFees; + } + if (parseFee && (reducedLength === 1)) { + order['fee'] = reducedFees[0]; } } - if (order['filled'] === undefined) { - if (order['amount'] !== undefined && order['remaining'] !== undefined) { - order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0) + if (amount === undefined) { + // ensure amount = filled + remaining + if (filled !== undefined && remaining !== undefined) { + amount = this.sum (filled, remaining); + } else if (this.safeString (order, 'status') === 'closed') { + amount = filled; } } - if (order['remaining'] === undefined) { - if (order['amount'] !== undefined && order['filled'] !== undefined) { - order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0) + if (filled === undefined) { + if (amount !== undefined && remaining !== undefined) { + filled = Math.max (this.sum (amount, -remaining), 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'] + if (remaining === undefined) { + if (amount !== undefined && filled !== undefined) { + remaining = Math.max (this.sum (amount, -filled), 0); } } - // 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'] + // ensure that the average field is calculated correctly + if (average === undefined) { + if ((filled !== undefined) && (cost !== undefined) && (cost > 0)) { + average = cost / filled; } - order['cost'] = costPrice * order['filled'] } - // We add support for market orders - if (order['price'] === undefined && order['type'] === 'market') { - order['price'] = order['average'] + // also ensure the cost field is calculated correctly + const costPriceExists = (average !== undefined) || (price !== undefined); + if (parseCost && (filled !== undefined) && costPriceExists) { + cost = (average === undefined) ? (price * filled) : (average * filled); } - return order + // support for market orders + const orderType = this.safeValue (order, 'type'); + const emptyPrice = (price === undefined) || (price === 0.0); + if (emptyPrice && (orderType === 'market')) { + price = average; + } + return this.extend (order, { + 'lastTradeTimestamp': lastTradeTimeTimestamp, + 'price': price, + 'amount': amount, + 'cost': cost, + 'average': average, + 'filled': filled, + 'remaining': remaining, + }); + } + + parseNumber (value, d = undefined) { + if (value === undefined) { + return d + } else { + try { + return this.number (value) + } catch (e) { + return d + } + } + } + + safeNumber (object, key, d = undefined) { + const value = this.safeString (object, key) + return this.parseNumber (value, d) + } + + safeNumber2 (object, key1, key2, d = undefined) { + const value = this.safeString2 (object, key1, key2) + return this.parseNumber (value, d) } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Precise.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Precise.js new file mode 100644 index 000000000..9bf17ad8d --- /dev/null +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/Precise.js @@ -0,0 +1,145 @@ +'use strict' + +const BN = require ('../static_dependencies/BN/bn') + +class Precise { + constructor (number, decimals = 0) { + const isBN = number instanceof BN + const isString = typeof number === 'string' + if (!(isBN || isString)) { + throw new Error ('Precise initiated with something other than a string or BN') + } + if (isBN) { + this.integer = number + this.decimals = decimals + } else { + if (decimals) { + throw new Error ('Cannot set decimals when initializing with a string') + } + let modifier = 0 + number = number.toLowerCase () + if (number.indexOf ('e') > -1) { + [ number, modifier ] = number.split ('e') + modifier = parseInt (modifier) + } + const decimalIndex = number.indexOf ('.') + this.decimals = (decimalIndex > -1) ? number.length - decimalIndex - 1 : 0 + const integerString = number.replace ('.', '') + this.integer = new BN (integerString) + this.decimals = this.decimals - modifier + } + this.base = 10 + this.reduce () + } + + mul (other) { + // other must be another instance of Precise + const integerResult = this.integer.mul (other.integer) + return new Precise (integerResult, this.decimals + other.decimals) + } + + div (other, precision = 18) { + const distance = precision - this.decimals + other.decimals + let numerator + if (distance === 0) { + numerator = this.integer + } else if (distance < 0) { + const exponent = new BN (this.base).pow (new BN (-distance)) + numerator = this.integer.div (exponent) + } else { + const exponent = new BN (this.base).pow (new BN (distance)) + numerator = this.integer.mul (exponent) + } + const result = numerator.div (other.integer) + return new Precise (result, precision) + } + + add (other) { + if (this.decimals === other.decimals) { + const integerResult = this.integer.add (other.integer) + return new Precise (integerResult, this.decimals) + } else { + const [ smaller, bigger ] = + (this.decimals > other.decimals) ? [ other, this ] : [ this, other ] + const exponent = new BN (bigger.decimals - smaller.decimals) + const normalised = smaller.integer.mul (new BN (this.base).pow (exponent)) + const result = normalised.add (bigger.integer) + return new Precise (result, bigger.decimals) + } + } + + sub (other) { + const negative = new Precise (other.integer.neg (), other.decimals) + return this.add (negative) + } + + reduce () { + const zero = new BN (0) + if (this.integer.eq (zero)) { + this.decimals = 0 + return this + } + const base = new BN (this.base) + let divmod = this.integer.divmod (base) + while (divmod.mod.eq (zero)) { + this.integer = divmod.div + this.decimals-- + divmod = this.integer.divmod (base) + } + return this + } + + toString () { + const sign = this.integer.negative ? '-' : '' + const integerArray = Array.from (this.integer.abs ().toString (this.base).padStart (this.decimals, '0')) + const index = integerArray.length - this.decimals + let item + if (index === 0) { + // if we are adding to the front + item = '0.' + } else if (this.decimals < 0) { + item = '0'.repeat (-this.decimals) + } else if (this.decimals === 0) { + item = '' + } else { + item = '.' + } + integerArray.splice (index, 0, item) + return sign + integerArray.join ('') + } + + static stringMul (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).mul (new Precise (string2)).toString () + } + + static stringDiv (string1, string2, precision = 18) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).div (new Precise (string2), precision).toString () + } + + static stringAdd (string1, string2) { + if ((string1 === undefined) && (string2 === undefined)) { + return undefined + } + if (string1 === undefined) { + return string2 + } else if (string2 === undefined) { + return string1 + } + return (new Precise (string1)).add (new Precise (string2)).toString () + } + + static stringSub (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).sub (new Precise (string2)).toString () + } +} + +module.exports = Precise; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/functions/encode.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/functions/encode.js index 0b4331ccf..e64251dbc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/functions/encode.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/base/functions/encode.js @@ -19,7 +19,6 @@ let base58Encoder = null module.exports = { json: (data, params = undefined) => JSON.stringify (data) - , unjson: JSON.parse , isJsonEncodedObject: object => ( (typeof object === 'string') && diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bibox.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bibox.js index 4d46d8f35..ed9826a1a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bibox.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bibox.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AccountSuspended, ArgumentsRequired, AuthenticationError, DDoSProtection, ExchangeNotAvailable, InvalidOrder, OrderNotFound, PermissionDenied, InsufficientFunds, BadSymbol, RateLimitExceeded, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -229,9 +230,9 @@ module.exports = class bibox extends Exchange { const quote = this.safeCurrencyCode (quoteId); symbol = base + '/' + quote; } - const last = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); - const baseVolume = this.safeFloat2 (ticker, 'vol', 'vol24H'); + const last = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); + const baseVolume = this.safeNumber2 (ticker, 'vol', 'vol24H'); let open = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; @@ -245,11 +246,11 @@ module.exports = class bibox extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -260,7 +261,7 @@ module.exports = class bibox extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': baseVolume, - 'quoteVolume': this.safeFloat (ticker, 'amount'), + 'quoteVolume': this.safeNumber (ticker, 'amount'), 'info': ticker, }; } @@ -276,17 +277,6 @@ module.exports = class bibox extends Exchange { return this.parseTicker (response['result'], market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - const ticker = this.parseTicker (rawTickers[i]); - if ((symbols === undefined) || (this.inArray (ticker['symbol'], symbols))) { - tickers.push (ticker); - } - } - return tickers; - } - async fetchTickers (symbols = undefined, params = {}) { const request = { 'cmd': 'marketAll', @@ -319,7 +309,7 @@ module.exports = class bibox extends Exchange { symbol = market['symbol']; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = this.safeString (trade, 'fee_symbol'); if (feeCurrency !== undefined) { if (feeCurrency in this.currencies_by_id) { @@ -329,12 +319,11 @@ module.exports = class bibox extends Exchange { } } const feeRate = undefined; // todo: deduce from market if market is defined - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if (feeCost !== undefined) { fee = { 'cost': -feeCost, @@ -385,7 +374,7 @@ module.exports = class bibox extends Exchange { request['size'] = limit; // default = 200 } const response = await this.publicGetMdata (this.extend (request, params)); - return this.parseOrderBook (response['result'], this.safeFloat (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); + return this.parseOrderBook (response['result'], this.safeNumber (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); } parseOHLCV (ohlcv, market = undefined) { @@ -401,11 +390,11 @@ module.exports = class bibox extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -497,7 +486,7 @@ module.exports = class bibox extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw_min'), + 'min': this.safeNumber (currency, 'withdraw_min'), 'max': undefined, }, }, @@ -629,19 +618,17 @@ module.exports = class bibox extends Exchange { code = this.currencies_by_id[code]['code']; } const account = this.account (); - let balance = indexed[id]; + const balance = indexed[id]; if (typeof balance === 'string') { - balance = parseFloat (balance); account['free'] = balance; - account['used'] = 0.0; account['total'] = balance; } else { - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -732,8 +719,8 @@ module.exports = class bibox extends Exchange { let tag = this.safeString (transaction, 'addr_remark'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'fee'); if (type === 'deposit') { feeCost = 0; tag = undefined; @@ -841,26 +828,19 @@ module.exports = class bibox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const type = (order['order_type'] === 1) ? 'market' : 'limit'; - const timestamp = order['createdAt']; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'deal_price'); - const filled = this.safeFloat (order, 'deal_amount'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat2 (order, 'deal_money', 'money'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - cost = price * filled; - } - } - const side = (order['order_side'] === 1) ? 'buy' : 'sell'; + const rawType = this.safeString (order, 'order_type'); + const type = (rawType === '1') ? 'market' : 'limit'; + const timestamp = this.safeInteger (order, 'createdAt'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'deal_price'); + const filled = this.safeNumber (order, 'deal_amount'); + const amount = this.safeNumber (order, 'amount'); + const cost = this.safeNumber2 (order, 'deal_money', 'money'); + const rawSide = this.safeString (order, 'order_side'); + const side = (rawSide === '1') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -868,8 +848,7 @@ module.exports = class bibox extends Exchange { 'currency': undefined, }; } - cost = cost ? cost : (parseFloat (price) * filled); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -887,11 +866,11 @@ module.exports = class bibox extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -1059,7 +1038,7 @@ module.exports = class bibox extends Exchange { }; const response = await this.privatePostTransfer (request); info[code] = response; - withdrawFees[code] = this.safeFloat (response['result'], 'withdraw_fee'); + withdrawFees[code] = this.safeNumber (response['result'], 'withdraw_fee'); } return { 'info': info, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bigone.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bigone.js index d6e940c4d..f30eec7a4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bigone.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bigone.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, OrderNotFound, InsufficientFunds, PermissionDenied, BadRequest, RateLimitExceeded, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -260,28 +261,28 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (ticker, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = undefined; - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', {}); const ask = this.safeValue (ticker, 'ask', {}); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 'price'), - 'bidVolume': this.safeFloat (bid, 'quantity'), - 'ask': this.safeFloat (ask, 'price'), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 'price'), + 'bidVolume': this.safeNumber (bid, 'quantity'), + 'ask': this.safeNumber (ask, 'price'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, 'last': close, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'daily_change'), + 'change': this.safeNumber (ticker, 'daily_change'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -446,16 +447,13 @@ module.exports = class bigone extends Exchange { // } // const timestamp = this.parse8601 (this.safeString2 (trade, 'created_at', 'inserted_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } let side = this.safeString (trade, 'side'); const takerSide = this.safeString (trade, 'taker_side'); let takerOrMaker = undefined; @@ -529,8 +527,8 @@ module.exports = class bigone extends Exchange { takerCurrencyCode = market['quote']; } } - const makerFeeCost = this.safeFloat (trade, 'maker_fee'); - const takerFeeCost = this.safeFloat (trade, 'taker_fee'); + const makerFeeCost = this.safeNumber (trade, 'maker_fee'); + const takerFeeCost = this.safeNumber (trade, 'taker_fee'); if (makerFeeCost !== undefined) { if (takerFeeCost !== undefined) { result['fees'] = [ @@ -593,11 +591,11 @@ module.exports = class bigone extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -668,11 +666,11 @@ module.exports = class bigone extends Exchange { const symbol = this.safeString (balance, 'asset_symbol'); const code = this.safeCurrencyCode (symbol); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -694,13 +692,9 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (order, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (amount !== undefined && filled !== undefined) { - remaining = Math.max (0, amount - filled); - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); const status = this.parseOrderStatus (this.safeString (order, 'state')); let side = this.safeString (order, 'side'); if (side === 'BID') { @@ -708,15 +702,9 @@ module.exports = class bigone extends Exchange { } else { side = 'sell'; } - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'updated_at')); - const average = this.safeFloat (order, 'avg_deal_price'); - return { + const average = this.safeNumber (order, 'avg_deal_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -731,14 +719,14 @@ module.exports = class bigone extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -762,7 +750,7 @@ module.exports = class bigone extends Exchange { const isStopLimit = (uppercaseType === 'STOP_LIMIT'); const isStopMarket = (uppercaseType === 'STOP_MARKET'); if (isStopLimit || isStopMarket) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price parameter'); } @@ -1101,7 +1089,7 @@ module.exports = class bigone extends Exchange { const currencyId = this.safeString (transaction, 'asset_symbol'); const code = this.safeCurrencyCode (currencyId); const id = this.safeInteger (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const timestamp = this.parse8601 (this.safeString (transaction, 'inserted_at')); const updated = this.parse8601 (this.safeString2 (transaction, 'updated_at', 'completed_at')); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/binance.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/binance.js index a115b3f7b..a5865c442 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/binance.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/binance.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, RateLimitExceeded, PermissionDenied, NotSupported, BadRequest, BadSymbol, AccountSuspended, OrderImmediatelyFillable } = require ('./base/errors'); -const { ROUND, TRUNCATE } = require ('./base/functions/number'); +const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -47,6 +48,8 @@ module.exports = class binance extends Exchange { 'fetchTransactions': false, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, + 'fetchTransfers': true, }, 'timeframes': { '1m': '1m', @@ -195,6 +198,26 @@ module.exports = class binance extends Exchange { 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/recentRecord', 'apiReferral/kickback/historicalRecord', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccount', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/info', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/recentRecord', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/status', + 'broker/subAccount/depositHist', + 'broker/subAccount/spotSummary', + 'broker/subAccount/marginSummary', + 'broker/subAccount/futuresSummary', + 'broker/rebate/futures/recentRecord', + 'broker/subAccountApi/ipRestriction', + 'broker/universalTransfer', + // v2 not supported yet + // GET /sapi/v2/broker/subAccount/futuresSummary ], 'post': [ 'asset/dust', @@ -234,11 +257,30 @@ module.exports = class binance extends Exchange { // leveraged token endpoints 'blvt/subscribe', 'blvt/redeem', - // broker api + // brokerage API 'apiReferral/customization', 'apiReferral/userCustomization', 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/historicalRecord', + 'broker/subAccount', + 'broker/subAccount/margin', + 'broker/subAccount/futures', + 'broker/subAccountApi', + 'broker/subAccountApi/permission', + 'broker/subAccountApi/commission', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/spot', + 'broker/subAccount/bnbBurn/marginInterest', + 'broker/subAccount/blvt', + 'broker/subAccountApi/ipRestriction', + 'broker/subAccountApi/ipRestriction/ipList', + 'broker/universalTransfer', + 'broker/subAccountApi/permission/universalTransfer', + 'broker/subAccountApi/permission/vanillaOptions', ], 'put': [ 'userDataStream', @@ -249,6 +291,9 @@ module.exports = class binance extends Exchange { 'margin/order', 'userDataStream', 'userDataStream/isolated', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccountApi/ipRestriction/ipList', ], }, 'wapi': { @@ -385,6 +430,8 @@ module.exports = class binance extends Exchange { 'positionSide/dual', 'userTrades', 'income', + 'commissionRate', + 'apiTradingStatus', // broker endpoints 'apiReferral/ifNewUser', 'apiReferral/customization', @@ -474,6 +521,7 @@ module.exports = class binance extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.001, @@ -498,7 +546,7 @@ module.exports = class binance extends Exchange { 'parseOrderToPrecision': false, // force amounts and costs in parseOrder to precision 'newOrderRespType': { 'market': 'FULL', // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills - 'limit': 'RESULT', // we change it from 'ACK' by default to 'RESULT' + 'limit': 'FULL', // we change it from 'ACK' by default to 'FULL' (returns immediately if limit is not hit) }, 'quoteOrderQty': true, // whether market orders support amounts in quote currency 'broker': { @@ -507,6 +555,25 @@ module.exports = class binance extends Exchange { 'future': 'x-xcKtGhcu', 'delivery': 'x-xcKtGhcu', }, + 'fetchPositions': { + 'future': 'fapiPrivateV2GetAccount', // 'fapiPrivateGetPositionRisk' + 'delivery': 'dapiPrivateGetAccount', // 'dapiPrivateGetPositionRisk' + }, + 'accountsByType': { + 'main': 'MAIN', + 'spot': 'MAIN', + 'margin': 'MARGIN', + 'future': 'UMFUTURE', + 'delivery': 'CMFUTURE', + 'mining': 'MINING', + }, + 'typesByAccount': { + 'MAIN': 'spot', + 'MARGIN': 'margin', + 'UMFUTURE': 'future', + 'CMFUTURE': 'delivery', + 'MINING': 'mining', + }, }, // https://binance-docs.github.io/apidocs/spot/en/#error-codes-2 'exceptions': { @@ -564,6 +631,8 @@ module.exports = class binance extends Exchange { '-3010': ExchangeError, // {"code":-3010,"msg":"Repay not allowed. Repay amount exceeds borrow amount."} '-3022': AccountSuspended, // You account's trading is banned. '-4028': BadRequest, // {"code":-4028,"msg":"Leverage 100 is not valid"} + '-3020': InsufficientFunds, // {"code":-3020,"msg":"Transfer out amount exceeds max amount."} + '-3041': InsufficientFunds, // {"code":-3041,"msg":"Balance is not enough"} '-5013': InsufficientFunds, // Asset transfer failed: insufficient balance" }, }); @@ -706,13 +775,14 @@ module.exports = class binance extends Exchange { let fee = undefined; for (let j = 0; j < networkList.length; j++) { const networkItem = networkList[j]; - const name = this.safeString (networkItem, 'name'); - const withdrawFee = this.safeFloat (networkItem, 'withdrawFee'); + const network = this.safeString (networkItem, 'network'); + // const name = this.safeString (networkItem, 'name'); + const withdrawFee = this.safeNumber (networkItem, 'withdrawFee'); const depositEnable = this.safeValue (networkItem, 'depositEnable'); const withdrawEnable = this.safeValue (networkItem, 'withdrawEnable'); isDepositEnabled = isDepositEnabled || depositEnable; isWithdrawEnabled = isWithdrawEnabled || withdrawEnable; - fees[name] = withdrawFee; + fees[network] = withdrawFee; const isDefault = this.safeValue (networkItem, 'isDefault'); if (isDefault || fee === undefined) { fee = withdrawFee; @@ -898,7 +968,7 @@ module.exports = class binance extends Exchange { if (this.options['adjustForTimeDifference']) { await this.loadTimeDifference (); } - const markets = this.safeValue (response, 'symbols'); + const markets = this.safeValue (response, 'symbols', []); const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -963,10 +1033,10 @@ module.exports = class binance extends Exchange { // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } @@ -977,47 +1047,26 @@ module.exports = class binance extends Exchange { const stepSize = this.safeString (filter, 'stepSize'); entry['precision']['amount'] = this.precisionFromString (stepSize); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat2 (filter, 'minNotional', 'notional'); + entry['limits']['cost']['min'] = this.safeNumber2 (filter, 'minNotional', 'notional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -1188,8 +1237,8 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -1202,13 +1251,13 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['used'] = this.safeFloat (balance, 'initialMargin'); - account['total'] = this.safeFloat2 (balance, 'marginBalance', 'balance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['used'] = this.safeString (balance, 'initialMargin'); + account['total'] = this.safeString2 (balance, 'marginBalance', 'balance'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -1261,36 +1310,36 @@ module.exports = class binance extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'openPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'openPrice'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } async fetchStatus (params = {}) { const response = await this.wapiGetSystemStatus (params); - let status = this.safeValue (response, 'status'); + let status = this.safeString (response, 'status'); if (status !== undefined) { - status = (status === 0) ? 'ok' : 'maintenance'; + status = (status === '0') ? 'ok' : 'maintenance'; this.status = this.extend (this.status, { 'status': status, 'updated': this.milliseconds (), @@ -1319,14 +1368,6 @@ module.exports = class binance extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -1381,11 +1422,11 @@ module.exports = class binance extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -1516,8 +1557,11 @@ module.exports = class binance extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -1535,7 +1579,7 @@ module.exports = class binance extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -1548,10 +1592,6 @@ module.exports = class binance extends Exchange { } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } return { 'info': trade, 'timestamp': timestamp, @@ -1670,7 +1710,7 @@ module.exports = class binance extends Exchange { parseOrder (order, market = undefined) { // - // spot + // spot // // { // "symbol": "LTCBTC", @@ -1691,7 +1731,7 @@ module.exports = class binance extends Exchange { // "isWorking": true // } // - // futures + // futures // // { // "symbol": "BTCUSDT", @@ -1709,6 +1749,33 @@ module.exports = class binance extends Exchange { // "updateTime": 1499827319559 // } // + // createOrder with { "newOrderRespType": "FULL" } + // + // { + // "symbol": "BTCUSDT", + // "orderId": 5403233939, + // "orderListId": -1, + // "clientOrderId": "x-R4BD3S825e669e75b6c14f69a2c43e", + // "transactTime": 1617151923742, + // "price": "0.00000000", + // "origQty": "0.00050000", + // "executedQty": "0.00050000", + // "cummulativeQuoteQty": "29.47081500", + // "status": "FILLED", + // "timeInForce": "GTC", + // "type": "MARKET", + // "side": "BUY", + // "fills": [ + // { + // "price": "58941.63000000", + // "qty": "0.00050000", + // "commission": "0.00007050", + // "commissionAsset": "BNB", + // "tradeId": 737466631 + // } + // ] + // } + // const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -1718,80 +1785,26 @@ module.exports = class binance extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); // - Spot/Margin market: cummulativeQuoteQty // - Futures market: cumQuote. // Note this is not the actual cost, since Binance futures uses leverage to calculate margins. - let cost = this.safeFloat2 (order, 'cummulativeQuoteQty', 'cumQuote'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const cost = this.safeNumber2 (order, 'cummulativeQuoteQty', 'cumQuote'); const id = this.safeString (order, 'orderId'); let type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - if (this.options['parseOrderToPrecision']) { - price = parseFloat (this.priceToPrecision (symbol, price)); - } - } - } - } - } else if (type === 'limit_maker') { + if (type === 'limit_maker') { type = 'limit'; } const side = this.safeStringLower (order, 'side'); - let fee = undefined; - let trades = undefined; - const fills = this.safeValue (order, 'fills'); - if (fills !== undefined) { - trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - if (this.options['parseOrderToPrecision']) { - average = parseFloat (this.priceToPrecision (symbol, average)); - } - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const fills = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (fills, market); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = (type === 'limit_maker') || (timeInForce === 'GTX'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1807,13 +1820,13 @@ module.exports = class binance extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1860,8 +1873,11 @@ module.exports = class binance extends Exchange { } else { request['newClientOrderId'] = clientOrderId; } - if (market['spot']) { + if ((orderType === 'spot') || (orderType === 'margin')) { request['newOrderRespType'] = this.safeValue (this.options['newOrderRespType'], type, 'RESULT'); // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills + } else { + // delivery and future + request['newOrderRespType'] = 'RESULT'; // "ACK", "RESULT", default "ACK" } // additional required fields depending on the order type let timeInForceIsRequired = false; @@ -1891,7 +1907,7 @@ module.exports = class binance extends Exchange { if (uppercaseType === 'MARKET') { const quoteOrderQty = this.safeValue (this.options, 'quoteOrderQty', false); if (quoteOrderQty) { - const quoteOrderQty = this.safeFloat (params, 'quoteOrderQty'); + const quoteOrderQty = this.safeNumber (params, 'quoteOrderQty'); const precision = market['precision']['price']; if (quoteOrderQty !== undefined) { request['quoteOrderQty'] = this.decimalToPrecision (quoteOrderQty, TRUNCATE, precision, this.precisionMode); @@ -1911,7 +1927,7 @@ module.exports = class binance extends Exchange { } else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) { stopPriceIsRequired = true; quantityIsRequired = true; - if (market['future']) { + if (market['future'] || market['delivery']) { priceIsRequired = true; } } else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) { @@ -1934,7 +1950,7 @@ module.exports = class binance extends Exchange { stopPriceIsRequired = true; } else if (uppercaseType === 'TRAILING_STOP_MARKET') { quantityIsRequired = true; - const callbackRate = this.safeFloat (params, 'callbackRate'); + const callbackRate = this.safeNumber (params, 'callbackRate'); if (callbackRate === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a callbackRate extra param for a ' + type + ' order'); } @@ -1952,7 +1968,7 @@ module.exports = class binance extends Exchange { request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -2168,10 +2184,15 @@ module.exports = class binance extends Exchange { } } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.fetchBalance (params); - const info = this.safeValue (response, 'info', {}); + const defaultType = this.safeString (this.options, 'defaultType', 'future'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + const options = this.safeValue (this.options, 'fetchPositions', {}); + const defaultMethod = (type === 'delivery') ? 'dapiPrivateGetAccount' : 'fapiPrivateV2GetAccount'; + const method = this.safeString (options, type, defaultMethod); + const response = await this[method] (params); // // futures, delivery // @@ -2214,9 +2235,44 @@ module.exports = class binance extends Exchange { // ] // } // - const positions = this.safeValue2 (info, 'positions', 'userAssets', []); - // todo unify parsePosition/parsePositions - return positions; + // fapiPrivateGetPositionRisk, dapiPrivateGetPositionRisk + // + // [ + // { + // symbol: 'XRPUSD_210625', + // positionAmt: '0', + // entryPrice: '0.00000000', + // markPrice: '0.00000000', + // unRealizedProfit: '0.00000000', + // liquidationPrice: '0', + // leverage: '20', + // maxQty: '500000', + // marginType: 'cross', + // isolatedMargin: '0.00000000', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0', + // isolatedWallet: '0' + // }, + // { + // symbol: 'BTCUSD_210326', + // positionAmt: '1', + // entryPrice: '60665.79999885', + // markPrice: '60696.76856843', + // unRealizedProfit: '0.00000084', + // liquidationPrice: '58034.68208092', + // leverage: '20', + // maxQty: '50', + // marginType: 'isolated', + // isolatedMargin: '0.00008345', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0.00164753', + // isolatedWallet: '0.00008261' + // }, + // ] + // + return this.safeValue (response, 'positions', response); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -2354,7 +2410,7 @@ module.exports = class binance extends Exchange { // const fee = { 'currency': earnedCurrency, - 'cost': this.safeFloat (trade, 'serviceChargeAmount'), + 'cost': this.safeNumber (trade, 'serviceChargeAmount'), }; let symbol = undefined; let amount = undefined; @@ -2362,13 +2418,13 @@ module.exports = class binance extends Exchange { let side = undefined; if (tradedCurrencyIsQuote) { symbol = applicantSymbol; - amount = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); - cost = this.safeFloat (trade, 'amount'); + amount = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); + cost = this.safeNumber (trade, 'amount'); side = 'buy'; } else { symbol = tradedCurrency + '/' + earnedCurrency; - amount = this.safeFloat (trade, 'amount'); - cost = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); + amount = this.safeNumber (trade, 'amount'); + cost = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); side = 'sell'; } let price = undefined; @@ -2541,8 +2597,8 @@ module.exports = class binance extends Exchange { } } const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'transactionFee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'transactionFee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -2569,6 +2625,151 @@ module.exports = class binance extends Exchange { }; } + parseTransferStatus (status) { + const statuses = { + 'CONFIRMED': 'ok', + }; + return this.safeString (statuses, status, status); + } + + parseTransfer (transfer, currency = undefined) { + // + // transfer + // + // { + // "tranId":13526853623 + // } + // + // fetchTransfers + // + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // } + // + const id = this.safeString (transfer, 'tranId'); + const currencyId = this.safeString (transfer, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const amount = this.safeNumber (transfer, 'amount'); + const type = this.safeString (transfer, 'type'); + let fromAccount = undefined; + let toAccount = undefined; + const typesByAccount = this.safeValue (this.options, 'typesByAccount', {}); + if (type !== undefined) { + const parts = type.split ('_'); + fromAccount = this.safeValue (parts, 0); + toAccount = this.safeValue (parts, 1); + fromAccount = this.safeString (typesByAccount, fromAccount, fromAccount); + toAccount = this.safeString (typesByAccount, toAccount, toAccount); + } + const timestamp = this.safeInteger (transfer, 'timestamp'); + const status = this.parseTransferStatus (this.safeString (transfer, 'status')); + return { + 'info': transfer, + 'id': id, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'currency': code, + 'amount': amount, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': status, + }; + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount, fromAccount); + const toId = this.safeString (accountsByType, toAccount, toAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'asset': currency['id'], + 'amount': this.currencyToPrecision (code, amount), + 'type': type, + }; + const response = await this.sapiPostAssetTransfer (this.extend (request, params)); + // + // { + // "tranId":13526853623 + // } + // + const transfer = this.parseTransfer (response, currency); + return this.extend (transfer, { + 'amount': amount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + }); + } + + async fetchTransfers (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const defaultType = this.safeString2 (this.options, 'fetchTransfers', 'defaultType', 'spot'); + const fromAccount = this.safeString (params, 'fromAccount', defaultType); + const defaultTo = (fromAccount === 'future') ? 'spot' : 'future'; + const toAccount = this.safeString (params, 'toAccount', defaultTo); + let type = this.safeString (params, 'type'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + if (type === undefined) { + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount parameter must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount parameter must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'type': type, + }; + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['size'] = limit; + } + const response = await this.sapiGetAssetTransfer (this.extend (request, params)); + // + // { + // total: 3, + // rows: [ + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // }, + // ] + // } + // + const rows = this.safeValue (response, 'rows', []); + return this.parseTransfers (rows, currency, since, limit); + } + async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -2631,7 +2832,7 @@ module.exports = class binance extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (detail[id], 'withdrawFee'); + withdrawFees[code] = this.safeNumber (detail[id], 'withdrawFee'); } return { 'withdraw': withdrawFees, @@ -2678,8 +2879,8 @@ module.exports = class binance extends Exchange { return { 'info': fee, 'symbol': symbol, - 'maker': this.safeFloat (fee, 'maker'), - 'taker': this.safeFloat (fee, 'taker'), + 'maker': this.safeNumber (fee, 'maker'), + 'taker': this.safeNumber (fee, 'taker'), }; } @@ -2741,7 +2942,6 @@ module.exports = class binance extends Exchange { if (api === 'wapi') { url += '.html'; } - const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); if (path === 'historicalTrades') { if (this.apiKey) { headers = { @@ -2750,19 +2950,22 @@ module.exports = class binance extends Exchange { } else { throw new AuthenticationError (this.id + ' historicalTrades endpoint requires `apiKey` credential'); } - } else if (userDataStream) { + } + const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); + if (userDataStream) { if (this.apiKey) { // v1 special case for userDataStream - body = this.urlencode (params); headers = { 'X-MBX-APIKEY': this.apiKey, 'Content-Type': 'application/x-www-form-urlencoded', }; + if (method !== 'GET') { + body = this.urlencode (params); + } } else { throw new AuthenticationError (this.id + ' userDataStream endpoint requires `apiKey` credential'); } - } - if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { + } else if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { this.checkRequiredCredentials (); let query = undefined; const recvWindow = this.safeInteger (this.options, 'recvWindow', 5000); @@ -2794,13 +2997,8 @@ module.exports = class binance extends Exchange { headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } else { - // userDataStream endpoints are public, but POST, PUT, DELETE - // therefore they don't accept URL query arguments - // https://github.com/ccxt/ccxt/issues/5224 - if (!userDataStream) { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } + if (Object.keys (params).length) { + url += '?' + this.urlencode (params); } } return { 'url': url, 'method': method, 'body': body, 'headers': headers }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bit2c.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bit2c.js index a4d60733a..1f58d3f75 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bit2c.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bit2c.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, InvalidNonce, AuthenticationError, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -155,12 +156,12 @@ module.exports = class bit2c extends Exchange { const currencyId = this.currencyId (code); const uppercase = currencyId.toUpperCase (); if (uppercase in balance) { - account['free'] = this.safeFloat (balance, 'AVAILABLE_' + uppercase); - account['total'] = this.safeFloat (balance, uppercase); + account['free'] = this.safeString (balance, 'AVAILABLE_' + uppercase); + account['total'] = this.safeString (balance, uppercase); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -179,22 +180,22 @@ module.exports = class bit2c extends Exchange { }; const ticker = await this.publicGetExchangesPairTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const averagePrice = this.safeFloat (ticker, 'av'); - const baseVolume = this.safeFloat (ticker, 'a'); + const averagePrice = this.safeNumber (ticker, 'av'); + const baseVolume = this.safeNumber (ticker, 'a'); let quoteVolume = undefined; if (baseVolume !== undefined && averagePrice !== undefined) { quoteVolume = baseVolume * averagePrice; } - const last = this.safeFloat (ticker, 'll'); + const last = this.safeNumber (ticker, 'll'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'h'), + 'bid': this.safeNumber (ticker, 'h'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'l'), + 'ask': this.safeNumber (ticker, 'l'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -276,14 +277,8 @@ module.exports = class bit2c extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -296,7 +291,7 @@ module.exports = class bit2c extends Exchange { } const id = this.safeString (order, 'id'); const status = this.safeString (order, 'status'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -313,12 +308,12 @@ module.exports = class bit2c extends Exchange { 'amount': amount, 'filled': undefined, 'remaining': undefined, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -344,16 +339,16 @@ module.exports = class bit2c extends Exchange { parseTrade (trade, market = undefined) { let timestamp = undefined; let id = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let orderId = undefined; let feeCost = undefined; let side = undefined; const reference = this.safeString (trade, 'reference'); if (reference !== undefined) { timestamp = this.safeTimestamp (trade, 'ticks'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'firstAmount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'firstAmount'); const reference_parts = reference.split ('|'); // reference contains 'pair|orderId|tradeId' if (market === undefined) { const marketId = this.safeString (trade, 'pair'); @@ -371,12 +366,12 @@ module.exports = class bit2c extends Exchange { } else if (side === 1) { side = 'sell'; } - feeCost = this.safeFloat (trade, 'feeAmount'); + feeCost = this.safeNumber (trade, 'feeAmount'); } else { timestamp = this.safeTimestamp (trade, 'date'); id = this.safeString (trade, 'tid'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'amount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'amount'); side = this.safeValue (trade, 'isBid'); if (side !== undefined) { if (side) { @@ -390,6 +385,9 @@ module.exports = class bit2c extends Exchange { if (market !== undefined) { symbol = market['symbol']; } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -402,7 +400,7 @@ module.exports = class bit2c extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': { 'cost': feeCost, 'currency': 'NIS', diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbank.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbank.js index d357531d7..c3626b01f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbank.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbank.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -78,21 +79,23 @@ module.exports = class bitbank extends Exchange { }, }, 'markets': { + 'BAT/JPY': { 'id': 'bat_jpy', 'symbol': 'BAT/JPY', 'base': 'BAT', 'quote': 'JPY', 'baseId': 'bat', 'quoteId': 'jpy' }, + 'BAT/BTC': { 'id': 'bat_btc', 'symbol': 'BAT/BTC', 'base': 'BAT', 'quote': 'BTC', 'baseId': 'bat', 'quoteId': 'btc' }, 'BCH/BTC': { 'id': 'bcc_btc', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC', 'baseId': 'bcc', 'quoteId': 'btc' }, 'BCH/JPY': { 'id': 'bcc_jpy', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bcc', 'quoteId': 'jpy' }, + 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, + 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, + 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, + 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, + 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, 'MONA/BTC': { 'id': 'mona_btc', 'symbol': 'MONA/BTC', 'base': 'MONA', 'quote': 'BTC', 'baseId': 'mona', 'quoteId': 'btc' }, 'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' }, 'QTUM/BTC': { 'id': 'qtum_btc', 'symbol': 'QTUM/BTC', 'base': 'QTUM', 'quote': 'BTC', 'baseId': 'qtum', 'quoteId': 'btc' }, 'QTUM/JPY': { 'id': 'qtum_jpy', 'symbol': 'QTUM/JPY', 'base': 'QTUM', 'quote': 'JPY', 'baseId': 'qtum', 'quoteId': 'jpy' }, - 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, - 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, - 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, - 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, - 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, - 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, - 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, - 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, 'XLM/BTC': { 'id': 'xlm_btc', 'symbol': 'XLM/BTC', 'base': 'XLM', 'quote': 'BTC', 'baseId': 'xlm', 'quoteId': 'btc' }, + 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, + 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, + 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, }, 'fees': { 'trading': { @@ -141,16 +144,16 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -160,7 +163,7 @@ module.exports = class bitbank extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -196,18 +199,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; feeCurrency = market['quote']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'transaction_id', 'trade_id'); const takerOrMaker = this.safeString (trade, 'maker_taker'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee_amount_quote'); + const feeCost = this.safeNumber (trade, 'fee_amount_quote'); if (feeCost !== undefined) { fee = { 'currency': feeCurrency, @@ -259,11 +259,11 @@ module.exports = class bitbank extends Exchange { // return [ this.safeInteger (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -314,14 +314,13 @@ module.exports = class bitbank extends Exchange { const balance = assets[i]; const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'free_amount'), - 'used': this.safeFloat (balance, 'locked_amount'), - 'total': this.safeFloat (balance, 'onhand_amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'free_amount'); + account['used'] = this.safeString (balance, 'locked_amount'); + account['total'] = this.safeString (balance, 'onhand_amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -346,21 +345,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (order, 'ordered_at'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'start_amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const average = this.safeFloat (order, 'average_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'start_amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const average = this.safeNumber (order, 'average_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -374,7 +367,7 @@ module.exports = class bitbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, @@ -382,7 +375,7 @@ module.exports = class bitbank extends Exchange { 'trades': undefined, 'fee': undefined, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbay.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbay.js index 4f502e934..760fc7aa2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbay.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitbay.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { InvalidNonce, InsufficientFunds, AuthenticationError, InvalidOrder, ExchangeError, OrderNotFound, AccountSuspended, BadSymbol, OrderImmediatelyFillable, RateLimitExceeded, OnMaintenance, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -278,8 +279,8 @@ module.exports = class bitbay extends Exchange { if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) { fees = this.safeValue (this.fees, 'fiat', {}); } - const maker = this.safeFloat (fees, 'maker'); - const taker = this.safeFloat (fees, 'taker'); + const maker = this.safeNumber (fees, 'maker'); + const taker = this.safeNumber (fees, 'taker'); // todo: check that the limits have ben interpreted correctly // todo: parse the fees page result.push ({ @@ -295,7 +296,7 @@ module.exports = class bitbay extends Exchange { 'taker': taker, 'limits': { 'amount': { - 'min': this.safeFloat (first, 'minOffer'), + 'min': this.safeNumber (first, 'minOffer'), 'max': undefined, }, 'price': { @@ -303,7 +304,7 @@ module.exports = class bitbay extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (second, 'minOffer'), + 'min': this.safeNumber (second, 'minOffer'), 'max': undefined, }, }, @@ -343,16 +344,10 @@ module.exports = class bitbay extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (order, 'time'); - const amount = this.safeFloat (order, 'startAmount'); - const remaining = this.safeFloat (order, 'currentAmount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } + const amount = this.safeNumber (order, 'startAmount'); + const remaining = this.safeNumber (order, 'currentAmount'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'info': order, @@ -365,16 +360,16 @@ module.exports = class bitbay extends Exchange { 'timeInForce': undefined, 'postOnly': postOnly, 'side': this.safeStringLower (order, 'offerType'), - 'price': this.safeFloat (order, 'rate'), + 'price': this.safeNumber (order, 'rate'), 'stopPrice': undefined, 'amount': amount, 'cost': undefined, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'average': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -427,11 +422,11 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lockedFunds'); - account['free'] = this.safeFloat (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'lockedFunds'); + account['free'] = this.safeString (balance, 'availableFunds'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -450,22 +445,22 @@ module.exports = class bitbay extends Exchange { }; const ticker = await this.publicGetIdTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'volume'); - const vwap = this.safeFloat (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max'), + 'low': this.safeNumber (ticker, 'min'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -474,7 +469,7 @@ module.exports = class bitbay extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), + 'average': this.safeNumber (ticker, 'average'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -775,7 +770,7 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const change = this.safeValue (item, 'change', {}); - let amount = this.safeFloat (change, 'total'); + let amount = this.safeNumber (change, 'total'); let direction = 'in'; if (amount < 0) { direction = 'out'; @@ -787,9 +782,9 @@ module.exports = class bitbay extends Exchange { const referenceId = this.safeString (item, 'detailId'); const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const fundsBefore = this.safeValue (item, 'fundsBefore', {}); - const before = this.safeFloat (fundsBefore, 'total'); + const before = this.safeNumber (fundsBefore, 'total'); const fundsAfter = this.safeValue (item, 'fundsAfter', {}); - const after = this.safeFloat (fundsAfter, 'total'); + const after = this.safeNumber (fundsAfter, 'total'); return { 'info': item, 'id': id, @@ -846,11 +841,11 @@ module.exports = class bitbay extends Exchange { const first = this.safeValue (ohlcv, 1, {}); return [ this.safeInteger (ohlcv, 0), - this.safeFloat (first, 'o'), - this.safeFloat (first, 'h'), - this.safeFloat (first, 'l'), - this.safeFloat (first, 'c'), - this.safeFloat (first, 'v'), + this.safeNumber (first, 'o'), + this.safeNumber (first, 'h'), + this.safeNumber (first, 'l'), + this.safeNumber (first, 'c'), + this.safeNumber (first, 'v'), ]; } @@ -933,15 +928,12 @@ module.exports = class bitbay extends Exchange { if (wasTaker !== undefined) { takerOrMaker = wasTaker ? 'taker' : 'maker'; } - const price = this.safeFloat2 (trade, 'rate', 'r'); - const amount = this.safeFloat2 (trade, 'amount', 'a'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'commissionValue'); + const priceString = this.safeString2 (trade, 'rate', 'r'); + const amountString = this.safeString2 (trade, 'amount', 'a'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'commissionValue'); const marketId = this.safeString (trade, 'market'); market = this.safeMarket (marketId, market, '-'); const symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex.js index 6d34687ff..1d7643454 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { NotSupported, RateLimitExceeded, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, InvalidNonce, BadSymbol } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -45,6 +46,7 @@ module.exports = class bitfinex extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': '1m', @@ -158,6 +160,7 @@ module.exports = class bitfinex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'maker': 0.1 / 100, @@ -344,6 +347,8 @@ module.exports = class bitfinex extends Exchange { 'No summary found.': ExchangeError, // fetchTradingFees (summary) endpoint can give this vague error message 'Cannot evaluate your available balance, please try again': ExchangeNotAvailable, 'Unknown symbol': BadSymbol, + 'Cannot complete transfer. Exchange balance insufficient.': InsufficientFunds, + 'Momentary balance check. Please wait few seconds and try the transfer again.': ExchangeError, }, 'broad': { 'Invalid X-BFX-SIGNATURE': AuthenticationError, @@ -441,6 +446,15 @@ module.exports = class bitfinex extends Exchange { 'limit': 'exchange limit', 'market': 'exchange market', }, + 'accountsByType': { + 'spot': 'exchange', + 'margin': 'trading', + 'funding': 'deposit', + 'exchange': 'exchange', + 'trading': 'trading', + 'deposit': 'deposit', + 'derivatives': 'trading', + }, }, }); } @@ -454,7 +468,7 @@ module.exports = class bitfinex extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdraw[code] = this.safeFloat (fees, id); + withdraw[code] = this.safeNumber (fees, id); } return { 'info': response, @@ -490,14 +504,31 @@ module.exports = class bitfinex extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } async fetchMarkets (params = {}) { const ids = await this.publicGetSymbols (); + // + // [ "btcusd", "ltcusd", "ltcbtc" ] + // const details = await this.publicGetSymbolsDetails (); + // + // [ + // { + // "pair":"btcusd", + // "price_precision":5, + // "initial_margin":"10.0", + // "minimum_margin":"5.0", + // "maximum_order_size":"2000.0", + // "minimum_order_size":"0.0002", + // "expiration":"NA", + // "margin":true + // }, + // ] + // const result = []; for (let i = 0; i < details.length; i++) { const market = details[i]; @@ -528,8 +559,8 @@ module.exports = class bitfinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -540,6 +571,7 @@ module.exports = class bitfinex extends Exchange { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -548,6 +580,8 @@ module.exports = class bitfinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': true, + 'type': 'spot', + 'margin': margin, 'precision': precision, 'limits': limits, 'info': market, @@ -572,40 +606,15 @@ module.exports = class bitfinex extends Exchange { return this.decimalToPrecision (price, TRUNCATE, 8, DECIMAL_PLACES); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - const code = market[key]; - const currency = this.safeValue (this.currencies, code); - if (currency !== undefined) { - const precision = this.safeInteger (currency, 'precision'); - if (precision !== undefined) { - cost = parseFloat (this.currencyToPrecision (code, cost)); - } - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); - const types = { - 'exchange': 'exchange', - 'deposit': 'funding', - 'trading': 'margin', - }; - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } const query = this.omit (params, 'type'); const response = await this.privatePostBalances (query); // [ { type: 'deposit', @@ -621,12 +630,16 @@ module.exports = class bitfinex extends Exchange { // amount: '0.0005', // available: '0.0005' } ], const result = { 'info': response }; + const isDerivative = requestedType === 'derivatives'; for (let i = 0; i < response.length; i++) { const balance = response[i]; const type = this.safeString (balance, 'type'); - const parsedType = this.safeString (types, type); - if ((parsedType === balanceType) || (type === balanceType)) { - const currencyId = this.safeString (balance, 'currency'); + const currencyId = this.safeStringLower (balance, 'currency', ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { const code = this.safeCurrencyCode (currencyId); // bitfinex had BCH previously, now it's BAB, but the old // BCH symbol is kept for backward-compatibility @@ -635,13 +648,80 @@ module.exports = class bitfinex extends Exchange { // https://github.com/ccxt/ccxt/issues/4989 if (!(code in result)) { const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currencyId = this.currencyId (code); + const fromCurrencyId = this.convertDerivativesId (currencyId, fromAccount); + const toCurrencyId = this.convertDerivativesId (currencyId, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'walletfrom': fromId, + 'walletto': toId, + }; + const response = await this.privatePostTransfer (this.extend (request, params)); + // [ + // { + // status: 'success', + // message: '0.0001 Bitcoin transfered from Margin to Exchange' + // } + // ] + const result = this.safeValue (response, 0); + const status = this.safeString (result, 'status'); + const message = this.safeString (result, 'message'); + if (message === undefined) { + throw new ExchangeError (this.id + ' transfer failed'); + } + // [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}] + if (status === 'error') { + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + return { + 'info': response, + 'status': status, + 'amount': requestedAmount, + 'code': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'timestamp': undefined, + 'datetime': undefined, + }; + } + + convertDerivativesId (currencyId, type) { + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if ((type !== 'derivatives' && type !== 'trading' && type !== 'margin') && isDerivativeCode) { + currencyId = currencyId.slice (0, start); + } else if (type === 'derivatives' && !isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + return currencyId; } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -680,7 +760,7 @@ module.exports = class bitfinex extends Exchange { } parseTicker (ticker, market = undefined) { - let timestamp = this.safeFloat (ticker, 'timestamp'); + let timestamp = this.safeNumber (ticker, 'timestamp'); if (timestamp !== undefined) { timestamp *= 1000; } @@ -703,16 +783,16 @@ module.exports = class bitfinex extends Exchange { } } } - const last = this.safeFloat (ticker, 'last_price'); + const last = this.safeNumber (ticker, 'last_price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -721,8 +801,8 @@ module.exports = class bitfinex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'mid'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'mid'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -730,24 +810,21 @@ module.exports = class bitfinex extends Exchange { parseTrade (trade, market) { const id = this.safeString (trade, 'tid'); - let timestamp = this.safeFloat (trade, 'timestamp'); + let timestamp = this.safeNumber (trade, 'timestamp'); if (timestamp !== undefined) { timestamp = parseInt (timestamp) * 1000; } const type = undefined; const side = this.safeStringLower (trade, 'type'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; if ('fee_amount' in trade) { - const feeCost = -this.safeFloat (trade, 'fee_amount'); + const feeCost = -this.safeNumber (trade, 'fee_amount'); const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { @@ -862,6 +939,30 @@ module.exports = class bitfinex extends Exchange { } parseOrder (order, market = undefined) { + // + // { + // id: 57334010955, + // cid: 1611584840966, + // cid_date: null, + // gid: null, + // symbol: 'ltcbtc', + // exchange: null, + // price: '0.0042125', + // avg_execution_price: '0.0042097', + // side: 'sell', + // type: 'exchange market', + // timestamp: '1611584841.0', + // is_live: false, + // is_cancelled: false, + // is_hidden: 0, + // oco_order: 0, + // was_forced: false, + // original_amount: '0.205176', + // remaining_amount: '0.0', + // executed_amount: '0.205176', + // src: 'web' + // } + // const side = this.safeString (order, 'side'); const open = this.safeValue (order, 'is_live'); const canceled = this.safeValue (order, 'is_cancelled'); @@ -873,30 +974,17 @@ module.exports = class bitfinex extends Exchange { } else { status = 'closed'; } - let symbol = undefined; - if (market === undefined) { - const marketId = this.safeStringUpper (order, 'symbol'); - if (marketId !== undefined) { - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } - } - } - if (market !== undefined) { - symbol = market['symbol']; - } - let orderType = order['type']; + const marketId = this.safeStringUpper (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market); + let orderType = this.safeString (order, 'type', ''); const exchange = orderType.indexOf ('exchange ') >= 0; if (exchange) { const parts = order['type'].split (' '); orderType = parts[1]; } - let timestamp = this.safeFloat (order, 'timestamp'); - if (timestamp !== undefined) { - timestamp = parseInt (timestamp) * 1000; - } + const timestamp = this.safeTimestamp (order, 'timestamp'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -908,17 +996,17 @@ module.exports = class bitfinex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': side, - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_execution_price'), - 'amount': this.safeFloat (order, 'original_amount'), - 'remaining': this.safeFloat (order, 'remaining_amount'), - 'filled': this.safeFloat (order, 'executed_amount'), + 'average': this.safeNumber (order, 'avg_execution_price'), + 'amount': this.safeNumber (order, 'original_amount'), + 'remaining': this.safeNumber (order, 'remaining_amount'), + 'filled': this.safeNumber (order, 'executed_amount'), 'status': status, 'fee': undefined, 'cost': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -973,11 +1061,11 @@ module.exports = class bitfinex extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -1125,11 +1213,11 @@ module.exports = class bitfinex extends Exchange { // "timestamp_created": "1561716066.0" // } // - let timestamp = this.safeFloat (transaction, 'timestamp_created'); + let timestamp = this.safeNumber (transaction, 'timestamp_created'); if (timestamp !== undefined) { timestamp = parseInt (timestamp * 1000); } - let updated = this.safeFloat (transaction, 'timestamp'); + let updated = this.safeNumber (transaction, 'timestamp'); if (updated !== undefined) { updated = parseInt (updated * 1000); } @@ -1137,7 +1225,7 @@ module.exports = class bitfinex extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const type = this.safeStringLower (transaction, 'type'); // DEPOSIT or WITHDRAWAL const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -1150,7 +1238,7 @@ module.exports = class bitfinex extends Exchange { 'address': this.safeString (transaction, 'address'), // todo: this is actually the tag for XRP transfers (the address is missing) 'tag': undefined, // refix it properly for the tag from description 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -1204,7 +1292,7 @@ module.exports = class bitfinex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex2.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex2.js index b47da9faf..9313f2025 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex2.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitfinex2.js @@ -286,6 +286,15 @@ module.exports = class bitfinex2 extends bitfinex { 'JPY': 'JPY', 'GBP': 'GBP', }, + // actually the correct names unlike the v1 + // we don't want to extend this with accountsByType in v1 + 'v2AccountsByType': { + 'spot': 'exchange', + 'exchange': 'exchange', + 'funding': 'funding', + 'margin': 'margin', + 'derivatives': 'margin', + }, }, 'exceptions': { 'exact': { @@ -367,8 +376,8 @@ module.exports = class bitfinex2 extends bitfinex { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -379,6 +388,7 @@ module.exports = class bitfinex2 extends bitfinex { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -393,6 +403,7 @@ module.exports = class bitfinex2 extends bitfinex { 'type': type, 'swap': false, 'spot': spot, + 'margin': margin, 'futures': futures, }); } @@ -505,7 +516,7 @@ module.exports = class bitfinex2 extends bitfinex { const ids = this.safeValue (response, 0, []); const result = {}; for (let i = 0; i < ids.length; i++) { - let id = ids[i]; + const id = ids[i]; const code = this.safeCurrencyCode (id); const label = this.safeValue (indexed['label'], id, []); const name = this.safeString (label, 1); @@ -513,13 +524,14 @@ module.exports = class bitfinex2 extends bitfinex { const type = this.safeString (pool, 1); const feeValues = this.safeValue (indexed['fees'], id, []); const fees = this.safeValue (feeValues, 1, []); - const fee = this.safeFloat (fees, 1); + const fee = this.safeNumber (fees, 1); + const undl = this.safeValue (indexed['undl'], id, []); const precision = 8; // default precision, todo: fix "magic constants" - id = 'f' + id; + const fid = 'f' + id; result[code] = { - 'id': id, + 'id': fid, 'code': code, - 'info': [ id, label, pool, feeValues ], + 'info': [ id, label, pool, feeValues, undl ], 'type': type, 'name': name, 'active': true, @@ -550,40 +562,117 @@ module.exports = class bitfinex2 extends bitfinex { async fetchBalance (params = {}) { // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances) + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 await this.loadMarkets (); - const response = await this.privatePostAuthRWallets (params); - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } + const isDerivative = requestedType === 'derivatives'; + const query = this.omit (params, 'type'); + const response = await this.privatePostAuthRWallets (query); const result = { 'info': response }; - for (let b = 0; b < response.length; b++) { - const balance = response[b]; - const accountType = balance[0]; - let currency = balance[1]; - const total = balance[2]; - const available = balance[4]; - if (accountType === balanceType) { - if (currency[0] === 't') { - currency = currency.slice (1); - } - const code = this.safeCurrencyCode (currency); + for (let i = 0; i < response.length; i++) { + const balance = response[i]; + const type = this.safeString (balance, 0); + const currencyId = this.safeStringLower (balance, 1, ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { + const code = this.safeCurrencyCode (currencyId); const account = this.account (); - // do not fill in zeroes and missing values in the parser - // rewrite and unify the following to use the unified parseBalance - account['total'] = total; - if (!available) { - if (available === 0) { - account['free'] = 0; - account['used'] = total; - } else { - account['free'] = total; - } - } else { - account['free'] = available; - account['used'] = account['total'] - account['free']; - } + account['total'] = this.safeString (balance, 2); + account['free'] = this.safeString (balance, 4); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currency = this.currency (code); + const fromCurrencyId = this.convertDerivativesId (currency, fromAccount); + const toCurrencyId = this.convertDerivativesId (currency, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + // this request is slightly different from v1 fromAccount -> from + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'from': fromId, + 'to': toId, + }; + const response = await this.privatePostAuthWTransfer (this.extend (request, params)); + // [1616451183763,"acc_tf",null,null,[1616451183763,"exchange","margin",null,"UST","UST",null,1],null,"SUCCESS","1.0 Tether USDt transfered from Exchange to Margin"] + const timestamp = this.safeInteger (response, 0); + // ["error",10001,"Momentary balance check. Please wait few seconds and try the transfer again."] + const error = this.safeString (response, 0); + if (error === 'error') { + const message = this.safeString (response, 2, ''); + // same message as in v1 + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + const info = this.safeValue (response, 4); + const fromResponse = this.safeString (info, 1); + const toResponse = this.safeString (info, 2); + const toCode = this.safeCurrencyCode (this.safeString (info, 5)); + const success = this.safeString (response, 6); + const status = (success === 'SUCCESS') ? 'ok' : undefined; + return { + 'info': response, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'status': status, + 'amount': requestedAmount, + 'code': toCode, + 'fromAccount': fromResponse, + 'toAccount': toResponse, + }; + } + + convertDerivativesId (currency, type) { + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 + // { + // id: 'fUSTF0', + // code: 'USTF0', + // info: [ 'USTF0', [], [], [], [ 'USTF0', 'UST' ] ], + const info = this.safeValue (currency, 'info'); + const transferId = this.safeString (info, 0); + const underlying = this.safeValue (info, 4, []); + let currencyId = undefined; + if (type === 'derivatives') { + currencyId = this.safeString (underlying, 0, transferId); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if (!isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + } else if (type !== 'margin') { + currencyId = this.safeString (underlying, 1, transferId); + } else { + currencyId = transferId; + } + return currencyId; } async fetchOrder (id, symbol = undefined, params = {}) { @@ -613,9 +702,10 @@ module.exports = class bitfinex2 extends bitfinex { const priceIndex = (fullRequest['precision'] === 'R0') ? 1 : 0; for (let i = 0; i < orderbook.length; i++) { const order = orderbook[i]; - const price = order[priceIndex]; - const amount = Math.abs (order[2]); - const side = (order[2] > 0) ? 'bids' : 'asks'; + const price = this.safeNumber (order, priceIndex); + const signedAmount = this.safeNumber (order, 2); + const amount = Math.abs (signedAmount); + const side = (signedAmount > 0) ? 'bids' : 'asks'; result[side].push ([ price, amount ]); } result['bids'] = this.sortBy (result['bids'], 0, true); @@ -630,26 +720,26 @@ module.exports = class bitfinex2 extends bitfinex { symbol = market['symbol']; } const length = ticker.length; - const last = ticker[length - 4]; + const last = this.safeNumber (ticker, length - 4); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': ticker[length - 2], - 'low': ticker[length - 1], - 'bid': ticker[length - 10], + 'high': this.safeNumber (ticker, length - 2), + 'low': this.safeNumber (ticker, length - 1), + 'bid': this.safeNumber (ticker, length - 10), 'bidVolume': undefined, - 'ask': ticker[length - 8], + 'ask': this.safeNumber (ticker, length - 8), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': ticker[length - 6], - 'percentage': ticker[length - 5] * 100, + 'change': this.safeNumber (ticker, length - 6), + 'percentage': this.safeNumber (ticker, length - 5) * 100, 'average': undefined, - 'baseVolume': ticker[length - 3], + 'baseVolume': this.safeNumber (ticker, length - 3), 'quoteVolume': undefined, 'info': ticker, }; @@ -738,12 +828,12 @@ module.exports = class bitfinex2 extends bitfinex { // const tradeLength = trade.length; const isPrivate = (tradeLength > 5); - const id = trade[0].toString (); + const id = this.safeString (trade, 0); const amountIndex = isPrivate ? 4 : 2; - let amount = trade[amountIndex]; + let amount = this.safeNumber (trade, amountIndex); let cost = undefined; const priceIndex = isPrivate ? 5 : 3; - const price = trade[priceIndex]; + const price = this.safeNumber (trade, priceIndex); let side = undefined; let orderId = undefined; let takerOrMaker = undefined; @@ -751,7 +841,7 @@ module.exports = class bitfinex2 extends bitfinex { let fee = undefined; let symbol = undefined; const timestampIndex = isPrivate ? 2 : 1; - const timestamp = trade[timestampIndex]; + const timestamp = this.safeInteger (trade, timestampIndex); if (isPrivate) { const marketId = trade[1]; if (marketId in this.markets_by_id) { @@ -760,10 +850,12 @@ module.exports = class bitfinex2 extends bitfinex { } else { symbol = this.parseSymbol (marketId); } - orderId = trade[3].toString (); - takerOrMaker = (trade[8] === 1) ? 'maker' : 'taker'; - let feeCost = trade[9]; - const feeCurrency = this.safeCurrencyCode (trade[10]); + orderId = this.safeString (trade, 3); + const maker = this.safeInteger (trade, 8); + takerOrMaker = (maker === 1) ? 'maker' : 'taker'; + let feeCost = this.safeNumber (trade, 9); + const feeCurrencyId = this.safeString (trade, 10); + const feeCurrency = this.safeCurrencyCode (feeCurrencyId); if (feeCost !== undefined) { feeCost = -feeCost; if (symbol in this.markets) { @@ -904,10 +996,10 @@ module.exports = class bitfinex2 extends bitfinex { // https://github.com/ccxt/ccxt/issues/6686 // const timestamp = this.safeTimestamp (order, 5); const timestamp = this.safeInteger (order, 5); - const remaining = Math.abs (this.safeFloat (order, 6)); - const amount = Math.abs (this.safeFloat (order, 7)); - const filled = amount - remaining; - const side = (order[7] < 0) ? 'sell' : 'buy'; + const remaining = Math.abs (this.safeNumber (order, 6)); + const signedAmount = this.safeNumber (order, 7); + const amount = Math.abs (signedAmount); + const side = (signedAmount < 0) ? 'sell' : 'buy'; const orderType = this.safeString (order, 8); const type = this.safeString (this.safeValue (this.options, 'exchangeTypes'), orderType); let status = undefined; @@ -916,11 +1008,10 @@ module.exports = class bitfinex2 extends bitfinex { const parts = statusString.split (' @ '); status = this.parseOrderStatus (this.safeString (parts, 0)); } - const price = this.safeFloat (order, 16); - const average = this.safeFloat (order, 17); - const cost = price * filled; + const price = this.safeNumber (order, 16); + const average = this.safeNumber (order, 17); const clientOrderId = this.safeString (order, 2); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -935,14 +1026,14 @@ module.exports = class bitfinex2 extends bitfinex { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -959,11 +1050,11 @@ module.exports = class bitfinex2 extends bitfinex { if ((orderType === 'LIMIT') || (orderType === 'EXCHANGE LIMIT')) { request['price'] = this.numberToString (price); } else if ((orderType === 'STOP') || (orderType === 'EXCHANGE STOP')) { - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'STOP LIMIT') || (orderType === 'EXCHANGE STOP LIMIT')) { - const priceAuxLimit = this.safeFloat (params, 'price_aux_limit'); - let stopPrice = this.safeFloat (params, 'stopPrice'); + const priceAuxLimit = this.safeNumber (params, 'price_aux_limit'); + let stopPrice = this.safeNumber (params, 'stopPrice'); if (priceAuxLimit === undefined) { if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter or a price_aux_limit parameter for a ' + orderType + ' order'); @@ -978,9 +1069,9 @@ module.exports = class bitfinex2 extends bitfinex { } request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'TRAILING STOP') || (orderType === 'EXCHANGE TRAILING STOP')) { - const priceTrailing = this.safeFloat (params, 'price_trailing'); + const priceTrailing = this.safeNumber (params, 'price_trailing'); request['price_trailing'] = this.numberToString (priceTrailing); - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'FOK') || (orderType === 'EXCHANGE FOK') || (orderType === 'IOC') || (orderType === 'EXCHANGE IOC')) { request['price'] = this.numberToString (price); @@ -1312,11 +1403,11 @@ module.exports = class bitfinex2 extends bitfinex { if (currency !== undefined) { code = currency['code']; } - feeCost = this.safeFloat (data, 8); + feeCost = this.safeNumber (data, 8); if (feeCost !== undefined) { feeCost = -feeCost; } - amount = this.safeFloat (data, 5); + amount = this.safeNumber (data, 5); id = this.safeValue (data, 0); status = 'ok'; if (id === 0) { @@ -1330,7 +1421,7 @@ module.exports = class bitfinex2 extends bitfinex { timestamp = this.safeInteger (transaction, 5); updated = this.safeInteger (transaction, 6); status = this.parseTransactionStatus (this.safeString (transaction, 9)); - amount = this.safeFloat (transaction, 12); + amount = this.safeNumber (transaction, 12); if (amount !== undefined) { if (amount < 0) { type = 'withdrawal'; @@ -1338,7 +1429,7 @@ module.exports = class bitfinex2 extends bitfinex { type = 'deposit'; } } - feeCost = this.safeFloat (transaction, 13); + feeCost = this.safeNumber (transaction, 13); if (feeCost !== undefined) { feeCost = -feeCost; } @@ -1466,7 +1557,7 @@ module.exports = class bitfinex2 extends bitfinex { }); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitflyer.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitflyer.js index f9c19b59a..911cb61f0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitflyer.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitflyer.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -185,11 +186,11 @@ module.exports = class bitflyer extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'amount'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -208,16 +209,16 @@ module.exports = class bitflyer extends Exchange { }; const ticker = await this.publicGetGetticker (this.extend (request, params)); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'ltp'); + const last = this.safeNumber (ticker, 'ltp'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'best_bid'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -227,7 +228,7 @@ module.exports = class bitflyer extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_by_product'), + 'baseVolume': this.safeNumber (ticker, 'volume_by_product'), 'quoteVolume': undefined, 'info': ticker, }; @@ -251,14 +252,11 @@ module.exports = class bitflyer extends Exchange { order = this.safeString (trade, 'child_order_acceptance_id'); } const timestamp = this.parse8601 (this.safeString (trade, 'exec_date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -334,18 +332,17 @@ module.exports = class bitflyer extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'child_order_date')); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'outstanding_size'); - const filled = this.safeFloat (order, 'executed_size'); - const price = this.safeFloat (order, 'price'); - const cost = price * filled; + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'outstanding_size'); + const filled = this.safeNumber (order, 'executed_size'); + const price = this.safeNumber (order, 'price'); const status = this.parseOrderStatus (this.safeString (order, 'child_order_state')); const type = this.safeStringLower (order, 'child_order_type'); const side = this.safeStringLower (order, 'side'); const marketId = this.safeString (order, 'product_code'); const symbol = this.safeSymbol (marketId, market); let fee = undefined; - const feeCost = this.safeFloat (order, 'total_commission'); + const feeCost = this.safeNumber (order, 'total_commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -354,7 +351,7 @@ module.exports = class bitflyer extends Exchange { }; } const id = this.safeString (order, 'child_order_acceptance_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -369,14 +366,14 @@ module.exports = class bitflyer extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrders (symbol = undefined, since = undefined, limit = 100, params = {}) { @@ -439,7 +436,7 @@ module.exports = class bitflyer extends Exchange { return this.parseTrades (response, market, since, limit); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchPositions() requires a `symbols` argument, exactly one symbol in an array'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitforex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitforex.js index 8fa337979..0dfebbef7 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitforex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitforex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, OrderNotFound, InsufficientFunds, DDoSProtection, PermissionDenied, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -259,7 +260,7 @@ module.exports = class bitforex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -295,14 +296,11 @@ module.exports = class bitforex extends Exchange { const timestamp = this.safeInteger (trade, 'time'); const id = this.safeString (trade, 'tid'); const orderId = undefined; - const amount = this.safeFloat (trade, 'amount'); - const price = this.safeFloat (trade, 'price'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const sideId = this.safeInteger (trade, 'direction'); const side = this.parseSide (sideId); return { @@ -345,12 +343,12 @@ module.exports = class bitforex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'active'); - account['total'] = this.safeFloat (balance, 'fix'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'active'); + account['total'] = this.safeString (balance, 'fix'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTicker (symbol, params = {}) { @@ -366,21 +364,21 @@ module.exports = class bitforex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (data, 'high'), - 'low': this.safeFloat (data, 'low'), - 'bid': this.safeFloat (data, 'buy'), + 'high': this.safeNumber (data, 'high'), + 'low': this.safeNumber (data, 'low'), + 'bid': this.safeNumber (data, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (data, 'sell'), + 'ask': this.safeNumber (data, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (data, 'last'), - 'last': this.safeFloat (data, 'last'), + 'close': this.safeNumber (data, 'last'), + 'last': this.safeNumber (data, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (data, 'vol'), + 'baseVolume': this.safeNumber (data, 'vol'), 'quoteVolume': undefined, 'info': response, }; @@ -400,11 +398,11 @@ module.exports = class bitforex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -472,26 +470,24 @@ module.exports = class bitforex extends Exchange { parseOrder (order, market = undefined) { const id = this.safeString (order, 'orderId'); - const timestamp = this.safeFloat (order, 'createTime'); - const lastTradeTimestamp = this.safeFloat (order, 'lastTime'); + const timestamp = this.safeNumber (order, 'createTime'); + const lastTradeTimestamp = this.safeNumber (order, 'lastTime'); const symbol = market['symbol']; const sideId = this.safeInteger (order, 'tradeType'); const side = this.parseSide (sideId); const type = undefined; - const price = this.safeFloat (order, 'orderPrice'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderAmount'); - const filled = this.safeFloat (order, 'dealAmount'); - const remaining = amount - filled; + const price = this.safeNumber (order, 'orderPrice'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderAmount'); + const filled = this.safeNumber (order, 'dealAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderState')); - const cost = filled * price; const feeSide = (side === 'buy') ? 'base' : 'quote'; const feeCurrency = market[feeSide]; const fee = { - 'cost': this.safeFloat (order, 'tradeFee'), + 'cost': this.safeNumber (order, 'tradeFee'), 'currency': feeCurrency, }; - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -505,16 +501,15 @@ module.exports = class bitforex extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitget.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitget.js index 3c9581955..75e458fe0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitget.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitget.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -793,7 +794,7 @@ module.exports = class bitget extends Exchange { let swap = false; const baseId = this.safeString2 (market, 'base_currency', 'coin'); const quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { marketType = 'swap'; spot = false; @@ -811,7 +812,7 @@ module.exports = class bitget extends Exchange { 'amount': parseFloat ('1e-' + sizeIncrement), 'price': parseFloat ('1e-' + tickSize), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const status = this.safeString (market, 'status'); let active = undefined; if (status !== undefined) { @@ -1068,26 +1069,26 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat2 (ticker, 'last', 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'last', 'close'); + const open = this.safeNumber (ticker, 'open'); let bidVolume = undefined; let askVolume = undefined; let bid = this.safeValue (ticker, 'bid'); if (bid === undefined) { - bid = this.safeFloat (ticker, 'best_bid'); + bid = this.safeNumber (ticker, 'best_bid'); } else { - bidVolume = this.safeFloat (bid, 1); - bid = this.safeFloat (bid, 0); + bidVolume = this.safeNumber (bid, 1); + bid = this.safeNumber (bid, 0); } let ask = this.safeValue (ticker, 'ask'); if (ask === undefined) { - ask = this.safeFloat (ticker, 'best_ask'); + ask = this.safeNumber (ticker, 'best_ask'); } else { - askVolume = this.safeFloat (ask, 1); - ask = this.safeFloat (ask, 0); + askVolume = this.safeNumber (ask, 1); + ask = this.safeNumber (ask, 0); } - const baseVolume = this.safeFloat2 (ticker, 'amount', 'volume_24h'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber2 (ticker, 'amount', 'volume_24h'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; @@ -1101,8 +1102,8 @@ module.exports = class bitget extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -1337,9 +1338,12 @@ module.exports = class bitget extends Exchange { } let timestamp = this.safeInteger (trade, 'created_at'); timestamp = this.safeInteger2 (trade, 'timestamp', 'ts', timestamp); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'filled_amount', 'order_qty'); - amount = this.safeFloat2 (trade, 'size', 'amount', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'filled_amount', 'order_qty'); + amountString = this.safeString2 (trade, 'size', 'amount', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -1358,18 +1362,13 @@ module.exports = class bitget extends Exchange { type = this.parseOrderType (side); side = this.parseOrderSide (side); } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - let feeCost = this.safeFloat (trade, 'fee'); - if (feeCost === undefined) { - feeCost = this.safeFloat (trade, 'filled_fees'); + let feeCostString = this.safeString (trade, 'fee'); + if (feeCostString === undefined) { + feeCostString = this.safeString (trade, 'filled_fees'); } else { - feeCost = -feeCost; + feeCostString = (feeCostString[0] === '-') ? feeCostString.slice (1) : feeCostString; } + const feeCost = this.parseNumber (feeCostString); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -1492,23 +1491,23 @@ module.exports = class bitget extends Exchange { const volumeIndex = this.safeString (volume, market['type'], 'amount'); return [ this.safeInteger (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets ]; } else { const volumeIndex = this.safeValue (volume, market['type'], 6); return [ this.safeInteger (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, volumeIndex), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, volumeIndex), // Base Volume ]; } } @@ -1610,13 +1609,13 @@ module.exports = class bitget extends Exchange { } const type = this.safeValue (balance, 'type'); if (type === 'trade') { - result[code]['free'] = this.safeFloat (balance, 'balance'); + result[code]['free'] = this.safeString (balance, 'balance'); } else if ((type === 'frozen') || (type === 'lock')) { - const used = this.safeFloat (result[code], 'used'); - result[code]['used'] = this.sum (used, this.safeFloat (balance, 'balance')); + const used = this.safeString (result[code], 'used'); + result[code]['used'] = Precise.stringAdd (used, this.safeString (balance, 'balance')); } } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseSwapBalance (response) { @@ -1640,11 +1639,11 @@ module.exports = class bitget extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeString (balance, 'equity'); + account['free'] = this.safeString (balance, 'total_avail_balance'); result[symbol] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchAccounts (params = {}) { @@ -1921,26 +1920,13 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let amount = this.safeFloat2 (order, 'amount', 'size'); - const filled = this.safeFloat2 (order, 'filled_amount', 'filled_qty'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - amount = Math.max (amount, filled); - remaining = Math.max (0, amount - filled); - } - } - if (type === 'market') { - remaining = 0; - } - const cost = this.safeFloat (order, 'filled_cash_amount'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); - if ((average === undefined) && (filled !== undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } + const amount = this.safeNumber2 (order, 'amount', 'size'); + const filled = this.safeNumber2 (order, 'filled_amount', 'filled_qty'); + const cost = this.safeNumber (order, 'filled_cash_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'price_avg'); const status = this.parseOrderStatus (this.safeString2 (order, 'state', 'status')); - const feeCost = this.safeFloat2 (order, 'filled_fees', 'fee'); + const feeCost = this.safeNumber2 (order, 'filled_fees', 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -1950,7 +1936,7 @@ module.exports = class bitget extends Exchange { }; } const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1968,11 +1954,11 @@ module.exports = class bitget extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -2019,7 +2005,7 @@ module.exports = class bitget extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'amount'); + let cost = this.safeNumber (params, 'amount'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2569,12 +2555,12 @@ module.exports = class bitget extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const txid = this.safeString (transaction, 'tx_hash'); const timestamp = this.safeInteger (transaction, 'created_at'); const updated = this.safeInteger (transaction, 'updated_at'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -2764,7 +2750,7 @@ module.exports = class bitget extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.swapGetPositionAllPosition (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bithumb.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bithumb.js index ef4e7d479..051562718 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bithumb.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bithumb.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, AuthenticationError, BadRequest, PermissionDenied, InvalidAddress, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); const { DECIMAL_PLACES, SIGNIFICANT_DIGITS, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -198,12 +199,12 @@ module.exports = class bithumb extends Exchange { const account = this.account (); const currency = this.currency (code); const lowerCurrencyId = this.safeStringLower (currency, 'id'); - account['total'] = this.safeFloat (balances, 'total_' + lowerCurrencyId); - account['used'] = this.safeFloat (balances, 'in_use_' + lowerCurrencyId); - account['free'] = this.safeFloat (balances, 'available_' + lowerCurrencyId); + account['total'] = this.safeString (balances, 'total_' + lowerCurrencyId); + account['used'] = this.safeString (balances, 'in_use_' + lowerCurrencyId); + account['free'] = this.safeString (balances, 'available_' + lowerCurrencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -265,8 +266,8 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'opening_price'); - const close = this.safeFloat (ticker, 'closing_price'); + const open = this.safeNumber (ticker, 'opening_price'); + const close = this.safeNumber (ticker, 'closing_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -277,18 +278,18 @@ module.exports = class bithumb extends Exchange { } average = this.sum (open, close) / 2; } - const baseVolume = this.safeFloat (ticker, 'units_traded_24H'); - const quoteVolume = this.safeFloat (ticker, 'acc_trade_value_24H'); + const baseVolume = this.safeNumber (ticker, 'units_traded_24H'); + const quoteVolume = this.safeNumber (ticker, 'acc_trade_value_24H'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -394,11 +395,11 @@ module.exports = class bithumb extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -488,18 +489,16 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'units_traded', 'units'); - let cost = this.safeFloat (trade, 'total'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'units_traded', 'units'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.commonCurrencyCode (feeCurrencyId); @@ -702,14 +701,14 @@ module.exports = class bithumb extends Exchange { const sideProperty = this.safeValue2 (order, 'type', 'side'); const side = (sideProperty === 'bid') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'order_status')); - let price = this.safeFloat2 (order, 'order_price', 'price'); + let price = this.safeNumber2 (order, 'order_price', 'price'); let type = 'limit'; if (price === 0) { price = undefined; type = 'market'; } - const amount = this.safeFloat2 (order, 'order_qty', 'units'); - let remaining = this.safeFloat (order, 'units_remaining'); + const amount = this.safeNumber2 (order, 'order_qty', 'units'); + let remaining = this.safeNumber (order, 'units_remaining'); if (remaining === undefined) { if (status === 'closed') { remaining = 0; @@ -728,65 +727,14 @@ module.exports = class bithumb extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let filled = undefined; - let cost = undefined; - let average = undefined; const id = this.safeString (order, 'order_id'); - const rawTrades = this.safeValue (order, 'contract'); - let trades = undefined; - let fee = undefined; - let fees = undefined; - let feesByCurrency = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'side': side, - 'symbol': symbol, - 'order': id, - }); - filled = 0; - feesByCurrency = {}; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - filled = this.sum (filled, trade['amount']); - cost = this.sum (cost, trade['cost']); - const tradeFee = trade['fee']; - const feeCurrency = tradeFee['currency']; - if (feeCurrency in feesByCurrency) { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': this.sum (feesByCurrency[feeCurrency]['cost'], tradeFee['cost']), - }; - } else { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': tradeFee['cost'], - }; - } - } - const feeCurrencies = Object.keys (feesByCurrency); - const feeCurrenciesLength = feeCurrencies.length; - if (feeCurrenciesLength > 1) { - fees = []; - for (let i = 0; i < feeCurrencies.length; i++) { - const feeCurrency = feeCurrencies[i]; - fees.push (feesByCurrency[feeCurrency]); - } - } else { - fee = this.safeValue (feesByCurrency, feeCurrencies[0]); - } - if (filled !== 0) { - average = cost / filled; - } - } - if (amount !== undefined) { - if ((filled === undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if ((remaining === undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const result = { + const rawTrades = this.safeValue (order, 'contract', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'side': side, + 'symbol': symbol, + 'order': id, + }); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -801,20 +749,14 @@ module.exports = class bithumb extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, + 'cost': undefined, + 'average': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': trades, - }; - if (fee !== undefined) { - result['fee'] = fee; - } else if (fees !== undefined) { - result['fees'] = fees; - } - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmart.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmart.js index 4ad47118a..9ec806c6e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmart.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmart.js @@ -435,16 +435,16 @@ module.exports = class bitmart extends Exchange { // const pricePrecision = this.safeInteger (market, 'price_max_precision'); const precision = { - 'amount': this.safeFloat (market, 'base_min_size'), + 'amount': this.safeNumber (market, 'base_min_size'), 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 10)), }; - const minBuyCost = this.safeFloat (market, 'min_buy_amount'); - const minSellCost = this.safeFloat (market, 'min_sell_amount'); + const minBuyCost = this.safeNumber (market, 'min_buy_amount'); + const minSellCost = this.safeNumber (market, 'min_sell_amount'); const minCost = Math.max (minBuyCost, minSellCost); const limits = { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': { 'min': undefined, @@ -554,16 +554,16 @@ module.exports = class bitmart extends Exchange { // // the docs are wrong: https://github.com/ccxt/ccxt/issues/5612 // - const amountPrecision = this.safeFloat (contract, 'vol_unit'); - const pricePrecision = this.safeFloat (contract, 'price_unit'); + const amountPrecision = this.safeNumber (contract, 'vol_unit'); + const pricePrecision = this.safeNumber (contract, 'price_unit'); const precision = { 'amount': amountPrecision, 'price': pricePrecision, }; const limits = { 'amount': { - 'min': this.safeFloat (contract, 'min_vol'), - 'max': this.safeFloat (contract, 'max_vol'), + 'min': this.safeNumber (contract, 'min_vol'), + 'max': this.safeNumber (contract, 'max_vol'), }, 'price': { 'min': undefined, @@ -586,8 +586,8 @@ module.exports = class bitmart extends Exchange { future = true; } const feeConfig = this.safeValue (market, 'fee_config', {}); - const maker = this.safeFloat (feeConfig, 'maker_fee'); - const taker = this.safeFloat (feeConfig, 'taker_fee'); + const maker = this.safeNumber (feeConfig, 'maker_fee'); + const taker = this.safeNumber (feeConfig, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -675,33 +675,33 @@ module.exports = class bitmart extends Exchange { const timestamp = this.safeTimestamp (ticker, 'timestamp', this.milliseconds ()); const marketId = this.safeString2 (ticker, 'symbol', 'contract_id'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat2 (ticker, 'close_24h', 'last_price'); - let percentage = this.safeFloat (ticker, 'fluctuation', 'rise_fall_rate'); + const last = this.safeNumber2 (ticker, 'close_24h', 'last_price'); + let percentage = this.safeNumber (ticker, 'fluctuation', 'rise_fall_rate'); if (percentage !== undefined) { percentage *= 100; } - const baseVolume = this.safeFloat2 (ticker, 'base_volume_24h', 'base_coin_volume'); - const quoteVolume = this.safeFloat2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); + const baseVolume = this.safeNumber2 (ticker, 'base_volume_24h', 'base_coin_volume'); + const quoteVolume = this.safeNumber2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const open = this.safeFloat2 (ticker, 'open_24h', 'open'); + const open = this.safeNumber2 (ticker, 'open_24h', 'open'); let average = undefined; if ((last !== undefined) && (open !== undefined)) { average = this.sum (last, open) / 2; } - average = this.safeFloat (ticker, 'avg_price', average); + average = this.safeNumber (ticker, 'avg_price', average); const price = this.safeValue (ticker, 'depth_price', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), - 'bid': this.safeFloat (price, 'best_bid', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (price, 'best_ask', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), + 'bid': this.safeNumber (price, 'best_bid', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (price, 'best_ask', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open_24h'), + 'open': this.safeNumber (ticker, 'open_24h'), 'close': last, 'last': last, 'previousClose': undefined, @@ -1005,18 +1005,18 @@ module.exports = class bitmart extends Exchange { if (execType !== undefined) { takerOrMaker = (execType === 'M') ? 'maker' : 'taker'; } - let price = this.safeFloat2 (trade, 'price', 'deal_price'); - price = this.safeFloat (trade, 'price_avg', price); - let amount = this.safeFloat2 (trade, 'amount', 'deal_vol'); - amount = this.safeFloat (trade, 'size', amount); - let cost = this.safeFloat2 (trade, 'count', 'notional'); + let price = this.safeNumber2 (trade, 'price', 'deal_price'); + price = this.safeNumber (trade, 'price_avg', price); + let amount = this.safeNumber2 (trade, 'amount', 'deal_vol'); + amount = this.safeNumber (trade, 'size', amount); + let cost = this.safeNumber2 (trade, 'count', 'notional'); if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { cost = amount * price; } const orderId = this.safeInteger (trade, 'order_id'); const marketId = this.safeString2 (trade, 'contract_id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (trade, 'fees'); + const feeCost = this.safeNumber (trade, 'fees'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_coin_name'); @@ -1144,11 +1144,11 @@ module.exports = class bitmart extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1475,11 +1475,11 @@ module.exports = class bitmart extends Exchange { currencyId = this.safeString (balance, 'coind_code', currencyId); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat2 (balance, 'available', 'available_vol'); - account['used'] = this.safeFloat2 (balance, 'frozen', 'freeze_vol'); + account['free'] = this.safeString2 (balance, 'available', 'available_vol'); + account['used'] = this.safeString2 (balance, 'frozen', 'freeze_vol'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -1548,29 +1548,10 @@ module.exports = class bitmart extends Exchange { if (market !== undefined) { status = this.parseOrderStatusByType (market['type'], this.safeString (order, 'status')); } - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat2 (order, 'price_avg', 'done_avg_price'); - const amount = this.safeFloat2 (order, 'size', 'vol'); - let cost = undefined; - let filled = this.safeFloat2 (order, 'filled_size', 'done_vol'); - let remaining = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - if (filled === undefined) { - filled = Math.max (0, amount - remaining); - } - } - if (filled !== undefined) { - if (remaining === undefined) { - remaining = Math.max (0, amount - filled); - } - if (cost === undefined) { - if (average !== undefined) { - cost = average * filled; - } - } - } - } + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber2 (order, 'price_avg', 'done_avg_price'); + const amount = this.safeNumber2 (order, 'size', 'vol'); + const filled = this.safeNumber2 (order, 'filled_size', 'done_vol'); let side = this.safeString (order, 'side'); // 1 = Open long // 2 = Close short @@ -1592,7 +1573,7 @@ module.exports = class bitmart extends Exchange { average = undefined; } } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -1607,14 +1588,14 @@ module.exports = class bitmart extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatusByType (type, status) { @@ -1655,7 +1636,7 @@ module.exports = class bitmart extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2241,12 +2222,12 @@ module.exports = class bitmart extends Exchange { type = 'deposit'; id = depositId; } - const amount = this.safeFloat (transaction, 'arrival_amount'); + const amount = this.safeNumber (transaction, 'arrival_amount'); const timestamp = this.safeInteger (transaction, 'tapply_timeime'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmex.js index 4f5a0552a..8eddc8287 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -215,8 +216,8 @@ module.exports = class bitmex extends Exchange { 'amount': undefined, 'price': undefined, }; - const lotSize = this.safeFloat (market, 'lotSize'); - const tickSize = this.safeFloat (market, 'tickSize'); + const lotSize = this.safeNumber (market, 'lotSize'); + const tickSize = this.safeNumber (market, 'tickSize'); if (lotSize !== undefined) { precision['amount'] = lotSize; } @@ -230,7 +231,7 @@ module.exports = class bitmex extends Exchange { }, 'price': { 'min': tickSize, - 'max': this.safeFloat (market, 'maxPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { 'min': undefined, @@ -240,7 +241,7 @@ module.exports = class bitmex extends Exchange { const limitField = (position === quote) ? 'cost' : 'amount'; limits[limitField] = { 'min': lotSize, - 'max': this.safeFloat (market, 'maxOrderQty'), + 'max': this.safeNumber (market, 'maxOrderQty'), }; result.push ({ 'id': id, @@ -252,8 +253,8 @@ module.exports = class bitmex extends Exchange { 'active': active, 'precision': precision, 'limits': limits, - 'taker': this.safeFloat (market, 'takerFee'), - 'maker': this.safeFloat (market, 'makerFee'), + 'taker': this.safeNumber (market, 'takerFee'), + 'maker': this.safeNumber (market, 'makerFee'), 'type': type, 'spot': false, 'swap': swap, @@ -319,21 +320,17 @@ module.exports = class bitmex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - let free = this.safeFloat (balance, 'availableMargin'); - let total = this.safeFloat (balance, 'marginBalance'); + let free = this.safeString (balance, 'availableMargin'); + let total = this.safeString (balance, 'marginBalance'); if (code === 'BTC') { - if (free !== undefined) { - free /= 100000000; - } - if (total !== undefined) { - total /= 100000000; - } + free = Precise.stringDiv (free, '1e8'); + total = Precise.stringDiv (total, '1e8'); } account['free'] = free; account['total'] = total; result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -412,8 +409,8 @@ module.exports = class bitmex extends Exchange { for (let i = 0; i < response.length; i++) { const order = response[i]; const side = (order['side'] === 'Sell') ? 'asks' : 'bids'; - const amount = this.safeFloat (order, 'size'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const price = this.safeNumber (order, 'price'); // https://github.com/ccxt/ccxt/issues/4926 // https://github.com/ccxt/ccxt/issues/4927 // the exchange sometimes returns null price in the orderbook @@ -619,7 +616,7 @@ module.exports = class bitmex extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'transactType')); const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount !== undefined) { amount = amount / 100000000; } @@ -630,7 +627,7 @@ module.exports = class bitmex extends Exchange { // for unrealized pnl and other transactions without a timestamp timestamp = 0; // see comments above } - let feeCost = this.safeFloat (item, 'fee', 0); + let feeCost = this.safeNumber (item, 'fee', 0); if (feeCost !== undefined) { feeCost = feeCost / 100000000; } @@ -638,7 +635,7 @@ module.exports = class bitmex extends Exchange { 'cost': feeCost, 'currency': code, }; - let after = this.safeFloat (item, 'walletBalance'); + let after = this.safeNumber (item, 'walletBalance'); if (after !== undefined) { after = after / 100000000; } @@ -957,8 +954,8 @@ module.exports = class bitmex extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const open = this.safeFloat (ticker, 'prevPrice24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'prevPrice24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; if (last !== undefined && open !== undefined) { @@ -971,13 +968,13 @@ module.exports = class bitmex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askPrice'), + 'ask': this.safeNumber (ticker, 'askPrice'), 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'vwap'), + 'vwap': this.safeNumber (ticker, 'vwap'), 'open': open, 'close': last, 'last': last, @@ -985,8 +982,8 @@ module.exports = class bitmex extends Exchange { 'change': change, 'percentage': percentage, 'average': this.sum (open, last) / 2, - 'baseVolume': this.safeFloat (ticker, 'homeNotional24h'), - 'quoteVolume': this.safeFloat (ticker, 'foreignNotional24h'), + 'baseVolume': this.safeNumber (ticker, 'homeNotional24h'), + 'quoteVolume': this.safeNumber (ticker, 'foreignNotional24h'), 'info': ticker, }; } @@ -1011,11 +1008,11 @@ module.exports = class bitmex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1144,23 +1141,23 @@ module.exports = class bitmex extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat2 (trade, 'avgPx', 'price'); - const amount = this.safeFloat2 (trade, 'size', 'lastQty'); + const price = this.safeNumber2 (trade, 'avgPx', 'price'); + const amount = this.safeNumber2 (trade, 'size', 'lastQty'); const id = this.safeString (trade, 'trdMatchID'); const order = this.safeString (trade, 'orderID'); const side = this.safeStringLower (trade, 'side'); // price * amount doesn't work for all symbols (e.g. XBT, ETH) - let cost = this.safeFloat (trade, 'execCost'); + let cost = this.safeNumber (trade, 'execCost'); if (cost !== undefined) { cost = Math.abs (cost) / 100000000; } let fee = undefined; if ('execComm' in trade) { - let feeCost = this.safeFloat (trade, 'execComm'); + let feeCost = this.safeNumber (trade, 'execComm'); feeCost = feeCost / 100000000; const currencyId = this.safeString (trade, 'settlCurrency'); const feeCurrency = this.safeCurrencyCode (currencyId); - const feeRate = this.safeFloat (trade, 'commission'); + const feeRate = this.safeNumber (trade, 'commission'); fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -1262,33 +1259,19 @@ module.exports = class bitmex extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'transactTime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty', 0.0); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (amount - filled, 0.0); - } - } - const average = this.safeFloat (order, 'avgPx'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = average * filled; - } else if (price !== undefined) { - cost = price * filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty', 0.0); + const average = this.safeNumber (order, 'avgPx'); const id = this.safeString (order, 'orderID'); const type = this.safeStringLower (order, 'ordType'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'clOrdID'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'ParticipateDoNotInitiate'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1303,14 +1286,14 @@ module.exports = class bitmex extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { @@ -1371,7 +1354,7 @@ module.exports = class bitmex extends Exchange { 'ordType': orderType, }; if ((orderType === 'Stop') || (orderType === 'StopLimit') || (orderType === 'MarketIfTouched') || (orderType === 'LimitIfTouched')) { - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPx or stopPrice parameter for the ' + orderType + ' order type'); } else { @@ -1488,7 +1471,7 @@ module.exports = class bitmex extends Exchange { return this.parseOrders (response, market); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPosition (params); // [ diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitpanda.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitpanda.js index b440aba7d..5f857014b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitpanda.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitpanda.js @@ -328,7 +328,7 @@ module.exports = class bitpanda extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; @@ -401,9 +401,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -450,8 +450,8 @@ module.exports = class bitpanda extends Exchange { const activeFeeTier = this.safeValue (response, 'active_fee_tier', {}); const result = { 'info': response, - 'maker': this.safeFloat (activeFeeTier, 'maker_fee'), - 'taker': this.safeFloat (activeFeeTier, 'taker_fee'), + 'maker': this.safeNumber (activeFeeTier, 'maker_fee'), + 'taker': this.safeNumber (activeFeeTier, 'taker_fee'), 'percentage': true, 'tierBased': true, }; @@ -460,9 +460,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -500,27 +500,27 @@ module.exports = class bitpanda extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last_price'); - const percentage = this.safeFloat (ticker, 'price_change_percentage'); - const change = this.safeFloat (ticker, 'price_change'); + const last = this.safeNumber (ticker, 'last_price'); + const percentage = this.safeNumber (ticker, 'price_change_percentage'); + const change = this.safeNumber (ticker, 'price_change'); let open = undefined; let average = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'best_bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -705,11 +705,11 @@ module.exports = class bitpanda extends Exchange { const volumeField = this.safeString (options, 'volume', 'total_amount'); return [ alignedTimestamp, - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -795,21 +795,21 @@ module.exports = class bitpanda extends Exchange { timestamp = this.parse8601 (this.safeString (trade, 'time')); } const side = this.safeStringLower2 (trade, 'side', 'taker_side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + let cost = this.safeNumber (trade, 'volume'); if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { cost = amount * price; } const marketId = this.safeString (trade, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (feeInfo, 'fee_amount'); + const feeCost = this.safeNumber (feeInfo, 'fee_amount'); let takerOrMaker = undefined; let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (feeInfo, 'fee_percentage'); + const feeRate = this.safeNumber (feeInfo, 'fee_percentage'); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, @@ -892,11 +892,11 @@ module.exports = class bitpanda extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -1150,12 +1150,12 @@ module.exports = class bitpanda extends Exchange { // } // const id = this.safeString (transaction, 'transaction_id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const currencyId = this.safeString (transaction, 'currency'); currency = this.safeCurrency (currencyId, currency); const status = 'ok'; // the exchange returns cleared transactions only - const feeCost = this.safeFloat2 (transaction, 'fee_amount', 'fee'); + const feeCost = this.safeNumber2 (transaction, 'fee_amount', 'fee'); let fee = undefined; const addressTo = this.safeString (transaction, 'recipient'); const tagTo = this.safeString (transaction, 'destination_tag'); @@ -1270,72 +1270,34 @@ module.exports = class bitpanda extends Exchange { // ] // } // - const rawTrades = this.safeValue (order, 'trades', []); - order = this.safeValue (order, 'order', order); - const id = this.safeString (order, 'order_id'); - const clientOrderId = this.safeString (order, 'client_id'); - const timestamp = this.parse8601 (this.safeString (order, 'time')); - let status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'instrument_code'); + const rawOrder = this.safeValue (order, 'order', order); + const id = this.safeString (rawOrder, 'order_id'); + const clientOrderId = this.safeString (rawOrder, 'client_id'); + const timestamp = this.parse8601 (this.safeString (rawOrder, 'time')); + const rawStatus = this.parseOrderStatus (this.safeString (rawOrder, 'status')); + const status = this.parseOrderStatus (rawStatus); + const marketId = this.safeString (rawOrder, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - if (status === undefined) { - if (remaining > 0) { - status = 'open'; - } else { - status = 'closed'; - } - } - } - } - const side = this.safeStringLower (order, 'side'); - const type = this.safeStringLower (order, 'type'); - const trades = this.parseTrades (rawTrades, market, undefined, undefined); - const fees = []; - const numTrades = trades.length; - let lastTradeTimestamp = undefined; - let tradeCost = undefined; - let tradeAmount = undefined; - if (numTrades > 0) { - lastTradeTimestamp = trades[0]['timestamp']; - tradeCost = 0; - tradeAmount = 0; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - fees.push (trade['fee']); - lastTradeTimestamp = Math.max (lastTradeTimestamp, trade['timestamp']); - tradeCost = this.sum (tradeCost, trade['cost']); - tradeAmount = this.sum (tradeAmount, trade['amount']); - } - } - let average = this.safeFloat (order, 'average_price'); - if (average === undefined) { - if ((tradeCost !== undefined) && (tradeAmount !== undefined) && (tradeAmount !== 0)) { - average = tradeCost / tradeAmount; - } - } - if (cost === undefined) { - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - } - const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'trigger_price'); - const postOnly = this.safeValue (order, 'is_post_only'); - const result = { + const price = this.safeNumber (rawOrder, 'price'); + const amount = this.safeNumber (rawOrder, 'amount'); + const filledString = this.safeString (rawOrder, 'filled_amount'); + const filled = this.parseNumber (filledString); + const side = this.safeStringLower (rawOrder, 'side'); + const type = this.safeStringLower (rawOrder, 'type'); + const timeInForce = this.parseTimeInForce (this.safeString (rawOrder, 'time_in_force')); + const stopPrice = this.safeNumber (rawOrder, 'trigger_price'); + const postOnly = this.safeValue (rawOrder, 'is_post_only'); + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'type': type, + }); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -1344,41 +1306,14 @@ module.exports = class bitpanda extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, // 'fee': undefined, 'trades': trades, - }; - const numFees = fees.length; - if (numFees > 0) { - if (numFees === 1) { - result['fee'] = fees[0]; - } else { - const feesByCurrency = this.groupBy (fees, 'currency'); - const feeCurrencies = Object.keys (feesByCurrency); - const numFeesByCurrency = feeCurrencies.length; - if (numFeesByCurrency === 1) { - const feeCurrency = feeCurrencies[0]; - const feeArray = this.safeValue (feesByCurrency, feeCurrency); - let feeCost = 0; - for (let i = 0; i < feeArray.length; i++) { - feeCost = this.sum (feeCost, feeArray[i]['cost']); - } - result['fee'] = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } else { - result['fees'] = fees; - } - } - } else { - result['fee'] = undefined; - } - return result; + }); } parseTimeInForce (timeInForce) { @@ -1412,7 +1347,7 @@ module.exports = class bitpanda extends Exchange { priceIsRequired = true; } if (uppercaseType === 'STOP') { - const triggerPrice = this.safeFloat (params, 'trigger_price'); + const triggerPrice = this.safeNumber (params, 'trigger_price'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a trigger_price param for ' + type + ' orders'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitso.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitso.js index d8bc07145..defcece54 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitso.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitso.js @@ -157,28 +157,28 @@ module.exports = class bitso extends Exchange { const symbol = base + '/' + quote; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), - 'max': this.safeFloat (market, 'maximum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), + 'max': this.safeNumber (market, 'maximum_amount'), }, 'price': { - 'min': this.safeFloat (market, 'minimum_price'), - 'max': this.safeFloat (market, 'maximum_price'), + 'min': this.safeNumber (market, 'minimum_price'), + 'max': this.safeNumber (market, 'maximum_price'), }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), - 'max': this.safeFloat (market, 'maximum_value'), + 'min': this.safeNumber (market, 'minimum_value'), + 'max': this.safeNumber (market, 'maximum_value'), }, }; - const defaultPricePrecision = this.safeFloat (this.options['precision'], quote, this.options['defaultPrecision']); - const pricePrecision = this.safeFloat (market, 'tick_size', defaultPricePrecision); + const defaultPricePrecision = this.safeNumber (this.options['precision'], quote, this.options['defaultPrecision']); + const pricePrecision = this.safeNumber (market, 'tick_size', defaultPricePrecision); const precision = { - 'amount': this.safeFloat (this.options['precision'], base, this.options['defaultPrecision']), + 'amount': this.safeNumber (this.options['precision'], base, this.options['defaultPrecision']), 'price': pricePrecision, }; const fees = this.safeValue (market, 'fees', {}); const flatRate = this.safeValue (fees, 'flat_rate', {}); - const maker = this.safeFloat (flatRate, 'maker'); - const taker = this.safeFloat (flatRate, 'taker'); + const maker = this.safeNumber (flatRate, 'maker'); + const taker = this.safeNumber (flatRate, 'taker'); const feeTiers = this.safeValue (fees, 'structure', []); const fee = { 'taker': parseFloat (this.decimalToPrecision (taker / 100, ROUND, 0.00000001, TICK_SIZE)), @@ -190,9 +190,9 @@ module.exports = class bitso extends Exchange { const makerFees = []; for (let j = 0; j < feeTiers.length; j++) { const tier = feeTiers[j]; - const volume = this.safeFloat (tier, 'volume'); - const takerFee = this.safeFloat (tier, 'taker'); - const makerFee = this.safeFloat (tier, 'maker'); + const volume = this.safeNumber (tier, 'volume'); + const takerFee = this.safeNumber (tier, 'taker'); + const makerFee = this.safeNumber (tier, 'maker'); const takerFeeToPrecision = parseFloat (this.decimalToPrecision (takerFee / 100, ROUND, 0.00000001, TICK_SIZE)); const makerFeeToPrecision = parseFloat (this.decimalToPrecision (makerFee / 100, ROUND, 0.00000001, TICK_SIZE)); takerFees.push ([ volume, takerFeeToPrecision ]); @@ -232,14 +232,13 @@ module.exports = class bitso extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'locked'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -261,22 +260,22 @@ module.exports = class bitso extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'payload'); const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -297,12 +296,12 @@ module.exports = class bitso extends Exchange { const marketId = this.safeString (trade, 'book'); const symbol = this.safeSymbol (marketId, market, '_'); const side = this.safeString2 (trade, 'side', 'maker_side'); - let amount = this.safeFloat2 (trade, 'amount', 'major'); + let amount = this.safeNumber2 (trade, 'amount', 'major'); if (amount !== undefined) { amount = Math.abs (amount); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fees_amount'); + const feeCost = this.safeNumber (trade, 'fees_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fees_currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -311,11 +310,11 @@ module.exports = class bitso extends Exchange { 'currency': feeCurrency, }; } - let cost = this.safeFloat (trade, 'minor'); + let cost = this.safeNumber (trade, 'minor'); if (cost !== undefined) { cost = Math.abs (cost); } - const price = this.safeFloat (trade, 'price'); + const price = this.safeNumber (trade, 'price'); const orderId = this.safeString (trade, 'oid'); const id = this.safeString (trade, 'tid'); return { @@ -416,17 +415,11 @@ module.exports = class bitso extends Exchange { const symbol = this.safeSymbol (marketId, market, '_'); const orderType = this.safeString (order, 'type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'unfilled_amount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'unfilled_amount'); const clientOrderId = this.safeString (order, 'client_id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -443,12 +436,12 @@ module.exports = class bitso extends Exchange { 'amount': amount, 'cost': undefined, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = 25, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp.js index 4671385bf..0ac6fe9f7 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp.js @@ -115,6 +115,16 @@ module.exports = class bitstamp extends Exchange { 'usdc_address/', 'omg_withdrawal/', 'omg_address/', + 'dai_withdrawal/', + 'dai_address/', + 'knc_withdrawal/', + 'knc_address/', + 'mkr_withdrawal/', + 'mkr_address/', + 'zrx_withdrawal/', + 'zrx_address/', + 'gusd_withdrawal/', + 'gusd_address/', 'transfer-to-main/', 'transfer-from-main/', 'withdrawal-requests/', @@ -249,13 +259,15 @@ module.exports = class bitstamp extends Exchange { const symbolId = baseId + '_' + quoteId; const id = this.safeString (market, 'url_symbol'); const precision = { - 'amount': market['base_decimals'], - 'price': market['counter_decimals'], + 'amount': this.safeInteger (market, 'base_decimals'), + 'price': this.safeInteger (market, 'counter_decimals'), }; - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; // let [ cost, currency ] = market['minimum_order'].split (' '); - const active = (market['trading'] === 'Enabled'); + const trading = this.safeString (market, 'trading'); + const active = (trading === 'Enabled'); result.push ({ 'id': id, 'symbol': symbol, @@ -299,7 +311,7 @@ module.exports = class bitstamp extends Exchange { 'type': currencyType, 'name': name, 'active': true, - 'fee': this.safeFloat (description['fees']['funding']['withdraw'], code), + 'fee': this.safeNumber (description['fees']['funding']['withdraw'], code), 'precision': precision, 'limits': { 'amount': { @@ -352,13 +364,16 @@ module.exports = class bitstamp extends Exchange { quote = this.safeCurrencyCode (quote); const description = this.safeString (market, 'description'); const [ baseDescription, quoteDescription ] = description.split (' / '); - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; if (!(base in result)) { - result[base] = this.constructCurrencyObject (baseId, base, baseDescription, market['base_decimals'], undefined, market); + const baseDecimals = this.safeInteger (market, 'base_decimals'); + result[base] = this.constructCurrencyObject (baseId, base, baseDescription, baseDecimals, undefined, market); } if (!(quote in result)) { - result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, market['counter_decimals'], parseFloat (cost), market); + const counterDecimals = this.safeInteger (market, 'counter_decimals'); + result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, counterDecimals, parseFloat (cost), market); } } return result; @@ -400,25 +415,25 @@ module.exports = class bitstamp extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -461,7 +476,7 @@ module.exports = class bitstamp extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; if (id.indexOf ('_') < 0) { - const value = this.safeFloat (transaction, id); + const value = this.safeNumber (transaction, id); if ((value !== undefined) && (value !== 0)) { return id; } @@ -543,11 +558,11 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString2 (trade, 'id', 'tid'); let symbol = undefined; let side = undefined; - let price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat (trade, 'amount'); + let price = this.safeNumber (trade, 'price'); + let amount = this.safeNumber (trade, 'amount'); const orderId = this.safeString (trade, 'order_id'); const type = undefined; - let cost = this.safeFloat (trade, 'cost'); + let cost = this.safeNumber (trade, 'cost'); if (market === undefined) { const keys = Object.keys (trade); for (let i = 0; i < keys.length; i++) { @@ -564,12 +579,12 @@ module.exports = class bitstamp extends Exchange { market = this.getMarketFromTrade (trade); } } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = undefined; if (market !== undefined) { - price = this.safeFloat (trade, market['symbolId'], price); - amount = this.safeFloat (trade, market['baseId'], amount); - cost = this.safeFloat (trade, market['quoteId'], cost); + price = this.safeNumber (trade, market['symbolId'], price); + amount = this.safeNumber (trade, market['baseId'], amount); + cost = this.safeNumber (trade, market['quoteId'], cost); feeCurrency = market['quote']; symbol = market['symbol']; } @@ -638,7 +653,7 @@ module.exports = class bitstamp extends Exchange { parseTradingFee (balances, symbol) { const market = this.market (symbol); - const tradeFee = this.safeFloat (balances, market['id'] + '_fee'); + const tradeFee = this.safeNumber (balances, market['id'] + '_fee'); return { 'symbol': symbol, 'maker': tradeFee, @@ -688,11 +703,11 @@ module.exports = class bitstamp extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -750,12 +765,12 @@ module.exports = class bitstamp extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -802,7 +817,7 @@ module.exports = class bitstamp extends Exchange { if (id.indexOf ('_withdrawal_fee') >= 0) { const currencyId = id.split ('_')[0]; const code = this.safeCurrencyCode (currencyId); - withdraw[code] = this.safeFloat (balance, id); + withdraw[code] = this.safeNumber (balance, id); } } return { @@ -1048,16 +1063,16 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString (transaction, 'id'); const currencyId = this.getCurrencyIdFromTransaction (transaction); const code = this.safeCurrencyCode (currencyId, currency); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let feeCurrency = undefined; let amount = undefined; if ('amount' in transaction) { - amount = this.safeFloat (transaction, 'amount'); + amount = this.safeNumber (transaction, 'amount'); } else if (currency !== undefined) { - amount = this.safeFloat (transaction, currency['id'], amount); + amount = this.safeNumber (transaction, currency['id'], amount); feeCurrency = currency['code']; } else if ((code !== undefined) && (currencyId !== undefined)) { - amount = this.safeFloat (transaction, currencyId, amount); + amount = this.safeNumber (transaction, currencyId, amount); feeCurrency = code; } if (amount !== undefined) { @@ -1182,83 +1197,23 @@ module.exports = class bitstamp extends Exchange { } // there is no timestamp from fetchOrder const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - let lastTradeTimestamp = undefined; - let symbol = undefined; - let marketId = this.safeStringLower (order, 'currency_pair'); - if (marketId !== undefined) { - marketId = marketId.replace ('/', ''); - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - symbol = market['symbol']; - } - } - let amount = this.safeFloat (order, 'amount'); - let filled = 0.0; - const trades = []; - const transactions = this.safeValue (order, 'transactions', []); - let feeCost = undefined; - let cost = undefined; - const numTransactions = transactions.length; - if (numTransactions > 0) { - feeCost = 0.0; - for (let i = 0; i < numTransactions; i++) { - const trade = this.parseTrade (this.extend ({ - 'order_id': id, - 'side': side, - }, transactions[i]), market); - filled = this.sum (filled, trade['amount']); - feeCost = this.sum (feeCost, trade['fee']['cost']); - if (cost === undefined) { - cost = 0.0; - } - cost = this.sum (cost, trade['cost']); - trades.push (trade); - } - lastTradeTimestamp = trades[numTransactions - 1]['timestamp']; - } + const marketId = this.safeStringLower (order, 'currency_pair'); + let symbol = this.safeSymbol (marketId, market, '/'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((status === 'closed') && (amount === undefined)) { - amount = filled; + const amount = this.safeNumber (order, 'amount'); + const transactions = this.safeValue (order, 'transactions', []); + const trades = this.parseTrades (transactions, market); + const length = trades.length; + if (length) { + symbol = trades[0]['symbol']; } - let remaining = undefined; - if (amount !== undefined) { - remaining = amount - filled; - } - let price = this.safeFloat (order, 'price'); - if (market === undefined) { - market = this.getMarketFromTrades (trades); - } - let feeCurrency = undefined; - if (market !== undefined) { - if (symbol === undefined) { - symbol = market['symbol']; - } - feeCurrency = market['quote']; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if (price === undefined) { - if (filled > 0) { - price = cost / filled; - } - } - let fee = undefined; - if (feeCost !== undefined) { - if (feeCurrency !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { + const price = this.safeNumber (order, 'price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'status': status, 'symbol': symbol, 'type': undefined, @@ -1267,15 +1222,15 @@ module.exports = class bitstamp extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, - 'filled': filled, - 'remaining': remaining, + 'filled': undefined, + 'remaining': undefined, 'trades': trades, - 'fee': fee, + 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } parseLedgerEntryType (type) { @@ -1355,11 +1310,11 @@ module.exports = class bitstamp extends Exchange { const parsedTransaction = this.parseTransaction (item); let direction = undefined; if ('amount' in item) { - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); direction = amount > 0 ? 'in' : 'out'; } else if (('currency' in parsedTransaction) && parsedTransaction['currency'] !== undefined) { const currencyId = this.currencyId (parsedTransaction['currency']); - const amount = this.safeFloat (item, currencyId); + const amount = this.safeNumber (item, currencyId); direction = amount > 0 ? 'in' : 'out'; } return { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp1.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp1.js index 8d8de5db1..2b6b70a04 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp1.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitstamp1.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -100,25 +101,25 @@ module.exports = class bitstamp1 extends Exchange { await this.loadMarkets (); const ticker = await this.publicGetTicker (params); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -141,14 +142,11 @@ module.exports = class bitstamp1 extends Exchange { } } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -192,12 +190,12 @@ module.exports = class bitstamp1 extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bittrex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bittrex.js index 1e11d600a..fb8f6fb09 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bittrex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bittrex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, DDoSProtection, PermissionDenied, AddressPending, OnMaintenance, BadRequest, InvalidAddress } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -280,7 +281,7 @@ module.exports = class bittrex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeSize'), + 'min': this.safeNumber (market, 'minTradeSize'), 'max': undefined, }, 'price': { @@ -308,11 +309,11 @@ module.exports = class bittrex extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); const balance = indexed[currencyId]; - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -372,7 +373,7 @@ module.exports = class bittrex extends Exchange { const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); const precision = 8; // default precision, todo: fix "magic constants" - const fee = this.safeFloat (currency, 'txFee'); // todo: redesign + const fee = this.safeNumber (currency, 'txFee'); // todo: redesign const isActive = this.safeString (currency, 'status'); result[code] = { 'id': id, @@ -433,17 +434,17 @@ module.exports = class bittrex extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'updatedAt')); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const percentage = this.safeFloat (ticker, 'percentChange'); - const last = this.safeFloat (ticker, 'lastTradeRate'); + const percentage = this.safeNumber (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'lastTradeRate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidRate'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidRate'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askRate'), + 'ask': this.safeNumber (ticker, 'askRate'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -453,8 +454,8 @@ module.exports = class bittrex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -567,21 +568,18 @@ module.exports = class bittrex extends Exchange { const order = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'marketSymbol'); market = this.safeMarket (marketId, market, '-'); - let cost = undefined; - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'quantity'); - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = undefined; const isTaker = this.safeValue (trade, 'isTaker'); if (isTaker !== undefined) { takerOrMaker = isTaker ? 'taker' : 'maker'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -651,11 +649,11 @@ module.exports = class bittrex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'startsAt')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -762,9 +760,9 @@ module.exports = class bittrex extends Exchange { let cost = undefined; if (isCeilingLimit) { request['limit'] = this.priceToPrecision (symbol, price); - cost = this.safeFloat2 (params, 'ceiling', 'cost', amount); + cost = this.safeNumber2 (params, 'ceiling', 'cost', amount); } else if (isCeilingMarket) { - cost = this.safeFloat2 (params, 'ceiling', 'cost'); + cost = this.safeNumber2 (params, 'ceiling', 'cost'); if (cost === undefined) { if (price === undefined) { cost = amount; @@ -923,7 +921,7 @@ module.exports = class bittrex extends Exchange { // } // const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const address = this.safeString (transaction, 'cryptoAddress'); const txid = this.safeString (transaction, 'txId'); const updated = this.parse8601 (this.safeString (transaction, 'updatedAt')); @@ -959,7 +957,7 @@ module.exports = class bittrex extends Exchange { status = 'ok'; } } - let feeCost = this.safeFloat (transaction, 'txCost'); + let feeCost = this.safeNumber (transaction, 'txCost'); if (feeCost === undefined) { if (type === 'deposit') { // according to https://support.bittrex.com/hc/en-us/articles/115000199651-What-fees-does-Bittrex-charge- @@ -1016,15 +1014,9 @@ module.exports = class bittrex extends Exchange { // } // const marketSymbol = this.safeString (order, 'marketSymbol'); - let symbol = undefined; - let feeCurrency = undefined; - if (marketSymbol !== undefined) { - const [ baseId, quoteId ] = marketSymbol.split ('-'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - feeCurrency = quote; - } + market = this.safeMarket (marketSymbol, market, '-'); + const symbol = market['symbol']; + const feeCurrency = market['quote']; const direction = this.safeStringLower (order, 'direction'); const createdAt = this.safeString (order, 'createdAt'); const updatedAt = this.safeString (order, 'updatedAt'); @@ -1037,32 +1029,15 @@ module.exports = class bittrex extends Exchange { } const timestamp = this.parse8601 (createdAt); const type = this.safeStringLower (order, 'type'); - const quantity = this.safeFloat (order, 'quantity'); - const limit = this.safeFloat (order, 'limit'); - const fillQuantity = this.safeFloat (order, 'fillQuantity'); - const commission = this.safeFloat (order, 'commission'); - const proceeds = this.safeFloat (order, 'proceeds'); - let average = undefined; - let remaining = undefined; - if (fillQuantity !== undefined) { - if (proceeds !== undefined) { - if (fillQuantity > 0) { - average = proceeds / fillQuantity; - } else if (proceeds === 0) { - average = 0; - } - } - if (quantity !== undefined) { - remaining = quantity - fillQuantity; - } - } - let status = this.safeStringLower (order, 'status'); - if ((status === 'closed') && (remaining !== undefined) && (remaining > 0)) { - status = 'canceled'; - } + const quantity = this.safeNumber (order, 'quantity'); + const limit = this.safeNumber (order, 'limit'); + const fillQuantity = this.safeNumber (order, 'fillQuantity'); + const commission = this.safeNumber (order, 'commission'); + const proceeds = this.safeNumber (order, 'proceeds'); + const status = this.safeStringLower (order, 'status'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'timestamp': timestamp, @@ -1076,10 +1051,10 @@ module.exports = class bittrex extends Exchange { 'price': limit, 'stopPrice': undefined, 'cost': proceeds, - 'average': average, + 'average': undefined, 'amount': quantity, 'filled': fillQuantity, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': { 'cost': commission, @@ -1087,7 +1062,7 @@ module.exports = class bittrex extends Exchange { }, 'info': order, 'trades': undefined, - }; + }); } parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { @@ -1136,9 +1111,9 @@ module.exports = class bittrex extends Exchange { 'side': this.safeString (order, 'side'), 'order': this.safeString (order, 'id'), 'type': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'average'), - 'amount': this.safeFloat (order, 'filled'), - 'cost': this.safeFloat (order, 'cost'), + 'price': this.safeNumber (order, 'average'), + 'amount': this.safeNumber (order, 'filled'), + 'cost': this.safeNumber (order, 'cost'), 'symbol': this.safeString (order, 'symbol'), 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitvavo.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitvavo.js index e6633b568..ef66620ca 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitvavo.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitvavo.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadSymbol, AuthenticationError, InsufficientFunds, InvalidOrder, ArgumentsRequired, OrderNotFound, InvalidAddress, BadRequest, RateLimitExceeded, PermissionDenied, ExchangeNotAvailable, AccountSuspended, OnMaintenance } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -306,7 +307,7 @@ module.exports = class bitvavo extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minOrderInBaseAsset'), + 'min': this.safeNumber (market, 'minOrderInBaseAsset'), 'max': undefined, }, 'price': { @@ -314,7 +315,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderInQuoteAsset'), + 'min': this.safeNumber (market, 'minOrderInQuoteAsset'), 'max': undefined, }, }, @@ -377,7 +378,7 @@ module.exports = class bitvavo extends Exchange { 'code': code, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -393,7 +394,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMinAmount'), + 'min': this.safeNumber (currency, 'withdrawalMinAmount'), 'max': undefined, }, }, @@ -450,14 +451,14 @@ module.exports = class bitvavo extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); + const last = this.safeNumber (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -469,12 +470,12 @@ module.exports = class bitvavo extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': vwap, 'open': open, 'close': last, @@ -490,14 +491,6 @@ module.exports = class bitvavo extends Exchange { return result; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24h (params); @@ -611,12 +604,11 @@ module.exports = class bitvavo extends Exchange { // feeCurrency: 'EUR' // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'side'); const id = this.safeString2 (trade, 'id', 'fillId'); @@ -627,7 +619,7 @@ module.exports = class bitvavo extends Exchange { if (taker !== undefined) { takerOrMaker = taker ? 'taker' : 'maker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); @@ -698,11 +690,11 @@ module.exports = class bitvavo extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -750,13 +742,12 @@ module.exports = class bitvavo extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'inOrder'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'inOrder'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDepositAddress (code, params = {}) { @@ -806,7 +797,7 @@ module.exports = class bitvavo extends Exchange { if (price !== undefined) { cost = amount * price; } else { - cost = this.safeFloat2 (params, 'cost', 'amountQuote'); + cost = this.safeNumber2 (params, 'cost', 'amountQuote'); } if (cost !== undefined) { const precision = market['precision']['price']; @@ -819,7 +810,7 @@ module.exports = class bitvavo extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['amount'] = this.amountToPrecision (symbol, amount); } else if (isStopMarket || isStopLimit) { - let stopPrice = this.safeFloat2 (params, 'stopPrice', 'triggerAmount'); + let stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerAmount'); if (stopPrice === undefined) { if (isStopLimit) { throw new ArgumentsRequired (this.id + ' createOrder requires a stopPrice parameter for a ' + type + ' order'); @@ -881,7 +872,7 @@ module.exports = class bitvavo extends Exchange { await this.loadMarkets (); const market = this.market (symbol); let request = {}; - const amountRemaining = this.safeFloat (params, 'amountRemaining'); + const amountRemaining = this.safeNumber (params, 'amountRemaining'); params = this.omit (params, 'amountRemaining'); if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); @@ -946,7 +937,6 @@ module.exports = class bitvavo extends Exchange { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); } await this.loadMarkets (); - await this.loadMarkets (); const market = this.market (symbol); const request = { 'orderId': id, @@ -1172,26 +1162,13 @@ module.exports = class bitvavo extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let remaining = this.safeFloat (order, 'amountRemaining'); - let filled = this.safeFloat (order, 'filledAmount'); - const remainingCost = this.safeFloat (order, 'remainingCost'); - if ((remainingCost !== undefined) && (remainingCost === 0.0)) { - remaining = 0; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - const cost = this.safeFloat (order, 'filledAmountQuote'); - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amountRemaining'); + const filled = this.safeNumber (order, 'filledAmount'); + const cost = this.safeNumber (order, 'filledAmountQuote'); let fee = undefined; - const feeCost = this.safeFloat (order, 'feePaid'); + const feeCost = this.safeNumber (order, 'feePaid'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1200,32 +1177,24 @@ module.exports = class bitvavo extends Exchange { 'currency': feeCurrencyCode, }; } - let lastTradeTimestamp = undefined; - const rawTrades = this.safeValue (order, 'fills'); - let trades = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'symbol': symbol, - 'order': id, - 'side': side, - }); - const numTrades = trades.length; - if (numTrades > 0) { - const lastTrade = this.safeValue (trades, numTrades - 1); - lastTradeTimestamp = lastTrade['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'symbol': symbol, + 'order': id, + 'side': side, + 'type': type, + }); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = this.safeValue (order, 'postOnly'); // https://github.com/ccxt/ccxt/issues/8489 - const stopPrice = this.safeFloat (order, 'triggerPrice'); - return { + const stopPrice = this.safeNumber (order, 'triggerPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -1235,13 +1204,13 @@ module.exports = class bitvavo extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1436,11 +1405,11 @@ module.exports = class bitvavo extends Exchange { const currencyId = this.safeString (transaction, 'symbol'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitz.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitz.js index 816bb15a4..d78900841 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitz.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitz.js @@ -59,7 +59,7 @@ module.exports = class bitz extends Exchange { 'assets': 'https://{hostname}', }, 'www': 'https://www.bitz.com', - 'doc': 'https://apidoc.bitz.com/en/', + 'doc': 'https://apidocv2.bitz.plus/en/', 'fees': 'https://www.bitz.com/fee?type=1', 'referral': 'https://u.bitz.com/register?invite_code=1429193', }, @@ -76,6 +76,11 @@ module.exports = class bitz extends Exchange { 'currencyRate', 'currencyCoinRate', 'coinRate', + 'getContractCoin', + 'getContractKline', + 'getContractOrderBook', + 'getContractTradesHistory', + 'getContractTickers', ], }, 'trade': { @@ -88,6 +93,10 @@ module.exports = class bitz extends Exchange { 'getUserNowEntrustSheet', // open orders 'getEntrustSheetInfo', // order 'depositOrWithdraw', // transactions + 'getCoinAddress', + 'getCoinAddressList', + 'marketTrade', + 'addEntrustSheetBatch', ], }, 'assets': { @@ -95,6 +104,20 @@ module.exports = class bitz extends Exchange { 'getUserAssets', ], }, + 'contract': { + 'post': [ + 'addContractTrade', + 'cancelContractTrade', + 'getContractActivePositions', + 'getContractAccountInfo', + 'getContractMyPositions', + 'getContractOrderResult', + 'getContractTradeResult', + 'getContractOrder', + 'getContractMyHistoryTrade', + 'getContractMyTrades', + ], + }, }, 'fees': { 'trading': { @@ -281,8 +304,8 @@ module.exports = class bitz extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTrade'), - 'max': this.safeFloat (market, 'maxTrade'), + 'min': this.safeNumber (market, 'minTrade'), + 'max': this.safeNumber (market, 'maxTrade'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -331,12 +354,12 @@ module.exports = class bitz extends Exchange { const currencyId = this.safeString (balance, 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lock'); - account['total'] = this.safeFloat (balance, 'num'); - account['free'] = this.safeFloat (balance, 'over'); + account['used'] = this.safeString (balance, 'lock'); + account['total'] = this.safeString (balance, 'num'); + account['free'] = this.safeString (balance, 'over'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTicker (ticker, market = undefined) { @@ -366,8 +389,8 @@ module.exports = class bitz extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'now'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'now'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -378,22 +401,22 @@ module.exports = class bitz extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': undefined, 'open': open, 'close': last, 'last': last, 'previousClose': undefined, 'change': change, - 'percentage': this.safeFloat (ticker, 'priceChange24h'), + 'percentage': this.safeNumber (ticker, 'priceChange24h'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -583,8 +606,8 @@ module.exports = class bitz extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'p'); - const amount = this.safeFloat (trade, 'n'); + const price = this.safeNumber (trade, 'p'); + const amount = this.safeNumber (trade, 'n'); let cost = undefined; if (price !== undefined) { if (amount !== undefined) { @@ -652,11 +675,11 @@ module.exports = class bitz extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -754,22 +777,17 @@ module.exports = class bitz extends Exchange { if (side !== undefined) { side = (side === 'sale') ? 'sell' : 'buy'; } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'number'); - const remaining = this.safeFloat (order, 'numberOver'); - const filled = this.safeFloat (order, 'numberDeal'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'number'); + const remaining = this.safeNumber (order, 'numberOver'); + const filled = this.safeNumber (order, 'numberDeal'); let timestamp = this.safeInteger (order, 'timestamp'); if (timestamp === undefined) { timestamp = this.safeTimestamp (order, 'created'); } - let cost = this.safeFloat (order, 'orderTotalPrice'); - if (price !== undefined) { - if (filled !== undefined) { - cost = filled * price; - } - } + const cost = this.safeNumber (order, 'orderTotalPrice'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -791,7 +809,7 @@ module.exports = class bitz extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1118,7 +1136,7 @@ module.exports = class bitz extends Exchange { const type = this.safeStringLower (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'network_fee'); + const feeCost = this.safeNumber (transaction, 'network_fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1133,7 +1151,7 @@ module.exports = class bitz extends Exchange { 'address': this.safeString (transaction, 'wallet'), 'tag': this.safeString (transaction, 'memo'), 'type': type, - 'amount': this.safeFloat (transaction, 'number'), + 'amount': this.safeNumber (transaction, 'number'), 'currency': code, 'status': status, 'updated': timestamp, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bl3p.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bl3p.js index bb84442ec..832b5dc6f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bl3p.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bl3p.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -81,17 +82,19 @@ module.exports = class bl3p extends Exchange { const available = this.safeValue (wallet, 'available', {}); const balance = this.safeValue (wallet, 'balance', {}); const account = this.account (); - account['free'] = this.safeFloat (available, 'value'); - account['total'] = this.safeFloat (balance, 'value'); + account['free'] = this.safeString (available, 'value'); + account['total'] = this.safeString (balance, 'value'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { + const price = this.safeNumber (bidask, priceKey); + const size = this.safeNumber (bidask, amountKey); return [ - bidask[priceKey] / 100000.0, - bidask[amountKey] / 100000000.0, + price / 100000.0, + size / 100000000.0, ]; } @@ -111,16 +114,16 @@ module.exports = class bl3p extends Exchange { }; const ticker = await this.publicGetMarketTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -130,7 +133,7 @@ module.exports = class bl3p extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker['volume'], '24h'), + 'baseVolume': this.safeNumber (ticker['volume'], '24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -139,20 +142,13 @@ module.exports = class bl3p extends Exchange { parseTrade (trade, market = undefined) { const id = this.safeString (trade, 'trade_id'); const timestamp = this.safeInteger (trade, 'date'); - let price = this.safeFloat (trade, 'price_int'); - if (price !== undefined) { - price /= 100000.0; - } - let amount = this.safeFloat (trade, 'amount_int'); - if (amount !== undefined) { - amount /= 100000000.0; - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + let priceString = this.safeString (trade, 'price_int'); + priceString = Precise.stringDiv (priceString, '100000'); + let amountString = this.safeString (trade, 'amount_int'); + amountString = Precise.stringDiv (amountString, '100000000'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bleutrade.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bleutrade.js index 67262da33..01e7d30ce 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bleutrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bleutrade.js @@ -163,8 +163,8 @@ module.exports = class bleutrade extends Exchange { 'code': code, 'name': this.safeString (item, 'AssetLong'), 'active': this.safeValue (item, 'IsActive') && !this.safeValue (item, 'MaintenanceMode'), - 'fee': this.safeFloat (item, 'WithdrawTxFee'), - 'precision': this.safeFloat (item, 'DecimalPlaces'), + 'fee': this.safeNumber (item, 'WithdrawTxFee'), + 'precision': this.safeNumber (item, 'DecimalPlaces'), 'info': item, 'limits': this.limits, }; @@ -216,7 +216,7 @@ module.exports = class bleutrade extends Exchange { 'taker': this.fees['trading']['taker'], 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinTradeSize'), + 'min': this.safeNumber (market, 'MinTradeSize'), 'max': undefined, }, 'price': { @@ -292,8 +292,8 @@ module.exports = class bleutrade extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'TimeStamp')); const marketId = this.safeString (ticker, 'MarketName'); const symbol = this.safeSymbol (marketId, market, '_'); - const previous = this.safeFloat (ticker, 'PrevDay'); - const last = this.safeFloat (ticker, 'Last'); + const previous = this.safeNumber (ticker, 'PrevDay'); + const last = this.safeNumber (ticker, 'Last'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -308,11 +308,11 @@ module.exports = class bleutrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'High'), - 'low': this.safeFloat (ticker, 'Low'), - 'bid': this.safeFloat (ticker, 'Bid'), + 'high': this.safeNumber (ticker, 'High'), + 'low': this.safeNumber (ticker, 'Low'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': previous, @@ -322,8 +322,8 @@ module.exports = class bleutrade extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume'), - 'quoteVolume': this.safeFloat (ticker, 'BaseVolume'), + 'baseVolume': this.safeNumber (ticker, 'Volume'), + 'quoteVolume': this.safeNumber (ticker, 'BaseVolume'), 'info': ticker, }; } @@ -331,11 +331,11 @@ module.exports = class bleutrade extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (ohlcv['TimeStamp'] + '+00:00'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -411,11 +411,11 @@ module.exports = class bleutrade extends Exchange { const currencyId = this.safeString (item, 'Asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (item, 'Available'); - account['total'] = this.safeFloat (item, 'Balance'); + account['free'] = this.safeString (item, 'Available'); + account['total'] = this.safeString (item, 'Balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -558,7 +558,7 @@ module.exports = class bleutrade extends Exchange { // } const timestamp = this.parse8601 (this.safeString (item, 'TimeStamp')); - let amount = this.safeFloat (item, 'Amount'); + let amount = this.safeNumber (item, 'Amount'); let direction = undefined; if (amount !== undefined) { direction = 'in'; @@ -632,27 +632,12 @@ module.exports = class bleutrade extends Exchange { if ('Created' in order) { timestamp = this.parse8601 (order['Created'] + '+00:00'); } - let price = this.safeFloat (order, 'Price'); - let cost = undefined; - const amount = this.safeFloat (order, 'Quantity'); - const remaining = this.safeFloat (order, 'QuantityRemaining'); - let filled = undefined; - if (amount !== undefined && remaining !== undefined) { - filled = amount - remaining; - } - if (!cost) { - if (price && filled) { - cost = price * filled; - } - } - if (!price) { - if (cost && filled) { - price = cost / filled; - } - } - const average = this.safeFloat (order, 'PricePerUnit'); + const price = this.safeNumber (order, 'Price'); + const amount = this.safeNumber (order, 'Quantity'); + const remaining = this.safeNumber (order, 'QuantityRemaining'); + const average = this.safeNumber (order, 'PricePerUnit'); const id = this.safeString (order, 'OrderID'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -666,15 +651,15 @@ module.exports = class bleutrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -711,7 +696,7 @@ module.exports = class bleutrade extends Exchange { // Symbol: 'BTC' } // const id = this.safeString (transaction, 'ID'); - let amount = this.safeFloat (transaction, 'Amount'); + let amount = this.safeNumber (transaction, 'Amount'); let type = 'deposit'; if (amount < 0) { amount = Math.abs (amount); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/braziliex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/braziliex.js index 0c54e4840..31a519468 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/braziliex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/braziliex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -184,11 +185,11 @@ module.exports = class braziliex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': this.safeFloat (currency, 'txWithdrawalFee'), + 'fee': this.safeNumber (currency, 'txWithdrawalFee'), }, 'deposit': { 'active': canDeposit, - 'fee': this.safeFloat (currency, 'txDepositFee'), + 'fee': this.safeNumber (currency, 'txDepositFee'), }, }, 'limits': { @@ -205,11 +206,11 @@ module.exports = class braziliex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'MinWithdrawal'), + 'min': this.safeNumber (currency, 'MinWithdrawal'), 'max': Math.pow (10, precision), }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, }, @@ -257,9 +258,9 @@ module.exports = class braziliex extends Exchange { const quoteIsFiat = this.safeInteger (quoteCurrency, 'is_fiat', 0); let minCost = undefined; if (quoteIsFiat) { - minCost = this.safeFloat (baseCurrency, 'minAmountTradeFIAT'); + minCost = this.safeNumber (baseCurrency, 'minAmountTradeFIAT'); } else { - minCost = this.safeFloat (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); + minCost = this.safeNumber (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); } const isActive = this.safeInteger (market, 'active'); const active = (isActive === 1); @@ -302,27 +303,27 @@ module.exports = class braziliex extends Exchange { symbol = market['symbol']; } const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highestBid24'), - 'low': this.safeFloat (ticker, 'lowestAsk24'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'highestBid24'), + 'low': this.safeNumber (ticker, 'lowestAsk24'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'percentChange'), + 'change': this.safeNumber (ticker, 'percentChange'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume24'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume24'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24'), 'info': ticker, }; } @@ -362,13 +363,18 @@ module.exports = class braziliex extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString2 (trade, 'date_exec', 'date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } - const cost = this.safeFloat (trade, 'total'); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_number'); const type = 'limit'; const side = this.safeString (trade, 'type'); @@ -410,11 +416,11 @@ module.exports = class braziliex extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -436,21 +442,16 @@ module.exports = class braziliex extends Exchange { if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'date')); } - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'total', 0.0); - const amount = this.safeFloat (order, 'amount'); - const filledPercentage = this.safeFloat (order, 'progress'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'total'); + const amount = this.safeNumber (order, 'amount'); + const filledPercentage = this.safeNumber (order, 'progress'); const filled = amount * filledPercentage; - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); - let info = order; - if ('info' in info) { - info = order['info']; - } const id = this.safeString (order, 'order_number'); const fee = this.safeValue (order, 'fee'); // propagated from createOrder const status = (filledPercentage === 1.0) ? 'closed' : 'open'; const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -467,12 +468,12 @@ module.exports = class braziliex extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, - 'info': info, + 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -524,7 +525,7 @@ module.exports = class braziliex extends Exchange { 'price': this.safeString (priceParts, 1), 'total': this.safeString (totalParts, 1), 'fee': { - 'cost': this.safeFloat (feeParts, 1), + 'cost': this.safeNumber (feeParts, 1), 'currency': this.safeString (feeParts, 2), }, 'progress': '0.0', diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcalpha.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcalpha.js index 820234604..f7a890dfb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcalpha.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcalpha.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, DDoSProtection, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -145,8 +146,8 @@ module.exports = class btcalpha extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -198,14 +199,11 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'id', 'tid'); const side = this.safeString2 (trade, 'my_side', 'side'); const orderId = this.safeString (trade, 'o_id'); @@ -254,11 +252,11 @@ module.exports = class btcalpha extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -295,11 +293,11 @@ module.exports = class btcalpha extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'reserve'); - account['total'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserve'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -320,8 +318,8 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (order, 'date'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString2 (order, 'oid', 'id'); let trades = this.safeValue (order, 'trades', []); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcbox.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcbox.js index 1a5f82456..48a455625 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcbox.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcbox.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, InvalidOrder, AuthenticationError, PermissionDenied, InvalidNonce, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -88,12 +89,12 @@ module.exports = class btcbox extends Exchange { if (free in response) { const account = this.account (); const used = currencyId + '_lock'; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -114,16 +115,16 @@ module.exports = class btcbox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -133,8 +134,8 @@ module.exports = class btcbox extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -158,14 +159,11 @@ module.exports = class btcbox extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeString (trade, 'type'); return { @@ -265,15 +263,15 @@ module.exports = class btcbox extends Exchange { if (datetimeString !== undefined) { timestamp = this.parse8601 (order['datetime'] + '+09:00'); // Tokyo time } - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let cost = undefined; if (price !== undefined) { if (filled !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcmarkets.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcmarkets.js index 2340d1960..44cdd0f78 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcmarkets.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcmarkets.js @@ -246,11 +246,11 @@ module.exports = class btcmarkets extends Exchange { const tagTo = tag; const addressFrom = undefined; const tagFrom = undefined; - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const currencyId = this.safeString (transaction, 'assetName'); const code = this.safeCurrencyCode (currencyId); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (fee) { amount -= fee; } @@ -303,10 +303,10 @@ module.exports = class btcmarkets extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const fees = this.safeValue (this.safeValue (this.options, 'fees', {}), quote, this.fees); - const pricePrecision = this.safeFloat (market, 'priceDecimals'); - const amountPrecision = this.safeFloat (market, 'amountDecimals'); - const minAmount = this.safeFloat (market, 'minOrderAmount'); - const maxAmount = this.safeFloat (market, 'maxOrderAmount'); + const pricePrecision = this.safeNumber (market, 'priceDecimals'); + const amountPrecision = this.safeNumber (market, 'amountDecimals'); + const minAmount = this.safeNumber (market, 'minOrderAmount'); + const maxAmount = this.safeNumber (market, 'maxOrderAmount'); let minPrice = undefined; if (quote === 'AUD') { minPrice = Math.pow (10, -pricePrecision); @@ -365,14 +365,12 @@ module.exports = class btcmarkets extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetName'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance, 'balance'); - const used = this.safeFloat (balance, 'locked'); const account = this.account (); - account['used'] = used; - account['total'] = total; + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -388,11 +386,11 @@ module.exports = class btcmarkets extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 0)), - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 2), // high - this.safeFloat (ohlcv, 3), // low - this.safeFloat (ohlcv, 4), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 2), // high + this.safeNumber (ohlcv, 3), // low + this.safeNumber (ohlcv, 4), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -488,21 +486,21 @@ module.exports = class btcmarkets extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'lastPrice'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); - const quoteVolume = this.safeFloat (ticker, 'volumeQte24h'); + const last = this.safeNumber (ticker, 'lastPrice'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); + const quoteVolume = this.safeNumber (ticker, 'volumeQte24h'); const vwap = this.vwap (baseVolume, quoteVolume); - const change = this.safeFloat (ticker, 'price24h'); - const percentage = this.safeFloat (ticker, 'pricePct24h'); + const change = this.safeNumber (ticker, 'price24h'); + const percentage = this.safeNumber (ticker, 'pricePct24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bestBid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'bestAsk'), + 'ask': this.safeNumber (ticker, 'bestAsk'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -613,8 +611,8 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -623,7 +621,7 @@ module.exports = class btcmarkets extends Exchange { } const orderId = this.safeString (trade, 'orderId'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -714,7 +712,7 @@ module.exports = class btcmarkets extends Exchange { } } if (triggerPriceIsRequired) { - const triggerPrice = this.safeFloat (params, 'triggerPrice'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); params = this.omit (params, 'triggerPrice'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a triggerPrice parameter for a ' + type + 'order'); @@ -847,9 +845,9 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const type = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'openAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'openAmount'); let filled = undefined; if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); @@ -864,7 +862,7 @@ module.exports = class btcmarkets extends Exchange { const id = this.safeString (order, 'orderId'); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btctradeua.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btctradeua.js index 011bc33b6..32527f881 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btctradeua.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btctradeua.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -106,10 +107,10 @@ module.exports = class btctradeua extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -249,14 +250,11 @@ module.exports = class btctradeua extends Exchange { const id = this.safeString (trade, 'id'); const type = 'limit'; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amnt_trade'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amnt_trade'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -337,11 +335,11 @@ module.exports = class btctradeua extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'amnt_trade'), + 'amount': this.safeNumber (order, 'amnt_trade'), 'filled': 0, - 'remaining': this.safeFloat (order, 'amnt_trade'), + 'remaining': this.safeNumber (order, 'amnt_trade'), 'trades': undefined, 'info': order, 'cost': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcturk.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcturk.js index 32ea74550..2ef97bc99 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcturk.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/btcturk.js @@ -125,13 +125,13 @@ module.exports = class btcturk extends Exchange { const used = currency['id'] + '_reserved'; if (free in response) { const account = this.account (); - account['free'] = this.safeFloat (response, free); - account['total'] = this.safeFloat (response, total); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['total'] = this.safeString (response, total); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -151,26 +151,26 @@ module.exports = class btcturk extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'average'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -204,8 +204,8 @@ module.exports = class btcturk extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -247,11 +247,11 @@ module.exports = class btcturk extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (this.safeString (ohlcv, 'Time')), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/buda.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/buda.js index e78c228ea..ac71ec42b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/buda.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/buda.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { AddressPending, AuthenticationError, ExchangeError, NotSupported, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -220,7 +221,7 @@ module.exports = class buda extends Exchange { } const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); - const precision = this.safeFloat (currency, 'input_decimals'); + const precision = this.safeNumber (currency, 'input_decimals'); const minimum = Math.pow (10, -precision); result[code] = { 'id': id, @@ -381,24 +382,25 @@ module.exports = class buda extends Exchange { let timestamp = undefined; let side = undefined; const type = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; const order = undefined; const fee = undefined; let symbol = undefined; - let cost = undefined; if (market) { symbol = market['symbol']; } if (Array.isArray (trade)) { - timestamp = parseInt (trade[0]); - price = parseFloat (trade[1]); - amount = parseFloat (trade[2]); - cost = price * amount; - side = trade[3]; - id = trade[4].toString (); + timestamp = this.safeInteger (trade, 0); + priceString = this.safeString (trade, 1); + amountString = this.safeString (trade, 2); + side = this.safeString (trade, 3); + id = this.safeString (trade, 4); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': order, @@ -453,11 +455,11 @@ module.exports = class buda extends Exchange { const currencyId = this.safeString (balance, 'id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = parseFloat (balance['available_amount'][0]); - account['total'] = parseFloat (balance['amount'][0]); + account['free'] = this.safeString (balance['available_amount'], 0); + account['total'] = this.safeString (balance['amount'], 0); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -565,15 +567,15 @@ module.exports = class buda extends Exchange { const side = this.safeStringLower (order, 'type'); const status = this.parseOrderStatus (this.safeString (order, 'state')); const originalAmount = this.safeValue (order, 'original_amount', []); - const amount = this.safeFloat (originalAmount, 0); + const amount = this.safeNumber (originalAmount, 0); const remainingAmount = this.safeValue (order, 'amount', []); - const remaining = this.safeFloat (remainingAmount, 0); + const remaining = this.safeNumber (remainingAmount, 0); const tradedAmount = this.safeValue (order, 'traded_amount', []); - const filled = this.safeFloat (tradedAmount, 0); + const filled = this.safeNumber (tradedAmount, 0); const totalExchanged = this.safeValue (order, 'totalExchanged', []); - const cost = this.safeFloat (totalExchanged, 0); + const cost = this.safeNumber (totalExchanged, 0); const limitPrice = this.safeValue (order, 'limit', []); - let price = this.safeFloat (limitPrice, 0); + let price = this.safeNumber (limitPrice, 0); if (price === undefined) { if (limitPrice !== undefined) { price = limitPrice; @@ -584,7 +586,7 @@ module.exports = class buda extends Exchange { average = this.priceToPrecision (symbol, cost / filled); } const paidFee = this.safeValue (order, 'paid_fee', []); - const feeCost = this.safeFloat (paidFee, 0); + const feeCost = this.safeNumber (paidFee, 0); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (paidFee, 1); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bw.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bw.js index 388946b39..4fb3b4192 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bw.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bw.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { RateLimitExceeded, BadSymbol, OrderNotFound, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -185,7 +186,7 @@ module.exports = class bw extends Exchange { const symbol = base + '/' + quote; const state = this.safeInteger (market, 'state'); const active = (state === 1); - const fee = this.safeFloat (market, 'defaultFee'); + const fee = this.safeNumber (market, 'defaultFee'); result.push ({ 'id': id, 'active': active, @@ -206,7 +207,7 @@ module.exports = class bw extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -292,11 +293,11 @@ module.exports = class bw extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'drawFee'), + 'fee': this.safeNumber (currency, 'drawFee'), 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'limitAmount', 0), + 'min': this.safeNumber (currency, 'limitAmount', 0), 'max': undefined, }, 'price': { @@ -309,7 +310,7 @@ module.exports = class bw extends Exchange { }, 'withdraw': { 'min': undefined, - 'max': this.safeFloat (currency, 'onceDrawLimit'), + 'max': this.safeNumber (currency, 'onceDrawLimit'), }, }, }; @@ -346,9 +347,9 @@ module.exports = class bw extends Exchange { 'high': parseFloat (this.safeValue (ticker, 2)), 'low': parseFloat (this.safeValue (ticker, 3)), 'bid': parseFloat (this.safeValue (ticker, 7)), - 'bidVolume': this.safeFloat (bid, 'quantity'), + 'bidVolume': this.safeNumber (bid, 'quantity'), 'ask': parseFloat (this.safeValue (ticker, 8)), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, 'open': undefined, 'close': close, @@ -477,8 +478,11 @@ module.exports = class bw extends Exchange { // ... // const timestamp = this.safeTimestamp (trade, 2); - const price = this.safeFloat (trade, 5); - const amount = this.safeFloat (trade, 6); + const priceString = this.safeString (trade, 5); + const amountString = this.safeString (trade, 6); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 1); let symbol = undefined; if (marketId !== undefined) { @@ -495,12 +499,6 @@ module.exports = class bw extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const sideString = this.safeString (trade, 4); const side = (sideString === 'ask') ? 'sell' : 'buy'; return { @@ -514,7 +512,7 @@ module.exports = class bw extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': parseFloat (cost), + 'cost': cost, 'fee': undefined, 'info': trade, }; @@ -571,11 +569,11 @@ module.exports = class bw extends Exchange { // return [ this.safeTimestamp (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - this.safeFloat (ohlcv, 6), - this.safeFloat (ohlcv, 7), - this.safeFloat (ohlcv, 8), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + this.safeNumber (ohlcv, 6), + this.safeNumber (ohlcv, 7), + this.safeNumber (ohlcv, 8), ]; } @@ -633,11 +631,11 @@ module.exports = class bw extends Exchange { const currencyId = this.safeString (balance, 'currencyTypeId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'amount'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'amount'); + account['used'] = this.safeString (balance, 'freeze'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -733,25 +731,13 @@ module.exports = class bw extends Exchange { } else if (side === '1') { side = 'buy'; } - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'completeAmount'); - let remaining = this.safeFloat2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available - let cost = this.safeFloat (order, 'totalMoney'); - if (filled !== undefined) { - if (amount !== undefined) { - if (remaining === undefined) { - remaining = amount - filled; - } - } - if (cost === undefined) { - if (price !== undefined) { - cost = filled * cost; - } - } - } + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'completeAmount'); + const remaining = this.safeNumber2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available + const cost = this.safeNumber (order, 'totalMoney'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'entrustId'), 'clientOrderId': undefined, @@ -773,7 +759,7 @@ module.exports = class bw extends Exchange { 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1069,12 +1055,12 @@ module.exports = class bw extends Exchange { code = currency['code']; } const type = ('depositId' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat2 (transaction, 'actuallyAmount', 'amount'); + const amount = this.safeNumber2 (transaction, 'actuallyAmount', 'amount'); const status = this.parseTransactionStatus (this.safeString2 (transaction, 'verifyStatus', 'state')); const timestamp = this.safeInteger (transaction, 'createTime'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bybit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bybit.js index f74d0db18..7f818c6e3 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bybit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bybit.js @@ -42,6 +42,7 @@ module.exports = class bybit extends Exchange { 'fetchTrades': true, 'fetchTransactions': false, 'fetchWithdrawals': true, + 'fetchPositions': true, }, 'timeframes': { '1m': '1', @@ -73,6 +74,34 @@ module.exports = class bybit extends Exchange { 'referral': 'https://www.bybit.com/app/register?ref=X7Prm', }, 'api': { + 'futures': { + 'private': { + 'get': [ + 'position/list', + 'order/list', + 'order', + 'stop-order/list', + 'stop-order', + 'execution/list', + 'trade/closed-pnl/list', + ], + 'post': [ + 'order/create', + 'order/cancel', + 'order/cancelAll', + 'order/replace', + 'stop-order/create', + 'stop-order/cancel', + 'stop-order/cancelAll', + 'stop-order/replace', + 'position/change-position-margin', + 'position/trading-stop', + 'position/leverage/save', + 'position/switch-mode', + 'position/switch-isolated', + ], + }, + }, 'v2': { 'public': { 'get': [ @@ -286,7 +315,11 @@ module.exports = class bybit extends Exchange { 'LTC/USDT': 'linear', 'XTZ/USDT': 'linear', 'LINK/USDT': 'linear', + 'ADA/USDT': 'linear', + 'DOT/USDT': 'linear', + 'UNI/USDT': 'linear', }, + 'defaultType': 'linear', // may also be inverse or inverseFuture 'code': 'BTC', 'cancelAllOrders': { // 'method': 'v2PrivatePostOrderCancelAll', // v2PrivatePostStopOrderCancelAll @@ -401,8 +434,8 @@ module.exports = class bybit extends Exchange { const lotSizeFilter = this.safeValue (market, 'lot_size_filter', {}); const priceFilter = this.safeValue (market, 'price_filter', {}); const precision = { - 'amount': this.safeFloat (lotSizeFilter, 'qty_step'), - 'price': this.safeFloat (priceFilter, 'tick_size'), + 'amount': this.safeNumber (lotSizeFilter, 'qty_step'), + 'price': this.safeNumber (priceFilter, 'tick_size'), }; const status = this.safeString (market, 'status'); let active = undefined; @@ -416,8 +449,8 @@ module.exports = class bybit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'type': 'future', 'spot': false, 'future': true, @@ -426,12 +459,12 @@ module.exports = class bybit extends Exchange { 'inverse': inverse, 'limits': { 'amount': { - 'min': this.safeFloat (lotSizeFilter, 'min_trading_qty'), - 'max': this.safeFloat (lotSizeFilter, 'max_trading_qty'), + 'min': this.safeNumber (lotSizeFilter, 'min_trading_qty'), + 'max': this.safeNumber (lotSizeFilter, 'max_trading_qty'), }, 'price': { - 'min': this.safeFloat (priceFilter, 'min_price'), - 'max': this.safeFloat (priceFilter, 'max_price'), + 'min': this.safeNumber (priceFilter, 'min_price'), + 'max': this.safeNumber (priceFilter, 'max_price'), }, 'cost': { 'min': undefined, @@ -477,9 +510,9 @@ module.exports = class bybit extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const open = this.safeFloat (ticker, 'prev_price_24h'); - let percentage = this.safeFloat (ticker, 'price_24h_pcnt'); + const last = this.safeNumber (ticker, 'last_price'); + const open = this.safeNumber (ticker, 'prev_price_24h'); + let percentage = this.safeNumber (ticker, 'price_24h_pcnt'); if (percentage !== undefined) { percentage *= 100; } @@ -489,18 +522,18 @@ module.exports = class bybit extends Exchange { change = last - open; average = this.sum (open, last) / 2; } - const baseVolume = this.safeFloat (ticker, 'turnover_24h'); - const quoteVolume = this.safeFloat (ticker, 'volume_24h'); + const baseVolume = this.safeNumber (ticker, 'turnover_24h'); + const quoteVolume = this.safeNumber (ticker, 'volume_24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price_24h'), - 'low': this.safeFloat (ticker, 'low_price_24h'), - 'bid': this.safeFloat (ticker, 'bid_price'), + 'high': this.safeNumber (ticker, 'high_price_24h'), + 'low': this.safeNumber (ticker, 'low_price_24h'), + 'bid': this.safeNumber (ticker, 'bid_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask_price'), + 'ask': this.safeNumber (ticker, 'ask_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -649,11 +682,11 @@ module.exports = class bybit extends Exchange { // return [ this.safeTimestamp2 (ohlcv, 'open_time', 'start_at'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat2 (ohlcv, 'turnover', 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber2 (ohlcv, 'turnover', 'volume'), ]; } @@ -779,9 +812,9 @@ module.exports = class bybit extends Exchange { const marketId = this.safeString (trade, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat2 (trade, 'qty', 'exec_qty'); - let cost = this.safeFloat (trade, 'exec_value'); - const price = this.safeFloat2 (trade, 'exec_price', 'price'); + const amount = this.safeNumber2 (trade, 'qty', 'exec_qty'); + let cost = this.safeNumber (trade, 'exec_value'); + const price = this.safeNumber2 (trade, 'exec_price', 'price'); if (cost === undefined) { if (amount !== undefined) { if (price !== undefined) { @@ -796,14 +829,14 @@ module.exports = class bybit extends Exchange { const side = this.safeStringLower (trade, 'side'); const lastLiquidityInd = this.safeString (trade, 'last_liquidity_ind'); const takerOrMaker = (lastLiquidityInd === 'AddedLiquidity') ? 'maker' : 'taker'; - const feeCost = this.safeFloat (trade, 'exec_fee'); + const feeCost = this.safeNumber (trade, 'exec_fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyCode = market['inverse'] ? market['base'] : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'fee_rate'), + 'rate': this.safeNumber (trade, 'fee_rate'), }; } return { @@ -963,12 +996,12 @@ module.exports = class bybit extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['used'] = this.safeFloat (balance, 'used_margin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'used_margin'); + account['total'] = this.safeString (balance, 'equity'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -1095,56 +1128,42 @@ module.exports = class bybit extends Exchange { // const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); - let symbol = undefined; - let base = undefined; + const symbol = market['symbol']; + let feeCurrency = undefined; const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const id = this.safeString2 (order, 'order_id', 'stop_order_id'); const type = this.safeStringLower (order, 'order_type'); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - let average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'qty'); - let cost = this.safeFloat (order, 'cum_exec_value'); - let filled = this.safeFloat (order, 'cum_exec_qty'); - let remaining = this.safeFloat (order, 'leaves_qty'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'qty'); + const cost = this.safeNumber (order, 'cum_exec_value'); + const filled = this.safeNumber (order, 'cum_exec_qty'); + const remaining = this.safeNumber (order, 'leaves_qty'); + const marketTypes = this.safeValue (this.options, 'marketTypes', {}); + const marketType = this.safeString (marketTypes, symbol); if (market !== undefined) { - symbol = market['symbol']; - base = market['base']; + if (marketType === 'linear') { + feeCurrency = market['quote']; + } else { + feeCurrency = market['base']; + } } let lastTradeTimestamp = this.safeTimestamp (order, 'last_exec_time'); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = amount - remaining; - } - if (filled !== undefined) { - if ((remaining === undefined) && (amount !== undefined)) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if ((type === 'market') && (cost !== undefined) && (cost > 0)) { - price = undefined; - if (average === undefined) { - average = filled / cost; - } - } - } const status = this.parseOrderStatus (this.safeString2 (order, 'order_status', 'stop_order_status')); const side = this.safeStringLower (order, 'side'); - let feeCost = this.safeFloat (order, 'cum_exec_fee'); + let feeCost = this.safeNumber (order, 'cum_exec_fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); fee = { 'cost': feeCost, - 'currency': base, + 'currency': feeCurrency, }; } let clientOrderId = this.safeString (order, 'order_link_id'); @@ -1152,9 +1171,9 @@ module.exports = class bybit extends Exchange { clientOrderId = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'stop_px'); + const stopPrice = this.safeNumber (order, 'stop_px'); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1176,7 +1195,7 @@ module.exports = class bybit extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -2027,7 +2046,8 @@ module.exports = class bybit extends Exchange { const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); + const type = this.safeStringLower (transaction, 'type'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -2047,8 +2067,8 @@ module.exports = class bybit extends Exchange { 'tag': undefined, 'tagTo': undefined, 'tagFrom': undefined, - 'type': 'withdrawal', - 'amount': this.safeFloat (transaction, 'amount'), + 'type': type, + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -2131,8 +2151,8 @@ module.exports = class bybit extends Exchange { // const currencyId = this.safeString (item, 'coin'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'wallet_balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'wallet_balance'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -2198,7 +2218,8 @@ module.exports = class bybit extends Exchange { 'recv_window': this.options['recvWindow'], 'timestamp': timestamp, }); - const auth = this.rawencode (this.keysort (query)); + const sortedQuery = this.keysort (query); + const auth = this.rawencode (sortedQuery); const signature = this.hmac (this.encode (auth), this.encode (this.secret)); if (method === 'POST') { body = this.json (this.extend (query, { @@ -2208,7 +2229,7 @@ module.exports = class bybit extends Exchange { 'Content-Type': 'application/json', }; } else { - request += '?' + auth + '&sign=' + signature; + request += '?' + this.urlencode (sortedQuery) + '&sign=' + signature; } } url += request; @@ -2231,12 +2252,43 @@ module.exports = class bybit extends Exchange { // time_now: '1583934106.590436' // } // - const errorCode = this.safeValue (response, 'ret_code'); - if (errorCode !== 0) { + const errorCode = this.safeString (response, 'ret_code'); + if (errorCode !== '0') { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, feedback); this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback); throw new ExchangeError (feedback); // unknown message } } + + async fetchPositions (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (Array.isArray (symbols)) { + const length = symbols.length; + if (length !== 1) { + throw new ArgumentsRequired (this.id + ' fetchPositions takes exactly one symbol'); + } + request['symbol'] = this.marketId (symbols[0]); + } + const defaultType = this.safeString (this.options, 'defaultType', 'linear'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + let response = undefined; + if (type === 'linear') { + response = await this.privateLinearGetPositionList (this.extend (request, params)); + } else if (type === 'inverse') { + response = await this.v2PrivateGetPositionList (this.extend (request, params)); + } else if (type === 'inverseFuture') { + response = await this.futuresPrivateGetPositionList (this.extend (request, params)); + } + // { + // ret_code: 0, + // ret_msg: 'OK', + // ext_code: '', + // ext_info: '', + // result: [] or {} depending on the request + // } + return this.safeValue (response, 'result'); + } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bytetrade.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bytetrade.js index 25953b6f7..ad0c929d8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bytetrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bytetrade.js @@ -186,12 +186,12 @@ module.exports = class bytetrade extends Exchange { const limits = this.safeValue (currency, 'limits'); const deposit = this.safeValue (limits, 'deposit'); const amountPrecision = this.safeInteger (currency, 'basePrecision'); - let maxDeposit = this.safeFloat (deposit, 'max'); + let maxDeposit = this.safeNumber (deposit, 'max'); if (maxDeposit === -1.0) { maxDeposit = undefined; } const withdraw = this.safeValue (limits, 'withdraw'); - let maxWithdraw = this.safeFloat (withdraw, 'max'); + let maxWithdraw = this.safeNumber (withdraw, 'max'); if (maxWithdraw === -1.0) { maxWithdraw = undefined; } @@ -207,11 +207,11 @@ module.exports = class bytetrade extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (deposit, 'min'), + 'min': this.safeNumber (deposit, 'min'), 'max': maxDeposit, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'min'), + 'min': this.safeNumber (withdraw, 'min'), 'max': maxWithdraw, }, }, @@ -265,12 +265,12 @@ module.exports = class bytetrade extends Exchange { 'normalSymbol': normalSymbol, 'limits': { 'amount': { - 'min': this.safeFloat (amount, 'min'), - 'max': this.safeFloat (amount, 'max'), + 'min': this.safeNumber (amount, 'min'), + 'max': this.safeNumber (amount, 'max'), }, 'price': { - 'min': this.safeFloat (price, 'min'), - 'max': this.safeFloat (price, 'max'), + 'min': this.safeNumber (price, 'min'), + 'max': this.safeNumber (price, 'max'), }, 'cost': { 'min': undefined, @@ -298,11 +298,11 @@ module.exports = class bytetrade extends Exchange { const currencyId = this.safeString (balance, 'code'); const code = this.safeCurrencyCode (currencyId, undefined); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'used'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'used'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -363,22 +363,22 @@ module.exports = class bytetrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'open'), - 'close': this.safeFloat (ticker, 'close'), - 'last': this.safeFloat (ticker, 'last'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'open'), + 'close': this.safeNumber (ticker, 'close'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, // previous day close - 'change': this.safeFloat (ticker, 'change'), - 'percentage': this.safeFloat (ticker, 'percentage'), + 'change': this.safeNumber (ticker, 'change'), + 'percentage': this.safeNumber (ticker, 'percentage'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -421,24 +421,16 @@ module.exports = class bytetrade extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetDepth (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetDepth (params); + return this.parseTickers (response, symbols); } async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetTickers (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetTickers (params); + return this.parseTickers (response, symbols); } parseOHLCV (ohlcv, market = undefined) { @@ -454,11 +446,11 @@ module.exports = class bytetrade extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -488,9 +480,9 @@ module.exports = class bytetrade extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeInteger (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - const cost = this.safeFloat (trade, 'cost'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + const cost = this.safeNumber (trade, 'cost'); const id = this.safeString (trade, 'id'); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'takerOrMaker'); @@ -560,12 +552,12 @@ module.exports = class bytetrade extends Exchange { const timestamp = this.safeInteger (order, 'timestamp'); const datetime = this.safeString (order, 'datetime'); const lastTradeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled'); - const remaining = this.safeFloat (order, 'remaining'); - const cost = this.safeFloat (order, 'cost'); - const average = this.safeFloat (order, 'average'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled'); + const remaining = this.safeNumber (order, 'remaining'); + const cost = this.safeNumber (order, 'cost'); + const average = this.safeNumber (order, 'average'); const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); @@ -958,7 +950,7 @@ module.exports = class bytetrade extends Exchange { }; } - async transfer (code, amount, address, message = '', params = {}) { + async transfer (code, amount, fromAccount, toAccount, params = {}) { this.checkRequiredDependencies (); if (this.apiKey === undefined) { throw new ArgumentsRequired ('transfer() requires this.apiKey'); @@ -976,6 +968,7 @@ module.exports = class bytetrade extends Exchange { expirationDatetime = expirationDatetime.split ('.')[0]; const feeAmount = '300000000000000'; const defaultDappId = 'Sagittarius'; + const message = this.safeString (params, 'message', ''); const dappId = this.safeString (params, 'dappId', defaultDappId); const eightBytes = this.integerPow ('2', '64'); const byteStringArray = [ @@ -989,8 +982,8 @@ module.exports = class bytetrade extends Exchange { this.numberToLE (feeAmount, 8), // string for 32 bit php this.numberToLE (this.apiKey.length, 1), this.stringToBinary (this.encode (this.apiKey)), - this.numberToLE (address.length, 1), - this.stringToBinary (this.encode (address)), + this.numberToLE (toAccount.length, 1), + this.stringToBinary (this.encode (toAccount)), this.numberToLE (assetType, 4), this.numberToLE (this.integerDivide (amountChain, eightBytes), 8), this.numberToLE (this.integerModulo (amountChain, eightBytes), 8), @@ -1011,7 +1004,7 @@ module.exports = class bytetrade extends Exchange { const operation = { 'fee': '300000000000000', 'from': this.apiKey, - 'to': address, + 'to': toAccount, 'asset_type': parseInt (currency['id']), 'amount': amountChain.toString (), 'message': message, @@ -1165,9 +1158,9 @@ module.exports = class bytetrade extends Exchange { const datetime = this.safeString (transaction, 'datetime'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const feeInfo = this.safeValue (transaction, 'fee'); - const feeCost = this.safeFloat (feeInfo, 'cost'); + const feeCost = this.safeNumber (feeInfo, 'cost'); const feeCurrencyId = this.safeString (feeInfo, 'code'); const feeCode = this.safeCurrencyCode (feeCurrencyId, currency); const fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/cex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/cex.js index 77473d391..876830762 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/cex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/cex.js @@ -256,7 +256,7 @@ module.exports = class cex extends Exchange { 'fee': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimumCurrencyAmount'), + 'min': this.safeNumber (currency, 'minimumCurrencyAmount'), 'max': undefined, }, 'price': { @@ -268,7 +268,7 @@ module.exports = class cex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimalWithdrawalAmount'), + 'min': this.safeNumber (currency, 'minimalWithdrawalAmount'), 'max': undefined, }, }, @@ -351,15 +351,15 @@ module.exports = class cex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minLotSize'), - 'max': this.safeFloat (market, 'maxLotSize'), + 'min': this.safeNumber (market, 'minLotSize'), + 'max': this.safeNumber (market, 'maxLotSize'), }, 'price': { - 'min': this.safeFloat (market, 'minPrice'), - 'max': this.safeFloat (market, 'maxPrice'), + 'min': this.safeNumber (market, 'minPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { - 'min': this.safeFloat (market, 'minLotSizeS2'), + 'min': this.safeNumber (market, 'minLotSizeS2'), 'max': undefined, }, }, @@ -380,13 +380,13 @@ module.exports = class cex extends Exchange { const currencyId = currencyIds[i]; const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); + account['free'] = this.safeString (balance, 'available'); // https://github.com/ccxt/ccxt/issues/5484 - account['used'] = this.safeFloat (balance, 'orders', 0.0); + account['used'] = this.safeString (balance, 'orders', '0'); const code = this.safeCurrencyCode (currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -415,11 +415,11 @@ module.exports = class cex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -461,12 +461,12 @@ module.exports = class cex extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const volume = this.safeFloat (ticker, 'volume'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'last'); + const volume = this.safeNumber (ticker, 'volume'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'last'); let symbol = undefined; if (market) { symbol = market['symbol']; @@ -528,8 +528,8 @@ module.exports = class cex extends Exchange { const id = this.safeString (trade, 'tid'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -601,8 +601,8 @@ module.exports = class cex extends Exchange { // "complete": false // } // - const placedAmount = this.safeFloat (response, 'amount'); - const remaining = this.safeFloat (response, 'pending'); + const placedAmount = this.safeNumber (response, 'amount'); + const remaining = this.safeNumber (response, 'pending'); const timestamp = this.safeValue (response, 'time'); const complete = this.safeValue (response, 'complete'); const status = complete ? 'closed' : 'open'; @@ -621,7 +621,7 @@ module.exports = class cex extends Exchange { 'side': this.safeString (response, 'type'), 'symbol': symbol, 'status': status, - 'price': this.safeFloat (response, 'price'), + 'price': this.safeNumber (response, 'price'), 'amount': placedAmount, 'cost': undefined, 'average': undefined, @@ -663,42 +663,42 @@ module.exports = class cex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - let amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + let amount = this.safeNumber (order, 'amount'); // sell orders can have a negative amount // https://github.com/ccxt/ccxt/issues/5338 if (amount !== undefined) { amount = Math.abs (amount); } - const remaining = this.safeFloat2 (order, 'pending', 'remains'); + const remaining = this.safeNumber2 (order, 'pending', 'remains'); const filled = amount - remaining; let fee = undefined; let cost = undefined; if (market !== undefined) { symbol = market['symbol']; - const taCost = this.safeFloat (order, 'ta:' + market['quote']); - const ttaCost = this.safeFloat (order, 'tta:' + market['quote']); + const taCost = this.safeNumber (order, 'ta:' + market['quote']); + const ttaCost = this.safeNumber (order, 'tta:' + market['quote']); cost = this.sum (taCost, ttaCost); const baseFee = 'fa:' + market['base']; const baseTakerFee = 'tfa:' + market['base']; const quoteFee = 'fa:' + market['quote']; const quoteTakerFee = 'tfa:' + market['quote']; - let feeRate = this.safeFloat (order, 'tradingFeeMaker'); + let feeRate = this.safeNumber (order, 'tradingFeeMaker'); if (!feeRate) { - feeRate = this.safeFloat (order, 'tradingFeeTaker', feeRate); + feeRate = this.safeNumber (order, 'tradingFeeTaker', feeRate); } if (feeRate) { feeRate /= 100.0; // convert to mathematically-correct percentage coefficients: 1.0 = 100% } if ((baseFee in order) || (baseTakerFee in order)) { - const baseFeeCost = this.safeFloat2 (order, baseFee, baseTakerFee); + const baseFeeCost = this.safeNumber2 (order, baseFee, baseTakerFee); fee = { 'currency': market['base'], 'rate': feeRate, 'cost': baseFeeCost, }; } else if ((quoteFee in order) || (quoteTakerFee in order)) { - const quoteFeeCost = this.safeFloat2 (order, quoteFee, quoteTakerFee); + const quoteFeeCost = this.safeNumber2 (order, quoteFee, quoteTakerFee); fee = { 'currency': market['quote'], 'rate': feeRate, @@ -738,7 +738,7 @@ module.exports = class cex extends Exchange { // ds: 0 } continue; } - const tradePrice = this.safeFloat (item, 'price'); + const tradePrice = this.safeNumber (item, 'price'); if (tradePrice === undefined) { // this represents the order // { @@ -842,8 +842,8 @@ module.exports = class cex extends Exchange { // "fee_amount": "0.03" // } const tradeTimestamp = this.parse8601 (this.safeString (item, 'time')); - const tradeAmount = this.safeFloat (item, 'amount'); - const feeCost = this.safeFloat (item, 'fee_amount'); + const tradeAmount = this.safeNumber (item, 'amount'); + const feeCost = this.safeNumber (item, 'fee_amount'); let absTradeAmount = (tradeAmount < 0) ? -tradeAmount : tradeAmount; let tradeCost = undefined; if (tradeSide === 'sell') { @@ -1188,12 +1188,12 @@ module.exports = class cex extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const side = this.safeString (order, 'type'); - const baseAmount = this.safeFloat (order, 'a:' + baseId + ':cds'); - const quoteAmount = this.safeFloat (order, 'a:' + quoteId + ':cds'); - const fee = this.safeFloat (order, 'f:' + quoteId + ':cds'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const remaining = this.safeFloat (order, 'remains'); + const baseAmount = this.safeNumber (order, 'a:' + baseId + ':cds'); + const quoteAmount = this.safeNumber (order, 'a:' + quoteId + ':cds'); + const fee = this.safeNumber (order, 'f:' + quoteId + ':cds'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const remaining = this.safeNumber (order, 'remains'); const filled = amount - remaining; let orderAmount = undefined; let cost = undefined; @@ -1205,10 +1205,10 @@ module.exports = class cex extends Exchange { cost = quoteAmount; average = orderAmount / cost; } else { - const ta = this.safeFloat (order, 'ta:' + quoteId, 0); - const tta = this.safeFloat (order, 'tta:' + quoteId, 0); - const fa = this.safeFloat (order, 'fa:' + quoteId, 0); - const tfa = this.safeFloat (order, 'tfa:' + quoteId, 0); + const ta = this.safeNumber (order, 'ta:' + quoteId, 0); + const tta = this.safeNumber (order, 'tta:' + quoteId, 0); + const fa = this.safeNumber (order, 'fa:' + quoteId, 0); + const tfa = this.safeNumber (order, 'tfa:' + quoteId, 0); if (side === 'sell') { cost = this.sum (this.sum (ta, tta), this.sum (fa, tfa)); } else { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/chilebit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/chilebit.js deleted file mode 100644 index 4aeeb9ec3..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/chilebit.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const foxbit = require ('./foxbit.js'); - -// --------------------------------------------------------------------------- - -module.exports = class chilebit extends foxbit { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'chilebit', - 'name': 'ChileBit', - 'countries': [ 'CL' ], - 'has': { - 'CORS': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg', - 'api': { - 'public': 'https://api.blinktrade.com/api', - 'private': 'https://api.blinktrade.com/tapi', - }, - 'www': 'https://chilebit.net', - 'doc': 'https://blinktrade.com/docs', - }, - 'options': { - 'brokerId': '9', // https://blinktrade.com/docs/#brokers - }, - }); - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbase.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbase.js index cfceba2a4..1413a7064 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbase.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbase.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, RateLimitExceeded, InvalidNonce } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -411,10 +412,10 @@ module.exports = class coinbase extends Exchange { const timestamp = this.parse8601 (this.safeValue (transaction, 'created_at')); const updated = this.parse8601 (this.safeValue (transaction, 'updated_at')); const type = this.safeString (transaction, 'resource'); - const amount = this.safeFloat (subtotalObject, 'amount'); + const amount = this.safeNumber (subtotalObject, 'amount'); const currencyId = this.safeString (subtotalObject, 'currency'); const currency = this.safeCurrencyCode (currencyId); - const feeCost = this.safeFloat (feeObject, 'amount'); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -490,15 +491,12 @@ module.exports = class coinbase extends Exchange { const orderId = undefined; const side = this.safeString (trade, 'resource'); const type = undefined; - const cost = this.safeFloat (subtotalObject, 'amount'); - const amount = this.safeFloat (amountObject, 'amount'); - let price = undefined; - if (cost !== undefined) { - if ((amount !== undefined) && (amount > 0)) { - price = cost / amount; - } - } - const feeCost = this.safeFloat (feeObject, 'amount'); + const costString = this.safeString (subtotalObject, 'amount'); + const amountString = this.safeString (amountObject, 'amount'); + const cost = this.parseNumber (costString); + const amount = this.parseNumber (amountString); + const price = this.parseNumber (Precise.stringDiv (costString, amountString)); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -566,7 +564,7 @@ module.exports = class coinbase extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (quoteCurrency, 'min_size'), + 'min': this.safeNumber (quoteCurrency, 'min_size'), 'max': undefined, }, }, @@ -648,7 +646,7 @@ module.exports = class coinbase extends Exchange { 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min_size'), + 'min': this.safeNumber (currency, 'min_size'), 'max': undefined, }, 'price': { @@ -679,9 +677,9 @@ module.exports = class coinbase extends Exchange { const buy = await this.publicGetPricesSymbolBuy (request); const sell = await this.publicGetPricesSymbolSell (request); const spot = await this.publicGetPricesSymbolSpot (request); - const ask = this.safeFloat (buy['data'], 'amount'); - const bid = this.safeFloat (sell['data'], 'amount'); - const last = this.safeFloat (spot['data'], 'amount'); + const ask = this.safeNumber (buy['data'], 'amount'); + const bid = this.safeNumber (sell['data'], 'amount'); + const last = this.safeNumber (spot['data'], 'amount'); return { 'symbol': symbol, 'timestamp': timestamp, @@ -724,7 +722,7 @@ module.exports = class coinbase extends Exchange { if (this.inArray (balance['type'], accounts)) { const currencyId = this.safeString (balance['balance'], 'currency'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance['balance'], 'amount'); + const total = this.safeNumber (balance['balance'], 'amount'); const free = total; const used = undefined; if (code in result) { @@ -1025,7 +1023,7 @@ module.exports = class coinbase extends Exchange { // } // const amountInfo = this.safeValue (item, 'amount', {}); - let amount = this.safeFloat (amountInfo, 'amount'); + let amount = this.safeNumber (amountInfo, 'amount'); let direction = undefined; if (amount < 0) { direction = 'out'; @@ -1051,7 +1049,7 @@ module.exports = class coinbase extends Exchange { if (feeInfo !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId, currency); - const feeAmount = this.safeFloat (feeInfo, 'amount'); + const feeAmount = this.safeNumber (feeInfo, 'amount'); fee = { 'cost': feeAmount, 'currency': feeCurrencyCode, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbasepro.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbasepro.js index 582c03a61..6d8c48454 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbasepro.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinbasepro.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ArgumentsRequired, ExchangeError, InvalidOrder, InvalidAddress, AuthenticationError, NotSupported, OrderNotFound, OnMaintenance, PermissionDenied, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -239,7 +240,7 @@ module.exports = class coinbasepro extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const details = this.safeValue (currency, 'details', {}); - const precision = this.safeFloat (currency, 'max_precision'); + const precision = this.safeNumber (currency, 'max_precision'); const status = this.safeString (currency, 'status'); const active = (status === 'online'); result[code] = { @@ -253,7 +254,7 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (details, 'min_size'), + 'min': this.safeNumber (details, 'min_size'), 'max': undefined, }, 'price': { @@ -265,7 +266,7 @@ module.exports = class coinbasepro extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (details, 'min_withdrawal_amount'), + 'min': this.safeNumber (details, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -309,12 +310,12 @@ module.exports = class coinbasepro extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const priceLimits = { - 'min': this.safeFloat (market, 'quote_increment'), + 'min': this.safeNumber (market, 'quote_increment'), 'max': undefined, }; const precision = { - 'amount': this.safeFloat (market, 'base_increment'), - 'price': this.safeFloat (market, 'quote_increment'), + 'amount': this.safeNumber (market, 'base_increment'), + 'price': this.safeNumber (market, 'quote_increment'), }; const status = this.safeString (market, 'status'); const active = (status === 'online'); @@ -328,13 +329,13 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': priceLimits, 'cost': { - 'min': this.safeFloat (market, 'min_market_funds'), - 'max': this.safeFloat (market, 'max_market_funds'), + 'min': this.safeNumber (market, 'min_market_funds'), + 'max': this.safeNumber (market, 'max_market_funds'), }, }, 'active': active, @@ -391,14 +392,13 @@ module.exports = class coinbasepro extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'hold'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'hold'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -455,29 +455,29 @@ module.exports = class coinbasepro extends Exchange { // } // const timestamp = this.parse8601 (this.safeValue (ticker, 'time')); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'price'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'price'); const symbol = (market === undefined) ? undefined : market['symbol']; return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': undefined, 'ask': ask, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -550,7 +550,7 @@ module.exports = class coinbasepro extends Exchange { if (market !== undefined) { const feeCurrencyId = this.safeStringLower (market, 'quoteId'); const costField = feeCurrencyId + '_value'; - cost = this.safeFloat (trade, costField); + cost = this.safeNumber (trade, costField); feeCurrency = market['quote']; const liquidity = this.safeString (trade, 'liquidity'); if (liquidity !== undefined) { @@ -558,7 +558,7 @@ module.exports = class coinbasepro extends Exchange { feeRate = market[takerOrMaker]; } } - const feeCost = this.safeFloat2 (trade, 'fill_fees', 'fee'); + const feeCost = this.safeNumber2 (trade, 'fill_fees', 'fee'); const fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -572,10 +572,12 @@ module.exports = class coinbasepro extends Exchange { if (orderId !== undefined) { side = (trade['side'] === 'buy') ? 'buy' : 'sell'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - cost = amount * price; + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -637,11 +639,11 @@ module.exports = class coinbasepro extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -721,17 +723,11 @@ module.exports = class coinbasepro extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'filled_size'); - const amount = this.safeFloat (order, 'size', filled); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'executed_value'); - const feeCost = this.safeFloat (order, 'fill_fees'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'filled_size'); + const amount = this.safeNumber (order, 'size', filled); + const cost = this.safeNumber (order, 'executed_value'); + const feeCost = this.safeNumber (order, 'fill_fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -749,9 +745,9 @@ module.exports = class coinbasepro extends Exchange { const side = this.safeString (order, 'side'); const timeInForce = this.safeString (order, 'time_in_force'); const postOnly = this.safeValue (order, 'post_only'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -769,11 +765,11 @@ module.exports = class coinbasepro extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -863,7 +859,7 @@ module.exports = class coinbasepro extends Exchange { request['client_oid'] = clientOrderId; params = this.omit (params, [ 'clientOrderId', 'client_oid' ]); } - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop_price'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stop_price'); if (stopPrice !== undefined) { request['stop_price'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, [ 'stopPrice', 'stop_price' ]); @@ -877,7 +873,7 @@ module.exports = class coinbasepro extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['size'] = this.amountToPrecision (symbol, amount); } else if (type === 'market') { - let cost = this.safeFloat2 (params, 'cost', 'funds'); + let cost = this.safeNumber2 (params, 'cost', 'funds'); if (cost === undefined) { if (price !== undefined) { cost = amount * price; @@ -948,19 +944,6 @@ module.exports = class coinbasepro extends Exchange { return await this.privateDeleteOrders (this.extend (request, params)); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - const cost = amount * price; - const currency = market['quote']; - return { - 'type': takerOrMaker, - 'currency': currency, - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (currency, rate * cost)), - }; - } - async fetchPaymentMethods (params = {}) { return await this.privateGetPaymentMethods (params); } @@ -1099,7 +1082,7 @@ module.exports = class coinbasepro extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (transaction); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let type = this.safeString (transaction, 'type'); let address = this.safeString (details, 'crypto_address'); const tag = this.safeString (details, 'destination_tag'); @@ -1108,7 +1091,7 @@ module.exports = class coinbasepro extends Exchange { if (type === 'withdraw') { type = 'withdrawal'; address = this.safeString (details, 'sent_to_address', address); - const feeCost = this.safeFloat (details, 'fee'); + const feeCost = this.safeNumber (details, 'fee'); if (feeCost !== undefined) { if (amount !== undefined) { amount -= feeCost; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coincheck.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coincheck.js index 807882d02..e7a3db265 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coincheck.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coincheck.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -127,12 +128,12 @@ module.exports = class coincheck extends Exchange { if (currencyId in balances) { const account = this.account (); const reserved = currencyId + '_reserved'; - account['free'] = this.safeFloat (balances, currencyId); - account['used'] = this.safeFloat (balances, reserved); + account['free'] = this.safeString (balances, currencyId); + account['used'] = this.safeString (balances, reserved); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -170,23 +171,13 @@ module.exports = class coincheck extends Exchange { const id = this.safeString (order, 'id'); const side = this.safeString (order, 'order_type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const amount = this.safeFloat (order, 'pending_amount'); - const remaining = this.safeFloat (order, 'pending_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = Math.max (amount - remaining, 0); - if (price !== undefined) { - cost = filled * price; - } - } - } + const amount = this.safeNumber (order, 'pending_amount'); + const remaining = this.safeNumber (order, 'pending_amount'); + const price = this.safeNumber (order, 'rate'); const status = undefined; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -194,7 +185,7 @@ module.exports = class coincheck extends Exchange { 'lastTradeTimestamp': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'side': side, 'type': undefined, 'timeInForce': undefined, @@ -203,12 +194,12 @@ module.exports = class coincheck extends Exchange { 'symbol': symbol, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'info': order, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -232,16 +223,16 @@ module.exports = class coincheck extends Exchange { }; const ticker = await this.publicGetTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -251,7 +242,7 @@ module.exports = class coincheck extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -260,7 +251,7 @@ module.exports = class coincheck extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'rate'); + const priceString = this.safeString (trade, 'rate'); const marketId = this.safeString (trade, 'pair'); market = this.safeValue (this.markets_by_id, marketId, market); let symbol = undefined; @@ -287,7 +278,7 @@ module.exports = class coincheck extends Exchange { } } let takerOrMaker = undefined; - let amount = undefined; + let amountString = undefined; let cost = undefined; let side = undefined; let fee = undefined; @@ -299,24 +290,22 @@ module.exports = class coincheck extends Exchange { takerOrMaker = 'maker'; } const funds = this.safeValue (trade, 'funds', {}); - amount = this.safeFloat (funds, baseId); - cost = this.safeFloat (funds, quoteId); + amountString = this.safeString (funds, baseId); + cost = this.safeNumber (funds, quoteId); fee = { 'currency': this.safeString (trade, 'fee_currency'), - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), }; side = this.safeString (trade, 'side'); orderId = this.safeString (trade, 'order_id'); } else { - amount = this.safeFloat (trade, 'amount'); + amountString = this.safeString (trade, 'amount'); side = this.safeString (trade, 'order_type'); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -387,6 +376,10 @@ module.exports = class coincheck extends Exchange { return await this.privateDeleteExchangeOrdersId (this.extend (request, params)); } + nonce () { + return this.milliseconds (); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { let url = this.urls['api'] + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinegg.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinegg.js index e270e3bf7..0b2e2ef89 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinegg.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinegg.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -214,8 +215,8 @@ module.exports = class coinegg extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; let change = undefined; let average = undefined; @@ -229,11 +230,11 @@ module.exports = class coinegg extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -243,8 +244,8 @@ module.exports = class coinegg extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVol'), 'info': ticker, }; } @@ -273,15 +274,12 @@ module.exports = class coinegg extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const type = 'limit'; const side = this.safeString (trade, 'type'); const id = this.safeString (trade, 'tid'); @@ -328,9 +326,9 @@ module.exports = class coinegg extends Exchange { result[code] = this.account (); } const type = (accountType === 'lock') ? 'used' : 'free'; - result[code][type] = this.safeFloat (balances, key); + result[code][type] = this.safeString (balances, key); } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -339,15 +337,9 @@ module.exports = class coinegg extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let status = this.safeString (order, 'status'); if (status === 'cancelled') { status = 'canceled'; @@ -358,7 +350,7 @@ module.exports = class coinegg extends Exchange { const type = 'limit'; const side = this.safeString (order, 'type'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -374,13 +366,13 @@ module.exports = class coinegg extends Exchange { 'stopPrice': undefined, 'cost': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'trades': undefined, 'fee': undefined, 'info': info, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinex.js index cc344ee72..575d0f239 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, OrderNotFound, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -196,13 +197,13 @@ module.exports = class coinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': this.safeFloat (market, 'taker_fee_rate'), - 'maker': this.safeFloat (market, 'maker_fee_rate'), + 'taker': this.safeNumber (market, 'taker_fee_rate'), + 'maker': this.safeNumber (market, 'maker_fee_rate'), 'info': market, 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -222,16 +223,16 @@ module.exports = class coinex extends Exchange { symbol = market['symbol']; } ticker = this.safeValue (ticker, 'ticker', {}); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -241,7 +242,7 @@ module.exports = class coinex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat2 (ticker, 'vol', 'volume'), + 'baseVolume': this.safeNumber2 (ticker, 'vol', 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -301,16 +302,18 @@ module.exports = class coinex extends Exchange { } const tradeId = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market); - let cost = this.safeFloat (trade, 'deal_money'); - if (!cost) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); + let cost = this.safeNumber (trade, 'deal_money'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_asset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -363,11 +366,11 @@ module.exports = class coinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -428,11 +431,11 @@ module.exports = class coinex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -471,11 +474,11 @@ module.exports = class coinex extends Exchange { // } // const timestamp = this.safeTimestamp (order, 'create_time'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'deal_money'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'deal_amount'); - const average = this.safeFloat (order, 'avg_price'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'deal_money'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'deal_amount'); + const average = this.safeNumber (order, 'avg_price'); let symbol = undefined; const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); @@ -487,11 +490,11 @@ module.exports = class coinex extends Exchange { feeCurrency = market['quote']; } } - const remaining = this.safeFloat (order, 'left'); + const remaining = this.safeNumber (order, 'left'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -513,10 +516,10 @@ module.exports = class coinex extends Exchange { 'trades': undefined, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'deal_fee'), + 'cost': this.safeNumber (order, 'deal_fee'), }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -762,8 +765,8 @@ module.exports = class coinex extends Exchange { const timestamp = this.safeTimestamp (transaction, 'create_time'); const type = ('coin_withdraw_id' in transaction) ? 'withdraw' : 'deposit'; const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'tx_fee'); + let amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'tx_fee'); if (type === 'deposit') { feeCost = 0; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfalcon.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfalcon.js index 6c264b4ec..8d3077293 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfalcon.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfalcon.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, RateLimitExceeded, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -136,11 +137,11 @@ module.exports = class coinfalcon extends Exchange { 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'change_in_24h'), + 'change': this.safeNumber (ticker, 'change_in_24h'), 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -177,20 +178,17 @@ module.exports = class coinfalcon extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } const tradeId = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'order_id'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = this.safeString (trade, 'fee_currency_code'); fee = { @@ -258,14 +256,13 @@ module.exports = class coinfalcon extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available_balance'), - 'used': this.safeFloat (balance, 'hold_balance'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'hold_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -300,19 +297,9 @@ module.exports = class coinfalcon extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'size_filled'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (price !== undefined) { - cost = filled * price; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'size_filled'); const status = this.parseOrderStatus (this.safeString (order, 'status')); let type = this.safeString (order, 'operation_type'); if (type !== undefined) { @@ -321,7 +308,7 @@ module.exports = class coinfalcon extends Exchange { } const side = this.safeString (order, 'order_type'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -334,16 +321,16 @@ module.exports = class coinfalcon extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'lastTradeTimestamp': undefined, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfloor.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfloor.js index 7fff650de..790ac8c50 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfloor.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinfloor.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ExchangeError, InvalidNonce, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -105,14 +106,14 @@ module.exports = class coinfloor extends Exchange { const baseIdLower = this.safeStringLower (market, 'baseId'); const quoteIdLower = this.safeStringLower (market, 'quoteId'); result[base] = { - 'free': this.safeFloat (response, baseIdLower + '_available'), - 'used': this.safeFloat (response, baseIdLower + '_reserved'), - 'total': this.safeFloat (response, baseIdLower + '_balance'), + 'free': this.safeNumber (response, baseIdLower + '_available'), + 'used': this.safeNumber (response, baseIdLower + '_reserved'), + 'total': this.safeNumber (response, baseIdLower + '_balance'), }; result[quote] = { - 'free': this.safeFloat (response, quoteIdLower + '_available'), - 'used': this.safeFloat (response, quoteIdLower + '_reserved'), - 'total': this.safeFloat (response, quoteIdLower + '_balance'), + 'free': this.safeNumber (response, quoteIdLower + '_available'), + 'used': this.safeNumber (response, quoteIdLower + '_reserved'), + 'total': this.safeNumber (response, quoteIdLower + '_balance'), }; return this.parseBalance (result); } @@ -133,22 +134,22 @@ module.exports = class coinfloor extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -177,14 +178,11 @@ module.exports = class coinfloor extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -302,8 +300,8 @@ module.exports = class coinfloor extends Exchange { const parts = key.split ('_'); const numParts = parts.length; if (numParts === 2) { - const tmpBaseAmount = this.safeFloat (item, parts[0]); - const tmpQuoteAmount = this.safeFloat (item, parts[1]); + const tmpBaseAmount = this.safeNumber (item, parts[0]); + const tmpQuoteAmount = this.safeNumber (item, parts[1]); if (tmpBaseAmount !== undefined && tmpQuoteAmount !== undefined) { baseId = parts[0]; quoteId = parts[1]; @@ -319,7 +317,7 @@ module.exports = class coinfloor extends Exchange { const referenceId = this.safeString (item, 'id'); const timestamp = this.parse8601 (this.safeString (item, 'datetime')); let fee = undefined; - const feeCost = this.safeFloat (item, 'fee'); + const feeCost = this.safeNumber (item, 'fee'); const result = { 'id': undefined, 'timestamp': timestamp, @@ -423,8 +421,8 @@ module.exports = class coinfloor extends Exchange { 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, 'type': type, - 'price': this.safeFloat (response, 'price'), - 'remaining': this.safeFloat (response, 'amount'), + 'price': this.safeNumber (response, 'price'), + 'remaining': this.safeNumber (response, 'amount'), 'info': response, }; } @@ -449,19 +447,14 @@ module.exports = class coinfloor extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let side = undefined; const status = this.safeString (order, 'status'); - if (order['type'] === 0) { + const rawType = this.safeString (order, 'type'); + if (rawType === '0') { side = 'buy'; - } else if (order['type'] === 1) { + } else if (rawType === '1') { side = 'sell'; } let symbol = undefined; @@ -469,7 +462,7 @@ module.exports = class coinfloor extends Exchange { symbol = market['symbol']; } const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -487,11 +480,11 @@ module.exports = class coinfloor extends Exchange { 'amount': undefined, 'filled': undefined, 'remaining': amount, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coingi.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coingi.js index 650d80885..931325ea6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coingi.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coingi.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -165,14 +166,14 @@ module.exports = class coingi extends Exchange { const currencyId = this.safeString (balance['currency'], 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - const blocked = this.safeFloat (balance, 'blocked'); - const inOrders = this.safeFloat (balance, 'inOrders'); - const withdrawing = this.safeFloat (balance, 'withdrawing'); - account['used'] = this.sum (blocked, inOrders, withdrawing); + account['free'] = this.safeString (balance, 'available'); + const blocked = this.safeString (balance, 'blocked'); + const inOrders = this.safeString (balance, 'inOrders'); + const withdrawing = this.safeString (balance, 'withdrawing'); + account['used'] = Precise.stringAdd (Precise.stringAdd (blocked, inOrders), withdrawing); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = 512, params = {}) { @@ -198,11 +199,11 @@ module.exports = class coingi extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -212,8 +213,8 @@ module.exports = class coingi extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'counterVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'counterVolume'), 'info': ticker, }; } @@ -246,14 +247,11 @@ module.exports = class coingi extends Exchange { } parseTrade (trade, market = undefined) { - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const id = this.safeString (trade, 'id'); const marketId = this.safeString (trade, 'currencyPair'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmarketcap.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmarketcap.js index 171a65889..85edd4882 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmarketcap.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmarketcap.js @@ -208,16 +208,16 @@ module.exports = class coinmarketcap extends Exchange { if (timestamp === undefined) { timestamp = this.milliseconds (); } - const change = this.safeFloat (ticker, 'percent_change_24h'); + const change = this.safeNumber (ticker, 'percent_change_24h'); let last = undefined; let symbol = undefined; let volume = undefined; if (market !== undefined) { symbol = market['symbol']; const priceKey = 'price_' + market['quoteId']; - last = this.safeFloat (ticker, priceKey); + last = this.safeNumber (ticker, priceKey); const volumeKey = '24h_volume_' + market['quoteId']; - volume = this.safeFloat (ticker, volumeKey); + volume = this.safeNumber (ticker, volumeKey); } return { 'symbol': symbol, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmate.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmate.js index b03ce8783..821e5d7e8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmate.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinmate.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder, OrderNotFound, RateLimitExceeded, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -230,7 +231,7 @@ module.exports = class coinmate extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -258,12 +259,12 @@ module.exports = class coinmate extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -286,16 +287,16 @@ module.exports = class coinmate extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'data'); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'vwap': undefined, 'askVolume': undefined, 'open': undefined, @@ -305,7 +306,7 @@ module.exports = class coinmate extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'amount'), + 'baseVolume': this.safeNumber (ticker, 'amount'), 'quoteVolume': undefined, 'info': ticker, }; @@ -374,8 +375,8 @@ module.exports = class coinmate extends Exchange { // } // const timestamp = this.safeInteger (item, 'timestamp'); - const amount = this.safeFloat (item, 'amount'); - const fee = this.safeFloat (item, 'fee'); + const amount = this.safeNumber (item, 'amount'); + const fee = this.safeNumber (item, 'fee'); const txid = this.safeString (item, 'txid'); const address = this.safeString (item, 'destination'); const tag = this.safeString (item, 'destinationTag'); @@ -453,21 +454,18 @@ module.exports = class coinmate extends Exchange { // const marketId = this.safeString (trade, 'currencyPair'); market = this.safeMarket (marketId, market, '_'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeStringLower2 (trade, 'type', 'tradeType'); const type = this.safeStringLower (trade, 'orderType'); const orderId = this.safeString (trade, 'orderId'); const id = this.safeString (trade, 'transactionId'); const timestamp = this.safeInteger2 (trade, 'timestamp', 'createdTimestamp'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -608,11 +606,11 @@ module.exports = class coinmate extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.safeInteger (order, 'timestamp'); const side = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'originalAmount'); - let remaining = this.safeFloat (order, 'remainingAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'originalAmount'); + let remaining = this.safeNumber (order, 'remainingAmount'); if (remaining === undefined) { - remaining = this.safeFloat (order, 'amount'); + remaining = this.safeNumber (order, 'amount'); } let status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.parseOrderType (this.safeString (order, 'orderTradeType')); @@ -627,11 +625,11 @@ module.exports = class coinmate extends Exchange { cost = filled * price; } } - const average = this.safeFloat (order, 'avgPrice'); + const average = this.safeNumber (order, 'avgPrice'); const marketId = this.safeString (order, 'currencyPair'); const symbol = this.safeSymbol (marketId, market, '_'); const clientOrderId = this.safeString (order, 'clientOrderId'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); return { 'id': id, 'clientOrderId': clientOrderId, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinone.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinone.js index 0c86365b6..cd0f3585c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinone.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinone.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, BadRequest, ExchangeError, ArgumentsRequired, OrderNotFound, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -142,11 +143,11 @@ module.exports = class coinone extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'avail'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -199,13 +200,13 @@ module.exports = class coinone extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const first = this.safeFloat (ticker, 'first'); - const last = this.safeFloat (ticker, 'last'); + const first = this.safeNumber (ticker, 'first'); + const last = this.safeNumber (ticker, 'last'); let average = undefined; if (first !== undefined && last !== undefined) { average = this.sum (first, last) / 2; } - const previousClose = this.safeFloat (ticker, 'yesterday_last'); + const previousClose = this.safeNumber (ticker, 'yesterday_last'); let change = undefined; let percentage = undefined; if (last !== undefined && previousClose !== undefined) { @@ -219,8 +220,8 @@ module.exports = class coinone extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -233,7 +234,7 @@ module.exports = class coinone extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -279,20 +280,17 @@ module.exports = class coinone extends Exchange { side = 'buy'; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'fee'); + let feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); - let feeRate = this.safeFloat (trade, 'feeRate'); + let feeRate = this.safeNumber (trade, 'feeRate'); feeRate = Math.abs (feeRate); let feeCurrencyCode = undefined; if (market !== undefined) { @@ -452,7 +450,7 @@ module.exports = class coinone extends Exchange { // } // const id = this.safeString (order, 'orderId'); - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); const timestamp = this.safeTimestamp (order, 'timestamp'); let side = this.safeString (order, 'type'); if (side === 'ask') { @@ -460,9 +458,8 @@ module.exports = class coinone extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const remaining = this.safeFloat (order, 'remainQty'); - let filled = undefined; - const amount = this.safeFloat (order, 'qty'); + const remaining = this.safeNumber (order, 'remainQty'); + const amount = this.safeNumber (order, 'qty'); let status = this.safeString (order, 'status'); // https://github.com/ccxt/ccxt/pull/7067 if (status === 'live') { @@ -472,14 +469,7 @@ module.exports = class coinone extends Exchange { } } } - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (amount - remaining); - } status = this.parseOrderStatus (status); - let cost = undefined; - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } let symbol = undefined; let base = undefined; let quote = undefined; @@ -499,16 +489,16 @@ module.exports = class coinone extends Exchange { quote = market['quote']; } let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = (side === 'sell') ? quote : base; fee = { 'cost': feeCost, - 'rate': this.safeFloat (order, 'feeRate'), + 'rate': this.safeNumber (order, 'feeRate'), 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -522,15 +512,15 @@ module.exports = class coinone extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': amount, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -605,8 +595,8 @@ module.exports = class coinone extends Exchange { // eslint-disable-next-line quotes throw new ArgumentsRequired (this.id + " cancelOrder() requires a symbol argument. To cancel the order, pass a symbol argument and {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument of cancelOrder."); } - const price = this.safeFloat (params, 'price'); - const qty = this.safeFloat (params, 'qty'); + const price = this.safeNumber (params, 'price'); + const qty = this.safeNumber (params, 'qty'); const isAsk = this.safeInteger (params, 'is_ask'); if ((price === undefined) || (qty === undefined) || (isAsk === undefined)) { // eslint-disable-next-line quotes diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinspot.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinspot.js index e04c42b5d..63c9b3fd2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinspot.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/coinspot.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -123,7 +124,7 @@ module.exports = class coinspot extends Exchange { const balance = currencies[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } } @@ -133,11 +134,11 @@ module.exports = class coinspot extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -157,16 +158,16 @@ module.exports = class coinspot extends Exchange { id = id.toLowerCase (); const ticker = response['prices'][id]; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -214,11 +215,13 @@ module.exports = class coinspot extends Exchange { // "market":"BTC/AUD" // } // - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'total'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger (trade, 'solddate'); const marketId = this.safeString (trade, 'market'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/crex24.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/crex24.js index 7c1298090..5c3a3ccde 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/crex24.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/crex24.js @@ -4,6 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, InvalidNonce, RequestTimeout, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, AuthenticationError, BadSymbol } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110,6 +112,7 @@ module.exports = class crex24 extends Exchange { ], }, }, + 'precisionMode': TICK_SIZE, 'fees': { 'trading': { 'tierBased': true, @@ -130,6 +133,7 @@ module.exports = class crex24 extends Exchange { 'BIT': 'BitMoney', 'BULL': 'BuySell', 'CREDIT': 'TerraCredit', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'GHOST': 'GHOSTPRISM', 'IQ': 'IQ.Cash', 'PUT': 'PutinCoin', @@ -163,6 +167,7 @@ module.exports = class crex24 extends Exchange { 'API Key': AuthenticationError, // "API Key '9edc48de-d5b0-4248-8e7e-f59ffcd1c7f1' doesn't exist." 'Insufficient funds': InsufficientFunds, // "Insufficient funds: new order requires 10 ETH which is more than the available balance." 'has been delisted.': BadSymbol, // {"errorDescription":"Instrument '$PAC-BTC' has been delisted."} + 'is currently suspended.': BadSymbol, // {"errorDescription":"Trading in BITG-BTC is currently suspended."} 'Mandatory parameter': BadRequest, // {"errorDescription":"Mandatory parameter 'feeCurrency' is missing."} }, }, @@ -204,12 +209,12 @@ module.exports = class crex24 extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const tickSize = this.safeValue (market, 'tickSize'); - const minPrice = this.safeValue (market, 'minPrice'); - const minAmount = this.safeFloat (market, 'minVolume'); + const tickSize = this.safeNumber (market, 'tickSize'); + const minPrice = this.safeNumber (market, 'minPrice'); + const minAmount = this.safeNumber (market, 'minVolume'); const precision = { - 'amount': this.precisionFromString (this.numberToString (minAmount)), - 'price': this.precisionFromString (this.numberToString (tickSize)), + 'amount': minAmount, + 'price': tickSize, }; const active = (market['state'] === 'active'); result.push ({ @@ -274,7 +279,8 @@ module.exports = class crex24 extends Exchange { const currency = response[i]; const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); - const precision = this.safeInteger (currency, 'withdrawalPrecision'); + const withdrawalPrecision = this.safeInteger (currency, 'withdrawalPrecision'); + const precision = Math.pow (10, -withdrawalPrecision); const address = this.safeValue (currency, 'BaseAddress'); const active = (currency['depositsAllowed'] && currency['withdrawalsAllowed'] && !currency['isDelisted']); const type = currency['isFiat'] ? 'fiat' : 'crypto'; @@ -286,7 +292,7 @@ module.exports = class crex24 extends Exchange { 'type': type, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'flatWithdrawalFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'flatWithdrawalFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -302,12 +308,12 @@ module.exports = class crex24 extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -337,11 +343,11 @@ module.exports = class crex24 extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -393,16 +399,16 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); const marketId = this.safeString (ticker, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -410,10 +416,10 @@ module.exports = class crex24 extends Exchange { 'last': last, 'previousClose': undefined, // previous day close 'change': undefined, - 'percentage': this.safeFloat (ticker, 'percentChange'), + 'percentage': this.safeNumber (ticker, 'percentChange'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -483,14 +489,6 @@ module.exports = class crex24 extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - parseTrade (trade, market = undefined) { // // public fetchTrades @@ -515,14 +513,11 @@ module.exports = class crex24 extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'orderId'); @@ -531,7 +526,7 @@ module.exports = class crex24 extends Exchange { let fee = undefined; const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCode = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -592,11 +587,11 @@ module.exports = class crex24 extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -665,50 +660,19 @@ module.exports = class crex24 extends Exchange { const marketId = this.safeString (order, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remainingVolume'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remainingVolume'); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'lastUpdate')); - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = amount - remaining; - if (this.options['parseOrderToPrecision']) { - filled = parseFloat (this.amountToPrecision (symbol, filled)); - } - filled = Math.max (filled, 0.0); - if (price !== undefined) { - cost = price * filled; - } - } - } const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeString (order, 'side'); const fee = undefined; const trades = undefined; - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const average = undefined; const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -722,14 +686,14 @@ module.exports = class crex24 extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -764,7 +728,7 @@ module.exports = class crex24 extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -1183,8 +1147,8 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'createdAt')); const updated = this.parse8601 (this.safeString (transaction, 'processedAt')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); const fee = { 'cost': feeCost, 'currency': code, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/currencycom.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/currencycom.js index c8570f1d4..17aa6bfa5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/currencycom.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/currencycom.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -92,6 +93,7 @@ module.exports = class currencycom extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.002, @@ -250,7 +252,7 @@ module.exports = class currencycom extends Exchange { const filtersByType = this.indexBy (filters, 'filterType'); const precision = { 'amount': 1 / Math.pow (1, this.safeInteger (market, 'baseAssetPrecision')), - 'price': this.safeFloat (market, 'tickSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'TRADING'); @@ -283,14 +285,14 @@ module.exports = class currencycom extends Exchange { 'max': undefined, }, 'cost': { - 'min': -1 * Math.log10 (precision['amount']), + 'min': -Math.log10 (precision['amount']), 'max': undefined, }, }, }; - const exchangeFee = this.safeFloat2 (market, 'exchangeFee', 'tradingFee'); - const makerFee = this.safeFloat (market, 'makerFee', exchangeFee); - const takerFee = this.safeFloat (market, 'takerFee', exchangeFee); + const exchangeFee = this.safeNumber2 (market, 'exchangeFee', 'tradingFee'); + const makerFee = this.safeNumber (market, 'makerFee', exchangeFee); + const takerFee = this.safeNumber (market, 'takerFee', exchangeFee); if (makerFee !== undefined) { entry['maker'] = makerFee / 100; } @@ -299,65 +301,44 @@ module.exports = class currencycom extends Exchange { } if ('PRICE_FILTER' in filtersByType) { const filter = this.safeValue (filtersByType, 'PRICE_FILTER', {}); - entry['precision']['price'] = this.safeFloat (filter, 'tickSize'); + entry['precision']['price'] = this.safeNumber (filter, 'tickSize'); // PRICE_FILTER reports zero values for maxPrice // since they updated filter types in November 2018 // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } } if ('LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'LOT_SIZE', {}); - entry['precision']['amount'] = this.safeFloat (filter, 'stepSize'); + entry['precision']['amount'] = this.safeNumber (filter, 'stepSize'); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat (filter, 'minNotional'); + entry['limits']['cost']['min'] = this.safeNumber (filter, 'minNotional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { const response = await this.privateGetAccount (params); // @@ -404,8 +385,8 @@ module.exports = class currencycom extends Exchange { const response = await this.privateGetAccount (params); return { 'info': response, - 'maker': this.safeFloat (response, 'makerCommission'), - 'taker': this.safeFloat (response, 'takerCommission'), + 'maker': this.safeNumber (response, 'makerCommission'), + 'taker': this.safeNumber (response, 'takerCommission'), }; } @@ -439,11 +420,11 @@ module.exports = class currencycom extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -542,8 +523,8 @@ module.exports = class currencycom extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); - const open = this.safeFloat (ticker, 'openPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); let average = undefined; if ((open !== undefined) && (last !== undefined)) { average = this.sum (open, last) / 2; @@ -552,22 +533,22 @@ module.exports = class currencycom extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), 'open': open, 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -602,14 +583,6 @@ module.exports = class currencycom extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24hr (params); @@ -642,11 +615,11 @@ module.exports = class currencycom extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -712,8 +685,11 @@ module.exports = class currencycom extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -729,7 +705,7 @@ module.exports = class currencycom extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -751,7 +727,7 @@ module.exports = class currencycom extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': fee, }; } @@ -827,66 +803,21 @@ module.exports = class currencycom extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); + const remaining = undefined; + const cost = this.safeNumber (order, 'cummulativeQuoteQty'); const id = this.safeString (order, 'orderId'); const type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeStringLower (order, 'side'); - let fee = undefined; let trades = undefined; const fills = this.safeValue (order, 'fills'); if (fills !== undefined) { trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'timestamp': timestamp, @@ -900,13 +831,13 @@ module.exports = class currencycom extends Exchange { 'stopPrice': undefined, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/delta.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/delta.js index 9b3c559bf..028cdf3ac 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/delta.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/delta.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, BadRequest, BadSymbol, InvalidOrder, AuthenticationError, ArgumentsRequired, OrderNotFound, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -258,14 +259,14 @@ module.exports = class delta extends Exchange { 'name': this.safeString (currency, 'name'), 'info': currency, // the original payload 'active': active, - 'fee': this.safeFloat (currency, 'base_withdrawal_fee'), + 'fee': this.safeNumber (currency, 'base_withdrawal_fee'), 'precision': 1 / Math.pow (10, precision), 'limits': { 'amount': { 'min': undefined, 'max': undefined }, 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal_amount'), + 'min': this.safeNumber (currency, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -399,26 +400,26 @@ module.exports = class delta extends Exchange { } const precision = { 'amount': 1.0, // number of contracts - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; const limits = { 'amount': { 'min': 1.0, - 'max': this.safeFloat (market, 'position_size_limit'), + 'max': this.safeNumber (market, 'position_size_limit'), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; const state = this.safeString (market, 'state'); const active = (state === 'live'); - const maker = this.safeFloat (market, 'maker_commission_rate'); - const taker = this.safeFloat (market, 'taker_commission_rate'); + const maker = this.safeNumber (market, 'maker_commission_rate'); + const taker = this.safeNumber (market, 'taker_commission_rate'); result.push ({ 'id': id, 'numericId': numericId, @@ -466,8 +467,8 @@ module.exports = class delta extends Exchange { const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.001); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; let percentage = undefined; @@ -478,15 +479,15 @@ module.exports = class delta extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'turnover'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'turnover'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -656,12 +657,11 @@ module.exports = class delta extends Exchange { const orderId = this.safeString (trade, 'order_id'); let timestamp = this.parse8601 (this.safeString (trade, 'created_at')); timestamp = this.safeIntegerProduct (trade, 'timestamp', 0.001, timestamp); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const product = this.safeValue (trade, 'product', {}); const marketId = this.safeString (product, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -680,7 +680,7 @@ module.exports = class delta extends Exchange { if (type !== undefined) { type = type.replace ('_order', ''); } - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { const settlingAsset = this.safeValue (product, 'settling_asset', {}); @@ -747,11 +747,11 @@ module.exports = class delta extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -821,11 +821,11 @@ module.exports = class delta extends Exchange { const currency = this.safeValue (currenciesByNumericId, currencyId); const code = (currency === undefined) ? currencyId : currency['code']; const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchPosition (symbol, params = undefined) { @@ -849,7 +849,7 @@ module.exports = class delta extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPositionsMargined (params); // @@ -930,20 +930,12 @@ module.exports = class delta extends Exchange { const side = this.safeString (order, 'side'); let type = this.safeString (order, 'order_type'); type = type.replace ('_order', ''); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'unfilled_size'); - let filled = undefined; - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let cost = undefined; - const average = this.safeFloat (order, 'average_fill_price'); - if ((average !== undefined) && filled) { - cost = average * filled; - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'unfilled_size'); + const average = this.safeNumber (order, 'average_fill_price'); let fee = undefined; - const feeCost = this.safeFloat (order, 'paid_commission'); + const feeCost = this.safeNumber (order, 'paid_commission'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -956,7 +948,7 @@ module.exports = class delta extends Exchange { 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -968,14 +960,14 @@ module.exports = class delta extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1374,9 +1366,9 @@ module.exports = class delta extends Exchange { const currenciesByNumericId = this.safeValue (this.options, 'currenciesByNumericId'); currency = this.safeValue (currenciesByNumericId, currencyId, currency); const code = (currency === undefined) ? undefined : currency['code']; - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'created_at')); - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const before = Math.max (0, after - amount); const status = 'ok'; return { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/deribit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/deribit.js index f277c3975..1a7c91bec 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/deribit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/deribit.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -435,8 +436,8 @@ module.exports = class deribit extends Exchange { const future = (type === 'future'); const option = (type === 'option'); const active = this.safeValue (market, 'is_active'); - const minTradeAmount = this.safeFloat (market, 'min_trade_amount'); - const tickSize = this.safeFloat (market, 'tick_size'); + const minTradeAmount = this.safeNumber (market, 'min_trade_amount'); + const tickSize = this.safeNumber (market, 'tick_size'); const precision = { 'amount': minTradeAmount, 'price': tickSize, @@ -448,8 +449,8 @@ module.exports = class deribit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_commission'), - 'maker': this.safeFloat (market, 'maker_commission'), + 'taker': this.safeNumber (market, 'taker_commission'), + 'maker': this.safeNumber (market, 'maker_commission'), 'limits': { 'amount': { 'min': minTradeAmount, @@ -532,11 +533,11 @@ module.exports = class deribit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const currencyCode = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableFunds'); - account['used'] = this.safeFloat (balance, 'maintenanceMargin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'maintenanceMargin'); + account['total'] = this.safeString (balance, 'equity'); result[currencyCode] = account; - return this.parseBalance (result); + return this.parseBalance (result, false); } async createDepositAddress (code, params = {}) { @@ -654,18 +655,18 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger2 (ticker, 'timestamp', 'creation_timestamp'); const marketId = this.safeString (ticker, 'instrument_name'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat2 (ticker, 'last_price', 'last'); + const last = this.safeNumber2 (ticker, 'last_price', 'last'); const stats = this.safeValue (ticker, 'stats', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (stats, 'high', 'max_price'), - 'low': this.safeFloat2 (stats, 'low', 'min_price'), - 'bid': this.safeFloat2 (ticker, 'best_bid_price', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_amount'), - 'ask': this.safeFloat2 (ticker, 'best_ask_price', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_amount'), + 'high': this.safeNumber2 (stats, 'high', 'max_price'), + 'low': this.safeNumber2 (stats, 'low', 'min_price'), + 'bid': this.safeNumber2 (ticker, 'best_bid_price', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_amount'), + 'ask': this.safeNumber2 (ticker, 'best_ask_price', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_amount'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -675,7 +676,7 @@ module.exports = class deribit extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (stats, 'volume'), + 'quoteVolume': this.safeNumber (stats, 'volume'), 'info': ticker, }; } @@ -862,21 +863,18 @@ module.exports = class deribit extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const liquidity = this.safeString (trade, 'liquidity'); let takerOrMaker = undefined; if (liquidity !== undefined) { // M = maker, T = taker, MT = both takerOrMaker = (liquidity === 'M') ? 'maker' : 'taker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -1056,31 +1054,21 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger (order, 'creation_timestamp'); const lastUpdate = this.safeInteger (order, 'last_update_timestamp'); const id = this.safeString (order, 'order_id'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); let lastTradeTimestamp = undefined; if (filled !== undefined) { if (filled > 0) { lastTradeTimestamp = lastUpdate; } } - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = price * filled; - } - } const status = this.parseOrderStatus (this.safeString (order, 'order_state')); const marketId = this.safeString (order, 'instrument_name'); market = this.safeMarket (marketId, market); const side = this.safeStringLower (order, 'direction'); - let feeCost = this.safeFloat (order, 'commission'); + let feeCost = this.safeNumber (order, 'commission'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); @@ -1098,7 +1086,7 @@ module.exports = class deribit extends Exchange { const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); const stopPrice = this.safeValue (order, 'stop_price'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1113,14 +1101,14 @@ module.exports = class deribit extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1197,7 +1185,7 @@ module.exports = class deribit extends Exchange { } } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price or stopPrice param for a ' + type + ' order'); } else { @@ -1596,7 +1584,7 @@ module.exports = class deribit extends Exchange { const updated = this.safeInteger (transaction, 'updated_timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let type = 'deposit'; let fee = undefined; if (feeCost !== undefined) { @@ -1619,7 +1607,7 @@ module.exports = class deribit extends Exchange { 'tagTo': undefined, 'tagFrom': undefined, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -1665,7 +1653,7 @@ module.exports = class deribit extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.codeFromOptions ('fetchPositions'); const currency = this.currency (code); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/digifinex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/digifinex.js index 6584b919c..528126688 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/digifinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/digifinex.js @@ -3,7 +3,8 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); -const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -61,11 +62,6 @@ module.exports = class digifinex extends Exchange { 'referral': 'https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp', }, 'api': { - 'v2': { - 'get': [ - 'ticker', - ], - }, 'public': { 'get': [ '{market}/symbols', @@ -191,6 +187,7 @@ module.exports = class digifinex extends Exchange { }, 'commonCurrencies': { 'BHT': 'Black House Test', + 'EPS': 'Epanus', 'MBN': 'Mobilian Coin', 'TEL': 'TEL666', }, @@ -245,7 +242,7 @@ module.exports = class digifinex extends Exchange { const depositStatus = this.safeValue (currency, 'deposit_status', 1); const withdrawStatus = this.safeValue (currency, 'withdraw_status', 1); const active = depositStatus && withdrawStatus; - const fee = this.safeFloat (currency, 'withdraw_fee_rate'); + const fee = this.safeNumber (currency, 'withdraw_fee_rate'); if (code in result) { if (Array.isArray (result[code]['info'])) { result[code]['info'].push (currency); @@ -276,7 +273,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw_amount'), + 'min': this.safeNumber (currency, 'min_withdraw_amount'), 'max': undefined, }, }, @@ -330,7 +327,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), 'max': undefined, }, 'price': { @@ -338,7 +335,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), + 'min': this.safeNumber (market, 'minimum_value'), 'max': undefined, }, }; @@ -352,7 +349,7 @@ module.exports = class digifinex extends Exchange { // const status = this.safeString (market, 'status'); // const active = (status === 'TRADING'); // - const isAllowed = this.safeValue (market, 'is_allow', 1); + const isAllowed = this.safeInteger (market, 'is_allow', 1); const active = isAllowed ? true : false; const type = 'spot'; const spot = (type === 'spot'); @@ -408,7 +405,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), + 'min': this.safeNumber (market, 'min_volume'), 'max': undefined, }, 'price': { @@ -416,7 +413,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, }; @@ -461,12 +458,12 @@ module.exports = class digifinex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -500,87 +497,67 @@ module.exports = class digifinex extends Exchange { } async fetchTickers (symbols = undefined, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTickers() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); - const request = { - 'apiKey': apiKey, - }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (params); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const result = {}; - const tickers = this.safeValue (response, 'ticker', {}); + const tickers = this.safeValue (response, 'ticker', []); const date = this.safeInteger (response, 'date'); - const reversedMarketIds = Object.keys (tickers); - for (let i = 0; i < reversedMarketIds.length; i++) { - const reversedMarketId = reversedMarketIds[i]; - const ticker = this.extend ({ + for (let i = 0; i < tickers.length; i++) { + const rawTicker = this.extend ({ 'date': date, - }, tickers[reversedMarketId]); - const [ quoteId, baseId ] = reversedMarketId.split ('_'); - const marketId = baseId.toUpperCase () + '_' + quoteId.toUpperCase (); - const market = this.safeMarket (marketId, undefined, '_'); - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); + }, tickers[i]); + const ticker = this.parseTicker (rawTicker); + const symbol = ticker['symbol']; + result[symbol] = ticker; } return this.filterByArray (result, 'symbol', symbols); } async fetchTicker (symbol, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTicker() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); const market = this.market (symbol); - // reversed base/quote in v2 - const marketId = market['quoteId'].toLowerCase () + '_' + market['baseId'].toLowerCase (); const request = { - 'symbol': marketId, - 'apiKey': apiKey, + 'symbol': market['id'], }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (this.extend (request, params)); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const date = this.safeInteger (response, 'date'); - const ticker = this.safeValue (response, 'ticker', {}); - let result = this.safeValue (ticker, marketId, {}); - result = this.extend ({ 'date': date }, result); + const tickers = this.safeValue (response, 'ticker', []); + const firstTicker = this.safeValue (tickers, 0, {}); + const result = this.extend ({ 'date': date }, firstTicker); return this.parseTicker (result, market); } @@ -590,6 +567,7 @@ module.exports = class digifinex extends Exchange { // // { // "last":0.021957, + // "symbol": "btc_usdt", // "base_vol":2249.3521732227, // "change":-0.6, // "vol":102443.5111, @@ -600,22 +578,20 @@ module.exports = class digifinex extends Exchange { // "date"1564518452, // injected from fetchTicker/fetchTickers // } // - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeStringUpper (ticker, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -625,8 +601,8 @@ module.exports = class digifinex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'base_vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'base_vol'), 'info': ticker, }; } @@ -662,18 +638,15 @@ module.exports = class digifinex extends Exchange { const orderId = this.safeString (trade, 'order_id'); const timestamp = this.safeTimestamp2 (trade, 'date', 'timestamp'); const side = this.safeString2 (trade, 'type', 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); const takerOrMaker = this.safeValue (trade, 'is_maker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -775,11 +748,11 @@ module.exports = class digifinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 5), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 1), // volume + this.safeNumber (ohlcv, 5), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 1), // volume ]; } @@ -970,21 +943,11 @@ module.exports = class digifinex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_price'); - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - return { + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1000,13 +963,13 @@ module.exports = class digifinex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'average': average, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1200,7 +1163,7 @@ module.exports = class digifinex extends Exchange { const code = this.safeCurrencyCode (this.safeString (item, 'currency_mark'), currency); const timestamp = this.safeTimestamp (item, 'time'); const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -1263,16 +1226,6 @@ module.exports = class digifinex extends Exchange { return this.parseLedger (items, currency, since, limit); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -1425,8 +1378,8 @@ module.exports = class digifinex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_date')); const updated = this.parse8601 (this.safeString (transaction, 'finished_date')); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -1476,7 +1429,7 @@ module.exports = class digifinex extends Exchange { } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const version = (api === 'v2') ? api : this.version; + const version = this.version; let url = this.urls['api'] + '/' + version + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); const urlencoded = this.urlencode (this.keysort (query)); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/dsx.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/dsx.js deleted file mode 100644 index 349fc2489..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/dsx.js +++ /dev/null @@ -1,1274 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, BadRequest, InsufficientFunds, PermissionDenied, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class dsx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'dsx', - 'name': 'DSX', - 'countries': [ 'UK' ], - 'rateLimit': 1500, - 'version': 'v3', - 'has': { - 'cancelOrder': true, - 'CORS': false, - 'createDepositAddress': true, - 'createMarketOrder': false, - 'createOrder': true, - 'fetchBalance': true, - 'fetchClosedOrders': false, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOHLCV': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchOrderBooks': true, - 'fetchOrders': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTransactions': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg', - 'api': { - 'public': 'https://dsxglobal.com/mapi', // market data - 'private': 'https://dsxglobal.com/tapi', // trading - 'dwapi': 'https://dsxglobal.com/dwapi', // deposit/withdraw - }, - 'www': 'https://dsxglobal.com', - 'doc': [ - 'https://dsxglobal.com/developers/publicApi', - ], - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'maker': 0.15 / 100, - 'taker': 0.25 / 100, - }, - }, - 'timeframes': { - '1m': 'm', - '1h': 'h', - '1d': 'd', - }, - 'api': { - // market data (public) - 'public': { - 'get': [ - 'barsFromMoment/{pair}/{period}/{start}', - 'depth/{pair}', - 'info', - 'lastBars/{pair}/{period}/{amount}', // period is 'm', 'h' or 'd' - 'periodBars/{pair}/{period}/{start}/{end}', - 'ticker/{pair}', - 'trades/{pair}', - ], - }, - // trading (private) - 'private': { - 'post': [ - 'info/account', - 'history/transactions', - 'history/trades', - 'history/orders', - 'orders', - 'order/cancel', - // 'order/cancel/all', - 'order/status', - 'order/new', - 'volume', - 'fees', // trading fee schedule - ], - }, - // deposit / withdraw (private) - 'dwapi': { - 'post': [ - 'deposit/cryptoaddress', - 'withdraw/crypto', - 'withdraw/fiat', - 'withdraw/submit', - // 'withdraw/cancel', - 'transaction/status', // see 'history/transactions' in private tapi above - ], - }, - }, - 'exceptions': { - 'exact': { - 'Sign is invalid': AuthenticationError, // {"success":0,"error":"Sign is invalid"} - 'Order was rejected. Incorrect price.': InvalidOrder, // {"success":0,"error":"Order was rejected. Incorrect price."} - "Order was rejected. You don't have enough money.": InsufficientFunds, // {"success":0,"error":"Order was rejected. You don't have enough money."} - 'This method is blocked for your pair of keys': PermissionDenied, // {"success":0,"error":"This method is blocked for your pair of keys"} - }, - 'broad': { - 'INVALID_PARAMETER': BadRequest, - 'Invalid pair name': ExchangeError, // {"success":0,"error":"Invalid pair name: btc_eth"} - 'invalid api key': AuthenticationError, - 'invalid sign': AuthenticationError, - 'api key dont have trade permission': AuthenticationError, - 'invalid parameter': InvalidOrder, - 'invalid order': InvalidOrder, - 'Requests too often': DDoSProtection, - 'not available': ExchangeNotAvailable, - 'data unavailable': ExchangeNotAvailable, - 'external service unavailable': ExchangeNotAvailable, - 'nonce is invalid': InvalidNonce, // {"success":0,"error":"Parameter: nonce is invalid"} - 'Incorrect volume': InvalidOrder, // {"success": 0,"error":"Order was rejected. Incorrect volume."} - }, - }, - 'options': { - 'fetchTickersMaxLength': 250, - }, - 'commonCurrencies': { - 'DSH': 'DASH', - }, - }); - } - - async fetchMarkets (params = {}) { - const response = await this.publicGetInfo (params); - // - // { - // "server_time": 1522057909, - // "pairs": { - // "ethusd": { - // "decimal_places": 5, - // "min_price": 100, - // "max_price": 1500, - // "min_amount": 0.01, - // "hidden": 0, - // "fee": 0, - // "amount_decimal_places": 4, - // "quoted_currency": "USD", - // "base_currency": "ETH" - // } - // } - // } - // - const markets = this.safeValue (response, 'pairs'); - const keys = Object.keys (markets); - const result = []; - for (let i = 0; i < keys.length; i++) { - const id = keys[i]; - const market = markets[id]; - const baseId = this.safeString (market, 'base_currency'); - const quoteId = this.safeString (market, 'quoted_currency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const precision = { - 'amount': this.safeInteger (market, 'decimal_places'), - 'price': this.safeInteger (market, 'decimal_places'), - }; - const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), - }; - const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), - }; - const costLimits = { - 'min': this.safeFloat (market, 'min_total'), - }; - const limits = { - 'amount': amountLimits, - 'price': priceLimits, - 'cost': costLimits, - }; - const hidden = this.safeInteger (market, 'hidden'); - const active = (hidden === 0); - // see parseMarket below - // https://github.com/ccxt/ccxt/pull/5786 - const otherId = base.toLowerCase () + quote.toLowerCase (); - result.push ({ - 'id': id, - 'otherId': otherId, // https://github.com/ccxt/ccxt/pull/5786 - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': active, - 'precision': precision, - 'limits': limits, - 'info': market, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostInfoAccount (); - // - // { - // "success" : 1, - // "return" : { - // "funds" : { - // "BTC" : { - // "total" : 0, - // "available" : 0 - // }, - // "USD" : { - // "total" : 0, - // "available" : 0 - // }, - // "USDT" : { - // "total" : 0, - // "available" : 0 - // } - // }, - // "rights" : { - // "info" : 1, - // "trade" : 1 - // }, - // "transactionCount" : 0, - // "openOrders" : 0, - // "serverTime" : 1537451465 - // } - // } - // - const balances = this.safeValue (response, 'return'); - const result = { 'info': response }; - const funds = this.safeValue (balances, 'funds'); - const currencyIds = Object.keys (funds); - for (let i = 0; i < currencyIds.length; i++) { - const currencyId = currencyIds[i]; - const code = this.safeCurrencyCode (currencyId); - const balance = this.safeValue (funds, currencyId, {}); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseTicker (ticker, market = undefined) { - // - // { high: 0.03492, - // low: 0.03245, - // avg: 29.46133, - // vol: 500.8661, - // vol_cur: 17.000797104, - // last: 0.03364, - // buy: 0.03362, - // sell: 0.03381, - // updated: 1537521993, - // pair: "ethbtc" } - // - const timestamp = this.safeTimestamp (ticker, 'updated'); - let symbol = undefined; - const marketId = this.safeString (ticker, 'pair'); - market = this.parseMarket (marketId); - if (market !== undefined) { - symbol = market['symbol']; - } - // dsx average is inverted, liqui average is not - let average = this.safeFloat (ticker, 'avg'); - if (average !== undefined) { - if (average > 0) { - average = 1 / average; - } - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_cur'), - 'info': ticker, - }; - } - - parseTrade (trade, market = undefined) { - // - // fetchTrades (public) - // - // { - // "amount" : 0.0128, - // "price" : 6483.99000, - // "timestamp" : 1540334614, - // "tid" : 35684364, - // "type" : "ask" - // } - // - // fetchMyTrades (private) - // - // { - // "number": "36635882", // <-- this is present if the trade has come from the '/order/status' call - // "id": "36635882", // <-- this may have been artifically added by the parseTrades method - // "pair": "btcusd", - // "type": "buy", - // "volume": 0.0595, - // "rate": 9750, - // "orderId": 77149299, - // "timestamp": 1519612317, - // "commission": 0.00020825, - // "commissionCurrency": "btc" - // } - // - const timestamp = this.safeTimestamp (trade, 'timestamp'); - let side = this.safeString (trade, 'type'); - if (side === 'ask') { - side = 'sell'; - } else if (side === 'bid') { - side = 'buy'; - } - const price = this.safeFloat2 (trade, 'rate', 'price'); - const id = this.safeString2 (trade, 'number', 'id'); - const orderId = this.safeString (trade, 'orderId'); - const marketId = this.safeString (trade, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const amount = this.safeFloat2 (trade, 'amount', 'volume'); - const type = 'limit'; // all trades are still limit trades - let takerOrMaker = undefined; - let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const isYourOrder = this.safeValue (trade, 'is_your_order'); - if (isYourOrder !== undefined) { - takerOrMaker = 'taker'; - if (isYourOrder) { - takerOrMaker = 'maker'; - } - if (fee === undefined) { - fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); - } - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - return { - 'id': id, - 'order': orderId, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': type, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - 'info': trade, - }; - } - - parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - let result = []; - if (Array.isArray (trades)) { - for (let i = 0; i < trades.length; i++) { - result.push (this.parseTrade (trades[i], market)); - } - } else { - const ids = Object.keys (trades); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const trade = this.parseTrade (trades[id], market); - result.push (this.extend (trade, { 'id': id }, params)); - } - } - result = this.sortBy (result, 'timestamp'); - const symbol = (market !== undefined) ? market['symbol'] : undefined; - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const market_id_in_reponse = (market['id'] in response); - if (!market_id_in_reponse) { - throw new ExchangeError (this.id + ' ' + market['symbol'] + ' order book is empty or not available'); - } - const orderbook = response[market['id']]; - return this.parseOrderBook (orderbook); - } - - async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let ids = undefined; - if (symbols === undefined) { - ids = this.ids.join ('-'); - // max URL length is 2083 symbols, including http schema, hostname, tld, etc... - if (ids.length > 2048) { - const numIds = this.ids.length; - throw new ExchangeError (this.id + ' has ' + numIds.toString () + ' symbols exceeding max URL length, you are required to specify a list of symbols in the first argument to fetchOrderBooks'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const result = {}; - ids = Object.keys (response); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let symbol = id; - if (id in this.markets_by_id) { - const market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseOrderBook (response[id]); - } - return result; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - let ids = this.ids; - if (symbols === undefined) { - const numIds = ids.length; - ids = ids.join ('-'); - const maxLength = this.safeInteger (this.options, 'fetchTickersMaxLength', 2048); - // max URL length is 2048 symbols, including http schema, hostname, tld, etc... - if (ids.length > this.options['fetchTickersMaxLength']) { - throw new ArgumentsRequired (this.id + ' has ' + numIds.toString () + ' markets exceeding max URL length for this endpoint (' + maxLength.toString () + ' characters), please, specify a list of symbols of interest in the first argument to fetchTickers'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - const tickers = await this.publicGetTickerPair (this.extend (request, params)); - // - // { - // "bchbtc" : { - // "high" : 0.02989, - // "low" : 0.02736, - // "avg" : 33.90585, - // "vol" : 0.65982205, - // "vol_cur" : 0.0194604180960, - // "last" : 0.03000, - // "buy" : 0.02980, - // "sell" : 0.03001, - // "updated" : 1568104614, - // "pair" : "bchbtc" - // }, - // "ethbtc" : { - // "high" : 0.01772, - // "low" : 0.01742, - // "avg" : 56.89082, - // "vol" : 229.247115044, - // "vol_cur" : 4.02959737298943, - // "last" : 0.01769, - // "buy" : 0.01768, - // "sell" : 0.01776, - // "updated" : 1568104614, - // "pair" : "ethbtc" - // } - // } - // - const result = {}; - const keys = Object.keys (tickers); - for (let k = 0; k < keys.length; k++) { - const id = keys[k]; - const ticker = tickers[id]; - let symbol = id; - let market = undefined; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseTicker (ticker, market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - const tickers = await this.fetchTickers ([ symbol ], params); - return tickers[symbol]; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; - } - const response = await this.publicGetTradesPair (this.extend (request, params)); - if (Array.isArray (response)) { - const numElements = response.length; - if (numElements === 0) { - return []; - } - } - return this.parseTrades (response[market['id']], market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // } - // - return [ - this.safeInteger (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - 'period': this.timeframes[timeframe], - }; - let method = 'publicGetLastBarsPairPeriodAmount'; - if (since === undefined) { - if (limit === undefined) { - limit = 100; // required, max 2000 - } - request['amount'] = limit; - } else { - method = 'publicGetPeriodBarsPairPeriodStartEnd'; - // in their docs they expect milliseconds - // but it returns empty arrays with milliseconds - // however, it does work properly with seconds - request['start'] = parseInt (since / 1000); - if (limit === undefined) { - request['end'] = this.seconds (); - } else { - const duration = this.parseTimeframe (timeframe) * 1000; - const end = this.sum (since, duration * limit); - request['end'] = parseInt (end / 1000); - } - } - const response = await this[method] (this.extend (request, params)); - // - // { - // "ethbtc": [ - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // }, - // { - // "high" : 0.01967, - // "open" : 0.01967, - // "low" : 0.01967, - // "close" : 0.01967, - // "amount" : 0, - // "timestamp" : 1565155680000 - // } - // ] - // } - // - const candles = this.safeValue (response, market['id'], []); - return this.parseOHLCVs (candles, market, timeframe, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (type === 'market' && price === undefined) { - throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument even for market orders, that is the worst price that you agree to fill your order for'); - } - const request = { - 'pair': market['id'], - 'type': side, - 'volume': this.amountToPrecision (symbol, amount), - 'rate': this.priceToPrecision (symbol, price), - 'orderType': type, - }; - price = parseFloat (price); - amount = parseFloat (amount); - const response = await this.privatePostOrderNew (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "received": 0, - // "remains": 10, - // "funds": { - // "BTC": { - // "total": 100, - // "available": 95 - // }, - // "USD": { - // "total": 10000, - // "available": 9995 - // }, - // "EUR": { - // "total": 1000, - // "available": 995 - // }, - // "LTC": { - // "total": 1000, - // "available": 995 - // } - // }, - // "orderId": 0, // https://github.com/ccxt/ccxt/issues/3677 - // } - // } - // - let status = 'open'; - let filled = 0.0; - let remaining = amount; - const responseReturn = this.safeValue (response, 'return'); - let id = this.safeString2 (responseReturn, 'orderId', 'order_id'); - if (id === '0') { - id = this.safeString (responseReturn, 'initOrderId', 'init_order_id'); - status = 'closed'; - } - filled = this.safeFloat (responseReturn, 'received', 0.0); - remaining = this.safeFloat (responseReturn, 'remains', amount); - const timestamp = this.milliseconds (); - return { - 'info': response, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'side': side, - 'price': price, - 'cost': price * filled, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'fee': undefined, - // 'trades': this.parseTrades (order['trades'], market), - }; - } - - parseOrderStatus (status) { - const statuses = { - '0': 'open', // Active - '1': 'closed', // Filled - '2': 'canceled', // Killed - '3': 'canceling', // Killing - '7': 'canceled', // Rejected - }; - return this.safeString (statuses, status, status); - } - - parseMarket (id) { - if (id in this.markets_by_id) { - return this.markets_by_id[id]; - } else { - // the following is a fix for - // https://github.com/ccxt/ccxt/pull/5786 - // https://github.com/ccxt/ccxt/issues/5770 - let markets_by_other_id = this.safeValue (this.options, 'markets_by_other_id'); - if (markets_by_other_id === undefined) { - this.options['markets_by_other_id'] = this.indexBy (this.markets, 'otherId'); - markets_by_other_id = this.options['markets_by_other_id']; - } - if (id in markets_by_other_id) { - return markets_by_other_id[id]; - } - } - return undefined; - } - - parseOrder (order, market = undefined) { - // - // fetchOrder - // - // { - // "number": 36635882, - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // - const id = this.safeString (order, 'id'); - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const timestamp = this.safeTimestamp (order, 'timestampCreated'); - const marketId = this.safeString (order, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const remaining = this.safeFloat (order, 'remainingVolume'); - const amount = this.safeFloat (order, 'volume'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } - } - const orderType = this.safeString (order, 'orderType'); - const side = this.safeString (order, 'type'); - let fee = undefined; - const deals = this.safeValue (order, 'deals', []); - const numDeals = deals.length; - let trades = undefined; - let lastTradeTimestamp = undefined; - if (numDeals > 0) { - trades = this.parseTrades (deals); - let feeCost = undefined; - let feeCurrency = undefined; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - if (feeCost === undefined) { - feeCost = 0; - } - feeCost = this.sum (feeCost, trade['fee']['cost']); - feeCurrency = trade['fee']['currency']; - lastTradeTimestamp = trade['timestamp']; - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'type': orderType, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': undefined, - 'cost': cost, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'status': status, - 'fee': fee, - 'trades': trades, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': parseInt (id), - }; - const response = await this.privatePostOrderStatus (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // } - // - return this.parseOrder (this.extend ({ - 'id': id, - }, response['return'])); - } - - parseOrdersById (orders, symbol = undefined, since = undefined, limit = undefined) { - const ids = Object.keys (orders); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.parseOrder (this.extend ({ - 'id': id.toString (), - }, orders[id])); - result.push (order); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - const response = await this.privatePostOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': id, - }; - const response = await this.privatePostOrderCancel (this.extend (request, params)); - return response; - } - - parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { - const result = []; - const ids = Object.keys (orders); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.extend ({ 'id': id }, orders[id]); - result.push (this.extend (this.parseOrder (order, market), params)); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - const orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterBy (orders, 'status', 'closed'); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let market = undefined; - // some derived classes use camelcase notation for request fields - const request = { - // 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field) - // 'count': 1000, // the number of trades for display numerical, default = 1000 - // 'from_id': trade ID, from which the display starts numerical 0 - // 'end_id': trade ID on which the display ends numerical ∞ - // 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last) - // 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field) - // 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field) - // 'pair': 'eth_btc', // default = all markets - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['pair'] = market['id']; - } - if (limit !== undefined) { - request['count'] = parseInt (limit); - } - if (since !== undefined) { - request['since'] = parseInt (since / 1000); - } - const response = await this.privatePostHistoryTrades (this.extend (request, params)); - let trades = []; - if ('return' in response) { - trades = response['return']; - } - return this.parseTrades (trades, market, since, limit); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let currency = undefined; - const request = {}; - if (code !== undefined) { - currency = this.currency (code); - request['currency'] = currency['id']; - } - if (since !== undefined) { - request['since'] = since; - } - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryTransactions (this.extend (request, params)); - // - // { - // "success": 1, - // "return": [ - // { - // "id": 1, - // "timestamp": 11, - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // ] - // } - // - const transactions = this.safeValue (response, 'return', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - '1': 'failed', - '2': 'ok', - '3': 'pending', - '4': 'failed', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // "id": 1, - // "timestamp": 11, // 11 in their docs ( - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // - const timestamp = this.safeTimestamp (transaction, 'timestamp'); - let type = this.safeString (transaction, 'type'); - if (type !== undefined) { - if (type === 'Incoming') { - type = 'deposit'; - } else if (type === 'Withdraw') { - type = 'withdrawal'; - } - } - const currencyId = this.safeString (transaction, 'currency'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - return { - 'id': this.safeString (transaction, 'id'), - 'txid': this.safeString (transaction, 'txid'), - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'address': this.safeString (transaction, 'address'), - 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), - 'currency': code, - 'status': status, - 'fee': { - 'currency': code, - 'cost': this.safeFloat (transaction, 'commission'), - 'rate': undefined, - }, - 'info': transaction, - }; - } - - async createDepositAddress (code, params = {}) { - const request = { - 'new': 1, - }; - const response = await this.fetchDepositAddress (code, this.extend (request, params)); - return response; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency': currency['id'], - }; - const response = await this.dwapiPostDepositCryptoaddress (this.extend (request, params)); - const result = this.safeValue (response, 'return', {}); - const address = this.safeString (result, 'address'); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, // not documented in DSX API - 'info': response, - }; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - const commission = this.safeValue (params, 'commission'); - if (commission === undefined) { - throw new ArgumentsRequired (this.id + ' withdraw() requires a `commission` (withdrawal fee) parameter (string)'); - } - params = this.omit (params, commission); - const request = { - 'currency': currency['id'], - 'amount': parseFloat (amount), - 'address': address, - 'commission': commission, - }; - if (tag !== undefined) { - request['address'] += ':' + tag; - } - const response = await this.dwapiPostWithdrawCrypto (this.extend (request, params)); - // - // [ - // { - // "success": 1, - // "return": { - // "transactionId": 2863073 - // } - // } - // ] - // - const data = this.safeValue (response, 'return', {}); - const id = this.safeString (data, 'transactionId'); - return { - 'info': response, - 'id': id, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'][api]; - const query = this.omit (params, this.extractParams (path)); - if (api === 'private' || api === 'dwapi') { - url += '/' + this.version + '/' + this.implodeParams (path, params); - this.checkRequiredCredentials (); - const nonce = this.nonce (); - body = this.urlencode (this.extend ({ - 'nonce': nonce, - }, query)); - const signature = this.hmac (this.encode (body), this.encode (this.secret), 'sha512', 'base64'); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': signature, - }; - } else if (api === 'public') { - url += '/' + this.implodeParams (path, params); - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - url += '/' + this.implodeParams (path, params); - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - if (Object.keys (query).length) { - body = this.json (query); - headers = { - 'Content-Type': 'application/json', - }; - } - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - if ('success' in response) { - // - // 1 - Liqui only returns the integer 'success' key from their private API - // - // { "success": 1, ... } httpCode === 200 - // { "success": 0, ... } httpCode === 200 - // - // 2 - However, exchanges derived from Liqui, can return non-integers - // - // It can be a numeric string - // { "sucesss": "1", ... } - // { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc) - // - // Or just a string - // { "success": "true", ... } - // { "success": "false", ... }, httpCode >= 200 - // - // Or a boolean - // { "success": true, ... } - // { "success": false, ... }, httpCode >= 200 - // - // 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types - // - // 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui - // - // To cover points 1, 2, 3 and 4 combined this handler should work like this: - // - let success = this.safeValue (response, 'success', false); - if (typeof success === 'string') { - if ((success === 'true') || (success === '1')) { - success = true; - } else { - success = false; - } - } - if (!success) { - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'error'); - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/equos.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/equos.js index 5dc44a2ac..0b90d79ed 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/equos.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/equos.js @@ -221,7 +221,7 @@ module.exports = class equos extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeVol'), + 'min': this.safeNumber (market, 'minTradeVol'), 'max': undefined, }, 'price': { @@ -287,7 +287,7 @@ module.exports = class equos extends Exchange { const name = this.safeString (currency, 6); const status = this.safeInteger (currency, 4); const active = (status === 1); - const fee = this.safeFloat (currency, 5); // withdraw_fee + const fee = this.safeNumber (currency, 5); // withdraw_fee return { 'id': id, 'info': currency, @@ -379,8 +379,8 @@ module.exports = class equos extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); return [ this.convertFromScale (price, market['precision']['price']), this.convertFromScale (amount, market['precision']['amount']), @@ -526,9 +526,9 @@ module.exports = class equos extends Exchange { orderId = this.safeString (trade, 'orderId'); side = this.safeStringLower (trade, 'side'); type = this.parseOrderType (this.safeString (trade, 'ordType')); - price = this.safeFloat (trade, 'lastPx'); - amount = this.safeFloat (trade, 'quoteQty'); - let feeCost = this.safeFloat (trade, 'commission'); + price = this.safeNumber (trade, 'lastPx'); + amount = this.safeNumber (trade, 'quoteQty'); + let feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { feeCost = -feeCost; const feeCurrencyId = this.safeString (trade, 'commCurrency'); @@ -599,8 +599,8 @@ module.exports = class equos extends Exchange { if (assetType === 'ASSET') { const currencyId = this.safeString (position, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const quantity = this.safeFloat (position, 'quantity'); - const availableQuantity = this.safeFloat (position, 'availableQuantity'); + const quantity = this.safeNumber (position, 'quantity'); + const availableQuantity = this.safeNumber (position, 'availableQuantity'); const scale = this.safeInteger (position, 'quantity_scale'); const account = this.account (); account['free'] = this.convertFromScale (availableQuantity, scale); @@ -646,7 +646,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -743,7 +743,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -1116,7 +1116,7 @@ module.exports = class equos extends Exchange { address = undefined; } const type = this.safeString (transaction, 'type'); - let amount = this.safeFloat (transaction, 'balance_change'); + let amount = this.safeNumber (transaction, 'balance_change'); if (amount === undefined) { amount = this.safeInteger (transaction, 'quantity'); const amountScale = this.safeInteger (transaction, 'quantity_scale'); @@ -1199,8 +1199,8 @@ module.exports = class equos extends Exchange { for (let i = 0; i < tradingFees.length; i++) { const tradingFee = tradingFees[i]; if (this.safeString (tradingFee, 'tier') !== undefined) { - taker[tradingFee['tier']] = this.safeFloat (tradingFee, 'taker'); - maker[tradingFee['tier']] = this.safeFloat (tradingFee, 'maker'); + taker[tradingFee['tier']] = this.safeNumber (tradingFee, 'taker'); + maker[tradingFee['tier']] = this.safeNumber (tradingFee, 'maker'); } } return { @@ -1331,28 +1331,6 @@ module.exports = class equos extends Exchange { let remaining = this.safeInteger (order, 'leavesQty'); const remainingScale = this.safeInteger (order, 'leavesQty_scale'); remaining = this.convertFromScale (remaining, remainingScale); - if (remaining <= 0) { - if ((filled !== undefined) && (amount !== undefined) && (filled < amount)) { - remaining = undefined; - } - } - if ((remaining === undefined) && (amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0); - } - let average = this.safeInteger (order, 'price', 0); - if (average === 0) { - average = undefined; - } - const averageScale = this.safeInteger (order, 'price_scale'); - average = this.convertFromScale (average, averageScale); - let cost = undefined; - if (filled !== 0) { - if (average > 0) { - cost = average * filled; - } else if (price > 0) { - cost = price * filled; - } - } let fee = undefined; const currencyId = this.safeInteger (order, 'feeInstrumentId'); const feeCurrencyCode = this.safeCurrencyCode (currencyId); @@ -1375,7 +1353,7 @@ module.exports = class equos extends Exchange { } const stopPriceScale = this.safeInteger (order, 'stopPx_scale', 0); const stopPrice = this.convertFromScale (this.safeInteger (order, 'stopPx'), stopPriceScale); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1390,14 +1368,14 @@ module.exports = class equos extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/eterbase.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/eterbase.js index 40d2893d3..531327d1d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/eterbase.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/eterbase.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, InvalidOrder, ExchangeError, BadRequest, BadSymbol } = require ('./base/errors'); const { TRUNCATE, SIGNIFICANT_DIGITS } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -217,7 +218,7 @@ module.exports = class eterbase extends Exchange { const rule = rules[i]; const attribute = this.safeString (rule, 'attribute'); const condition = this.safeString (rule, 'condition'); - const value = this.safeFloat (rule, 'value'); + const value = this.safeNumber (rule, 'value'); if ((attribute === 'Qty') && (condition === 'Min')) { minAmount = value; } else if ((attribute === 'Qty') && (condition === 'Max')) { @@ -307,7 +308,7 @@ module.exports = class eterbase extends Exchange { 'type': type, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -323,8 +324,8 @@ module.exports = class eterbase extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMin'), - 'max': this.safeFloat (currency, 'withdrawalMax'), + 'min': this.safeNumber (currency, 'withdrawalMin'), + 'max': this.safeNumber (currency, 'withdrawalMax'), }, }, }; @@ -351,17 +352,17 @@ module.exports = class eterbase extends Exchange { const marketId = this.safeString (ticker, 'marketId'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const last = this.safeFloat (ticker, 'price'); - const baseVolume = this.safeFloat (ticker, 'volumeBase'); - const quoteVolume = this.safeFloat (ticker, 'volume'); + const last = this.safeNumber (ticker, 'price'); + const baseVolume = this.safeNumber (ticker, 'volumeBase'); + const quoteVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const percentage = this.safeFloat (ticker, 'change'); + const percentage = this.safeNumber (ticker, 'change'); const result = { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -403,14 +404,6 @@ module.exports = class eterbase extends Exchange { return this.parseTicker (response, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { @@ -465,10 +458,12 @@ module.exports = class eterbase extends Exchange { // "filledAt": 1556355722341 // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -477,9 +472,9 @@ module.exports = class eterbase extends Exchange { 'currency': feeCurrencyCode, }; } - let cost = this.safeFloat (trade, 'qty'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + let cost = this.safeNumber (trade, 'qty'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger2 (trade, 'executedAt', 'filledAt'); const tradeSide = this.safeString (trade, 'side'); @@ -577,11 +572,11 @@ module.exports = class eterbase extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -644,14 +639,13 @@ module.exports = class eterbase extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetId'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'reserved'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -778,18 +772,18 @@ module.exports = class eterbase extends Exchange { } else { type = 'stoplimit'; } - let price = this.safeFloat (order, 'limitPrice'); - const amount = this.safeFloat (order, 'qty'); - let remaining = this.safeFloat (order, 'remainingQty'); + let price = this.safeNumber (order, 'limitPrice'); + const amount = this.safeNumber (order, 'qty'); + let remaining = this.safeNumber (order, 'remainingQty'); let filled = undefined; - const remainingCost = this.safeFloat (order, 'remainingCost'); + const remainingCost = this.safeNumber (order, 'remainingCost'); if ((remainingCost !== undefined) && (remainingCost === 0.0)) { remaining = 0; } if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); } - const cost = this.safeFloat (order, 'cost'); + const cost = this.safeNumber (order, 'cost'); if (type === 'market') { if (price === 0.0) { if ((cost !== undefined) && (filled !== undefined)) { @@ -806,7 +800,7 @@ module.exports = class eterbase extends Exchange { } } const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -979,7 +973,7 @@ module.exports = class eterbase extends Exchange { } if ((uppercaseType === 'MARKET') && (uppercaseSide === 'BUY')) { // for market buy it requires the amount of quote currency to spend - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); if (this.options['createMarketBuyOrderRequiresPrice']) { if (cost === undefined) { if (price !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exmo.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exmo.js index c9e19479d..d79e42079 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exmo.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exmo.js @@ -112,6 +112,7 @@ module.exports = class exmo extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.2 / 100, @@ -581,18 +582,18 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = marketId.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const maxAmount = this.safeFloat (limit, 'max_q'); - const maxPrice = this.safeFloat (limit, 'max_p'); - const maxCost = this.safeFloat (limit, 'max_a'); - const minAmount = this.safeFloat (limit, 'min_q'); - const minPrice = this.safeFloat (limit, 'min_p'); - const minCost = this.safeFloat (limit, 'min_a'); - minAmounts[base] = Math.min (this.safeFloat (minAmounts, base, minAmount), minAmount); - maxAmounts[base] = Math.max (this.safeFloat (maxAmounts, base, maxAmount), maxAmount); - minPrices[quote] = Math.min (this.safeFloat (minPrices, quote, minPrice), minPrice); - minCosts[quote] = Math.min (this.safeFloat (minCosts, quote, minCost), minCost); - maxPrices[quote] = Math.max (this.safeFloat (maxPrices, quote, maxPrice), maxPrice); - maxCosts[quote] = Math.max (this.safeFloat (maxCosts, quote, maxCost), maxCost); + const maxAmount = this.safeNumber (limit, 'max_q'); + const maxPrice = this.safeNumber (limit, 'max_p'); + const maxCost = this.safeNumber (limit, 'max_a'); + const minAmount = this.safeNumber (limit, 'min_q'); + const minPrice = this.safeNumber (limit, 'min_p'); + const minCost = this.safeNumber (limit, 'min_a'); + minAmounts[base] = Math.min (this.safeNumber (minAmounts, base, minAmount), minAmount); + maxAmounts[base] = Math.max (this.safeNumber (maxAmounts, base, maxAmount), maxAmount); + minPrices[quote] = Math.min (this.safeNumber (minPrices, quote, minPrice), minPrice); + minCosts[quote] = Math.min (this.safeNumber (minCosts, quote, minCost), minCost); + maxPrices[quote] = Math.max (this.safeNumber (maxPrices, quote, maxPrice), maxPrice); + maxCosts[quote] = Math.max (this.safeNumber (maxCosts, quote, maxCost), maxCost); } const result = {}; for (let i = 0; i < ids.length; i++) { @@ -609,16 +610,16 @@ module.exports = class exmo extends Exchange { 'precision': 8, 'limits': { 'amount': { - 'min': this.safeFloat (minAmounts, code), - 'max': this.safeFloat (maxAmounts, code), + 'min': this.safeNumber (minAmounts, code), + 'max': this.safeNumber (maxAmounts, code), }, 'price': { - 'min': this.safeFloat (minPrices, code), - 'max': this.safeFloat (maxPrices, code), + 'min': this.safeNumber (minPrices, code), + 'max': this.safeNumber (maxPrices, code), }, 'cost': { - 'min': this.safeFloat (minCosts, code), - 'max': this.safeFloat (maxCosts, code), + 'min': this.safeNumber (minCosts, code), + 'max': this.safeNumber (maxCosts, code), }, }, 'info': id, @@ -653,8 +654,8 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = symbol.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const taker = this.safeFloat (market, 'commission_taker_percent'); - const maker = this.safeFloat (market, 'commission_maker_percent'); + const taker = this.safeNumber (market, 'commission_taker_percent'); + const maker = this.safeNumber (market, 'commission_maker_percent'); result.push ({ 'id': id, 'symbol': symbol, @@ -667,16 +668,16 @@ module.exports = class exmo extends Exchange { 'maker': maker / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, }, 'precision': { @@ -749,11 +750,11 @@ module.exports = class exmo extends Exchange { // return [ this.safeInteger (ohlcv, 't'), - this.safeFloat (ohlcv, 'o'), - this.safeFloat (ohlcv, 'h'), - this.safeFloat (ohlcv, 'l'), - this.safeFloat (ohlcv, 'c'), - this.safeFloat (ohlcv, 'v'), + this.safeNumber (ohlcv, 'o'), + this.safeNumber (ohlcv, 'h'), + this.safeNumber (ohlcv, 'l'), + this.safeNumber (ohlcv, 'c'), + this.safeNumber (ohlcv, 'v'), ]; } @@ -769,14 +770,14 @@ module.exports = class exmo extends Exchange { const currencyId = this.currencyId (code); const account = this.account (); if (currencyId in free) { - account['free'] = this.safeFloat (free, currencyId); + account['free'] = this.safeString (free, currencyId); } if (currencyId in used) { - account['used'] = this.safeFloat (used, currencyId); + account['used'] = this.safeString (used, currencyId); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -834,16 +835,16 @@ module.exports = class exmo extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -852,9 +853,9 @@ module.exports = class exmo extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_curr'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'vol_curr'), 'info': ticker, }; } @@ -915,9 +916,9 @@ module.exports = class exmo extends Exchange { let symbol = undefined; const id = this.safeString (trade, 'trade_id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'quantity'); + const cost = this.safeNumber (trade, 'amount'); const side = this.safeString (trade, 'type'); const type = undefined; const marketId = this.safeString (trade, 'pair'); @@ -936,11 +937,11 @@ module.exports = class exmo extends Exchange { } const takerOrMaker = this.safeString (trade, 'exec_type'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission_amount'); + const feeCost = this.safeNumber (trade, 'commission_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commission_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (trade, 'commission_percent'); + let feeRate = this.safeNumber (trade, 'commission_percent'); if (feeRate !== undefined) { feeRate /= 1000; } @@ -1239,13 +1240,13 @@ module.exports = class exmo extends Exchange { market = this.markets_by_id[marketId]; } } - let amount = this.safeFloat (order, 'quantity'); + let amount = this.safeNumber (order, 'quantity'); if (amount === undefined) { const amountField = (side === 'buy') ? 'in_amount' : 'out_amount'; - amount = this.safeFloat (order, amountField); + amount = this.safeNumber (order, amountField); } - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'amount'); + let price = this.safeNumber (order, 'price'); + let cost = this.safeNumber (order, 'amount'); let filled = 0.0; const trades = []; const transactions = this.safeValue (order, 'trades', []); @@ -1366,24 +1367,6 @@ module.exports = class exmo extends Exchange { return undefined; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -1428,7 +1411,7 @@ module.exports = class exmo extends Exchange { // } // const timestamp = this.safeTimestamp (transaction, 'dt'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -1458,7 +1441,7 @@ module.exports = class exmo extends Exchange { // fixed funding fees only (for now) if (!this.fees['funding']['percentage']) { const key = (type === 'withdrawal') ? 'withdraw' : 'deposit'; - let feeCost = this.safeFloat (this.options['fundingFees'][key], code); + let feeCost = this.safeNumber (this.options['fundingFees'][key], code); // users don't pay for cashbacks, no fees for that const provider = this.safeString (transaction, 'provider'); if (provider === 'cashback') { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exx.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exx.js index c4c12d03f..72b59ef1b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exx.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/exx.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ExchangeNotAvailable, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -148,26 +149,26 @@ module.exports = class exx extends Exchange { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); ticker = ticker['ticker']; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'riseRate'), + 'change': this.safeNumber (ticker, 'riseRate'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -217,14 +218,11 @@ module.exports = class exx extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -269,14 +267,13 @@ module.exports = class exx extends Exchange { const currencyId = currencies[i]; const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'balance'), - 'used': this.safeFloat (balance, 'freeze'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -296,11 +293,10 @@ module.exports = class exx extends Exchange { // const symbol = market['symbol']; const timestamp = parseInt (order['trade_date']); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'trade_money'); - const amount = this.safeFloat (order, 'total_amount'); - const filled = this.safeFloat (order, 'trade_amount', 0.0); - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'trade_money'); + const amount = this.safeNumber (order, 'total_amount'); + const filled = this.safeNumber (order, 'trade_amount', 0.0); let status = this.safeInteger (order, 'status'); if (status === 1) { status = 'canceled'; @@ -312,11 +308,11 @@ module.exports = class exx extends Exchange { let fee = undefined; if ('fees' in order) { fee = { - 'cost': this.safeFloat (order, 'fees'), + 'cost': this.safeNumber (order, 'fees'), 'currency': market['quote'], }; } - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -333,12 +329,12 @@ module.exports = class exx extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/fcoin.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/fcoin.js index 2d1c845ab..2d90e7cce 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/fcoin.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/fcoin.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, ArgumentsRequired, InsufficientFunds, InvalidOrder, RateLimitExceeded, InvalidNonce, AuthenticationError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -223,8 +224,8 @@ module.exports = class fcoin extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'limit_amount_min'), - 'max': this.safeFloat (market, 'limit_amount_max'), + 'min': this.safeNumber (market, 'limit_amount_min'), + 'max': this.safeNumber (market, 'limit_amount_max'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -319,12 +320,12 @@ module.exports = class fcoin extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidsAsks (orders, priceKey = 0, amountKey = 1) { @@ -337,8 +338,8 @@ module.exports = class fcoin extends Exchange { const priceField = this.sum (index, priceKey); const amountField = this.sum (index, amountKey); result.push ([ - this.safeFloat (orders, priceField), - this.safeFloat (orders, amountField), + this.safeNumber (orders, priceField), + this.safeNumber (orders, amountField), ]); } return result; @@ -386,17 +387,17 @@ module.exports = class fcoin extends Exchange { } } const values = ticker['ticker']; - const last = this.safeFloat (values, 0); + const last = this.safeNumber (values, 0); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (values, 7), - 'low': this.safeFloat (values, 8), - 'bid': this.safeFloat (values, 2), - 'bidVolume': this.safeFloat (values, 3), - 'ask': this.safeFloat (values, 4), - 'askVolume': this.safeFloat (values, 5), + 'high': this.safeNumber (values, 7), + 'low': this.safeNumber (values, 8), + 'bid': this.safeNumber (values, 2), + 'bidVolume': this.safeNumber (values, 3), + 'ask': this.safeNumber (values, 4), + 'askVolume': this.safeNumber (values, 5), 'vwap': undefined, 'open': undefined, 'close': last, @@ -405,8 +406,8 @@ module.exports = class fcoin extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (values, 9), - 'quoteVolume': this.safeFloat (values, 10), + 'baseVolume': this.safeNumber (values, 9), + 'quoteVolume': this.safeNumber (values, 10), 'info': ticker, }; } @@ -419,14 +420,11 @@ module.exports = class fcoin extends Exchange { const timestamp = this.safeInteger (trade, 'ts'); const side = this.safeStringLower (trade, 'side'); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = undefined; return { 'id': id, @@ -551,38 +549,25 @@ module.exports = class fcoin extends Exchange { const symbol = market['symbol']; const orderType = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'created_at'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'executed_value'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'executed_value'); let feeCurrency = undefined; let feeCost = undefined; - const feeRebate = this.safeFloat (order, 'fees_income'); + const feeRebate = this.safeNumber (order, 'fees_income'); if ((feeRebate !== undefined) && (feeRebate > 0)) { if (market !== undefined) { feeCurrency = (side === 'buy') ? market['quote'] : market['base']; } feeCost = -feeRebate; } else { - feeCost = this.safeFloat (order, 'fill_fees'); + feeCost = this.safeNumber (order, 'fill_fees'); if (market !== undefined) { feeCurrency = (side === 'buy') ? market['base'] : market['quote']; } } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -598,7 +583,7 @@ module.exports = class fcoin extends Exchange { 'stopPrice': undefined, 'cost': cost, 'amount': amount, - 'remaining': remaining, + 'remaining': undefined, 'filled': filled, 'average': undefined, 'status': status, @@ -607,7 +592,7 @@ module.exports = class fcoin extends Exchange { 'currency': feeCurrency, }, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -649,11 +634,11 @@ module.exports = class fcoin extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_vol'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/flowbtc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/flowbtc.js index 12646489b..45d80935d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/flowbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/flowbtc.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -131,11 +132,11 @@ module.exports = class flowbtc extends Exchange { const currencyId = balance['name']; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['total'] = this.safeFloat (balance, 'hold'); + account['free'] = this.safeString (balance, 'balance'); + account['total'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -156,16 +157,16 @@ module.exports = class flowbtc extends Exchange { }; const ticker = await this.publicPostGetTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -175,8 +176,8 @@ module.exports = class flowbtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume24hr'), - 'quoteVolume': this.safeFloat (ticker, 'volume24hrProduct2'), + 'baseVolume': this.safeNumber (ticker, 'volume24hr'), + 'quoteVolume': this.safeNumber (ticker, 'volume24hrProduct2'), 'info': ticker, }; } @@ -185,14 +186,11 @@ module.exports = class flowbtc extends Exchange { const timestamp = this.safeTimestamp (trade, 'unixtime'); const side = (trade['incomingOrderSide'] === 0) ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'px'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'px'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'timestamp': timestamp, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/foxbit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/foxbit.js index 5830969a3..b1fb3032b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/foxbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/foxbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89,11 +90,11 @@ module.exports = class foxbit extends Exchange { // otherwise we will lose the info if the currency balance has been funded or traded or not if (currencyId in balances) { const account = this.account (); - let used = this.safeFloat (balances, currencyId + '_locked'); + let used = this.safeNumber (balances, currencyId + '_locked'); if (used !== undefined) { used *= 1e-8; } - let total = this.safeFloat (balances, currencyId); + let total = this.safeNumber (balances, currencyId); if (total !== undefined) { total *= 1e-8; } @@ -128,16 +129,16 @@ module.exports = class foxbit extends Exchange { const timestamp = this.milliseconds (); const lowercaseQuote = market['quote'].toLowerCase (); const quoteVolume = 'vol_' + lowercaseQuote; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -147,8 +148,8 @@ module.exports = class foxbit extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -161,14 +162,11 @@ module.exports = class foxbit extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ftx.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ftx.js index 18b572cc6..a0e42e8e4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ftx.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ftx.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending } = require ('./base/errors'); +const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending, ArgumentsRequired, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -243,6 +244,7 @@ module.exports = class ftx extends Exchange { 'An unexpected error occurred': ExchangeNotAvailable, // {"error":"An unexpected error occurred, please try again later (58BC21C795).","success":false} 'Please retry request': ExchangeNotAvailable, // {"error":"Please retry request","success":false} 'Please try again': ExchangeNotAvailable, // {"error":"Please try again","success":false} + 'Only have permissions for subaccount': PermissionDenied, // {"success":false,"error":"Only have permissions for subaccount *sub_name*"} }, }, 'precisionMode': TICK_SIZE, @@ -366,8 +368,8 @@ module.exports = class ftx extends Exchange { // check if a market is a spot or future market const symbol = (type === 'future') ? this.safeString (market, 'name') : (base + '/' + quote); const active = this.safeValue (market, 'enabled'); - const sizeIncrement = this.safeFloat (market, 'sizeIncrement'); - const priceIncrement = this.safeFloat (market, 'priceIncrement'); + const sizeIncrement = this.safeNumber (market, 'sizeIncrement'); + const priceIncrement = this.safeNumber (market, 'priceIncrement'); const precision = { 'amount': sizeIncrement, 'price': priceIncrement, @@ -445,28 +447,28 @@ module.exports = class ftx extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); const timestamp = this.safeTimestamp (ticker, 'time', this.milliseconds ()); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'change24h'), + 'percentage': this.safeNumber (ticker, 'change24h'), 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24h'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24h'), 'info': ticker, }; } @@ -506,14 +508,6 @@ module.exports = class ftx extends Exchange { return this.parseTicker (result, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetMarkets (params); @@ -592,11 +586,11 @@ module.exports = class ftx extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -717,6 +711,45 @@ module.exports = class ftx extends Exchange { // "type": "otc" // } // + // with -ve fee + // { + // "id": 1171258927, + // "fee": -0.0000713875, + // "side": "sell", + // "size": 1, + // "time": "2021-03-11T13:34:35.523627+00:00", + // "type": "order", + // "price": 14.2775, + // "future": null, + // "market": "SOL/USD", + // "feeRate": -0.000005, + // "orderId": 33182929044, + // "tradeId": 582936801, + // "liquidity": "maker", + // "feeCurrency": "USD", + // "baseCurrency": "SOL", + // "quoteCurrency": "USD" + // } + // + // // from OTC order + // { + // "id": 1172129651, + // "fee": 0, + // "side": "sell", + // "size": 1.47568846, + // "time": "2021-03-11T15:04:46.893383+00:00", + // "type": "otc", + // "price": 14.60932598, + // "future": null, + // "market": null, + // "feeRate": 0, + // "orderId": null, + // "tradeId": null, + // "liquidity": "taker", + // "feeCurrency": "USD", + // "baseCurrency": "BCHA", + // "quoteCurrency": "USD" + // } const id = this.safeString (trade, 'id'); const takerOrMaker = this.safeString (trade, 'liquidity'); const marketId = this.safeString (trade, 'market'); @@ -734,25 +767,24 @@ module.exports = class ftx extends Exchange { } } const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } const orderId = this.safeString (trade, 'orderId'); @@ -858,8 +890,8 @@ module.exports = class ftx extends Exchange { const result = this.safeValue (response, 'result', {}); return { 'info': response, - 'maker': this.safeFloat (result, 'makerFee'), - 'taker': this.safeFloat (result, 'takerFee'), + 'maker': this.safeNumber (result, 'makerFee'), + 'taker': this.safeNumber (result, 'takerFee'), }; } @@ -886,11 +918,11 @@ module.exports = class ftx extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'coin')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -1013,9 +1045,9 @@ module.exports = class ftx extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); let status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filledSize'); - let remaining = this.safeFloat (order, 'remainingSize'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filledSize'); + let remaining = this.safeNumber (order, 'remainingSize'); if ((remaining === 0.0) && (amount !== undefined) && (filled !== undefined)) { remaining = Math.max (amount - filled, 0); if (remaining > 0) { @@ -1039,15 +1071,15 @@ module.exports = class ftx extends Exchange { } const side = this.safeString (order, 'side'); const type = this.safeString (order, 'type'); - const average = this.safeFloat (order, 'avgFillPrice'); - const price = this.safeFloat2 (order, 'price', 'triggerPrice', average); + const average = this.safeNumber (order, 'avgFillPrice'); + const price = this.safeNumber2 (order, 'price', 'triggerPrice', average); let cost = undefined; if (filled !== undefined && price !== undefined) { cost = filled * price; } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'triggeredAt')); const clientOrderId = this.safeString (order, 'clientId'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -1093,22 +1125,28 @@ module.exports = class ftx extends Exchange { request['clientId'] = clientOrderId; params = this.omit (params, [ 'clientId', 'clientOrderId' ]); } - let priceToPrecision = undefined; - if (price !== undefined) { - priceToPrecision = parseFloat (this.priceToPrecision (symbol, price)); - } - let method = 'privatePostConditionalOrders'; + let method = undefined; if (type === 'limit') { method = 'privatePostOrders'; - request['price'] = priceToPrecision; + request['price'] = parseFloat (this.priceToPrecision (symbol, price)); } else if (type === 'market') { method = 'privatePostOrders'; request['price'] = null; } else if ((type === 'stop') || (type === 'takeProfit')) { - request['triggerPrice'] = priceToPrecision; - // request['orderPrice'] = number; // optional, order type is limit if this is specified, otherwise market + method = 'privatePostConditionalOrders'; + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerPrice'); + if (stopPrice === undefined) { + throw new ArgumentsRequired (this.id + ' createOrder () requires a stopPrice parameter or a triggerPrice parameter for ' + type + ' orders'); + } else { + params = this.omit (params, [ 'stopPrice', 'triggerPrice' ]); + request['triggerPrice'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + } + if (price !== undefined) { + request['orderPrice'] = parseFloat (this.priceToPrecision (symbol, price)); // optional, order type is limit if this is specified, otherwise market + } } else if (type === 'trailingStop') { - request['trailValue'] = priceToPrecision; // negative for "sell", positive for "buy" + method = 'privatePostConditionalOrders'; + request['trailValue'] = parseFloat (this.priceToPrecision (symbol, price)); // negative for "sell", positive for "buy" } else { throw new InvalidOrder (this.id + ' createOrder () does not support order type ' + type + ', only limit, market, stop, trailingStop, or takeProfit orders are supported'); } @@ -1174,9 +1212,9 @@ module.exports = class ftx extends Exchange { const request = {}; let method = undefined; const clientOrderId = this.safeString2 (params, 'client_order_id', 'clientOrderId'); - const triggerPrice = this.safeFloat (params, 'triggerPrice'); - const orderPrice = this.safeFloat (params, 'orderPrice'); - const trailValue = this.safeFloat (params, 'trailValue'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); + const orderPrice = this.safeNumber (params, 'orderPrice'); + const trailValue = this.safeNumber (params, 'trailValue'); params = this.omit (params, [ 'client_order_id', 'clientOrderId', 'triggerPrice', 'orderPrice', 'trailValue' ]); const triggerPriceIsDefined = (triggerPrice !== undefined); const orderPriceIsDefined = (orderPrice !== undefined); @@ -1539,7 +1577,7 @@ module.exports = class ftx extends Exchange { return this.parseTransaction (result, currency); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetAccount (params); // @@ -1672,7 +1710,7 @@ module.exports = class ftx extends Exchange { // const code = this.safeCurrencyCode (this.safeString (transaction, 'coin')); const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'size'); + const amount = this.safeNumber (transaction, 'size'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const txid = this.safeString (transaction, 'txid'); @@ -1689,7 +1727,7 @@ module.exports = class ftx extends Exchange { address = notes.slice (12); } } - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gateio.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gateio.js index f0835c774..eac7234c9 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gateio.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gateio.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, ArgumentsRequired, InvalidAddress, OrderNotFound, NotSupported, DDoSProtection, InsufficientFunds, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,9 +165,12 @@ module.exports = class gateio extends Exchange { }, }, 'commonCurrencies': { + '88MPH': 'MPH', + 'BIFI': 'Bitcoin File', 'BOX': 'DefiBox', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', + 'MPH': 'Morpher', // conflict with 88MPH 'SBTC': 'Super Bitcoin', 'TNC': 'Trinity Network Credit', }, @@ -213,9 +217,9 @@ module.exports = class gateio extends Exchange { const currency = coin[id]; const code = this.safeCurrencyCode (id); const delisted = this.safeValue (currency, 'delisted', 0); - const withdrawDisabled = this.safeValue (currency, 'withdraw_disabled', 0); - const depositDisabled = this.safeValue (currency, 'deposit_disabled', 0); - const tradeDisabled = this.safeValue (currency, 'trade_disabled', 0); + const withdrawDisabled = this.safeInteger2 (currency, 'withdraw_disabled', 0); + const depositDisabled = this.safeInteger2 (currency, 'deposit_disabled', 0); + const tradeDisabled = this.safeInteger2 (currency, 'trade_disabled', 0); const listed = (delisted === 0); const withdrawEnabled = (withdrawDisabled === 0); const depositEnabled = (depositDisabled === 0); @@ -304,7 +308,7 @@ module.exports = class gateio extends Exchange { 'price': this.safeInteger (details, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (details, 'min_amount'), + 'min': this.safeNumber (details, 'min_amount'), 'max': undefined, }; const priceLimits = { @@ -312,7 +316,7 @@ module.exports = class gateio extends Exchange { 'max': undefined, }; const defaultCost = amountLimits['min'] * priceLimits['min']; - const minCost = this.safeFloat (this.options['limits']['cost']['min'], quote, defaultCost); + const minCost = this.safeNumber (this.options['limits']['cost']['min'], quote, defaultCost); const costLimits = { 'min': minCost, 'max': undefined, @@ -322,10 +326,10 @@ module.exports = class gateio extends Exchange { 'price': priceLimits, 'cost': costLimits, }; - const disabled = this.safeValue (details, 'trade_disabled'); + const disabled = this.safeInteger (details, 'trade_disabled'); const active = !disabled; const uppercaseId = id.toUpperCase (); - const fee = this.safeFloat (details, 'fee'); + const fee = this.safeNumber (details, 'fee'); result.push ({ 'id': id, 'uppercaseId': uppercaseId, @@ -359,11 +363,11 @@ module.exports = class gateio extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (available, currencyId); - account['used'] = this.safeFloat (locked, currencyId); + account['free'] = this.safeString (available, currencyId); + account['used'] = this.safeString (locked, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -379,11 +383,11 @@ module.exports = class gateio extends Exchange { // they return [ Timestamp, Volume, Close, High, Low, Open ] return [ this.safeInteger (ohlcv, 0), // t - this.safeFloat (ohlcv, 5), // o - this.safeFloat (ohlcv, 3), // h - this.safeFloat (ohlcv, 4), // l - this.safeFloat (ohlcv, 2), // c - this.safeFloat (ohlcv, 1), // v + this.safeNumber (ohlcv, 5), // o + this.safeNumber (ohlcv, 3), // h + this.safeNumber (ohlcv, 4), // l + this.safeNumber (ohlcv, 2), // c + this.safeNumber (ohlcv, 1), // v ]; } @@ -395,11 +399,11 @@ module.exports = class gateio extends Exchange { 'group_sec': this.timeframes[timeframe], }; // max limit = 1001 - if (limit !== undefined) { - const periodDurationInSeconds = this.parseTimeframe (timeframe); - const hours = parseInt ((periodDurationInSeconds * limit) / 3600); - request['range_hour'] = Math.max (0, hours - 1); - } + // if (limit !== undefined) { + // const periodDurationInSeconds = this.parseTimeframe (timeframe); + // const hours = parseInt ((periodDurationInSeconds * limit) / 3600); + // request['range_hour'] = Math.max (1, hours - 1); + // } const response = await this.publicGetCandlestick2Id (this.extend (request, params)); // // { @@ -423,8 +427,8 @@ module.exports = class gateio extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'percentChange'); let open = undefined; let change = undefined; let average = undefined; @@ -434,17 +438,17 @@ module.exports = class gateio extends Exchange { change = last - open; average = this.sum (last, open) / 2; } - open = this.safeFloat (ticker, 'open', open); - change = this.safeFloat (ticker, 'change', change); + open = this.safeNumber (ticker, 'open', open); + change = this.safeNumber (ticker, 'change', change); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high24hr', 'high'), - 'low': this.safeFloat2 (ticker, 'low24hr', 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber2 (ticker, 'high24hr', 'high'), + 'low': this.safeNumber2 (ticker, 'low24hr', 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -454,8 +458,8 @@ module.exports = class gateio extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), // gateio has them reversed - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), // gateio has them reversed + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -501,27 +505,24 @@ module.exports = class gateio extends Exchange { const id = this.safeString2 (trade, 'tradeID', 'id'); // take either of orderid or orderId const orderId = this.safeString2 (trade, 'orderid', 'orderNumber'); - const price = this.safeFloat2 (trade, 'rate', 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString2 (trade, 'rate', 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'role'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } let fee = undefined; let feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee_coin')); - let feeCost = this.safeFloat (trade, 'point_fee'); + let feeCost = this.safeNumber (trade, 'point_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'gt_fee'); + feeCost = this.safeNumber (trade, 'gt_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'fee'); + feeCost = this.safeNumber (trade, 'fee'); } else { feeCurrency = this.safeCurrencyCode ('GT'); } @@ -665,23 +666,20 @@ module.exports = class gateio extends Exchange { } else if (side === '2') { side = 'buy'; } - const price = this.safeFloat2 (order, 'initialRate', 'rate'); - const average = this.safeFloat (order, 'filledRate'); - const amount = this.safeFloat2 (order, 'initialAmount', 'amount'); - const filled = this.safeFloat (order, 'filledAmount'); + const price = this.safeNumber2 (order, 'initialRate', 'rate'); + const average = this.safeNumber (order, 'filledRate'); + const amount = this.safeNumber2 (order, 'initialAmount', 'amount'); + const filled = this.safeNumber (order, 'filledAmount'); // In the order status response, this field has a different name. - let remaining = this.safeFloat2 (order, 'leftAmount', 'left'); - if (remaining === undefined) { - remaining = amount - filled; - } - const feeCost = this.safeFloat (order, 'feeValue'); + const remaining = this.safeNumber2 (order, 'leftAmount', 'left'); + const feeCost = this.safeNumber (order, 'feeValue'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (order, 'feePercentage'); + let feeRate = this.safeNumber (order, 'feePercentage'); if (feeRate !== undefined) { feeRate = feeRate / 100; } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -707,7 +705,7 @@ module.exports = class gateio extends Exchange { 'rate': feeRate, }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -898,7 +896,7 @@ module.exports = class gateio extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'txid'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); if (address === 'false') { address = undefined; @@ -906,7 +904,7 @@ module.exports = class gateio extends Exchange { const timestamp = this.safeTimestamp (transaction, 'timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.parseTransactionType (id[0]); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gemini.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gemini.js index 6f28ef220..36892fa47 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gemini.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gemini.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidOrder, InvalidNonce, InsufficientFunds, AuthenticationError, PermissionDenied, NotSupported, OnMaintenance, RateLimitExceeded, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -221,16 +222,16 @@ module.exports = class gemini extends Exchange { // const base = this.safeCurrencyCode (baseId); const minAmountString = cells[1].replace ('', ''); const minAmountParts = minAmountString.split (' '); - const minAmount = this.safeFloat (minAmountParts, 0); + const minAmount = this.safeNumber (minAmountParts, 0); const amountPrecisionString = cells[2].replace ('', ''); const amountPrecisionParts = amountPrecisionString.split (' '); - const amountPrecision = this.safeFloat (amountPrecisionParts, 0); + const amountPrecision = this.safeNumber (amountPrecisionParts, 0); const idLength = marketId.length - 0; const quoteId = marketId.slice (idLength - 3, idLength); const quote = this.safeCurrencyCode (quoteId); const pricePrecisionString = cells[3].replace ('', ''); const pricePrecisionParts = pricePrecisionString.split (' '); - const pricePrecision = this.safeFloat (pricePrecisionParts, 0); + const pricePrecision = this.safeNumber (pricePrecisionParts, 0); const baseId = marketId.replace (quoteId, ''); const base = this.safeCurrencyCode (baseId); const symbol = base + '/' + quote; @@ -458,11 +459,11 @@ module.exports = class gemini extends Exchange { base = market['base']; quote = market['quote']; } - const price = this.safeFloat (ticker, 'price'); - const last = this.safeFloat2 (ticker, 'last', 'close', price); - let percentage = this.safeFloat (ticker, 'percentChange24h'); + const price = this.safeNumber (ticker, 'price'); + const last = this.safeNumber2 (ticker, 'last', 'close', price); + let percentage = this.safeNumber (ticker, 'percentChange24h'); let change = undefined; - let open = this.safeFloat (ticker, 'open'); + let open = this.safeNumber (ticker, 'open'); let average = undefined; if (last !== undefined) { if (open !== undefined) { @@ -479,18 +480,18 @@ module.exports = class gemini extends Exchange { average = this.sum (last, open) / 2; } } - const baseVolume = this.safeFloat (volume, baseId); - const quoteVolume = this.safeFloat (volume, quoteId); + const baseVolume = this.safeNumber (volume, baseId); + const quoteVolume = this.safeNumber (volume, quoteId); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -506,14 +507,6 @@ module.exports = class gemini extends Exchange { }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetV1Pricefeed (params); @@ -554,17 +547,14 @@ module.exports = class gemini extends Exchange { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); const fee = { - 'cost': this.safeFloat (trade, 'fee_amount'), + 'cost': this.safeNumber (trade, 'fee_amount'), 'currency': feeCurrencyCode, }; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeStringLower (trade, 'type'); const symbol = this.safeSymbol (undefined, market); @@ -617,18 +607,18 @@ module.exports = class gemini extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'timestampms'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const filled = this.safeFloat (order, 'executed_amount'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const filled = this.safeNumber (order, 'executed_amount'); let status = 'closed'; if (order['is_live']) { status = 'open'; @@ -636,14 +626,8 @@ module.exports = class gemini extends Exchange { if (order['is_cancelled']) { status = 'canceled'; } - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_execution_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_execution_price'); let type = this.safeString (order, 'type'); if (type === 'exchange limit') { type = 'limit'; @@ -658,7 +642,7 @@ module.exports = class gemini extends Exchange { const id = this.safeString (order, 'order_id'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'client_order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -674,13 +658,13 @@ module.exports = class gemini extends Exchange { 'price': price, 'stopPrice': undefined, 'average': average, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -795,7 +779,7 @@ module.exports = class gemini extends Exchange { status = 'ok'; } let fee = undefined; - const feeAmount = this.safeFloat (transaction, 'feeAmount'); + const feeAmount = this.safeNumber (transaction, 'feeAmount'); if (feeAmount !== undefined) { fee = { 'cost': feeAmount, @@ -811,7 +795,7 @@ module.exports = class gemini extends Exchange { 'address': address, 'tag': undefined, // or is it defined? 'type': type, // direction of the transaction, ('deposit' | 'withdraw') - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gopax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gopax.js index e3150163a..b27308f19 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gopax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/gopax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound, InvalidAddress, BadRequest } = require ('./base/errors'); const { TRUNCATE, ROUND, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -218,8 +219,8 @@ module.exports = class gopax extends Exchange { const minimums = this.safeValue (market, 'restApiOrderAmountMin', {}); const marketAsk = this.safeValue (minimums, 'marketAsk', {}); const marketBid = this.safeValue (minimums, 'marketBid', {}); - const takerFeePercent = this.safeFloat (market, 'takerFeePercent'); - const makerFeePercent = this.safeFloat (market, 'makerFeePercent'); + const takerFeePercent = this.safeNumber (market, 'takerFeePercent'); + const makerFeePercent = this.safeNumber (market, 'makerFeePercent'); const taker = parseFloat (this.decimalToPrecision (takerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); const maker = parseFloat (this.decimalToPrecision (makerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); result.push ({ @@ -237,15 +238,15 @@ module.exports = class gopax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (marketAsk, 'amount'), + 'min': this.safeNumber (marketAsk, 'amount'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'priceMin'), + 'min': this.safeNumber (market, 'priceMin'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (marketBid, 'amount'), + 'min': this.safeNumber (marketBid, 'amount'), 'max': undefined, }, }, @@ -280,8 +281,8 @@ module.exports = class gopax extends Exchange { const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'name'); - const fee = this.safeFloat (currency, 'withdrawalFee'); - const precision = this.safeFloat (currency, 'scale'); + const fee = this.safeNumber (currency, 'withdrawalFee'); + const precision = this.safeNumber (currency, 'scale'); result[code] = { 'id': id, 'info': currency, @@ -304,7 +305,7 @@ module.exports = class gopax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalAmountMin'), + 'min': this.safeNumber (currency, 'withdrawalAmountMin'), 'max': undefined, }, }, @@ -372,8 +373,8 @@ module.exports = class gopax extends Exchange { const marketId = this.safeString (ticker, 'name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (ticker, 'time')); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat2 (ticker, 'price', 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'price', 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -384,20 +385,20 @@ module.exports = class gopax extends Exchange { percentage = change / open * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidVolume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askVolume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidVolume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askVolume'), 'vwap': vwap, 'open': open, 'close': last, @@ -433,14 +434,6 @@ module.exports = class gopax extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTradingPairsStats (params); @@ -462,8 +455,8 @@ module.exports = class gopax extends Exchange { parsePublicTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let symbol = undefined; if ('symbol' in market) { symbol = this.safeString (market, 'symbol'); @@ -489,14 +482,14 @@ module.exports = class gopax extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const symbol = this.safeString (trade, 'tradingPairName').replace ('-', '/'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'baseAmount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'baseAmount'); let feeCurrency = symbol.slice (0, 3); if (side === 'sell') { feeCurrency = symbol.slice (4); } const fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': feeCurrency, 'rate': undefined, }; @@ -578,15 +571,15 @@ module.exports = class gopax extends Exchange { } else if (type === '2') { type = 'market'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'baseAmount'); - let cost = this.safeFloat (trade, 'quoteAmount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'baseAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteAmount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -653,11 +646,11 @@ module.exports = class gopax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -697,14 +690,14 @@ module.exports = class gopax extends Exchange { const balance = response[i]; const currencyId = this.safeString2 (balance, 'asset', 'isoAlpha3'); const code = this.safeCurrencyCode (currencyId); - const hold = this.safeFloat (balance, 'hold'); - const pendingWithdrawal = this.safeFloat (balance, 'pendingWithdrawal'); + const hold = this.safeString (balance, 'hold'); + const pendingWithdrawal = this.safeString (balance, 'pendingWithdrawal'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.sum (hold, pendingWithdrawal); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = Precise.stringAdd (hold, pendingWithdrawal); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -781,42 +774,36 @@ module.exports = class gopax extends Exchange { const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); const timeInForce = this.safeStringUpper (order, 'timeInForce'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - const remaining = this.safeFloat (order, 'remaining'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const stopPrice = this.safeNumber (order, 'stopPrice'); + const remaining = this.safeNumber (order, 'remaining'); const marketId = this.safeString (order, 'tradingPairName'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const balanceChange = this.safeValue (order, 'balanceChange', {}); - let filled = this.safeFloat (balanceChange, 'baseNet'); - let cost = this.safeFloat (balanceChange, 'quoteNet'); + const filled = this.safeNumber (balanceChange, 'baseNet'); + let cost = this.safeNumber (balanceChange, 'quoteNet'); if (cost !== undefined) { cost = Math.abs (cost); } let updated = undefined; - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } if ((filled !== undefined) && (filled > 0)) { updated = this.parse8601 (this.safeString (order, 'updatedAt')); } - if ((cost === undefined) && (price !== undefined) && (filled !== undefined)) { - cost = filled * price; - } let fee = undefined; if (side === 'buy') { const baseFee = this.safeValue (balanceChange, 'baseFee', {}); - const taking = this.safeFloat (baseFee, 'taking'); - const making = this.safeFloat (baseFee, 'making'); + const taking = this.safeNumber (baseFee, 'taking'); + const making = this.safeNumber (baseFee, 'making'); fee = { 'currency': market['base'], 'cost': this.sum (taking, making), }; } else { const quoteFee = this.safeValue (balanceChange, 'quoteFee', {}); - const taking = this.safeFloat (quoteFee, 'taking'); - const making = this.safeFloat (quoteFee, 'making'); + const taking = this.safeNumber (quoteFee, 'taking'); + const making = this.safeNumber (quoteFee, 'making'); fee = { 'currency': market['quote'], 'cost': this.sum (taking, making), @@ -826,7 +813,7 @@ module.exports = class gopax extends Exchange { if (timeInForce !== undefined) { postOnly = (timeInForce === 'PO'); } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'datetime': this.iso8601 (timestamp), @@ -848,7 +835,7 @@ module.exports = class gopax extends Exchange { 'trades': undefined, 'fee': fee, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -996,7 +983,7 @@ module.exports = class gopax extends Exchange { request['clientOrderId'] = clientOrderId; params = this.omit (params, 'clientOrderId'); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1125,18 +1112,6 @@ module.exports = class gopax extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetCryptoDepositAddresses (params); @@ -1201,8 +1176,8 @@ module.exports = class gopax extends Exchange { } else if ((type === 'crypto_deposit' || type === 'fiat_deposit')) { type = 'deposit'; } - const amount = this.safeFloat (transaction, 'netAmount'); - const feeCost = this.safeFloat (transaction, 'feeAmount'); + const amount = this.safeNumber (transaction, 'netAmount'); + const feeCost = this.safeNumber (transaction, 'feeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hbtc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hbtc.js index d819c3d77..5dfd98ec5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hbtc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, OrderNotFound, ArgumentsRequired, BadSymbol, BadRequest, NullResponse, InvalidOrder, BadResponse, NotSupported, ExchangeNotAvailable, RequestTimeout, RateLimitExceeded, PermissionDenied, InsufficientFunds, InvalidAddress } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -304,23 +305,23 @@ module.exports = class hbtc extends Exchange { const filter = filters[j]; const filterType = this.safeString (filter, 'filterType'); if (filterType === 'LOT_SIZE') { - amountMin = this.safeFloat (filter, 'minQty'); - amountMax = this.safeFloat (filter, 'maxQty'); + amountMin = this.safeNumber (filter, 'minQty'); + amountMax = this.safeNumber (filter, 'maxQty'); } if (filterType === 'PRICE_FILTER') { - priceMin = this.safeFloat (filter, 'minPrice'); - priceMax = this.safeFloat (filter, 'maxPrice'); + priceMin = this.safeNumber (filter, 'minPrice'); + priceMax = this.safeNumber (filter, 'maxPrice'); } if (filterType === 'MIN_NOTIONAL') { - costMin = this.safeFloat (filter, 'minNotional'); + costMin = this.safeNumber (filter, 'minNotional'); } } if ((costMin === undefined) && (amountMin !== undefined) && (priceMin !== undefined)) { costMin = amountMin * priceMin; } const precision = { - 'price': this.safeFloat2 (market, 'quotePrecision', 'quoteAssetPrecision'), - 'amount': this.safeFloat (market, 'baseAssetPrecision'), + 'price': this.safeNumber2 (market, 'quotePrecision', 'quoteAssetPrecision'), + 'amount': this.safeNumber (market, 'baseAssetPrecision'), }; const limits = { 'amount': { @@ -558,14 +559,6 @@ module.exports = class hbtc extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidAsk (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -717,8 +710,8 @@ module.exports = class hbtc extends Exchange { const currencyId = this.safeString2 (balance, 'asset', 'tokenName'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -728,12 +721,12 @@ module.exports = class hbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = response[currencyId]; const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableMargin'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'availableMargin'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTrades (symbol, since = undefined, limit = 50, params = {}) { @@ -774,11 +767,11 @@ module.exports = class hbtc extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -1464,8 +1457,8 @@ module.exports = class hbtc extends Exchange { // const currencyId = this.safeString (item, 'tokenId'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'change'); - const after = this.safeFloat (item, 'total'); + const amount = this.safeNumber (item, 'change'); + const after = this.safeNumber (item, 'total'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -1605,8 +1598,8 @@ module.exports = class hbtc extends Exchange { } else { type = 'withdrawal'; } - const amount = this.safeFloat (transaction, 'quantity'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'quantity'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'feeTokenId'); @@ -1667,8 +1660,8 @@ module.exports = class hbtc extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'openPrice'); - const close = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; let average = undefined; @@ -1679,19 +1672,19 @@ module.exports = class hbtc extends Exchange { percentage = (change / open) * 100; } } - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat2 (ticker, 'bestBidPrice', 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat2 (ticker, 'bestAskPrice', 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber2 (ticker, 'bestBidPrice', 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber2 (ticker, 'bestAskPrice', 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': vwap, 'open': open, 'close': close, @@ -1741,17 +1734,14 @@ module.exports = class hbtc extends Exchange { // } // const id = this.safeString (trade, 'id'); - const timestamp = this.safeFloat (trade, 'time'); + const timestamp = this.safeNumber (trade, 'time'); const type = undefined; const orderId = this.safeString (trade, 'orderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let side = undefined; let takerOrMaker = undefined; if ('isBuyerMaker' in trade) { @@ -1765,7 +1755,7 @@ module.exports = class hbtc extends Exchange { side = isBuyer ? 'buy' : 'sell'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1871,30 +1861,30 @@ module.exports = class hbtc extends Exchange { const symbol = this.safeSymbol (marketId, market); let type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'avgPrice'); + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'avgPrice'); let amount = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); + let cost = this.safeNumber (order, 'cummulativeQuoteQty'); let filled = undefined; let remaining = undefined; if (type === undefined) { type = this.safeStringLower (order, 'orderType'); if ((market !== undefined) && market['inverse']) { - cost = this.safeFloat (order, 'executedQty'); + cost = this.safeNumber (order, 'executedQty'); amount = undefined; } if (cost === 0.0) { filled = 0; } } else { - amount = this.safeFloat (order, 'origQty'); + amount = this.safeNumber (order, 'origQty'); if (type === 'market') { price = undefined; if (side === 'buy') { amount = undefined; } } - filled = this.safeFloat (order, 'executedQty'); + filled = this.safeNumber (order, 'executedQty'); if (filled !== undefined) { if (amount !== undefined) { remaining = amount - filled; @@ -1906,7 +1896,7 @@ module.exports = class hbtc extends Exchange { } const status = this.parseOrderStatus (this.safeString (order, 'status')); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const result = { 'info': order, 'id': id, @@ -1935,7 +1925,7 @@ module.exports = class hbtc extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'fee'); + const feeCost = this.safeNumber (fees[i], 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'feeToken'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hitbtc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hitbtc.js index b66392816..b7fd38b04 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hitbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hitbtc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, PermissionDenied, ExchangeError, ExchangeNotAvailable, OrderNotFound, InsufficientFunds, InvalidOrder, RequestTimeout, AuthenticationError } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -44,6 +45,7 @@ module.exports = class hitbtc extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': 'M1', @@ -81,10 +83,10 @@ module.exports = class hitbtc extends Exchange { 'api': { 'public': { 'get': [ - 'symbol', // Available Currency Symbols - 'symbol/{symbol}', // Get symbol info 'currency', // Available Currencies 'currency/{currency}', // Get currency info + 'symbol', // Available Currency Symbols + 'symbol/{symbol}', // Get symbol info 'ticker', // Ticker list for all symbols 'ticker/{symbol}', // Ticker for symbol 'trades', @@ -102,11 +104,20 @@ module.exports = class hitbtc extends Exchange { 'order/{clientOrderId}', // Get a single order by clientOrderId 'trading/fee/all', // Get trading fee rate 'trading/fee/{symbol}', // Get trading fee rate + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', 'history/order', // Get historical orders 'history/trades', // Get historical trades 'history/order/{orderId}/trades', // Get historical trades by specified order 'account/balance', // Get main acccount balance - 'account/crypto/address/{currency}', // Get deposit crypro address + 'account/crypto/address/{currency}', // Get current address + 'account/crypto/addresses/{currency}', // Get last 10 deposit addresses for currency + 'account/crypto/used-addresses/{currency}', // Get last 10 unique addresses used for withdraw by currency + 'account/crypto/estimate-withdraw', 'account/crypto/is-mine/{address}', 'account/transactions', // Get account transactions 'account/transactions/{id}', // Get account transaction by id @@ -117,23 +128,33 @@ module.exports = class hitbtc extends Exchange { ], 'post': [ 'order', // Create new order - 'account/crypto/address/{currency}', // Create new deposit crypro address - 'account/crypto/withdraw', // Withdraw crypro + 'margin/order', + 'account/crypto/address/{currency}', // Create new crypto deposit address + 'account/crypto/withdraw', // Withdraw crypto 'account/crypto/transfer-convert', - 'account/transfer', // Transfer amount to trading + 'account/transfer', // Transfer amount to trading account or to main account + 'account/transfer/internal', 'sub-acc/freeze', 'sub-acc/activate', 'sub-acc/transfer', ], 'put': [ 'order/{clientOrderId}', // Create new order - 'account/crypto/withdraw/{id}', // Commit withdraw crypro + 'margin/account/{symbol}', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Commit crypto withdrawal 'sub-acc/acl/{subAccountUserId}', ], 'delete': [ 'order', // Cancel all open orders 'order/{clientOrderId}', // Cancel order - 'account/crypto/withdraw/{id}', // Rollback withdraw crypro + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Rollback crypto withdrawal ], // outdated? 'patch': [ @@ -152,8 +173,20 @@ module.exports = class hitbtc extends Exchange { }, 'options': { 'defaultTimeInForce': 'FOK', + 'accountsByType': { + 'bank': 'bank', + 'exchange': 'exchange', + 'main': 'bank', // alias of the above + 'trading': 'exchange', + }, + 'fetchBalanceMethod': { + 'account': 'account', + 'main': 'account', + 'trading': 'trading', + }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BCC': 'BCC', // initial symbol for Bitcoin Cash, now inactive 'BET': 'DAO.Casino', 'BOX': 'BOX Token', @@ -180,7 +213,6 @@ module.exports = class hitbtc extends Exchange { '20002': OrderNotFound, // canceling non-existent order '20001': InsufficientFunds, // {"error":{"code":20001,"message":"Insufficient funds","description":"Check that the funds are sufficient, given commissions"}} }, - 'orders': {}, // orders cache / emulation }); } @@ -217,14 +249,14 @@ module.exports = class hitbtc extends Exchange { if (id.indexOf ('_') >= 0) { symbol = id; } - const lot = this.safeFloat (market, 'quantityIncrement'); - const step = this.safeFloat (market, 'tickSize'); + const lot = this.safeNumber (market, 'quantityIncrement'); + const step = this.safeNumber (market, 'tickSize'); const precision = { 'price': step, 'amount': lot, }; - const taker = this.safeFloat (market, 'takeLiquidityRate'); - const maker = this.safeFloat (market, 'provideLiquidityRate'); + const taker = this.safeNumber (market, 'takeLiquidityRate'); + const maker = this.safeNumber (market, 'provideLiquidityRate'); const feeCurrencyId = this.safeString (market, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); result.push (this.extend (this.fees['trading'], { @@ -259,6 +291,49 @@ module.exports = class hitbtc extends Exchange { return result; } + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // account can be "exchange" or "bank", with aliases "main" or "trading" respectively + await this.loadMarkets (); + const currency = this.currency (code); + const requestAmount = this.currencyToPrecision (code, amount); + const request = { + 'currency': currency['id'], + 'amount': requestAmount, + }; + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + const keys = Object.keys (accountsByType); + if (fromId === undefined) { + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ') + ' instead of ' + fromId); + } + if (toId === undefined) { + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ') + ' instead of ' + toId); + } + if (fromId === toId) { + throw new ExchangeError (this.id + ' from and to cannot be the same account'); + } + type = fromId + 'To' + this.capitalize (toId); + } + request['type'] = type; + const response = await this.privatePostAccountTransfer (this.extend (request, params)); + // { id: '2db6ebab-fb26-4537-9ef8-1a689472d236' } + const id = this.safeString (response, 'id'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'amount': requestAmount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': undefined, + }; + } + async fetchCurrencies (params = {}) { const response = await this.publicGetCurrency (params); // @@ -314,7 +389,7 @@ module.exports = class hitbtc extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'payoutFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'payoutFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -354,15 +429,20 @@ module.exports = class hitbtc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } async fetchBalance (params = {}) { await this.loadMarkets (); const type = this.safeString (params, 'type', 'trading'); - const method = 'privateGet' + this.capitalize (type) + 'Balance'; + const fetchBalanceAccounts = this.safeValue (this.options, 'fetchBalanceMethod', {}); + const typeId = this.safeString (fetchBalanceAccounts, type); + if (typeId === undefined) { + throw new ExchangeError (this.id + ' fetchBalance account type must be either main or trading'); + } + const method = 'privateGet' + this.capitalize (typeId) + 'Balance'; const query = this.omit (params, 'type'); const response = await this[method] (query); const result = { 'info': response }; @@ -371,11 +451,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -392,11 +472,11 @@ module.exports = class hitbtc extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'max'), - this.safeFloat (ohlcv, 'min'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'max'), + this.safeNumber (ohlcv, 'min'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -442,10 +522,10 @@ module.exports = class hitbtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); let change = undefined; let percentage = undefined; let average = undefined; @@ -461,11 +541,11 @@ module.exports = class hitbtc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -541,7 +621,7 @@ module.exports = class hitbtc extends Exchange { market = this.safeMarket (marketId, market); const symbol = market['symbol']; let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = market ? market['feeCurrency'] : undefined; fee = { @@ -553,9 +633,11 @@ module.exports = class hitbtc extends Exchange { // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const orderId = this.safeString (trade, 'clientOrderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); const id = this.safeString (trade, 'id'); return { @@ -654,11 +736,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'hash'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -846,66 +928,25 @@ module.exports = class hitbtc extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'cumQuantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'cumQuantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); // we use clientOrderId as the order id with this exchange intentionally // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const id = this.safeString (order, 'clientOrderId'); const clientOrderId = id; - let price = this.safeFloat (order, 'price'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - if (price !== undefined) { - cost = filled * price; - } - } - } + const price = this.safeNumber (order, 'price'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); let trades = this.safeValue (order, 'tradesReport'); - let fee = undefined; - let average = this.safeValue (order, 'avgPrice'); + const fee = undefined; + const average = this.safeNumber (order, 'avgPrice'); if (trades !== undefined) { trades = this.parseTrades (trades, market); - let feeCost = undefined; - const numTrades = trades.length; - let tradesCost = 0; - for (let i = 0; i < numTrades; i++) { - if (feeCost === undefined) { - feeCost = 0; - } - tradesCost = this.sum (tradesCost, trades[i]['cost']); - const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); - if (tradeFeeCost !== undefined) { - feeCost = this.sum (feeCost, tradeFeeCost); - } - } - cost = tradesCost; - if ((filled !== undefined) && (filled > 0)) { - if (average === undefined) { - average = cost / filled; - } - if (type === 'market') { - if (price === undefined) { - price = average; - } - } - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, // https://github.com/ccxt/ccxt/issues/5674 'timestamp': created, @@ -920,13 +961,13 @@ module.exports = class hitbtc extends Exchange { 'stopPrice': undefined, 'average': average, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hollaex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hollaex.js index 52e81fec3..bde50ed15 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hollaex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/hollaex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadRequest, AuthenticationError, NetworkError, ArgumentsRequired, OrderNotFound, InsufficientFunds } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -15,7 +16,7 @@ module.exports = class hollaex extends Exchange { 'name': 'HollaEx', 'countries': [ 'KR' ], 'rateLimit': 333, - 'version': 'v1', + 'version': 'v2', 'has': { 'CORS': false, 'fetchMarkets': true, @@ -35,13 +36,13 @@ module.exports = class hollaex extends Exchange { 'cancelOrder': true, 'cancelAllOrders': true, 'fetchOpenOrders': true, - 'fetchClosedOrders': false, + 'fetchClosedOrders': true, 'fetchOpenOrder': true, 'fetchOrder': false, 'fetchDeposits': true, 'fetchWithdrawals': true, 'fetchTransactions': false, - 'fetchOrders': false, + 'fetchOrders': true, 'fetchMyTrades': true, 'withdraw': true, 'fetchDepositAddress': true, @@ -66,13 +67,17 @@ module.exports = class hollaex extends Exchange { 'public': { 'get': [ 'health', - 'constant', + 'constants', + 'kit', + 'tiers', 'ticker', - 'ticker/all', + 'tickers', + 'orderbook', 'orderbooks', 'trades', 'chart', - // TradingView data + 'charts', + // TradingView 'udf/config', 'udf/history', 'udf/symbols', @@ -82,20 +87,20 @@ module.exports = class hollaex extends Exchange { 'get': [ 'user', 'user/balance', - 'user/trades', - 'user/orders', - 'user/orders/{order_id}', 'user/deposits', 'user/withdrawals', - 'user/withdraw/{currency}/fee', + 'user/withdrawal/fee', + 'user/trades', + 'orders', + 'orders/{order_id}', ], 'post': [ 'user/request-withdrawal', 'order', ], 'delete': [ - 'user/orders', - 'user/orders/{order_id}', + 'order/all', + 'order', ], }, }, @@ -130,7 +135,7 @@ module.exports = class hollaex extends Exchange { } async fetchMarkets (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); // // { // coins: { @@ -197,17 +202,17 @@ module.exports = class hollaex extends Exchange { 'quoteId': quoteId, 'active': active, 'precision': { - 'price': this.safeFloat (market, 'increment_price'), - 'amount': this.safeFloat (market, 'increment_size'), + 'price': this.safeNumber (market, 'increment_price'), + 'amount': this.safeNumber (market, 'increment_size'), }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, 'max': undefined }, }, @@ -218,7 +223,7 @@ module.exports = class hollaex extends Exchange { } async fetchCurrencies (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); const coins = this.safeValue (response, 'coins', {}); const keys = Object.keys (coins); const result = {}; @@ -230,8 +235,8 @@ module.exports = class hollaex extends Exchange { const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'fullname'); const active = this.safeValue (currency, 'active'); - const fee = this.safeFloat (currency, 'withdrawal_fee'); - const precision = this.safeFloat (currency, 'increment_unit'); + const fee = this.safeNumber (currency, 'withdrawal_fee'); + const precision = this.safeNumber (currency, 'increment_unit'); const withdrawalLimits = this.safeValue (currency, 'withdrawal_limits', []); result[code] = { 'id': id, @@ -244,8 +249,8 @@ module.exports = class hollaex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min'), - 'max': this.safeFloat (currency, 'max'), + 'min': this.safeNumber (currency, 'min'), + 'max': this.safeNumber (currency, 'max'), }, 'price': { 'min': undefined, @@ -334,7 +339,7 @@ module.exports = class hollaex extends Exchange { async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.publicGetTickerAll (this.extend (params)); + const response = await this.publicGetTickers (this.extend (params)); // // { // "bch-usdt": { @@ -397,27 +402,27 @@ module.exports = class hollaex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString2 (ticker, 'time', 'timestamp')); - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const result = { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, - 'last': this.safeFloat (ticker, 'last', close), + 'last': this.safeNumber (ticker, 'last', close), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, }; return result; @@ -475,15 +480,12 @@ module.exports = class hollaex extends Exchange { const datetime = this.safeString (trade, 'timestamp'); const timestamp = this.parse8601 (datetime); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const quote = market['quote']; @@ -568,11 +570,11 @@ module.exports = class hollaex extends Exchange { // return [ this.parse8601 (this.safeString (response, 'time')), - this.safeFloat (response, 'open'), - this.safeFloat (response, 'high'), - this.safeFloat (response, 'low'), - this.safeFloat (response, 'close'), - this.safeFloat (response, 'volume'), + this.safeNumber (response, 'open'), + this.safeNumber (response, 'high'), + this.safeNumber (response, 'low'), + this.safeNumber (response, 'close'), + this.safeNumber (response, 'volume'), ]; } @@ -597,11 +599,11 @@ module.exports = class hollaex extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (response, currencyId + '_available'); - account['total'] = this.safeFloat (response, currencyId + '_balance'); + account['free'] = this.safeString (response, currencyId + '_available'); + account['total'] = this.safeString (response, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrder (id, symbol = undefined, params = {}) { @@ -609,67 +611,146 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateGetUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateGetOrdersOrderId (this.extend (request, params)); // // { - // "created_at": "2018-03-23T04:14:08.663Z", - // "title": "string", - // "side": "sell", - // "type": "limit", - // "price": 0, - // "size": 0, - // "symbol": "xht-usdt", // "id": "string", - // "created_by": 1, - // "filled": 0 + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } // } // return this.parseOrder (response); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'open': true, + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'status': 'filled', + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); let market = undefined; - const request = {}; + const request = { + // 'symbol': market['id'], + // 'side': 'buy', // 'sell' + // 'status': 'new', // 'filled', 'pfilled', 'canceled' + // 'open': true, + // 'limit': limit, // default 50, max 100 + // 'page': 1, + // 'order_by': 'created_at', // id, ... + // 'order': 'asc', // 'desc' + // 'start_date': this.iso8601 (since), + // 'end_date': this.iso8601 (this.milliseconds ()), + }; if (symbol !== undefined) { market = this.market (symbol); request['symbol'] = market['id']; } - const response = await this.privateGetUserOrders (this.extend (request, params)); + if (since !== undefined) { + request['start_date'] = this.iso8601 (since); + } + if (limit !== undefined) { + request['limit'] = limit; // default 50, max 100 + } + const response = await this.privateGetOrders (this.extend (request, params)); // - // [ - // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 - // } - // ] + // { + // "count": 1, + // "data": [ + // { + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } + // } + // ] + // } // - return this.parseOrders (response, market); + const data = this.safeValue (response, 'data', []); + return this.parseOrders (data, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'new': 'open', + 'pfilled': 'open', + 'filled': 'closed', + 'canceled': 'canceled', + }; + return this.safeString (statuses, status, status); } parseOrder (order, market = undefined) { // - // fetchOpenOrder, fetchOpenOrders + // createOrder, fetchOpenOrder, fetchOpenOrders // // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // }, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, // } // const marketId = this.safeString (order, 'symbol'); @@ -678,21 +759,11 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filled'); - let cost = undefined; - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = filled * price; - } - } - const status = (type === 'market') ? 'closed' : 'open'; - const result = { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filled'); + const status = this.parseOrderStatus (this.safeString (order, 'status')); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -708,40 +779,56 @@ module.exports = class hollaex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; - return result; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); - const order = { + const request = { 'symbol': market['id'], 'side': side, 'size': amount, 'type': type, + // 'stop': parseFloat (this.priceToPrecision (symbol, stopPrice)), + // 'meta': {}, // other options such as post_only }; if (type !== 'market') { - order['price'] = price; + request['price'] = price; } - const response = await this.privatePostOrder (this.extend (order, params)); + const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop'); + if (stopPrice !== undefined) { + request['stop'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + params = this.omit (params, [ 'stopPrice', 'stop' ]); + } + const response = await this.privatePostOrder (this.extend (request, params)); // // { + // "fee": 0, + // "meta": {}, // "symbol": "xht-usdt", // "side": "sell", - // "size": 1, + // "size": 0.1, // "type": "limit", - // "price": 0.1, + // "price": 1, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, + // "fee_coin": "usdt", // "id": "string", - // "created_by": 34, + // "created_by": 116, // "filled": 0, - // "status": "pending" + // "status": "new", + // "updated_at": "2021-02-17T03:03:19.231Z", + // "created_at": "2021-02-17T03:03:19.231Z", + // "stop": null // } // return this.parseOrder (response, market); @@ -752,7 +839,7 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateDeleteUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateDeleteOrder (this.extend (request, params)); // // { // "title": "string", @@ -777,7 +864,7 @@ module.exports = class hollaex extends Exchange { market = this.markets (symbol); request['symbol'] = market['id']; } - const response = await this.privateDeleteUserOrders (this.extend (request, params)); + const response = await this.privateDeleteOrderAll (this.extend (request, params)); // // [ // { @@ -1043,7 +1130,7 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_at')); const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const type = this.safeString (transaction, 'type'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); let addressTo = undefined; const addressFrom = undefined; @@ -1073,7 +1160,7 @@ module.exports = class hollaex extends Exchange { } const fee = { 'currency': code, - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), }; return { 'info': transaction, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/huobipro.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/huobipro.js index 52dc315e8..22c1d91d5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/huobipro.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/huobipro.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, ArgumentsRequired, BadSymbol, BadRequest, RequestTimeout, NetworkError } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -22,7 +23,9 @@ module.exports = class huobipro extends Exchange { 'hostname': 'api.huobi.pro', // api.testnet.huobi.pro 'pro': true, 'has': { + 'cancelAllOrders': true, 'cancelOrder': true, + 'cancelOrders': true, 'CORS': false, 'createOrder': true, 'fetchBalance': true, @@ -189,6 +192,7 @@ module.exports = class huobipro extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.002, @@ -252,6 +256,7 @@ module.exports = class huobipro extends Exchange { // https://en.cryptonomist.ch/blog/eidoo/the-edo-to-pnt-upgrade-what-you-need-to-know-updated/ 'PNT': 'Penta', 'SBTC': 'Super Bitcoin', + 'BIFI': 'Bitcoin File', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706 }, }); } @@ -316,8 +321,8 @@ module.exports = class huobipro extends Exchange { 'info': limits, 'limits': { 'amount': { - 'min': this.safeFloat (limits, 'limit-order-must-greater-than'), - 'max': this.safeFloat (limits, 'limit-order-must-less-than'), + 'min': this.safeNumber (limits, 'limit-order-must-greater-than'), + 'max': this.safeNumber (limits, 'limit-order-must-less-than'), }, }, }; @@ -351,9 +356,9 @@ module.exports = class huobipro extends Exchange { }; const maker = (base === 'OMG') ? 0 : 0.2 / 100; const taker = (base === 'OMG') ? 0 : 0.2 / 100; - const minAmount = this.safeFloat (market, 'min-order-amt', Math.pow (10, -precision['amount'])); - const maxAmount = this.safeFloat (market, 'max-order-amt'); - const minCost = this.safeFloat (market, 'min-order-value', 0); + const minAmount = this.safeNumber (market, 'min-order-amt', Math.pow (10, -precision['amount'])); + const maxAmount = this.safeNumber (market, 'max-order-amt'); + const minCost = this.safeNumber (market, 'min-order-value', 0); const state = this.safeString (market, 'state'); const active = (state === 'online'); result.push ({ @@ -432,24 +437,24 @@ module.exports = class huobipro extends Exchange { let askVolume = undefined; if ('bid' in ticker) { if (Array.isArray (ticker['bid'])) { - bid = this.safeFloat (ticker['bid'], 0); - bidVolume = this.safeFloat (ticker['bid'], 1); + bid = this.safeNumber (ticker['bid'], 0); + bidVolume = this.safeNumber (ticker['bid'], 1); } else { - bid = this.safeFloat (ticker, 'bid'); + bid = this.safeNumber (ticker, 'bid'); bidVolume = this.safeValue (ticker, 'bidSize'); } } if ('ask' in ticker) { if (Array.isArray (ticker['ask'])) { - ask = this.safeFloat (ticker['ask'], 0); - askVolume = this.safeFloat (ticker['ask'], 1); + ask = this.safeNumber (ticker['ask'], 0); + askVolume = this.safeNumber (ticker['ask'], 1); } else { - ask = this.safeFloat (ticker, 'ask'); + ask = this.safeNumber (ticker, 'ask'); askVolume = this.safeValue (ticker, 'askSize'); } } - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -460,15 +465,15 @@ module.exports = class huobipro extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -557,7 +562,7 @@ module.exports = class huobipro extends Exchange { // } // const ticker = this.parseTicker (response['tick'], market); - const timestamp = this.safeValue (response, 'ts'); + const timestamp = this.safeInteger (response, 'ts'); ticker['timestamp'] = timestamp; ticker['datetime'] = this.iso8601 (timestamp); return ticker; @@ -626,21 +631,18 @@ module.exports = class huobipro extends Exchange { type = typeParts[1]; } const takerOrMaker = this.safeString (trade, 'role'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'filled-amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'filled-amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - let feeCost = this.safeFloat (trade, 'filled-fees'); + let feeCost = this.safeNumber (trade, 'filled-fees'); let feeCurrency = undefined; if (market !== undefined) { feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee-currency')); } - const filledPoints = this.safeFloat (trade, 'filled-points'); + const filledPoints = this.safeNumber (trade, 'filled-points'); if (filledPoints !== undefined) { if ((feeCost === undefined) || (feeCost === 0.0)) { feeCost = filledPoints; @@ -754,11 +756,11 @@ module.exports = class huobipro extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -855,11 +857,11 @@ module.exports = class huobipro extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'deposit-min-amount'), + 'min': this.safeNumber (currency, 'deposit-min-amount'), 'max': Math.pow (10, precision), }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw-min-amount'), + 'min': this.safeNumber (currency, 'withdraw-min-amount'), 'max': Math.pow (10, precision), }, }, @@ -890,14 +892,14 @@ module.exports = class huobipro extends Exchange { account = this.account (); } if (balance['type'] === 'trade') { - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); } if (balance['type'] === 'frozen') { - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrdersByStates (states, symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1072,28 +1074,14 @@ module.exports = class huobipro extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (order, 'created-at'); - let amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount - if ((type === 'market') && (side === 'buy')) { - amount = (status === 'closed') ? filled : undefined; - } - let price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - const cost = this.safeFloat2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - // if cost is defined and filled is not zero - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - const feeCost = this.safeFloat2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees + const cost = this.safeNumber2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo + const feeCost = this.safeNumber2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -1105,7 +1093,7 @@ module.exports = class huobipro extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1119,15 +1107,15 @@ module.exports = class huobipro extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1201,26 +1189,82 @@ module.exports = class huobipro extends Exchange { }); } - currencyToPrecision (currency, fee) { - return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); + async cancelOrders (ids, symbol = undefined, params = {}) { + await this.loadMarkets (); + const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); + params = this.omit (params, [ 'clientOrderIds', 'client-order-ids' ]); + const request = {}; + if (clientOrderIds === undefined) { + request['order-ids'] = ids; + } else { + request['client-order-ids'] = clientOrderIds; + } + const response = await this.privatePostOrderOrdersBatchcancel (this.extend (request, params)); + // + // { + // "status": "ok", + // "data": { + // "success": [ + // "5983466" + // ], + // "failed": [ + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "first" + // }, + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "second" + // }, + // { + // "err-msg": "The record is not found.", + // "order-id": "", + // "err-code": "base-not-found", + // "client-order-id": "third" + // } + // ] + // } + // } + // + return response; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (market[key], cost)), + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'account-id' string false NA The account id used for this cancel Refer to GET /v1/account/accounts + // 'symbol': market['id'], // a list of comma-separated symbols, all symbols by default + // 'types' 'string', buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-stop-limit, sell-stop-limit, buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok + // 'side': 'buy', // or 'sell' + // 'size': 100, // the number of orders to cancel 1-100 }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.privatePostOrderOrdersBatchCancelOpenOrders (this.extend (request, params)); + // + // { + // code: 200, + // data: { + // "success-count": 2, + // "failed-count": 0, + // "next-id": 5454600 + // } + // } + // + return response; + } + + currencyToPrecision (currency, fee) { + return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); } parseDepositAddress (depositAddress, currency = undefined) { @@ -1362,7 +1406,7 @@ module.exports = class huobipro extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const tag = this.safeString (transaction, 'address-tag'); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -1375,7 +1419,7 @@ module.exports = class huobipro extends Exchange { 'address': this.safeString (transaction, 'address'), 'tag': tag, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ice3x.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ice3x.js deleted file mode 100644 index f228076d1..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ice3x.js +++ /dev/null @@ -1,495 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class ice3x extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'ice3x', - 'name': 'ICE3X', - 'countries': [ 'ZA' ], // South Africa - 'rateLimit': 1000, - 'version': 'v1', - 'has': { - 'cancelOrder': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchCurrencies': true, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTrades': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg', - 'api': 'https://ice3x.com/api', - 'www': 'https://ice3x.com', // 'https://ice3x.co.za', - 'doc': 'https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017', - 'fees': [ - 'https://help.ice3.com/support/solutions/articles/11000033293-trading-fees', - 'https://help.ice3.com/support/solutions/articles/11000033288-fees-explained', - 'https://help.ice3.com/support/solutions/articles/11000008131-what-are-your-fiat-deposit-and-withdrawal-fees-', - 'https://help.ice3.com/support/solutions/articles/11000033289-deposit-fees', - ], - 'referral': 'https://ice3x.com?ref=14341802', - }, - 'api': { - 'public': { - 'get': [ - 'currency/list', - 'currency/info', - 'pair/list', - 'pair/info', - 'stats/marketdepthfull', - 'stats/marketdepthbtcav', - 'stats/marketdepth', - 'orderbook/info', - 'trade/list', - 'trade/info', - ], - }, - 'private': { - 'post': [ - 'balance/list', - 'balance/info', - 'order/new', - 'order/cancel', - 'order/list', - 'order/info', - 'trade/list', - 'trade/info', - 'transaction/list', - 'transaction/info', - 'invoice/list', - 'invoice/info', - 'invoice/pdf', - ], - }, - }, - 'fees': { - 'trading': { - 'maker': 0.005, - 'taker': 0.005, - }, - }, - 'precision': { - 'amount': 8, - 'price': 8, - }, - }); - } - - async fetchCurrencies (params = {}) { - const response = await this.publicGetCurrencyList (params); - const currencies = response['response']['entities']; - const precision = this.precision['amount']; - const result = {}; - for (let i = 0; i < currencies.length; i++) { - const currency = currencies[i]; - const id = this.safeString (currency, 'currency_id'); - const currencyId = this.safeString (currency, 'iso'); - const code = this.safeCurrencyCode (currencyId); - result[code] = { - 'id': id, - 'code': code, - 'name': currency['name'], - 'active': true, - 'precision': precision, - 'limits': { - 'amount': { - 'min': undefined, - 'max': Math.pow (10, precision), - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': Math.pow (10, precision), - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - }, - 'info': currency, - 'fee': undefined, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - if (this.currencies_by_id === undefined) { - this.currencies = await this.fetchCurrencies (); - this.currencies_by_id = this.indexBy (this.currencies, 'id'); - } - const response = await this.publicGetPairList (params); - const markets = this.safeValue (response['response'], 'entities'); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = this.safeString (market, 'pair_id'); - const baseId = this.safeString (market, 'currency_id_from'); - const quoteId = this.safeString (market, 'currency_id_to'); - const baseCurrency = this.currencies_by_id[baseId]; - const quoteCurrency = this.currencies_by_id[quoteId]; - const base = baseCurrency['code']; - const quote = quoteCurrency['code']; - const symbol = base + '/' + quote; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': undefined, - 'info': market, - 'precision': this.precision, - 'limits': this.limits, - }); - } - return result; - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.milliseconds (); - const symbol = market['symbol']; - const last = this.safeFloat (ticker, 'last_price'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'max_bid'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'min_ask'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'vol'), - 'info': ticker, - }; - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetStatsMarketdepthfull (this.extend (request, params)); - const ticker = this.safeValue (response['response'], 'entity'); - return this.parseTicker (ticker, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetStatsMarketdepthfull (params); - const tickers = this.safeValue (response['response'], 'entities'); - const result = {}; - for (let i = 0; i < tickers.length; i++) { - const ticker = tickers[i]; - const marketId = this.safeString (ticker, 'pair_id'); - const market = this.safeValue (this.marketsById, marketId); - if (market !== undefined) { - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); - } - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'pair_id': this.marketId (symbol), - }; - if (limit !== undefined) { - const type = this.safeString (params, 'type'); - if ((type !== 'ask') && (type !== 'bid')) { - // eslint-disable-next-line quotes - throw new ArgumentsRequired (this.id + " fetchOrderBook() requires an exchange-specific extra 'type' param ('bid' or 'ask') when used with a limit"); - } else { - request['items_per_page'] = limit; - } - } - const response = await this.publicGetOrderbookInfo (this.extend (request, params)); - const orderbook = this.safeValue (response['response'], 'entities'); - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'price', 'amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.safeTimestamp (trade, 'created'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } - const type = 'limit'; - const side = this.safeString (trade, 'type'); - const id = this.safeString (trade, 'trade_id'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'id': id, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': type, - 'side': side, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetTradeList (this.extend (request, params)); - const trades = this.safeValue (response['response'], 'entities'); - return this.parseTrades (trades, market, since, limit); - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostBalanceList (params); - const result = { 'info': response }; - const balances = this.safeValue (response['response'], 'entities', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - // currency ids are numeric strings - const currencyId = this.safeString (balance, 'currency_id'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseOrder (order, market = undefined) { - const pairId = this.safeInteger (order, 'pair_id'); - let symbol = undefined; - if (pairId && !market && (pairId in this.marketsById)) { - market = this.marketsById[pairId]; - symbol = market['symbol']; - } - const timestamp = this.safeTimestamp (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - let status = this.safeInteger (order, 'active'); - let remaining = this.safeFloat (order, 'remaining'); - let filled = undefined; - if (status === 1) { - status = 'open'; - } else { - status = 'closed'; - remaining = 0; - filled = amount; - } - let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - }; - if (market !== undefined) { - fee['currency'] = market['quote']; - } - } - return { - 'id': this.safeString (order, 'order_id'), - 'clientOrderId': undefined, - 'datetime': this.iso8601 (timestamp), - 'timestamp': timestamp, - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': 'limit', - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': this.safeString (order, 'type'), - 'price': price, - 'stopPrice': undefined, - 'cost': undefined, - 'amount': amount, - 'filled': filled, - 'remaining': remaining, - 'trades': undefined, - 'fee': fee, - 'info': order, - 'average': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - 'type': side, - 'amount': amount, - 'price': price, - }; - const response = await this.privatePostOrderNew (this.extend (request, params)); - const order = this.parseOrder ({ - 'order_id': response['response']['entity']['order_id'], - 'created': this.seconds (), - 'active': 1, - 'type': side, - 'price': price, - 'volume': amount, - 'remaining': amount, - 'info': response, - }, market); - return order; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - const request = { - 'order_id': id, - }; - return await this.privatePostOrderCancel (this.extend (request, params)); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'order _id': id, - }; - const response = await this.privatePostOrderInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const order = this.safeValue (data, 'entity'); - return this.parseOrder (order); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.privatePostOrderList (params); - const data = this.safeValue (response, 'response', {}); - const orders = this.safeValue (data, 'entities', []); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - return this.parseOrders (orders, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - if (limit !== undefined) { - request['items_per_page'] = limit; - } - if (since !== undefined) { - request['date_from'] = parseInt (since / 1000); - } - const response = await this.privatePostTradeList (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const trades = this.safeValue (data, 'entities', []); - return this.parseTrades (trades, market, since, limit); - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency_id': currency['id'], - }; - const response = await this.privatePostBalanceInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const balance = this.safeValue (data, 'entity', {}); - const address = this.safeString (balance, 'address'); - const status = address ? 'ok' : 'none'; - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'status': status, - 'info': response, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/' + this.version + '/' + path; - if (api === 'public') { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } - } else { - this.checkRequiredCredentials (); - body = this.urlencode (this.extend ({ - 'nonce': this.nonce (), - }, params)); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const response = await this.fetch2 (path, api, method, params, headers, body); - const errors = this.safeValue (response, 'errors'); - const data = this.safeValue (response, 'response'); - if (errors || !data) { - const authErrorKeys = [ 'Key', 'user_id', 'Sign' ]; - for (let i = 0; i < authErrorKeys.length; i++) { - const errorKey = authErrorKeys[i]; - const errorMessage = this.safeString (errors, errorKey); - if (!errorMessage) { - continue; - } - if (errorKey === 'user_id' && errorMessage.indexOf ('authorization') < 0) { - continue; - } - throw new AuthenticationError (errorMessage); - } - throw new ExchangeError (this.json (errors)); - } - return response; - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/idex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/idex.js index 7d52a5286..c3c14d981 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/idex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/idex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { PAD_WITH_ZERO } = require ('./base/functions/number'); const { InvalidOrder, InsufficientFunds, ExchangeError, ExchangeNotAvailable, DDoSProtection, BadRequest, NotSupported, InvalidAddress, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -241,14 +242,6 @@ module.exports = class idex extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // { // market: 'DIL-ETH', @@ -268,16 +261,16 @@ module.exports = class idex extends Exchange { // } const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'baseVolume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'baseVolume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'open'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const close = this.safeFloat (ticker, 'close'); - const ask = this.safeFloat (ticker, 'ask'); - const bid = this.safeFloat (ticker, 'bid'); - let percentage = this.safeFloat (ticker, 'percentChange'); + const open = this.safeNumber (ticker, 'open'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const close = this.safeNumber (ticker, 'close'); + const ask = this.safeNumber (ticker, 'ask'); + const bid = this.safeNumber (ticker, 'bid'); + let percentage = this.safeNumber (ticker, 'percentChange'); if (percentage !== undefined) { percentage = 1 + percentage / 100; } @@ -353,11 +346,11 @@ module.exports = class idex extends Exchange { // sequence: 3853 // } const timestamp = this.safeInteger (ohlcv, 'start'); - const open = this.safeFloat (ohlcv, 'open'); - const high = this.safeFloat (ohlcv, 'high'); - const low = this.safeFloat (ohlcv, 'low'); - const close = this.safeFloat (ohlcv, 'close'); - const volume = this.safeFloat (ohlcv, 'volume'); + const open = this.safeNumber (ohlcv, 'open'); + const high = this.safeNumber (ohlcv, 'high'); + const low = this.safeNumber (ohlcv, 'low'); + const close = this.safeNumber (ohlcv, 'close'); + const volume = this.safeNumber (ohlcv, 'volume'); return [ timestamp, open, high, low, close, volume ]; } @@ -419,9 +412,14 @@ module.exports = class idex extends Exchange { // txStatus: 'mined' // } const id = this.safeString (trade, 'fillId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'quoteQuantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteQuantity'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const timestamp = this.safeInteger (trade, 'time'); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); @@ -430,7 +428,7 @@ module.exports = class idex extends Exchange { const oppositeSide = (makerSide === 'buy') ? 'sell' : 'buy'; const side = this.safeString (trade, 'side', oppositeSide); const takerOrMaker = this.safeString (trade, 'liquidity', 'taker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); @@ -503,8 +501,8 @@ module.exports = class idex extends Exchange { const result = []; for (let i = 0; i < bookSide.length; i++) { const order = bookSide[i]; - const price = this.safeFloat (order, 0); - const amount = this.safeFloat (order, 1); + const price = this.safeNumber (order, 0); + const amount = this.safeNumber (order, 1); const orderCount = this.safeInteger (order, 2); result.push ([ price, amount, orderCount ]); } @@ -591,16 +589,13 @@ module.exports = class idex extends Exchange { const entry = response[i]; const currencyId = this.safeString (entry, 'asset'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (entry, 'quantity'); - const free = this.safeFloat (entry, 'availableForTrade'); - const used = this.safeFloat (entry, 'locked'); - result[code] = { - 'free': free, - 'used': used, - 'total': total, - }; + const account = this.account (); + account['total'] = this.safeString (entry, 'quantity'); + account['free'] = this.safeString (entry, 'availableForTrade'); + account['used'] = this.safeString (entry, 'locked'); + result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -821,10 +816,10 @@ module.exports = class idex extends Exchange { const symbol = this.safeSymbol (marketId, market, '-'); const trades = this.parseTrades (fills, market); const type = this.safeString (order, 'type'); - const amount = this.safeFloat (order, 'originalQuantity'); - const filled = this.safeFloat (order, 'executedQuantity'); - const average = this.safeFloat (order, 'avgExecutionPrice'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'originalQuantity'); + const filled = this.safeNumber (order, 'executedQuantity'); + const average = this.safeNumber (order, 'avgExecutionPrice'); + const price = this.safeNumber (order, 'price'); const rawStatus = this.safeString (order, 'status'); const status = this.parseOrderStatus (rawStatus); const fee = { @@ -933,7 +928,7 @@ module.exports = class idex extends Exchange { throw new NotSupported (this.id + ' quoteOrderQuantity is not supported for ' + type + ' orders, only supported for market orders'); } amountEnum = 1; - amount = this.safeFloat (params, 'quoteOrderQuantity'); + amount = this.safeNumber (params, 'quoteOrderQuantity'); } const sideEnum = (side === 'buy') ? 0 : 1; const walletBytes = this.remove0xPrefix (this.walletAddress); @@ -1236,13 +1231,13 @@ module.exports = class idex extends Exchange { } const id = this.safeString2 (transaction, 'depositId', 'withdrawId'); const code = this.safeCurrencyCode (this.safeString (transaction, 'asset'), currency); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const txid = this.safeString (transaction, 'txId'); const timestamp = this.safeInteger (transaction, 'txTime'); let fee = undefined; if ('fee' in transaction) { fee = { - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), 'currency': 'ETH', }; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/independentreserve.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/independentreserve.js index 119a216d5..86dcb348b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/independentreserve.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/independentreserve.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -126,11 +127,11 @@ module.exports = class independentreserve extends Exchange { const currencyId = this.safeString (balance, 'CurrencyCode'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'AvailableBalance'); - account['total'] = this.safeFloat (balance, 'TotalBalance'); + account['free'] = this.safeString (balance, 'AvailableBalance'); + account['total'] = this.safeString (balance, 'TotalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -151,16 +152,16 @@ module.exports = class independentreserve extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'LastPrice'); + const last = this.safeNumber (ticker, 'LastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'DayHighestPrice'), - 'low': this.safeFloat (ticker, 'DayLowestPrice'), - 'bid': this.safeFloat (ticker, 'CurrentHighestBidPrice'), + 'high': this.safeNumber (ticker, 'DayHighestPrice'), + 'low': this.safeNumber (ticker, 'DayLowestPrice'), + 'bid': this.safeNumber (ticker, 'CurrentHighestBidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'CurrentLowestOfferPrice'), + 'ask': this.safeNumber (ticker, 'CurrentLowestOfferPrice'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -169,8 +170,8 @@ module.exports = class independentreserve extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'DayAvgPrice'), - 'baseVolume': this.safeFloat (ticker, 'DayVolumeXbtInSecondaryCurrrency'), + 'average': this.safeNumber (ticker, 'DayAvgPrice'), + 'baseVolume': this.safeNumber (ticker, 'DayVolumeXbtInSecondaryCurrrency'), 'quoteVolume': undefined, 'info': ticker, }; @@ -249,20 +250,10 @@ module.exports = class independentreserve extends Exchange { orderType = 'limit'; } const timestamp = this.parse8601 (this.safeString (order, 'CreatedTimestampUtc')); - const amount = this.safeFloat2 (order, 'VolumeOrdered', 'Volume'); - let filled = this.safeFloat (order, 'VolumeFilled'); - let remaining = this.safeFloat (order, 'Outstanding'); - if (filled === undefined) { - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (0, amount - remaining); - } - } - if (remaining === undefined) { - if ((filled !== undefined) && (amount !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const feeRate = this.safeFloat (order, 'FeePercent'); + const amount = this.safeNumber2 (order, 'VolumeOrdered', 'Volume'); + const filled = this.safeNumber (order, 'VolumeFilled'); + const remaining = this.safeNumber (order, 'Outstanding'); + const feeRate = this.safeNumber (order, 'FeePercent'); let feeCost = undefined; if (feeRate !== undefined) { feeCost = feeRate * filled; @@ -274,10 +265,10 @@ module.exports = class independentreserve extends Exchange { }; const id = this.safeString (order, 'OrderGuid'); const status = this.parseOrderStatus (this.safeString (order, 'Status')); - const cost = this.safeFloat (order, 'Value'); - const average = this.safeFloat (order, 'AvgPrice'); - const price = this.safeFloat (order, 'Price', average); - return { + const cost = this.safeNumber (order, 'Value'); + const average = this.safeNumber (order, 'AvgPrice'); + const price = this.safeNumber (order, 'Price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -299,7 +290,7 @@ module.exports = class independentreserve extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -387,14 +378,11 @@ module.exports = class independentreserve extends Exchange { const timestamp = this.parse8601 (trade['TradeTimestampUtc']); const id = this.safeString (trade, 'TradeGuid'); const orderId = this.safeString (trade, 'OrderGuid'); - const price = this.safeFloat2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); - const amount = this.safeFloat2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); + const amountString = this.safeString2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const baseId = this.safeString (trade, 'PrimaryCurrencyCode'); const quoteId = this.safeString (trade, 'SecondaryCurrencyCode'); let marketId = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/indodax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/indodax.js index f1cc33732..05972a887 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/indodax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/indodax.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,7 +165,7 @@ module.exports = class indodax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const taker = this.safeFloat (market, 'trade_fee_percent'); + const taker = this.safeNumber (market, 'trade_fee_percent'); const isMaintenance = this.safeInteger (market, 'is_maintenance'); const active = (isMaintenance) ? false : true; const pricePrecision = this.safeInteger (market, 'price_round'); @@ -174,11 +175,11 @@ module.exports = class indodax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'trade_min_traded_currency'), + 'min': this.safeNumber (market, 'trade_min_traded_currency'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'trade_min_base_currency'), + 'min': this.safeNumber (market, 'trade_min_base_currency'), 'max': undefined, }, 'cost': { @@ -216,11 +217,11 @@ module.exports = class indodax extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (used, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (used, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -257,16 +258,16 @@ module.exports = class indodax extends Exchange { const timestamp = this.safeTimestamp (ticker, 'server_time'); const baseVolume = 'vol_' + market['baseId'].toLowerCase (); const quoteVolume = 'vol_' + market['quoteId'].toLowerCase (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -276,8 +277,8 @@ module.exports = class indodax extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, baseVolume), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, baseVolume), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -291,14 +292,11 @@ module.exports = class indodax extends Exchange { } const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -353,7 +351,7 @@ module.exports = class indodax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status', 'open')); let symbol = undefined; let cost = undefined; - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let amount = undefined; let remaining = undefined; let filled = undefined; @@ -367,18 +365,18 @@ module.exports = class indodax extends Exchange { if ((market['baseId'] === 'idr') && ('remain_rp' in order)) { baseId = 'rp'; } - cost = this.safeFloat (order, 'order_' + quoteId); + cost = this.safeNumber (order, 'order_' + quoteId); if (cost) { amount = cost / price; - const remainingCost = this.safeFloat (order, 'remain_' + quoteId); + const remainingCost = this.safeNumber (order, 'remain_' + quoteId); if (remainingCost !== undefined) { remaining = remainingCost / price; filled = amount - remaining; } } else { - amount = this.safeFloat (order, 'order_' + baseId); + amount = this.safeNumber (order, 'order_' + baseId); cost = price * amount; - remaining = this.safeFloat (order, 'remain_' + baseId); + remaining = this.safeNumber (order, 'remain_' + baseId); filled = amount - remaining; } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/itbit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/itbit.js index 552bb0de5..a46080ccc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/itbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/itbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -114,25 +115,25 @@ module.exports = class itbit extends Exchange { throw new ExchangeError (this.id + ' fetchTicker returned a bad response: ' + this.json (ticker)); } const timestamp = this.parse8601 (serverTimeUTC); - const vwap = this.safeFloat (ticker, 'vwap24h'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); + const vwap = this.safeNumber (ticker, 'vwap24h'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'openToday'), + 'open': this.safeNumber (ticker, 'openToday'), 'close': last, 'last': last, 'previousClose': undefined, @@ -179,23 +180,20 @@ module.exports = class itbit extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const side = this.safeString (trade, 'direction'); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'commissionPaid'); + let feeCost = this.safeNumber (trade, 'commissionPaid'); const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - let rebatesApplied = this.safeFloat (trade, 'rebatesApplied'); + let rebatesApplied = this.safeNumber (trade, 'rebatesApplied'); if (rebatesApplied !== undefined) { rebatesApplied = -rebatesApplied; } const rebateCurrencyId = this.safeString (trade, 'rebateCurrency'); const rebateCurrency = this.safeCurrencyCode (rebateCurrencyId); - const price = this.safeFloat2 (trade, 'price', 'rate'); - const amount = this.safeFloat2 (trade, 'currency1Amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'price', 'rate'); + const amountString = this.safeString2 (trade, 'currency1Amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; const marketId = this.safeString (trade, 'instrument'); if (marketId !== undefined) { @@ -317,7 +315,7 @@ module.exports = class itbit extends Exchange { 'txid': txnHash, 'type': transactionType, 'status': status, - 'amount': this.safeFloat (item, 'amount'), + 'amount': this.safeNumber (item, 'amount'), 'fee': undefined, 'info': item, }); @@ -417,11 +415,11 @@ module.exports = class itbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchWallets (params = {}) { @@ -512,26 +510,16 @@ module.exports = class itbit extends Exchange { const type = this.safeString (order, 'type'); const symbol = this.markets_by_id[order['instrument']]['symbol']; const timestamp = this.parse8601 (order['createdTime']); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'amountFilled'); - let remaining = undefined; - let cost = undefined; + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'amountFilled'); const fee = undefined; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'volumeWeightedAveragePrice'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'volumeWeightedAveragePrice'); const clientOrderId = this.safeString (order, 'clientOrderIdentifier'); const id = this.safeString (order, 'id'); const postOnlyString = this.safeString (order, 'postOnly'); const postOnly = (postOnlyString === 'True'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -546,15 +534,15 @@ module.exports = class itbit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, // 'trades': this.parseTrades (order['trades'], market), 'trades': undefined, - }; + }); } nonce () { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kraken.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kraken.js index 198ee4cf8..514ed0094 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kraken.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kraken.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeNotAvailable, ArgumentsRequired, PermissionDenied, AuthenticationError, ExchangeError, OrderNotFound, DDoSProtection, InvalidNonce, InsufficientFunds, CancelPending, InvalidOrder, InvalidAddress, RateLimitExceeded } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -297,26 +298,38 @@ module.exports = class kraken extends Exchange { // } // } // - const keys = Object.keys (response['result']); + const markets = this.safeValue (response, 'result', {}); + const keys = Object.keys (markets); let result = []; for (let i = 0; i < keys.length; i++) { const id = keys[i]; - const market = response['result'][id]; - const baseId = market['base']; - const quoteId = market['quote']; + const market = markets[id]; + const baseId = this.safeString (market, 'base'); + const quoteId = this.safeString (market, 'quote'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const darkpool = id.indexOf ('.d') >= 0; - const symbol = darkpool ? market['altname'] : (base + '/' + quote); + const altname = this.safeString (market, 'altname'); + const symbol = darkpool ? altname : (base + '/' + quote); + const makerFees = this.safeValue (market, 'fees_maker', []); + const firstMakerFee = this.safeValue (makerFees, 0, []); + const firstMakerFeeRate = this.safeNumber (firstMakerFee, 1); let maker = undefined; - if ('fees_maker' in market) { - maker = parseFloat (market['fees_maker'][0][1]) / 100; + if (firstMakerFeeRate !== undefined) { + maker = parseFloat (firstMakerFeeRate) / 100; + } + const takerFees = this.safeValue (market, 'fees', []); + const firstTakerFee = this.safeValue (takerFees, 0, []); + const firstTakerFeeRate = this.safeNumber (firstTakerFee, 1); + let taker = undefined; + if (firstTakerFeeRate !== undefined) { + taker = parseFloat (firstTakerFeeRate) / 100; } const precision = { - 'amount': market['lot_decimals'], - 'price': market['pair_decimals'], + 'amount': this.safeInteger (market, 'lot_decimals'), + 'price': this.safeInteger (market, 'pair_decimals'), }; - const minAmount = this.safeFloat (market, 'ordermin'); + const minAmount = this.safeNumber (market, 'ordermin'); result.push ({ 'id': id, 'symbol': symbol, @@ -328,7 +341,7 @@ module.exports = class kraken extends Exchange { 'info': market, 'altname': market['altname'], 'maker': maker, - 'taker': parseFloat (market['fees'][0][1]) / 100, + 'taker': taker, 'active': true, 'precision': precision, 'limits': { @@ -451,7 +464,7 @@ module.exports = class kraken extends Exchange { await this.loadMarkets (); this.checkRequiredCredentials (); const response = await this.privatePostTradeVolume (params); - const tradedVolume = this.safeFloat (response['result'], 'volume'); + const tradedVolume = this.safeNumber (response['result'], 'volume'); const tiers = this.fees['trading']['tiers']; let taker = tiers['taker'][1]; let maker = tiers['maker'][1]; @@ -473,8 +486,8 @@ module.exports = class kraken extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); const timestamp = this.safeInteger (bidask, 2); return [ price, amount, timestamp ]; } @@ -512,7 +525,14 @@ module.exports = class kraken extends Exchange { // } // const result = this.safeValue (response, 'result', {}); - const orderbook = this.safeValue (result, market['id']); + let orderbook = this.safeValue (result, market['id']); + // sometimes kraken returns wsname instead of market id + // https://github.com/ccxt/ccxt/issues/8662 + const marketInfo = this.safeValue (market, 'info', {}); + const wsName = this.safeValue (marketInfo, 'wsname'); + if (wsName !== undefined) { + orderbook = this.safeValue (result, wsName, orderbook); + } return this.parseOrderBook (orderbook); } @@ -540,7 +560,7 @@ module.exports = class kraken extends Exchange { 'ask': parseFloat (ticker['a'][0]), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'o'), + 'open': this.safeNumber (ticker, 'o'), 'close': last, 'last': last, 'previousClose': undefined, @@ -611,11 +631,11 @@ module.exports = class kraken extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 6), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 6), ]; } @@ -682,24 +702,24 @@ module.exports = class kraken extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'asset'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); } else { direction = 'in'; } - const time = this.safeFloat (item, 'time'); + const time = this.safeNumber (item, 'time'); let timestamp = undefined; if (time !== undefined) { timestamp = parseInt (time * 1000); } const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -823,9 +843,8 @@ module.exports = class kraken extends Exchange { let timestamp = undefined; let side = undefined; let type = undefined; - let price = undefined; - let amount = undefined; - let cost = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; let orderId = undefined; let fee = undefined; @@ -834,8 +853,8 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 2); side = (trade[3] === 's') ? 'sell' : 'buy'; type = (trade[4] === 'l') ? 'limit' : 'market'; - price = this.safeFloat (trade, 0); - amount = this.safeFloat (trade, 1); + priceString = this.safeString (trade, 0); + amountString = this.safeString (trade, 1); const tradeLength = trade.length; if (tradeLength > 6) { id = this.safeString (trade, 6); // artificially added as per #1794 @@ -856,15 +875,15 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 'time'); side = this.safeString (trade, 'type'); type = this.safeString (trade, 'ordertype'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'vol'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'vol'); if ('fee' in trade) { let currency = undefined; if (market !== undefined) { currency = market['quote']; } fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': currency, }; } @@ -872,11 +891,9 @@ module.exports = class kraken extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': orderId, @@ -951,10 +968,10 @@ module.exports = class kraken extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -983,15 +1000,15 @@ module.exports = class kraken extends Exchange { if (type === 'limit') { request['price'] = this.priceToPrecision (symbol, price); } else if ((type === 'stop-loss') || (type === 'take-profit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice', price); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice', price); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument or a price/stopPrice parameter for a ' + type + ' order'); } else { request['price'] = this.priceToPrecision (symbol, stopPrice); } } else if ((type === 'stop-loss-limit') || (type === 'take-profit-limit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice'); - const limitPrice = this.safeFloat (params, 'price2'); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice'); + const limitPrice = this.safeNumber (params, 'price2'); const stopPriceDefined = (stopPrice !== undefined); const limitPriceDefined = (limitPrice !== undefined); if (stopPriceDefined && limitPriceDefined) { @@ -1100,10 +1117,10 @@ module.exports = class kraken extends Exchange { if (orderDescription !== undefined) { const parts = orderDescription.split (' '); side = this.safeString (parts, 0); - amount = this.safeFloat (parts, 1); + amount = this.safeNumber (parts, 1); marketId = this.safeString (parts, 2); type = this.safeString (parts, 4); - price = this.safeFloat (parts, 5); + price = this.safeNumber (parts, 5); } side = this.safeString (description, 'type', side); type = this.safeString (description, 'ordertype', type); @@ -1117,27 +1134,23 @@ module.exports = class kraken extends Exchange { market = this.getDelistedMarketById (marketId); } const timestamp = this.safeTimestamp (order, 'opentm'); - amount = this.safeFloat (order, 'vol', amount); - const filled = this.safeFloat (order, 'vol_exec'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = amount - filled; - } + amount = this.safeNumber (order, 'vol', amount); + const filled = this.safeNumber (order, 'vol_exec'); let fee = undefined; - const cost = this.safeFloat (order, 'cost'); - price = this.safeFloat (description, 'price', price); + const cost = this.safeNumber (order, 'cost'); + price = this.safeNumber (description, 'price', price); if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (description, 'price2'); + price = this.safeNumber (description, 'price2'); } if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (order, 'price', price); + price = this.safeNumber (order, 'price', price); } - const average = this.safeFloat (order, 'price'); + const average = this.safeNumber (order, 'price'); if (market !== undefined) { symbol = market['symbol']; if ('fee' in order) { const flags = order['oflags']; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); fee = { 'cost': feeCost, 'rate': undefined, @@ -1161,8 +1174,8 @@ module.exports = class kraken extends Exchange { if (rawTrades !== undefined) { trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id }); } - const stopPrice = this.safeFloat (order, 'stopprice'); - return { + const stopPrice = this.safeNumber (order, 'stopprice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -1181,10 +1194,10 @@ module.exports = class kraken extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1534,10 +1547,10 @@ module.exports = class kraken extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const address = this.safeString (transaction, 'info'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.safeString (transaction, 'type'); // injected from the outside - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost === undefined) { if (type === 'deposit') { feeCost = 0; @@ -1714,7 +1727,7 @@ module.exports = class kraken extends Exchange { throw new ExchangeError (this.id + " withdraw() requires a 'key' parameter (withdrawal key name, as set up on your account)"); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { // 'txid': 'comma delimited list of transaction ids to restrict output to', diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kucoin.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kucoin.js index bcb058989..0b5aca5af 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kucoin.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kucoin.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, InvalidNonce, NotSupported, BadRequest, AuthenticationError, BadSymbol, RateLimitExceeded, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -45,6 +46,7 @@ module.exports = class kucoin extends Exchange { 'fetchTrades': true, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, }, 'urls': { 'logo': 'https://user-images.githubusercontent.com/51840849/87295558-132aaf80-c50e-11ea-9801-a2fb0c57c799.jpg', @@ -52,6 +54,7 @@ module.exports = class kucoin extends Exchange { 'api': { 'public': 'https://openapi-v2.kucoin.com', 'private': 'https://openapi-v2.kucoin.com', + 'futuresPrivate': 'https://api-futures.kucoin.com', }, 'test': { 'public': 'https://openapi-sandbox.kucoin.com', @@ -160,6 +163,15 @@ module.exports = class kucoin extends Exchange { 'stop-order/cancel', ], }, + 'futuresPrivate': { + 'get': [ + 'account-overview', + 'positions', + ], + 'post': [ + 'transfer-out', + ], + }, }, 'timeframes': { '1m': '1min', @@ -184,6 +196,7 @@ module.exports = class kucoin extends Exchange { 'order_not_exist_or_not_allow_to_cancel': InvalidOrder, // {"code":"400100","msg":"order_not_exist_or_not_allow_to_cancel"} 'Order size below the minimum requirement.': InvalidOrder, // {"code":"400100","msg":"Order size below the minimum requirement."} 'The withdrawal amount is below the minimum requirement.': ExchangeError, // {"code":"400100","msg":"The withdrawal amount is below the minimum requirement."} + 'Unsuccessful! Exceeded the max. funds out-transfer limit': InsufficientFunds, // {"code":"200000","msg":"Unsuccessful! Exceeded the max. funds out-transfer limit"} '400': BadRequest, '401': AuthenticationError, '403': NotSupported, @@ -240,9 +253,7 @@ module.exports = class kucoin extends Exchange { 'version': 'v1', 'symbolSeparator': '-', 'fetchMyTradesMethod': 'private_get_fills', - 'fetchBalance': { - 'type': 'trade', // or 'main' - }, + 'fetchBalance': 'trade', // endpoint versions 'versions': { 'public': { @@ -262,6 +273,25 @@ module.exports = class kucoin extends Exchange { 'accounts/sub-transfer': 'v2', }, }, + 'futuresPrivate': { + 'GET': { + 'account-overview': 'v1', + 'positions': 'v1', + }, + 'POST': { + 'transfer-out': 'v2', + }, + }, + }, + 'accountsByType': { + 'trade': 'trade', + 'trading': 'trade', + 'margin': 'margin', + 'main': 'main', + 'futures': 'contract', + 'contract': 'contract', + 'pool': 'pool', + 'pool-x': 'pool', }, }, }); @@ -342,11 +372,11 @@ module.exports = class kucoin extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const active = this.safeValue (market, 'enableTrading'); - const baseMaxSize = this.safeFloat (market, 'baseMaxSize'); - const baseMinSize = this.safeFloat (market, 'baseMinSize'); - const quoteMaxSize = this.safeFloat (market, 'quoteMaxSize'); - const quoteMinSize = this.safeFloat (market, 'quoteMinSize'); - // const quoteIncrement = this.safeFloat (market, 'quoteIncrement'); + const baseMaxSize = this.safeNumber (market, 'baseMaxSize'); + const baseMinSize = this.safeNumber (market, 'baseMinSize'); + const quoteMaxSize = this.safeNumber (market, 'quoteMaxSize'); + const quoteMinSize = this.safeNumber (market, 'quoteMinSize'); + // const quoteIncrement = this.safeNumber (market, 'quoteIncrement'); const precision = { 'amount': this.precisionFromString (this.safeString (market, 'baseIncrement')), 'price': this.precisionFromString (this.safeString (market, 'priceIncrement')), @@ -357,7 +387,7 @@ module.exports = class kucoin extends Exchange { 'max': baseMaxSize, }, 'price': { - 'min': this.safeFloat (market, 'priceIncrement'), + 'min': this.safeNumber (market, 'priceIncrement'), 'max': quoteMaxSize / baseMinSize, }, 'cost': { @@ -408,7 +438,7 @@ module.exports = class kucoin extends Exchange { const precision = this.safeInteger (entry, 'precision'); const isWithdrawEnabled = this.safeValue (entry, 'isWithdrawEnabled', false); const isDepositEnabled = this.safeValue (entry, 'isDepositEnabled', false); - const fee = this.safeFloat (entry, 'withdrawalMinFee'); + const fee = this.safeNumber (entry, 'withdrawalMinFee'); const active = (isWithdrawEnabled && isDepositEnabled); result[code] = { 'id': id, @@ -475,7 +505,7 @@ module.exports = class kucoin extends Exchange { const response = await this.privateGetWithdrawalsQuotas (this.extend (request, params)); const data = response['data']; const withdrawFees = {}; - withdrawFees[code] = this.safeFloat (data, 'withdrawMinFee'); + withdrawFees[code] = this.safeNumber (data, 'withdrawMinFee'); return { 'info': response, 'withdraw': withdrawFees, @@ -522,35 +552,35 @@ module.exports = class kucoin extends Exchange { // "mark": 0 // } // - let percentage = this.safeFloat (ticker, 'changeRate'); + let percentage = this.safeNumber (ticker, 'changeRate'); if (percentage !== undefined) { percentage = percentage * 100; } - const last = this.safeFloat2 (ticker, 'last', 'lastTradedPrice'); + const last = this.safeNumber2 (ticker, 'last', 'lastTradedPrice'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'vol'); - const quoteVolume = this.safeFloat (ticker, 'volValue'); + const baseVolume = this.safeNumber (ticker, 'vol'); + const quoteVolume = this.safeNumber (ticker, 'volValue'); const vwap = this.vwap (baseVolume, quoteVolume); const timestamp = this.safeInteger2 (ticker, 'time', 'datetime'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'changePrice'), + 'change': this.safeNumber (ticker, 'changePrice'), 'percentage': percentage, - 'average': this.safeFloat (ticker, 'averagePrice'), + 'average': this.safeNumber (ticker, 'averagePrice'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -634,11 +664,11 @@ module.exports = class kucoin extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -836,16 +866,18 @@ module.exports = class kucoin extends Exchange { // 'marginMode': 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned // 'autoBorrow': false, // The system will first borrow you funds at the optimal interest rate and then place an order for you }; - if (type !== 'market') { - request['price'] = this.priceToPrecision (symbol, price); - request['size'] = this.amountToPrecision (symbol, amount); - } else { - if (this.safeValue (params, 'quoteAmount')) { - // used to create market order by quote amount - https://github.com/ccxt/ccxt/issues/4876 - request['funds'] = this.amountToPrecision (symbol, amount); + const quoteAmount = this.safeNumber2 (params, 'cost', 'funds'); + if (type === 'market') { + if (quoteAmount !== undefined) { + params = this.omit (params, [ 'cost', 'funds' ]); + // kucoin uses base precision even for quote values + request['funds'] = this.amountToPrecision (symbol, quoteAmount); } else { request['size'] = this.amountToPrecision (symbol, amount); } + } else { + request['price'] = this.priceToPrecision (symbol, price); + request['size'] = this.amountToPrecision (symbol, amount); } const response = await this.privatePostOrders (this.extend (request, params)); // @@ -879,8 +911,10 @@ module.exports = class kucoin extends Exchange { 'fee': undefined, 'trades': undefined, }; - if (!this.safeValue (params, 'quoteAmount')) { + if (quoteAmount === undefined) { order['amount'] = amount; + } else { + order['cost'] = quoteAmount; } return order; } @@ -1056,15 +1090,18 @@ module.exports = class kucoin extends Exchange { const type = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'createdAt'); const datetime = this.iso8601 (timestamp); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); + if (price === 0.0) { + // market orders + price = undefined; + } const side = this.safeString (order, 'side'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (order, 'fee'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'dealSize'); - const cost = this.safeFloat (order, 'dealFunds'); - const remaining = amount - filled; + const feeCost = this.safeNumber (order, 'fee'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'dealSize'); + const cost = this.safeNumber (order, 'dealFunds'); // bool const isActive = this.safeValue (order, 'isActive', false); const cancelExist = this.safeValue (order, 'cancelExist', false); @@ -1074,20 +1111,11 @@ module.exports = class kucoin extends Exchange { 'currency': feeCurrency, 'cost': feeCost, }; - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const clientOrderId = this.safeString (order, 'clientOid'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': orderId, 'clientOrderId': clientOrderId, 'symbol': symbol, @@ -1100,7 +1128,7 @@ module.exports = class kucoin extends Exchange { 'stopPrice': stopPrice, 'cost': cost, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'timestamp': timestamp, 'datetime': datetime, 'fee': fee, @@ -1109,7 +1137,7 @@ module.exports = class kucoin extends Exchange { 'lastTradeTimestamp': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1310,7 +1338,6 @@ module.exports = class kucoin extends Exchange { const id = this.safeString2 (trade, 'tradeId', 'id'); const orderId = this.safeString (trade, 'orderId'); const takerOrMaker = this.safeString (trade, 'liquidity'); - const amount = this.safeFloat2 (trade, 'size', 'amount'); let timestamp = this.safeInteger (trade, 'time'); if (timestamp !== undefined) { timestamp = parseInt (timestamp / 1000000); @@ -1321,10 +1348,13 @@ module.exports = class kucoin extends Exchange { timestamp = timestamp * 1000; } } - const price = this.safeFloat2 (trade, 'price', 'dealPrice'); + const priceString = this.safeString2 (trade, 'price', 'dealPrice'); + const amountString = this.safeString2 (trade, 'size', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const side = this.safeString (trade, 'side'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); let feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -1336,20 +1366,16 @@ module.exports = class kucoin extends Exchange { fee = { 'cost': feeCost, 'currency': feeCurrency, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } let type = this.safeString (trade, 'type'); if (type === 'match') { type = undefined; } - let cost = this.safeFloat2 (trade, 'funds', 'dealValue'); + let cost = this.safeNumber2 (trade, 'funds', 'dealValue'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'info': trade, @@ -1445,7 +1471,7 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); let address = this.safeString (transaction, 'address'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let txid = this.safeString (transaction, 'walletTxId'); if (txid !== undefined) { const txidParts = txid.split ('@'); @@ -1463,7 +1489,7 @@ module.exports = class kucoin extends Exchange { const rawStatus = this.safeString (transaction, 'status'); const status = this.parseTransactionStatus (rawStatus); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { let rate = undefined; if (amount !== undefined) { @@ -1644,45 +1670,180 @@ module.exports = class kucoin extends Exchange { async fetchBalance (params = {}) { await this.loadMarkets (); - let type = undefined; - const request = {}; - if ('type' in params) { - type = params['type']; - if (type !== undefined) { - request['type'] = type; - } - params = this.omit (params, 'type'); + const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'trade'); + const requestedType = this.safeString (params, 'type', defaultType); + const accountsByType = this.safeValue (this.options, 'accountsByType'); + const type = this.safeString (accountsByType, requestedType); + if (type === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' type must be one of ' + keys.join (', ')); + } + params = this.omit (params, 'type'); + if (type === 'contract') { + // futures api requires a futures apiKey + // only fetches one balance at a time + // by default it will only fetch the BTC balance of the futures account + // you can send 'currency' in params to fetch other currencies + // fetchBalance ({ 'type': 'futures', 'currency': 'USDT' }) + const response = await this.futuresPrivateGetAccountOverview (params); + // + // { + // code: '200000', + // data: { + // accountEquity: 0.00005, + // unrealisedPNL: 0, + // marginBalance: 0.00005, + // positionMargin: 0, + // orderMargin: 0, + // frozenFunds: 0, + // availableBalance: 0.00005, + // currency: 'XBT' + // } + // } + // + const data = this.safeValue (response, 'data'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (data, 'availableBalance'); + account['total'] = this.safeString (data, 'accountEquity'); + const result = { 'info': response }; + result[code] = account; + return this.parseBalance (result, false); } else { - const options = this.safeValue (this.options, 'fetchBalance', {}); - type = this.safeString (options, 'type', 'trade'); - } - const response = await this.privateGetAccounts (this.extend (request, params)); - // - // { - // "code":"200000", - // "data":[ - // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, - // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, - // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - const result = { 'info': response }; - for (let i = 0; i < data.length; i++) { - const balance = data[i]; - const balanceType = this.safeString (balance, 'type'); - if (balanceType === type) { - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'holds'); - result[code] = account; + const request = { + 'type': type, + }; + const response = await this.privateGetAccounts (this.extend (request, params)); + // + // { + // "code":"200000", + // "data":[ + // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, + // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, + // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + const result = { 'info': response }; + for (let i = 0; i < data.length; i++) { + const balance = data[i]; + const balanceType = this.safeString (balance, 'type'); + if (balanceType === type) { + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'holds'); + result[code] = account; + } } + return this.parseBalance (result, false); + } + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const requestedAmount = this.currencyToPrecision (code, amount); + const accountsById = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsById, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsById, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + if (fromId === 'contract') { + if (toId !== 'main') { + throw new ExchangeError (this.id + ' only supports transferring from futures account to main account'); + } + const request = { + 'currency': currency['id'], + 'amount': requestedAmount, + }; + if (!('bizNo' in params)) { + // it doesn't like more than 24 characters + request['bizNo'] = this.uuid22 (); + } + const response = await this.futuresPrivatePostTransferOut (this.extend (request, params)); + // + // { + // code: '200000', + // data: { + // applyId: '605a87217dff1500063d485d', + // bizNo: 'bcd6e5e1291f4905af84dc', + // payAccountType: 'CONTRACT', + // payTag: 'DEFAULT', + // remark: '', + // recAccountType: 'MAIN', + // recTag: 'DEFAULT', + // recRemark: '', + // recSystem: 'KUCOIN', + // status: 'PROCESSING', + // currency: 'XBT', + // amount: '0.00001', + // fee: '0', + // sn: '573688685663948', + // reason: '', + // createdAt: 1616545569000, + // updatedAt: 1616545569000 + // } + // } + // + const data = this.safeValue (response, 'data'); + const timestamp = this.safeInteger (data, 'createdAt'); + const id = this.safeString (data, 'applyId'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const amount = this.safeNumber (data, 'amount'); + const rawStatus = this.safeString (data, 'status'); + let status = undefined; + if (rawStatus === 'PROCESSING') { + status = 'pending'; + } + return { + 'info': response, + 'currency': code, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'amount': amount, + 'fromAccount': fromId, + 'toAccount': toId, + 'id': id, + 'status': status, + }; + } else { + const request = { + 'currency': currency['id'], + 'from': fromId, + 'to': toId, + 'amount': requestedAmount, + }; + if (!('clientOid' in params)) { + request['clientOid'] = this.uuid (); + } + const response = await this.privatePostAccountsInnerTransfer (this.extend (request, params)); + // { code: '200000', data: { orderId: '605a6211e657f00006ad0ad6' } } + const data = this.safeValue (response, 'data'); + const id = this.safeString (data, 'orderId'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'currency': code, + 'amount': requestedAmount, + 'fromAccount': fromId, + 'toAccount': toId, + 'status': undefined, + }; } - return this.parseBalance (result); } async fetchLedger (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -1770,11 +1931,11 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'code': code, }; - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'balance'); const direction = this.safeString (item, 'direction'); let before = undefined; if (after !== undefined && amount !== undefined) { @@ -1824,6 +1985,94 @@ module.exports = class kucoin extends Exchange { return this.safeString (types, type, type); } + async fetchPositions (symbols = undefined, params = {}) { + const response = await this.futuresPrivateGetPositions (params); + // + // { + // code: '200000', + // data: [ + // { + // id: '605a9772a229ab0006408258', + // symbol: 'XBTUSDTM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746099, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54371.92, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'USDT', + // isInverse: false + // }, + // { + // id: '605a9772026ac900066550df', + // symbol: 'XBTUSDM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746110, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54354.76, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'XBT', + // isInverse: true + // } + // ] + // } + // + return this.safeValue (response, 'data', response); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { // // the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint @@ -1840,16 +2089,16 @@ module.exports = class kucoin extends Exchange { let endpart = ''; headers = (headers !== undefined) ? headers : {}; if (Object.keys (query).length) { - if (method !== 'GET') { + if ((method === 'GET') || (method === 'DELETE')) { + endpoint += '?' + this.urlencode (query); + } else { body = this.json (query); endpart = body; headers['Content-Type'] = 'application/json'; - } else { - endpoint += '?' + this.urlencode (query); } } const url = this.urls['api'][api] + endpoint; - if (api === 'private') { + if ((api === 'private') || (api === 'futuresPrivate')) { this.checkRequiredCredentials (); const timestamp = this.nonce ().toString (); headers = this.extend ({ @@ -1892,8 +2141,8 @@ module.exports = class kucoin extends Exchange { // { code: '200000', data: { ... }} // const errorCode = this.safeString (response, 'code'); - const message = this.safeString (response, 'msg'); - this.throwExactlyMatchedException (this.exceptions['exact'], message, message); - this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, message); + const message = this.safeString (response, 'msg', ''); + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, this.id + ' ' + message); } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kuna.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kuna.js index e652171d1..0067e406f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kuna.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/kuna.js @@ -2,12 +2,13 @@ // --------------------------------------------------------------------------- -const acx = require ('./acx.js'); -const { ArgumentsRequired } = require ('./base/errors'); +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, InsufficientFunds, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class kuna extends acx { +module.exports = class kuna extends Exchange { describe () { return this.deepExtend (super.describe (), { 'id': 'kuna', @@ -17,14 +18,24 @@ module.exports = class kuna extends acx { 'version': 'v2', 'has': { 'CORS': false, - 'fetchTickers': true, + 'cancelOrder': true, + 'createOrder': true, + 'fetchBalance': true, + 'fetchMarkets': true, + 'fetchMyTrades': true, 'fetchOHLCV': 'emulated', 'fetchOpenOrders': true, - 'fetchMyTrades': true, + 'fetchOrder': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchTime': true, + 'fetchTrades': true, 'withdraw': false, }, 'timeframes': undefined, 'urls': { + 'extension': '.json', 'referral': 'https://kuna.io?r=kunaid-gvfihe8az7o4', 'logo': 'https://user-images.githubusercontent.com/51840849/87153927-f0578b80-c2c0-11ea-84b6-74612568e9e1.jpg', 'api': 'https://kuna.io', @@ -32,8 +43,47 @@ module.exports = class kuna extends acx { 'doc': 'https://kuna.io/documents/api', 'fees': 'https://kuna.io/documents/api', }, + 'api': { + 'public': { + 'get': [ + 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. + 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator + 'k', // Get OHLC(k line) of specific market + 'markets', // Get all available markets + 'order_book', // Get the order book of specified market + 'order_book/{market}', + 'tickers', // Get ticker of all markets + 'tickers/{market}', // Get ticker of specific market + 'timestamp', // Get server current time, in seconds since Unix epoch + 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. + 'trades/{market}', + ], + }, + 'private': { + 'get': [ + 'members/me', // Get your profile and accounts info + 'deposits', // Get your deposits history + 'deposit', // Get details of specific deposit + 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. + 'orders', // Get your orders, results is paginated + 'order', // Get information of specified order + 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. + 'withdraws', // Get your cryptocurrency withdraws + 'withdraw', // Get your cryptocurrency withdraw + ], + 'post': [ + 'orders', // Create a Sell/Buy order + 'orders/multi', // Create multiple sell/buy orders + 'orders/clear', // Cancel all my orders + 'order/delete', // Cancel an order + 'withdraw', // Create a withdraw + ], + }, + }, 'fees': { 'trading': { + 'tierBased': false, + 'percentage': true, 'taker': 0.25 / 100, 'maker': 0.25 / 100, }, @@ -56,9 +106,24 @@ module.exports = class kuna extends acx { }, }, }, + 'commonCurrencies': { + 'PLA': 'Plair', + }, + 'exceptions': { + '2002': InsufficientFunds, + '2003': OrderNotFound, + }, }); } + async fetchTime (params = {}) { + const response = await this.publicGetTimestamp (params); + // + // 1594911427 + // + return response * 1000; + } + async fetchMarkets (params = {}) { const quotes = [ 'btc', 'eth', 'eurs', 'rub', 'uah', 'usd', 'usdt', 'gol' ]; const pricePrecisions = { @@ -114,24 +179,100 @@ module.exports = class kuna extends acx { return markets; } - async fetchL3OrderBook (symbol, limit = undefined, params = {}) { - return await this.fetchOrderBook (symbol, limit, params); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); - } + async fetchOrderBook (symbol, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); const request = { 'market': market['id'], }; - const response = await this.privateGetOrders (this.extend (request, params)); - // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder - // with order cache + fetchOpenOrders - // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX - return this.parseOrders (response, market, since, limit); + if (limit !== undefined) { + request['limit'] = limit; // default = 300 + } + const orderbook = await this.publicGetDepth (this.extend (request, params)); + const timestamp = this.safeTimestamp (orderbook, 'timestamp'); + return this.parseOrderBook (orderbook, timestamp); + } + + parseTicker (ticker, market = undefined) { + const timestamp = this.safeTimestamp (ticker, 'at'); + ticker = ticker['ticker']; + let symbol = undefined; + if (market) { + symbol = market['symbol']; + } + const last = this.safeNumber (ticker, 'last'); + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'bidVolume': undefined, + 'ask': this.safeNumber (ticker, 'sell'), + 'askVolume': undefined, + 'vwap': undefined, + 'open': this.safeNumber (ticker, 'open'), + 'close': last, + 'last': last, + 'previousClose': undefined, + 'change': undefined, + 'percentage': undefined, + 'average': undefined, + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const response = await this.publicGetTickers (params); + const ids = Object.keys (response); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + let market = undefined; + let symbol = id; + if (id in this.markets_by_id) { + market = this.markets_by_id[id]; + symbol = market['symbol']; + } else { + let base = id.slice (0, 3); + let quote = id.slice (3, 6); + base = base.toUpperCase (); + quote = quote.toUpperCase (); + base = this.safeCurrencyCode (base); + quote = this.safeCurrencyCode (quote); + symbol = base + '/' + quote; + } + result[symbol] = this.parseTicker (response[id], market); + } + return this.filterByArray (result, 'symbol', symbols); + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTickersMarket (this.extend (request, params)); + return this.parseTicker (response, market); + } + + async fetchL3OrderBook (symbol, limit = undefined, params = {}) { + return await this.fetchOrderBook (symbol, limit, params); + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTrades (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); } parseTrade (trade, market = undefined) { @@ -148,9 +289,14 @@ module.exports = class kuna extends acx { }; side = this.safeString (sideMap, side, side); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_id'); const id = this.safeString (trade, 'id'); return { @@ -170,29 +316,6 @@ module.exports = class kuna extends acx { }; } - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); - } - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.privateGetTradesMy (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const trades = await this.fetchTrades (symbol, since, limit, params); @@ -211,4 +334,198 @@ module.exports = class kuna extends acx { } return result; } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + const response = await this.privateGetMembersMe (params); + const balances = this.safeValue (response, 'accounts'); + const result = { 'info': balances }; + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'market': this.marketId (symbol), + 'side': side, + 'volume': amount.toString (), + 'ord_type': type, + }; + if (type === 'limit') { + request['price'] = price.toString (); + } + const response = await this.privatePostOrders (this.extend (request, params)); + const marketId = this.safeValue (response, 'market'); + const market = this.safeValue (this.markets_by_id, marketId); + return this.parseOrder (response, market); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': id, + }; + const response = await this.privatePostOrderDelete (this.extend (request, params)); + const order = this.parseOrder (response); + const status = order['status']; + if (status === 'closed' || status === 'canceled') { + throw new OrderNotFound (this.id + ' ' + this.json (order)); + } + return order; + } + + parseOrderStatus (status) { + const statuses = { + 'done': 'closed', + 'wait': 'open', + 'cancel': 'canceled', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + const marketId = this.safeString (order, 'market'); + const symbol = this.safeSymbol (marketId, market); + const timestamp = this.parse8601 (this.safeString (order, 'created_at')); + const status = this.parseOrderStatus (this.safeString (order, 'state')); + const type = this.safeString (order, 'type'); + const side = this.safeString (order, 'side'); + const id = this.safeString (order, 'id'); + return this.safeOrder ({ + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': undefined, + 'status': status, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': this.safeNumber (order, 'price'), + 'stopPrice': undefined, + 'amount': this.safeNumber (order, 'volume'), + 'filled': this.safeNumber (order, 'executed_volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'trades': undefined, + 'fee': undefined, + 'info': order, + 'cost': undefined, + 'average': undefined, + }); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': parseInt (id), + }; + const response = await this.privateGetOrder (this.extend (request, params)); + return this.parseOrder (response); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetOrders (this.extend (request, params)); + // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder + // with order cache + fetchOpenOrders + // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX + return this.parseOrders (response, market, since, limit); + } + + async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetTradesMy (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); + } + + nonce () { + return this.milliseconds (); + } + + encodeParams (params) { + if ('orders' in params) { + const orders = params['orders']; + let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); + for (let i = 0; i < orders.length; i++) { + const order = orders[i]; + const keys = Object.keys (order); + for (let k = 0; k < keys.length; k++) { + const key = keys[k]; + const value = order[key]; + query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); + } + } + return query; + } + return this.urlencode (this.keysort (params)); + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let request = '/api/' + this.version + '/' + this.implodeParams (path, params); + if ('extension' in this.urls) { + request += this.urls['extension']; + } + const query = this.omit (params, this.extractParams (path)); + let url = this.urls['api'] + request; + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const nonce = this.nonce ().toString (); + const query = this.encodeParams (this.extend ({ + 'access_key': this.apiKey, + 'tonce': nonce, + }, params)); + const auth = method + '|' + request + '|' + query; + const signed = this.hmac (this.encode (auth), this.encode (this.secret)); + const suffix = query + '&signature=' + signed; + if (method === 'GET') { + url += '?' + suffix; + } else { + body = suffix; + headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; + } + } + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; + } + if (code === 400) { + const error = this.safeValue (response, 'error'); + const errorCode = this.safeString (error, 'code'); + const feedback = this.id + ' ' + this.json (response); + this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); + // fallback to default error handler + } + } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lakebtc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lakebtc.js index 8acd8cc41..991e6ff86 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lakebtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lakebtc.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, BadSymbol, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -112,10 +113,10 @@ module.exports = class lakebtc extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -133,16 +134,16 @@ module.exports = class lakebtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -152,7 +153,7 @@ module.exports = class lakebtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -183,14 +184,11 @@ module.exports = class lakebtc extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/latoken.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/latoken.js index 45cb5951d..ecc53a8c6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/latoken.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/latoken.js @@ -4,7 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, DDoSProtection, BadRequest, AuthenticationError } = require ('./base/errors'); -const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -85,6 +85,7 @@ module.exports = class latoken extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.1 / 100, @@ -169,7 +170,7 @@ module.exports = class latoken extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minQty'), + 'min': this.safeNumber (market, 'minQty'), 'max': undefined, }, 'price': { @@ -219,7 +220,7 @@ module.exports = class latoken extends Exchange { const numericId = this.safeInteger (currency, 'currencyId'); const code = this.safeCurrencyCode (id); const precision = this.safeInteger (currency, 'precission'); - const fee = this.safeFloat (currency, 'fee'); + const fee = this.safeNumber (currency, 'fee'); const active = undefined; result[code] = { 'id': id, @@ -253,27 +254,6 @@ module.exports = class latoken extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const response = await this.privateGetAccountBalances (params); @@ -297,17 +277,15 @@ module.exports = class latoken extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const frozen = this.safeFloat (balance, 'frozen'); - const pending = this.safeFloat (balance, 'pending'); - const used = this.sum (frozen, pending); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': used, - 'total': this.safeFloat (balance, 'amount'), - }; + const frozen = this.safeString (balance, 'frozen'); + const pending = this.safeString (balance, 'pending'); + const account = this.account (); + account['used'] = Precise.stringAdd (frozen, pending); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -352,20 +330,20 @@ module.exports = class latoken extends Exchange { // const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; if (open !== undefined && close !== undefined) { change = close - open; } - const percentage = this.safeFloat (ticker, 'priceChange'); + const percentage = this.safeNumber (ticker, 'priceChange'); const timestamp = this.nonce (); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'low': this.safeFloat (ticker, 'low'), - 'high': this.safeFloat (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -379,7 +357,7 @@ module.exports = class latoken extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -463,22 +441,19 @@ module.exports = class latoken extends Exchange { timestamp *= 1000; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'orderId'); - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -613,29 +588,17 @@ module.exports = class latoken extends Exchange { const symbol = this.safeSymbol (marketId, market); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executedAmount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executedAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderStatus')); - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const timeFilled = this.safeTimestamp (order, 'timeFilled'); let lastTradeTimestamp = undefined; if ((timeFilled !== undefined) && (timeFilled > 0)) { lastTradeTimestamp = timeFilled; } const clientOrderId = this.safeString (order, 'cliOrdId'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -650,14 +613,14 @@ module.exports = class latoken extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'average': undefined, - 'remaining': remaining, + 'remaining': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lbank.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lbank.js index 9b39a0236..e9e4658dc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lbank.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lbank.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, DDoSProtection, AuthenticationError, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -201,8 +202,8 @@ module.exports = class lbank extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const info = ticker; ticker = info['ticker']; - const last = this.safeFloat (ticker, 'latest'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'latest'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; if (percentage !== undefined) { const relativeChange = this.sum (1, percentage / 100); @@ -223,8 +224,8 @@ module.exports = class lbank extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -237,8 +238,8 @@ module.exports = class lbank extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'turnover'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'turnover'), 'info': info, }; } @@ -288,17 +289,15 @@ module.exports = class lbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (trade, 'date_ms'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'tid'); const type = undefined; - const side = this.safeString (trade, 'type'); + let side = this.safeString (trade, 'type'); + side = side.replace ('_market', ''); return { 'id': id, 'info': this.safeValue (trade, 'info', trade), @@ -346,11 +345,11 @@ module.exports = class lbank extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -415,12 +414,12 @@ module.exports = class lbank extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (freeze, currencyId); - account['total'] = this.safeFloat (asset, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (freeze, currencyId); + account['total'] = this.safeString (asset, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -448,35 +447,20 @@ module.exports = class lbank extends Exchange { // "status":2 // } // - let symbol = undefined; - const responseMarket = this.safeValue (this.marketsById, order['symbol']); - if (responseMarket !== undefined) { - symbol = responseMarket['symbol']; - } else if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeInteger (order, 'create_time'); // Limit Order Request Returns: Order Price // Market Order Returns: cny amount of market order - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount', 0.0); - const filled = this.safeFloat (order, 'deal_amount', 0.0); - const av_price = this.safeFloat (order, 'avg_price'); - let cost = undefined; - if (av_price !== undefined) { - cost = filled * av_price; - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount', 0.0); + const filled = this.safeNumber (order, 'deal_amount', 0.0); + const average = this.safeNumber (order, 'avg_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'order_id'); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -490,15 +474,15 @@ module.exports = class lbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': this.safeValue (order, 'info', order), - 'average': undefined, - }; + 'average': average, + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/liquid.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/liquid.js index 732eda853..0365ef102 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/liquid.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/liquid.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported } = require ('./base/errors'); +const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -108,7 +109,7 @@ module.exports = class liquid extends Exchange { 'trading': { 'tierBased': true, 'percentage': true, - 'taker': 0.0015, + 'taker': 0.0030, 'maker': 0.0000, 'tiers': { 'perpetual': { @@ -127,48 +128,52 @@ module.exports = class liquid extends Exchange { [ 300000000, -0.00025 ], ], 'taker': [ - [ 0, 0.000600 ], - [ 25000, 0.000575 ], - [ 50000, 0.000550 ], - [ 100000, 0.000525 ], - [ 1000000, 0.000500 ], - [ 10000000, 0.000475 ], - [ 25000000, 0.000450 ], - [ 50000000, 0.000425 ], - [ 75000000, 0.000400 ], - [ 100000000, 0.000375 ], - [ 200000000, 0.000350 ], - [ 300000000, 0.000325 ], + [ 0, 0.00120 ], + [ 25000, 0.00115 ], + [ 50000, 0.00110 ], + [ 100000, 0.00105 ], + [ 1000000, 0.00100 ], + [ 10000000, 0.00095 ], + [ 25000000, 0.00090 ], + [ 50000000, 0.00085 ], + [ 75000000, 0.00080 ], + [ 100000000, 0.00075 ], + [ 200000000, 0.00070 ], + [ 300000000, 0.00065 ], ], }, 'spot': { 'taker': [ - [ 0, 0.0015 ], - [ 10000, 0.0015 ], - [ 20000, 0.0014 ], - [ 50000, 0.0013 ], - [ 100000, 0.0010 ], - [ 1000000, 0.0008 ], - [ 5000000, 0.0006 ], - [ 10000000, 0.0005 ], - [ 25000000, 0.0005 ], - [ 50000000, 0.00045 ], - [ 100000000, 0.0004 ], - [ 200000000, 0.0003 ], + [ 0, 0.003 ], + [ 10000, 0.0029 ], + [ 20000, 0.0028 ], + [ 50000, 0.0026 ], + [ 100000, 0.0020 ], + [ 1000000, 0.0016 ], + [ 5000000, 0.0012 ], + [ 10000000, 0.0010 ], + [ 25000000, 0.0009 ], + [ 50000000, 0.0008 ], + [ 100000000, 0.0007 ], + [ 200000000, 0.0006 ], + [ 500000000, 0.0004 ], + [ 1000000000, 0.0003 ], ], 'maker': [ [ 0, 0.0000 ], - [ 10000, 0.0015 ], - [ 20000, 0.1400 ], - [ 50000, 0.1300 ], - [ 100000, 0.0800 ], - [ 1000000, 0.0004 ], - [ 5000000, 0.00035 ], - [ 10000000, 0.00025 ], + [ 10000, 0.0020 ], + [ 20000, 0.0019 ], + [ 50000, 0.0018 ], + [ 100000, 0.0016 ], + [ 1000000, 0.0008 ], + [ 5000000, 0.0007 ], + [ 10000000, 0.0005 ], [ 25000000, 0.0000 ], [ 50000000, 0.0000 ], [ 100000000, 0.0000 ], [ 200000000, 0.0000 ], + [ 500000000, 0.0000 ], + [ 1000000000, 0.0000 ], ], }, }, @@ -187,6 +192,7 @@ module.exports = class liquid extends Exchange { 'less_than_order_size': InvalidOrder, 'price_too_high': InvalidOrder, 'price_too_small': InvalidOrder, // {"errors":{"order":["price_too_small"]}} + 'product_disabled': BadSymbol, // {"errors":{"order":["product_disabled"]}} }, 'commonCurrencies': { 'WIN': 'WCOIN', @@ -236,7 +242,7 @@ module.exports = class liquid extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': decimalPrecision, 'limits': { 'amount': { @@ -252,7 +258,7 @@ module.exports = class liquid extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal'), + 'min': this.safeNumber (currency, 'minimum_withdrawal'), 'max': undefined, }, }, @@ -377,19 +383,19 @@ module.exports = class liquid extends Exchange { let maker = this.fees['trading']['maker']; let taker = this.fees['trading']['taker']; if (type === 'swap') { - maker = this.safeFloat (market, 'maker_fee', this.fees['trading']['maker']); - taker = this.safeFloat (market, 'taker_fee', this.fees['trading']['taker']); + maker = this.safeNumber (market, 'maker_fee', this.fees['trading']['maker']); + taker = this.safeNumber (market, 'taker_fee', this.fees['trading']['taker']); } const disabled = this.safeValue (market, 'disabled', false); const active = !disabled; const baseCurrency = this.safeValue (currenciesByCode, base); const precision = { 'amount': 0.00000001, - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; let minAmount = undefined; if (baseCurrency !== undefined) { - minAmount = this.safeFloat (baseCurrency['info'], 'minimum_order_quantity'); + minAmount = this.safeNumber (baseCurrency['info'], 'minimum_order_quantity'); } const limits = { 'amount': { @@ -471,8 +477,8 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } for (let i = 0; i < fiat.length; i++) { @@ -480,11 +486,11 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -503,7 +509,7 @@ module.exports = class liquid extends Exchange { if (ticker['last_traded_price']) { const length = ticker['last_traded_price'].length; if (length > 0) { - last = this.safeFloat (ticker, 'last_traded_price'); + last = this.safeNumber (ticker, 'last_traded_price'); } } } @@ -528,7 +534,7 @@ module.exports = class liquid extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'last_price_24h'); + const open = this.safeNumber (ticker, 'last_price_24h'); if (open !== undefined && last !== undefined) { change = last - open; average = this.sum (last, open) / 2; @@ -540,11 +546,11 @@ module.exports = class liquid extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_market_ask'), - 'low': this.safeFloat (ticker, 'low_market_bid'), - 'bid': this.safeFloat (ticker, 'market_bid'), + 'high': this.safeNumber (ticker, 'high_market_ask'), + 'low': this.safeNumber (ticker, 'low_market_bid'), + 'bid': this.safeNumber (ticker, 'market_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'market_ask'), + 'ask': this.safeNumber (ticker, 'market_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -554,7 +560,7 @@ module.exports = class liquid extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'volume_24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -600,14 +606,11 @@ module.exports = class liquid extends Exchange { if (mySide !== undefined) { takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; } - let cost = undefined; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -810,9 +813,9 @@ module.exports = class liquid extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeValue (this.markets_by_id, marketId); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'filled_quantity'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + let filled = this.safeNumber (order, 'filled_quantity'); + const price = this.safeNumber (order, 'price'); let symbol = undefined; let feeCurrency = undefined; if (market !== undefined) { @@ -822,7 +825,7 @@ module.exports = class liquid extends Exchange { const type = this.safeString (order, 'order_type'); let tradeCost = 0; let tradeFilled = 0; - let average = this.safeFloat (order, 'average_price'); + let average = this.safeNumber (order, 'average_price'); const trades = this.parseTrades (this.safeValue (order, 'executions', []), market, undefined, undefined, { 'order': orderId, 'type': type, @@ -879,7 +882,7 @@ module.exports = class liquid extends Exchange { 'trades': trades, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'order_fee'), + 'cost': this.safeNumber (order, 'order_fee'), }, 'info': order, }; @@ -1034,7 +1037,7 @@ module.exports = class liquid extends Exchange { const updated = this.safeTimestamp (transaction, 'updated_at'); const type = 'withdrawal'; const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/luno.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/luno.js index 2bbec0ec1..ad5568218 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/luno.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/luno.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -79,6 +80,10 @@ module.exports = class luno extends Exchange { 'quotes/{id}', 'withdrawals', 'withdrawals/{id}', + 'transfers', + // GET /api/exchange/2/listorders + // GET /api/exchange/2/orders/{id} + // GET /api/exchange/3/order ], 'post': [ 'accounts', @@ -153,12 +158,12 @@ module.exports = class luno extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), - 'max': this.safeFloat (market, 'max_volume'), + 'min': this.safeNumber (market, 'min_volume'), + 'max': this.safeNumber (market, 'max_volume'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -209,20 +214,22 @@ module.exports = class luno extends Exchange { const wallet = wallets[i]; const currencyId = this.safeString (wallet, 'asset'); const code = this.safeCurrencyCode (currencyId); - const reserved = this.safeFloat (wallet, 'reserved'); - const unconfirmed = this.safeFloat (wallet, 'unconfirmed'); - const balance = this.safeFloat (wallet, 'balance'); + const reserved = this.safeString (wallet, 'reserved'); + const unconfirmed = this.safeString (wallet, 'unconfirmed'); + const balance = this.safeString (wallet, 'balance'); + const reservedUnconfirmed = Precise.stringAdd (reserved, unconfirmed); + const balanceUnconfirmed = Precise.stringAdd (balance, unconfirmed); if (code in result) { - result[code]['used'] = this.sum (result[code]['used'], reserved, unconfirmed); - result[code]['total'] = this.sum (result[code]['total'], balance, unconfirmed); + result[code]['used'] = Precise.stringAdd (result[code]['used'], reservedUnconfirmed); + result[code]['total'] = Precise.stringAdd (result[code]['total'], balanceUnconfirmed); } else { const account = this.account (); - account['used'] = this.sum (reserved, unconfirmed); - account['total'] = this.sum (balance, unconfirmed); + account['used'] = reservedUnconfirmed; + account['total'] = balanceUnconfirmed; result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -273,18 +280,12 @@ module.exports = class luno extends Exchange { const side = (order['type'] === 'ASK') ? 'sell' : 'buy'; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'limit_volume'); - const quoteFee = this.safeFloat (order, 'fee_counter'); - const baseFee = this.safeFloat (order, 'fee_base'); - const filled = this.safeFloat (order, 'base'); - const cost = this.safeFloat (order, 'counter'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'limit_volume'); + const quoteFee = this.safeNumber (order, 'fee_counter'); + const baseFee = this.safeNumber (order, 'fee_base'); + const filled = this.safeNumber (order, 'base'); + const cost = this.safeNumber (order, 'counter'); const fee = { 'currency': undefined }; if (quoteFee) { fee['cost'] = quoteFee; @@ -298,7 +299,7 @@ module.exports = class luno extends Exchange { } } const id = this.safeString (order, 'order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -315,12 +316,12 @@ module.exports = class luno extends Exchange { 'amount': amount, 'filled': filled, 'cost': cost, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -366,16 +367,16 @@ module.exports = class luno extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -385,7 +386,7 @@ module.exports = class luno extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'rolling_24_hour_volume'), + 'baseVolume': this.safeNumber (ticker, 'rolling_24_hour_volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -436,8 +437,8 @@ module.exports = class luno extends Exchange { } else { side = trade['is_buy'] ? 'buy' : 'sell'; } - const feeBase = this.safeFloat (trade, 'fee_base'); - const feeCounter = this.safeFloat (trade, 'fee_counter'); + const feeBase = this.safeNumber (trade, 'fee_base'); + const feeCounter = this.safeNumber (trade, 'fee_counter'); let feeCurrency = undefined; let feeCost = undefined; if (feeBase !== undefined) { @@ -462,10 +463,10 @@ module.exports = class luno extends Exchange { 'type': undefined, 'side': side, 'takerOrMaker': takerOrMaker, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), // Does not include potential fee costs - 'cost': this.safeFloat (trade, 'counter'), + 'cost': this.safeNumber (trade, 'counter'), 'fee': { 'cost': feeCost, 'currency': feeCurrency, @@ -512,8 +513,8 @@ module.exports = class luno extends Exchange { const response = await this.privateGetFeeInfo (params); return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } @@ -647,9 +648,9 @@ module.exports = class luno extends Exchange { const timestamp = this.safeValue (entry, 'timestamp'); const currencyId = this.safeString (entry, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - const available_delta = this.safeFloat (entry, 'available_delta'); - const balance_delta = this.safeFloat (entry, 'balance_delta'); - const after = this.safeFloat (entry, 'balance'); + const available_delta = this.safeNumber (entry, 'available_delta'); + const balance_delta = this.safeNumber (entry, 'balance_delta'); + const after = this.safeNumber (entry, 'balance'); const comment = this.safeString (entry, 'description'); let before = after; let amount = 0.0; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lykke.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lykke.js index edc0fe73a..707034d20 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lykke.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/lykke.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -184,18 +185,16 @@ module.exports = class lykke extends Exchange { const id = this.safeString2 (trade, 'id', 'Id'); const orderId = this.safeString (trade, 'OrderId'); const timestamp = this.parse8601 (this.safeString2 (trade, 'dateTime', 'DateTime')); - const price = this.safeFloat2 (trade, 'price', 'Price'); - let amount = this.safeFloat2 (trade, 'volume', 'Amount'); + const priceString = this.safeString2 (trade, 'price', 'Price'); + let amountString = this.safeString2 (trade, 'volume', 'Amount'); let side = this.safeStringLower (trade, 'action'); if (side === undefined) { - if (amount < 0) { - side = 'sell'; - } else { - side = 'buy'; - } + side = (amountString[0] === '-') ? 'sell' : 'buy'; } - amount = Math.abs (amount); - const cost = price * amount; + amountString = (amountString[0] === '-') ? amountString.slice (1) : amountString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = { 'cost': 0, // There are no fees for trading. https://www.lykke.com/wallet-fees-and-limits/ 'currency': market['quote'], @@ -256,11 +255,11 @@ module.exports = class lykke extends Exchange { const currencyId = this.safeString (balance, 'AssetId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Balance'); - account['used'] = this.safeFloat (balance, 'Reserved'); + account['total'] = this.safeString (balance, 'Balance'); + account['used'] = this.safeString (balance, 'Reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -307,7 +306,7 @@ module.exports = class lykke extends Exchange { // } // const id = this.safeString (result, 'Id'); - price = this.safeFloat (result, 'Price'); + price = this.safeNumber (result, 'Price'); return { 'id': id, 'info': result, @@ -398,16 +397,16 @@ module.exports = class lykke extends Exchange { if (market) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'lastPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -418,7 +417,7 @@ module.exports = class lykke extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume24H'), + 'quoteVolume': this.safeNumber (ticker, 'volume24H'), 'info': ticker, }; } @@ -476,20 +475,18 @@ module.exports = class lykke extends Exchange { } else if (('CreatedAt' in order) && (order['CreatedAt'])) { timestamp = this.parse8601 (order['CreatedAt']); } - const price = this.safeFloat (order, 'Price'); + const price = this.safeNumber (order, 'Price'); let side = undefined; - let amount = this.safeFloat (order, 'Volume'); + let amount = this.safeNumber (order, 'Volume'); if (amount < 0) { side = 'sell'; amount = Math.abs (amount); } else { side = 'buy'; } - const remaining = Math.abs (this.safeFloat (order, 'RemainingVolume')); - const filled = amount - remaining; - const cost = filled * price; + const remaining = Math.abs (this.safeNumber (order, 'RemainingVolume')); const id = this.safeString (order, 'Id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -503,15 +500,15 @@ module.exports = class lykke extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -572,8 +569,8 @@ module.exports = class lykke extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - let amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + let amount = this.safeNumber (bidask, amountKey); if (amount < 0) { amount = -amount; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mercado.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mercado.js index a2fd9593e..2746e14b8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mercado.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mercado.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -160,7 +161,7 @@ module.exports = class mercado extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, baseId), + 'min': this.safeNumber (amountLimits, baseId), 'max': undefined, }, 'price': { @@ -196,16 +197,16 @@ module.exports = class mercado extends Exchange { const response = await this.publicGetCoinTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'ticker', {}); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -215,7 +216,7 @@ module.exports = class mercado extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -230,15 +231,12 @@ module.exports = class mercado extends Exchange { const id = this.safeString2 (trade, 'tid', 'operation_id'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee_rate'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee_rate'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -295,12 +293,12 @@ module.exports = class mercado extends Exchange { if (currencyId in balances) { const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -407,32 +405,31 @@ module.exports = class mercado extends Exchange { // } // const id = this.safeString (order, 'order_id'); + const order_type = this.safeString (order, 'order_type'); let side = undefined; if ('order_type' in order) { - side = (order['order_type'] === 1) ? 'buy' : 'sell'; + side = (order_type === '1') ? 'buy' : 'sell'; } const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'coin_pair'); market = this.safeMarket (marketId, market); const timestamp = this.safeTimestamp (order, 'created_timestamp'); const fee = { - 'cost': this.safeFloat (order, 'fee'), + 'cost': this.safeNumber (order, 'fee'), 'currency': market['quote'], }; - const price = this.safeFloat (order, 'limit_price'); - // price = this.safeFloat (order, 'executed_price_avg', price); - const average = this.safeFloat (order, 'executed_price_avg'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'executed_quantity'); - const remaining = amount - filled; - const cost = filled * average; + const price = this.safeNumber (order, 'limit_price'); + // price = this.safeNumber (order, 'executed_price_avg', price); + const average = this.safeNumber (order, 'executed_price_avg'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const lastTradeTimestamp = this.safeTimestamp (order, 'updated_timestamp'); const rawTrades = this.safeValue (order, 'operations', []); const trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'side': side, 'order': id, }); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -446,15 +443,15 @@ module.exports = class mercado extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -512,11 +509,11 @@ module.exports = class mercado extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mixcoins.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mixcoins.js index 85138f138..11bbf93b6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mixcoins.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/mixcoins.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -72,11 +73,11 @@ module.exports = class mixcoins extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.safeFloat (balance, 'lock'); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = this.safeString (balance, 'lock'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -96,16 +97,16 @@ module.exports = class mixcoins extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'result'); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -115,7 +116,7 @@ module.exports = class mixcoins extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -128,14 +129,11 @@ module.exports = class mixcoins extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ndax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ndax.js index 0367c2695..37e8b2760 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ndax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ndax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -244,7 +245,7 @@ module.exports = class ndax extends Exchange { const name = this.safeString (currency, 'ProductFullName'); const type = this.safeString (currency, 'ProductType'); const code = this.safeCurrencyCode (this.safeString (currency, 'Product')); - const precision = this.safeFloat (currency, 'TickSize'); + const precision = this.safeNumber (currency, 'TickSize'); const isDisabled = this.safeValue (currency, 'IsDisabled'); const active = !isDisabled; result[code] = { @@ -325,8 +326,8 @@ module.exports = class ndax extends Exchange { const quote = this.safeCurrencyCode (this.safeString (market, 'Product2Symbol')); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'QuantityIncrement'), - 'price': this.safeFloat (market, 'PriceIncrement'), + 'amount': this.safeNumber (market, 'QuantityIncrement'), + 'price': this.safeNumber (market, 'PriceIncrement'), }; const sessionStatus = this.safeString (market, 'SessionStatus'); const isDisable = this.safeValue (market, 'IsDisable'); @@ -344,11 +345,11 @@ module.exports = class ndax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinimumQuantity'), + 'min': this.safeNumber (market, 'MinimumQuantity'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'MinimumPrice'), + 'min': this.safeNumber (market, 'MinimumPrice'), 'max': undefined, }, 'cost': { @@ -469,27 +470,27 @@ module.exports = class ndax extends Exchange { const timestamp = this.safeInteger (ticker, 'TimeStamp'); const marketId = this.safeString (ticker, 'InstrumentId'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'LastTradedPx'); - const percentage = this.safeFloat (ticker, 'Rolling24HrPxChangePercent'); - const change = this.safeFloat (ticker, 'Rolling24HrPxChange'); - const open = this.safeFloat (ticker, 'SessionOpen'); + const last = this.safeNumber (ticker, 'LastTradedPx'); + const percentage = this.safeNumber (ticker, 'Rolling24HrPxChangePercent'); + const change = this.safeNumber (ticker, 'Rolling24HrPxChange'); + const open = this.safeNumber (ticker, 'SessionOpen'); let average = undefined; if ((last !== undefined) && (change !== undefined)) { average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'Rolling24HrVolume'); - const quoteVolume = this.safeFloat (ticker, 'Rolling24HrNotional'); + const baseVolume = this.safeNumber (ticker, 'Rolling24HrVolume'); + const quoteVolume = this.safeNumber (ticker, 'Rolling24HrNotional'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'SessionHigh'), - 'low': this.safeFloat (ticker, 'SessionLow'), - 'bid': this.safeFloat (ticker, 'BestBid'), - 'bidVolume': undefined, // this.safeFloat (ticker, 'BidQty'), always shows 0 - 'ask': this.safeFloat (ticker, 'BestOffer'), - 'askVolume': undefined, // this.safeFloat (ticker, 'AskQty'), always shows 0 + 'high': this.safeNumber (ticker, 'SessionHigh'), + 'low': this.safeNumber (ticker, 'SessionLow'), + 'bid': this.safeNumber (ticker, 'BestBid'), + 'bidVolume': undefined, // this.safeNumber (ticker, 'BidQty'), always shows 0 + 'ask': this.safeNumber (ticker, 'BestOffer'), + 'askVolume': undefined, // this.safeNumber (ticker, 'AskQty'), always shows 0 'vwap': vwap, 'open': open, 'close': last, @@ -562,11 +563,11 @@ module.exports = class ndax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -714,8 +715,8 @@ module.exports = class ndax extends Exchange { // "OMSId":1 // } // - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let cost = undefined; let timestamp = undefined; let id = undefined; @@ -726,11 +727,8 @@ module.exports = class ndax extends Exchange { let fee = undefined; let type = undefined; if (Array.isArray (trade)) { - price = this.safeFloat (trade, 3); - amount = this.safeFloat (trade, 2); - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + priceString = this.safeString (trade, 3); + amountString = this.safeString (trade, 2); timestamp = this.safeInteger (trade, 6); id = this.safeString (trade, 0); marketId = this.safeInteger (trade, 1); @@ -742,13 +740,13 @@ module.exports = class ndax extends Exchange { id = this.safeString (trade, 'TradeId'); orderId = this.safeString2 (trade, 'OrderId', 'OrigOrderId'); marketId = this.safeString2 (trade, 'InstrumentId', 'Instrument'); - price = this.safeFloat (trade, 'Price'); - amount = this.safeFloat (trade, 'Quantity'); - cost = this.safeFloat2 (trade, 'Value', 'GrossValueExecuted'); + priceString = this.safeString (trade, 'Price'); + amountString = this.safeString (trade, 'Quantity'); + cost = this.safeNumber2 (trade, 'Value', 'GrossValueExecuted'); takerOrMaker = this.safeStringLower (trade, 'MakerTaker'); side = this.safeStringLower (trade, 'Side'); type = this.safeStringLower (trade, 'OrderType'); - const feeCost = this.safeFloat (trade, 'Fee'); + const feeCost = this.safeNumber (trade, 'Fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'FeeProductId'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -758,6 +756,11 @@ module.exports = class ndax extends Exchange { }; } } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const symbol = this.safeSymbol (marketId, market); return { 'info': trade, @@ -872,11 +875,11 @@ module.exports = class ndax extends Exchange { const currencyId = this.safeString (balance, 'ProductId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Amount'); - account['used'] = this.safeFloat (balance, 'Hold'); + account['total'] = this.safeString (balance, 'Amount'); + account['used'] = this.safeString (balance, 'Hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseLedgerEntryType (type) { @@ -922,8 +925,8 @@ module.exports = class ndax extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'ReferenceType')); const currencyId = this.safeString (item, 'ProductId'); const code = this.safeCurrencyCode (currencyId, currency); - const credit = this.safeFloat (item, 'CR'); - const debit = this.safeFloat (item, 'DR'); + const credit = this.safeNumber (item, 'CR'); + const debit = this.safeNumber (item, 'DR'); let amount = undefined; let direction = undefined; if (credit > 0) { @@ -935,7 +938,7 @@ module.exports = class ndax extends Exchange { } const timestamp = this.safeInteger (item, 'TimeStamp'); let before = undefined; - const after = this.safeFloat (item, 'Balance'); + const after = this.safeNumber (item, 'Balance'); if (direction === 'out') { before = this.sum (after, amount); } else if (direction === 'in') { @@ -1083,36 +1086,26 @@ module.exports = class ndax extends Exchange { // const id = this.safeString2 (order, 'ReplacementOrderId', 'OrderId'); const timestamp = this.safeInteger (order, 'ReceiveTime'); - let lastTradeTimestamp = undefined; + const lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); const marketId = this.safeString (order, 'Instrument'); const symbol = this.safeSymbol (marketId, market); const side = this.safeStringLower (order, 'Side'); const type = this.safeStringLower (order, 'OrderType'); const clientOrderId = this.safeString2 (order, 'ReplacementClOrdId', 'ClientOrderId'); - let price = this.safeFloat (order, 'Price', 0.0); + let price = this.safeNumber (order, 'Price', 0.0); price = (price > 0.0) ? price : undefined; - const amount = this.safeFloat (order, 'OrigQuantity'); - const filled = this.safeFloat (order, 'QuantityExecuted'); - const cost = this.safeFloat (order, 'GrossValueExecuted'); - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (filled > 0) { - lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); - average = this.safeFloat (order, 'AvgPrice', 0.0); - average = (average > 0) ? average : undefined; - } - } - let stopPrice = this.safeFloat (order, 'StopPrice', 0.0); + const amount = this.safeNumber (order, 'OrigQuantity'); + const filled = this.safeNumber (order, 'QuantityExecuted'); + const cost = this.safeNumber (order, 'GrossValueExecuted'); + let average = this.safeNumber (order, 'AvgPrice', 0.0); + average = (average > 0) ? average : undefined; + let stopPrice = this.safeNumber (order, 'StopPrice', 0.0); stopPrice = (stopPrice > 0.0) ? stopPrice : undefined; const timeInForce = undefined; const status = this.parseOrderStatus (this.safeString (order, 'OrderState')); const fee = undefined; const trades = undefined; - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -1131,10 +1124,10 @@ module.exports = class ndax extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1932,8 +1925,8 @@ module.exports = class ndax extends Exchange { } const addressTo = address; const status = this.parseTransactionStatusByType (this.safeString (transaction, 'TicketStatus'), type); - const amount = this.safeFloat (transaction, 'Amount'); - const feeCost = this.safeFloat (transaction, 'FeeAmount'); + const amount = this.safeNumber (transaction, 'Amount'); + const feeCost = this.safeNumber (transaction, 'FeeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/novadax.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/novadax.js index dfc6569d2..76f763414 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/novadax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/novadax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, BadRequest, CancelPending, OrderNotFound, InsufficientFunds, RateLimitExceeded, InvalidOrder, AccountSuspended, BadSymbol, OnMaintenance } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -197,7 +198,7 @@ module.exports = class novadax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -205,7 +206,7 @@ module.exports = class novadax extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderValue'), + 'min': this.safeNumber (market, 'minOrderValue'), 'max': undefined, }, }; @@ -247,8 +248,8 @@ module.exports = class novadax extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const open = this.safeFloat (ticker, 'open24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'open24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let percentage = undefined; let change = undefined; let average = undefined; @@ -257,18 +258,18 @@ module.exports = class novadax extends Exchange { percentage = change / open * 100; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'baseVolume24h'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume24h'); + const baseVolume = this.safeNumber (ticker, 'baseVolume24h'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -424,11 +425,13 @@ module.exports = class novadax extends Exchange { const orderId = this.safeString (trade, 'orderId'); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeStringLower (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - cost = amount * price; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'volume'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); @@ -440,7 +443,7 @@ module.exports = class novadax extends Exchange { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { - 'cost': this.safeFloat (parts, 0), + 'cost': this.safeNumber (parts, 0), 'currency': feeCurrencyCode, }; } @@ -548,11 +551,11 @@ module.exports = class novadax extends Exchange { const volumeField = this.safeString (options, 'volume', 'amount'); // or vol return [ this.safeTimestamp (ohlcv, 'score'), - this.safeFloat (ohlcv, 'openPrice'), - this.safeFloat (ohlcv, 'highPrice'), - this.safeFloat (ohlcv, 'lowPrice'), - this.safeFloat (ohlcv, 'closePrice'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'openPrice'), + this.safeNumber (ohlcv, 'highPrice'), + this.safeNumber (ohlcv, 'lowPrice'), + this.safeNumber (ohlcv, 'closePrice'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -580,12 +583,12 @@ module.exports = class novadax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'available'); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); + account['total'] = this.safeString (balance, 'available'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -608,7 +611,7 @@ module.exports = class novadax extends Exchange { if (uppercaseSide === 'SELL') { request['amount'] = this.amountToPrecision (symbol, amount); } else if (uppercaseSide === 'BUY') { - let value = this.safeFloat (params, 'value'); + let value = this.safeNumber (params, 'value'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -838,21 +841,17 @@ module.exports = class novadax extends Exchange { // } // const id = this.safeString (order, 'id'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'filledValue'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'filledValue'); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeInteger (order, 'timestamp'); - const average = this.safeFloat (order, 'averagePrice'); - const filled = this.safeFloat (order, 'filledAmount'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } + const average = this.safeNumber (order, 'averagePrice'); + const filled = this.safeNumber (order, 'filledAmount'); let fee = undefined; - const feeCost = this.safeFloat (order, 'filledFee'); + const feeCost = this.safeNumber (order, 'filledFee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -861,7 +860,7 @@ module.exports = class novadax extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -879,11 +878,11 @@ module.exports = class novadax extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async withdraw (code, amount, address, tag = undefined, params = {}) { @@ -1046,7 +1045,7 @@ module.exports = class novadax extends Exchange { } else if (type === 'COIN_OUT') { type = 'withdraw'; } - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'addressTag'); const txid = this.safeString (transaction, 'txHash'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/oceanex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/oceanex.js index 28cb8e857..6073f75d5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/oceanex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/oceanex.js @@ -147,10 +147,10 @@ module.exports = class oceanex extends Exchange { 'active': true, 'info': market, 'precision': { - 'amount': this.safeValue (market, 'amount_precision'), - 'price': this.safeValue (market, 'price_precision'), - 'base': this.safeValue (market, 'ask_precision'), - 'quote': this.safeValue (market, 'bid_precision'), + 'amount': this.safeInteger (market, 'amount_precision'), + 'price': this.safeInteger (market, 'price_precision'), + 'base': this.safeInteger (market, 'ask_precision'), + 'quote': this.safeInteger (market, 'bid_precision'), }, 'limits': { 'amount': { @@ -162,7 +162,7 @@ module.exports = class oceanex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeValue (market, 'minimum_trading_amount'), + 'min': this.safeNumber (market, 'minimum_trading_amount'), 'max': undefined, }, }, @@ -256,21 +256,21 @@ module.exports = class oceanex extends Exchange { 'symbol': market['symbol'], 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (ticker, 'last'), - 'last': this.safeFloat (ticker, 'last'), + 'close': this.safeNumber (ticker, 'last'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -395,8 +395,8 @@ module.exports = class oceanex extends Exchange { 'type': 'limit', 'takerOrMaker': undefined, 'side': side, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), 'cost': undefined, 'fee': undefined, }; @@ -423,8 +423,8 @@ module.exports = class oceanex extends Exchange { result[symbol] = { 'info': group, 'symbol': symbol, - 'maker': this.safeFloat (maker, 'value'), - 'taker': this.safeFloat (taker, 'value'), + 'maker': this.safeNumber (maker, 'value'), + 'taker': this.safeNumber (taker, 'value'), }; } return result; @@ -446,11 +446,11 @@ module.exports = class oceanex extends Exchange { const currencyId = this.safeValue (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -558,12 +558,12 @@ module.exports = class oceanex extends Exchange { // const status = this.parseOrderStatus (this.safeValue (order, 'state')); const marketId = this.safeString2 (order, 'market', 'market_id'); - const symbol = this.safeSymbol (marketId); + const symbol = this.safeSymbol (marketId, market); let timestamp = this.safeTimestamp (order, 'created_on'); if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'created_at')); } - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, @@ -575,17 +575,17 @@ module.exports = class oceanex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeValue (order, 'side'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_price'), - 'amount': this.safeFloat (order, 'volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'filled': this.safeFloat (order, 'executed_volume'), + 'average': this.safeNumber (order, 'avg_price'), + 'amount': this.safeNumber (order, 'volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'filled': this.safeNumber (order, 'executed_volume'), 'status': status, 'cost': undefined, 'trades': undefined, 'fee': undefined, - }; + }); } parseOrderStatus (status) { @@ -678,7 +678,7 @@ module.exports = class oceanex extends Exchange { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['codes'], errorCode, feedback); this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - throw new ExchangeError (response); + throw new ExchangeError (feedback); } } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/okex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/okex.js index b9b09c4e0..02d686c17 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/okex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/okex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -798,7 +799,7 @@ module.exports = class okex extends Exchange { let option = false; let baseId = this.safeString (market, 'base_currency'); let quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { if ('option_type' in market) { marketType = 'option'; @@ -824,12 +825,12 @@ module.exports = class okex extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = spot ? (base + '/' + quote) : id; - const lotSize = this.safeFloat2 (market, 'lot_size', 'trade_increment'); + const lotSize = this.safeNumber2 (market, 'lot_size', 'trade_increment'); const precision = { - 'amount': this.safeFloat (market, 'size_increment', lotSize), - 'price': this.safeFloat (market, 'tick_size'), + 'amount': this.safeNumber (market, 'size_increment', lotSize), + 'price': this.safeNumber (market, 'tick_size'), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const active = true; const fees = this.safeValue2 (this.fees, marketType, 'trading', {}); return this.extend (fees, { @@ -1004,7 +1005,7 @@ module.exports = class okex extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal'), + 'min': this.safeNumber (currency, 'min_withdrawal'), 'max': undefined, }, }, @@ -1079,18 +1080,18 @@ module.exports = class okex extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open_24h'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open_24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_24h'), - 'low': this.safeFloat (ticker, 'low_24h'), - 'bid': this.safeFloat (ticker, 'best_bid'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (ticker, 'best_ask'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber (ticker, 'high_24h'), + 'low': this.safeNumber (ticker, 'low_24h'), + 'bid': this.safeNumber (ticker, 'best_bid'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (ticker, 'best_ask'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': undefined, 'open': open, 'close': last, @@ -1099,8 +1100,8 @@ module.exports = class okex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'base_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'quote_volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'base_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'quote_volume_24h'), 'info': ticker, }; } @@ -1237,9 +1238,12 @@ module.exports = class okex extends Exchange { quote = market['quote']; } const timestamp = this.parse8601 (this.safeString2 (trade, 'timestamp', 'created_at')); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'size', 'qty'); - amount = this.safeFloat (trade, 'order_qty', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'size', 'qty'); + amountString = this.safeString (trade, 'order_qty', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -1247,13 +1251,7 @@ module.exports = class okex extends Exchange { takerOrMaker = 'taker'; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -1362,22 +1360,22 @@ module.exports = class okex extends Exchange { } return [ timestamp, // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets ]; } else { return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, 'volume'), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, 'volume'), // Base Volume ]; } } @@ -1523,9 +1521,9 @@ module.exports = class okex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeNumber (balance, 'balance'); + account['used'] = this.safeNumber (balance, 'hold'); + account['free'] = this.safeNumber (balance, 'available'); result[code] = account; } return this.parseBalance (result); @@ -1595,9 +1593,9 @@ module.exports = class okex extends Exchange { const currencyId = parts[1]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (marketBalance, 'balance'); - account['used'] = this.safeFloat (marketBalance, 'hold'); - account['free'] = this.safeFloat (marketBalance, 'available'); + account['total'] = this.safeNumber (marketBalance, 'balance'); + account['used'] = this.safeNumber (marketBalance, 'hold'); + account['free'] = this.safeNumber (marketBalance, 'available'); accounts[code] = account; } else { throw new NotSupported (this.id + ' margin balance response format has changed!'); @@ -1650,29 +1648,29 @@ module.exports = class okex extends Exchange { const code = this.safeCurrencyCode (id); const balance = this.safeValue (info, id, {}); const account = this.account (); - const totalAvailBalance = this.safeFloat (balance, 'total_avail_balance'); + const totalAvailBalance = this.safeNumber (balance, 'total_avail_balance'); if (this.safeString (balance, 'margin_mode') === 'fixed') { const contracts = this.safeValue (balance, 'contracts', []); let free = totalAvailBalance; for (let i = 0; i < contracts.length; i++) { const contract = contracts[i]; - const fixedBalance = this.safeFloat (contract, 'fixed_balance'); - const realizedPnl = this.safeFloat (contract, 'realized_pnl'); - const marginFrozen = this.safeFloat (contract, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (contract, 'margin_for_unfilled'); + const fixedBalance = this.safeNumber (contract, 'fixed_balance'); + const realizedPnl = this.safeNumber (contract, 'realized_pnl'); + const marginFrozen = this.safeNumber (contract, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (contract, 'margin_for_unfilled'); const margin = this.sum (fixedBalance, realizedPnl) - marginFrozen - marginForUnfilled; free = this.sum (free, margin); } account['free'] = free; } else { - const realizedPnl = this.safeFloat (balance, 'realized_pnl'); - const unrealizedPnl = this.safeFloat (balance, 'unrealized_pnl'); - const marginFrozen = this.safeFloat (balance, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (balance, 'margin_for_unfilled'); + const realizedPnl = this.safeNumber (balance, 'realized_pnl'); + const unrealizedPnl = this.safeNumber (balance, 'unrealized_pnl'); + const marginFrozen = this.safeNumber (balance, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (balance, 'margin_for_unfilled'); account['free'] = this.sum (totalAvailBalance, realizedPnl, unrealizedPnl) - marginFrozen - marginForUnfilled; } // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); + account['total'] = this.safeNumber (balance, 'equity'); result[code] = account; } return this.parseBalance (result); @@ -1710,8 +1708,8 @@ module.exports = class okex extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeNumber (balance, 'equity'); + account['free'] = this.safeNumber (balance, 'total_avail_balance'); result[symbol] = account; } return this.parseBalance (result); @@ -1915,7 +1913,7 @@ module.exports = class okex extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2125,8 +2123,8 @@ module.exports = class okex extends Exchange { symbol = market['symbol']; } } - let amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat2 (order, 'filled_size', 'filled_qty'); + let amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber2 (order, 'filled_size', 'filled_qty'); let remaining = undefined; if (amount !== undefined) { if (filled !== undefined) { @@ -2137,9 +2135,9 @@ module.exports = class okex extends Exchange { if (type === 'market') { remaining = 0; } - let cost = this.safeFloat2 (order, 'filled_notional', 'funds'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); + let cost = this.safeNumber2 (order, 'filled_notional', 'funds'); + const price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'price_avg'); if (cost === undefined) { if (filled !== undefined && average !== undefined) { cost = average * filled; @@ -2150,7 +2148,7 @@ module.exports = class okex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'state')); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -2163,7 +2161,7 @@ module.exports = class okex extends Exchange { if ((clientOrderId !== undefined) && (clientOrderId.length < 1)) { clientOrderId = undefined; // fix empty clientOrderId string } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); return { 'info': order, 'id': id, @@ -2407,16 +2405,6 @@ module.exports = class okex extends Exchange { return await this.fetchOrdersByState ('7', symbol, since, limit, params); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -2444,7 +2432,8 @@ module.exports = class okex extends Exchange { async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); - const currency = this.currency (code); + const parts = code.split ('-'); + const currency = this.currency (parts[0]); const request = { 'currency': currency['id'], }; @@ -2457,8 +2446,8 @@ module.exports = class okex extends Exchange { // } // ] // - const addresses = this.parseDepositAddresses (response); - const address = this.safeValue (addresses, code); + const addressesByCode = this.parseDepositAddresses (response); + const address = this.safeValue (addressesByCode, code); if (address === undefined) { throw new InvalidAddress (this.id + ' fetchDepositAddress cannot return nonexistent addresses, you should create withdrawal addresses with the exchange website first'); } @@ -2633,7 +2622,7 @@ module.exports = class okex extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const txid = this.safeString (transaction, 'txid'); const timestamp = this.parse8601 (this.safeString (transaction, 'timestamp')); @@ -2696,19 +2685,19 @@ module.exports = class okex extends Exchange { let feeCurrencyId = undefined; if (receivedCurrencyId === quoteId) { side = this.safeString (otherTrade, 'side'); - amount = this.safeFloat (otherTrade, 'size'); - cost = this.safeFloat (userTrade, 'size'); + amount = this.safeNumber (otherTrade, 'size'); + cost = this.safeNumber (userTrade, 'size'); feeCurrencyId = this.safeString (otherTrade, 'currency'); } else { side = this.safeString (userTrade, 'side'); - amount = this.safeFloat (userTrade, 'size'); - cost = this.safeFloat (otherTrade, 'size'); + amount = this.safeNumber (userTrade, 'size'); + cost = this.safeNumber (otherTrade, 'size'); feeCurrencyId = this.safeString (userTrade, 'currency'); } const id = this.safeString (userTrade, 'trade_id'); - const price = this.safeFloat (userTrade, 'price'); - const feeCostFirst = this.safeFloat (otherTrade, 'fee'); - const feeCostSecond = this.safeFloat (userTrade, 'fee'); + const price = this.safeNumber (userTrade, 'price'); + const feeCostFirst = this.safeNumber (otherTrade, 'fee'); + const feeCostSecond = this.safeNumber (userTrade, 'fee'); const feeCurrencyCodeFirst = this.safeCurrencyCode (this.safeString (otherTrade, 'currency')); const feeCurrencyCodeSecond = this.safeCurrencyCode (this.safeString (userTrade, 'currency')); let fee = undefined; @@ -3140,7 +3129,7 @@ module.exports = class okex extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); let method = undefined; const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType'); @@ -3522,14 +3511,14 @@ module.exports = class okex extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'timestamp')); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; const marketId = this.safeString (item, 'instrument_id'); let symbol = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/paymium.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/paymium.js index 1af0c5355..2d0d8418c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/paymium.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/paymium.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -96,12 +97,12 @@ module.exports = class paymium extends Exchange { if (free in response) { const account = this.account (); const used = 'locked_' + currencyId; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -120,30 +121,30 @@ module.exports = class paymium extends Exchange { }; const ticker = await this.publicGetDataCurrencyTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'at'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'price'); + const last = this.safeNumber (ticker, 'price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'variation'), + 'percentage': this.safeNumber (ticker, 'variation'), 'average': undefined, 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, @@ -159,15 +160,12 @@ module.exports = class paymium extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); + const priceString = this.safeString (trade, 'price'); const amountField = 'traded_' + market['base'].toLowerCase (); - const amount = this.safeFloat (trade, amountField); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const amountString = this.safeString (trade, amountField); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/phemex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/phemex.js index b1c294ab2..ae494da41 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/phemex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/phemex.js @@ -305,13 +305,13 @@ module.exports = class phemex extends Exchange { }); } - parseSafeFloat (value = undefined) { + parseSafeNumber (value = undefined) { if (value === undefined) { return value; } value = value.replace (',', ''); const parts = value.split (' '); - return this.safeFloat (parts, 0); + return this.safeNumber (parts, 0); } parseSwapMarket (market) { @@ -335,7 +335,9 @@ module.exports = class phemex extends Exchange { // "minPriceEp":5000, // "maxPriceEp":10000000000, // "maxOrderQty":1000000, - // "type":"Perpetual" + // "type":"Perpetual", + // "status":"Listed", + // "tipOrderQty":1000000, // "steps":"50", // "riskLimits":[ // {"limit":100,"initialMargin":"1.0%","initialMarginEr":1000000,"maintenanceMargin":"0.5%","maintenanceMarginEr":500000}, @@ -360,7 +362,7 @@ module.exports = class phemex extends Exchange { // } // const id = this.safeString (market, 'symbol'); - const baseId = this.safeString (market, 'baseCurrency', 'contractUnderlyingAssets'); + const baseId = this.safeString2 (market, 'baseCurrency', 'contractUnderlyingAssets'); const quoteId = this.safeString (market, 'quoteCurrency'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); @@ -377,16 +379,16 @@ module.exports = class phemex extends Exchange { } const linear = !inverse; const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const priceScale = this.safeInteger (market, 'priceScale'); const ratioScale = this.safeInteger (market, 'ratioScale'); const valueScale = this.safeInteger (market, 'valueScale'); - const minPriceEp = this.safeFloat (market, 'minPriceEp'); - const maxPriceEp = this.safeFloat (market, 'maxPriceEp'); - const makerFeeRateEr = this.safeFloat (market, 'makerFeeRateEr'); - const takerFeeRateEr = this.safeFloat (market, 'takerFeeRateEr'); + const minPriceEp = this.safeNumber (market, 'minPriceEp'); + const maxPriceEp = this.safeNumber (market, 'maxPriceEp'); + const makerFeeRateEr = this.safeNumber (market, 'makerFeeRateEr'); + const takerFeeRateEr = this.safeNumber (market, 'takerFeeRateEr'); if (makerFeeRateEr !== undefined) { maker = this.fromEn (makerFeeRateEr, ratioScale, 0.00000001); } @@ -404,10 +406,11 @@ module.exports = class phemex extends Exchange { }, 'cost': { 'min': undefined, - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderQty')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderQty')), }, }; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -456,7 +459,9 @@ module.exports = class phemex extends Exchange { // "defaultMakerFee":"0.001", // "defaultMakerFeeEr":100000, // "baseQtyPrecision":6, - // "quoteQtyPrecision":2 + // "quoteQtyPrecision":2, + // "status":"Listed", + // "tipOrderQty":20 // } // const type = this.safeStringLower (market, 'type'); @@ -467,30 +472,31 @@ module.exports = class phemex extends Exchange { const inverse = undefined; const spot = true; const swap = false; - const taker = this.safeFloat (market, 'defaultTakerFee'); - const maker = this.safeFloat (market, 'defaultMakerFee'); + const taker = this.safeNumber (market, 'defaultTakerFee'); + const maker = this.safeNumber (market, 'defaultMakerFee'); const precision = { - 'amount': this.parseSafeFloat (this.safeString (market, 'baseTickSize')), - 'price': this.parseSafeFloat (this.safeString (market, 'quoteTickSize')), + 'amount': this.parseSafeNumber (this.safeString (market, 'baseTickSize')), + 'price': this.parseSafeNumber (this.safeString (market, 'quoteTickSize')), }; const limits = { 'amount': { 'min': precision['amount'], - 'max': this.parseSafeFloat (this.safeString (market, 'maxBaseOrderSize')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxBaseOrderSize')), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.parseSafeFloat (this.safeString (market, 'minOrderValue')), - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderValue')), + 'min': this.parseSafeNumber (this.safeString (market, 'minOrderValue')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderValue')), }, }; const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -680,8 +686,8 @@ module.exports = class phemex extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const valueScale = this.safeInteger (currency, 'valueScale'); - const minValueEv = this.safeFloat (currency, 'minValueEv'); - const maxValueEv = this.safeFloat (currency, 'maxValueEv'); + const minValueEv = this.safeNumber (currency, 'minValueEv'); + const maxValueEv = this.safeNumber (currency, 'maxValueEv'); let minAmount = undefined; let maxAmount = undefined; let precision = undefined; @@ -731,12 +737,12 @@ module.exports = class phemex extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - let amount = this.safeFloat (bidask, amountKey); + let amount = this.safeNumber (bidask, amountKey); if (market['spot']) { amount = this.fromEv (amount, market); } return [ - this.fromEp (this.safeFloat (bidask, priceKey), market), + this.fromEp (this.safeNumber (bidask, priceKey), market), amount, ]; } @@ -870,16 +876,16 @@ module.exports = class phemex extends Exchange { // let baseVolume = undefined; if ((market !== undefined) && market['spot']) { - baseVolume = this.fromEv (this.safeFloat (ohlcv, 7), market); + baseVolume = this.fromEv (this.safeNumber (ohlcv, 7), market); } else { baseVolume = this.safeInteger (ohlcv, 7); } return [ this.safeTimestamp (ohlcv, 0), - this.fromEp (this.safeFloat (ohlcv, 3), market), - this.fromEp (this.safeFloat (ohlcv, 4), market), - this.fromEp (this.safeFloat (ohlcv, 5), market), - this.fromEp (this.safeFloat (ohlcv, 6), market), + this.fromEp (this.safeNumber (ohlcv, 3), market), + this.fromEp (this.safeNumber (ohlcv, 4), market), + this.fromEp (this.safeNumber (ohlcv, 5), market), + this.fromEp (this.safeNumber (ohlcv, 6), market), baseVolume, ]; } @@ -972,11 +978,11 @@ module.exports = class phemex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.000001); - const last = this.fromEp (this.safeFloat (ticker, 'lastEp'), market); - const quoteVolume = this.fromEp (this.safeFloat (ticker, 'turnoverEv'), market); - let baseVolume = this.safeFloat (ticker, 'volume'); + const last = this.fromEp (this.safeNumber (ticker, 'lastEp'), market); + const quoteVolume = this.fromEp (this.safeNumber (ticker, 'turnoverEv'), market); + let baseVolume = this.safeNumber (ticker, 'volume'); if (baseVolume === undefined) { - baseVolume = this.fromEv (this.safeFloat (ticker, 'volumeEv')); + baseVolume = this.fromEv (this.safeNumber (ticker, 'volumeEv')); } let vwap = undefined; if ((market !== undefined) && (market['spot'])) { @@ -985,7 +991,7 @@ module.exports = class phemex extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.fromEp (this.safeFloat (ticker, 'openEp'), market); + const open = this.fromEp (this.safeNumber (ticker, 'openEp'), market); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -997,11 +1003,11 @@ module.exports = class phemex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.fromEp (this.safeFloat (ticker, 'highEp'), market), - 'low': this.fromEp (this.safeFloat (ticker, 'lowEp'), market), - 'bid': this.fromEp (this.safeFloat (ticker, 'bidEp'), market), + 'high': this.fromEp (this.safeNumber (ticker, 'highEp'), market), + 'low': this.fromEp (this.safeNumber (ticker, 'lowEp'), market), + 'bid': this.fromEp (this.safeNumber (ticker, 'bidEp'), market), 'bidVolume': undefined, - 'ask': this.fromEp (this.safeFloat (ticker, 'askEp'), market), + 'ask': this.fromEp (this.safeNumber (ticker, 'askEp'), market), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -1192,8 +1198,8 @@ module.exports = class phemex extends Exchange { id = this.safeString (trade, tradeLength - 4); } side = this.safeStringLower (trade, tradeLength - 3); - price = this.fromEp (this.safeFloat (trade, tradeLength - 2), market); - amount = this.fromEv (this.safeFloat (trade, tradeLength - 1), market); + price = this.fromEp (this.safeNumber (trade, tradeLength - 2), market); + amount = this.fromEv (this.safeNumber (trade, tradeLength - 1), market); if (market['spot']) { if ((price !== undefined) && (amount !== undefined)) { cost = price * amount; @@ -1209,14 +1215,14 @@ module.exports = class phemex extends Exchange { if (execStatus === 'MakerFill') { takerOrMaker = 'maker'; } - price = this.fromEp (this.safeFloat (trade, 'execPriceEp'), market); - amount = this.fromEv (this.safeFloat (trade, 'execBaseQtyEv'), market); - amount = this.safeFloat (trade, 'execQty', amount); - cost = this.fromEv (this.safeFloat2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); - const feeCost = this.fromEv (this.safeFloat (trade, 'execFeeEv'), market); + price = this.fromEp (this.safeNumber (trade, 'execPriceEp'), market); + amount = this.fromEv (this.safeNumber (trade, 'execBaseQtyEv'), market); + amount = this.safeNumber (trade, 'execQty', amount); + cost = this.fromEv (this.safeNumber2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); + const feeCost = this.fromEv (this.safeNumber (trade, 'execFeeEv'), market); if (feeCost !== undefined) { let feeRate = undefined; - let feeRateEr = this.safeFloat (trade, 'feeRateEr'); + let feeRateEr = this.safeNumber (trade, 'feeRateEr'); if (feeRateEr < 0) { feeRateEr = Math.abs (feeRateEr); feeRate = this.fromEr (feeRateEr, market); @@ -1292,9 +1298,9 @@ module.exports = class phemex extends Exchange { const currency = this.safeValue (this.currencies, code, {}); const scale = this.safeInteger (currency, 'valueScale', 8); const account = this.account (); - const balanceEv = this.safeFloat (balance, 'balanceEv'); - const lockedTradingBalanceEv = this.safeFloat (balance, 'lockedTradingBalanceEv'); - const lockedWithdrawEv = this.safeFloat (balance, 'lockedWithdrawEv'); + const balanceEv = this.safeNumber (balance, 'balanceEv'); + const lockedTradingBalanceEv = this.safeNumber (balance, 'lockedTradingBalanceEv'); + const lockedWithdrawEv = this.safeNumber (balance, 'lockedWithdrawEv'); const total = this.fromEn (balanceEv, scale, scale, DECIMAL_PLACES); const lockedTradingBalance = this.fromEn (lockedTradingBalanceEv, scale, scale, DECIMAL_PLACES); const lockedWithdraw = this.fromEn (lockedWithdrawEv, scale, scale, DECIMAL_PLACES); @@ -1388,8 +1394,8 @@ module.exports = class phemex extends Exchange { const code = this.safeCurrencyCode (currencyId); const currency = this.currency (code); const account = this.account (); - const accountBalanceEv = this.safeFloat (balance, 'accountBalanceEv'); - const totalUsedBalanceEv = this.safeFloat (balance, 'totalUsedBalanceEv'); + const accountBalanceEv = this.safeNumber (balance, 'accountBalanceEv'); + const totalUsedBalanceEv = this.safeNumber (balance, 'totalUsedBalanceEv'); const valueScale = this.safeInteger (currency, 'valueScale', 8); account['total'] = this.fromEn (accountBalanceEv, valueScale, valueScale, DECIMAL_PLACES); account['used'] = this.fromEn (totalUsedBalanceEv, valueScale, valueScale, DECIMAL_PLACES); @@ -1621,21 +1627,21 @@ module.exports = class phemex extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let price = this.fromEp (this.safeFloat (order, 'priceEp'), market); + let price = this.fromEp (this.safeNumber (order, 'priceEp'), market); if (price === 0) { price = undefined; } - const amount = this.fromEv (this.safeFloat (order, 'baseQtyEv'), market); - const remaining = this.fromEv (this.safeFloat (order, 'leavesBaseQtyEv'), market); - let filled = this.fromEv (this.safeFloat (order, 'cumBaseQtyEv'), market); - const cost = this.fromEv (this.safeFloat (order, 'quoteQtyEv'), market); - const average = this.fromEp (this.safeFloat (order, 'avgPriceEp'), market); + const amount = this.fromEv (this.safeNumber (order, 'baseQtyEv'), market); + const remaining = this.fromEv (this.safeNumber (order, 'leavesBaseQtyEv'), market); + let filled = this.fromEv (this.safeNumber (order, 'cumBaseQtyEv'), market); + const cost = this.fromEv (this.safeNumber (order, 'quoteQtyEv'), market); + const average = this.fromEp (this.safeNumber (order, 'avgPriceEp'), market); const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'ordType')); const timestamp = this.safeIntegerProduct2 (order, 'actionTimeNs', 'createTimeNs', 0.000001); let fee = undefined; - const feeCost = this.fromEv (this.safeFloat (order, 'cumFeeEv'), market); + const feeCost = this.fromEv (this.safeNumber (order, 'cumFeeEv'), market); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1648,7 +1654,7 @@ module.exports = class phemex extends Exchange { } } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.fromEp (this.safeFloat (order, 'stopPxEp', market)); + const stopPrice = this.fromEp (this.safeNumber (order, 'stopPxEp', market)); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -1721,18 +1727,18 @@ module.exports = class phemex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'orderType')); - const price = this.fromEp (this.safeFloat (order, 'priceEp'), market); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); + const price = this.fromEp (this.safeNumber (order, 'priceEp'), market); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); const timestamp = this.safeIntegerProduct (order, 'actionTimeNs', 0.000001); - const cost = this.safeFloat (order, 'cumValue'); + const cost = this.safeNumber (order, 'cumValue'); let lastTradeTimestamp = this.safeIntegerProduct (order, 'transactTimeNs', 0.000001); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -1807,7 +1813,7 @@ module.exports = class phemex extends Exchange { } request['qtyType'] = qtyType; if (qtyType === 'ByQuote') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); params = this.omit (params, 'cost'); if (this.options['createOrderByQuoteRequiresPrice']) { if (price !== undefined) { @@ -1827,7 +1833,7 @@ module.exports = class phemex extends Exchange { if (type === 'Limit') { request['priceEp'] = this.toEp (price, market); } - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice !== undefined) { request['stopPxEp'] = this.toEp (stopPrice, market); } @@ -2335,7 +2341,7 @@ module.exports = class phemex extends Exchange { const code = currency['code']; const timestamp = this.safeInteger2 (transaction, 'createdAt', 'submitedAt'); let type = this.safeStringLower (transaction, 'type'); - const feeCost = this.fromEn (this.safeFloat (transaction, 'feeEv'), currency['valueScale'], currency['precision']); + const feeCost = this.fromEn (this.safeNumber (transaction, 'feeEv'), currency['valueScale'], currency['precision']); let fee = undefined; if (feeCost !== undefined) { type = 'withdrawal'; @@ -2345,7 +2351,7 @@ module.exports = class phemex extends Exchange { }; } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.fromEn (this.safeFloat (transaction, 'amountEv'), currency['valueScale'], currency['precision']); + const amount = this.fromEn (this.safeNumber (transaction, 'amountEv'), currency['valueScale'], currency['precision']); return { 'info': transaction, 'id': id, @@ -2367,7 +2373,7 @@ module.exports = class phemex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.safeString (params, 'code'); const request = {}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/poloniex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/poloniex.js index 30eee15c9..fbb6447ad 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/poloniex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/poloniex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, PermissionDenied, DDoSProtection, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, CancelPending, InvalidNonce, OnMaintenance, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -113,6 +114,7 @@ module.exports = class poloniex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', // starting from Jan 8 2020 'maker': 0.0009, 'taker': 0.0009, @@ -207,24 +209,6 @@ module.exports = class poloniex extends Exchange { }); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - parseOHLCV (ohlcv, market = undefined) { // // { @@ -240,11 +224,11 @@ module.exports = class poloniex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'date'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'quoteVolume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'quoteVolume'), ]; } @@ -337,11 +321,11 @@ module.exports = class poloniex extends Exchange { const balance = this.safeValue (response, currencyId, {}); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onOrders'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFees (params = {}) { @@ -359,8 +343,8 @@ module.exports = class poloniex extends Exchange { // return { 'info': fees, - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), 'withdraw': {}, 'deposit': {}, }; @@ -418,8 +402,8 @@ module.exports = class poloniex extends Exchange { let open = undefined; let change = undefined; let average = undefined; - const last = this.safeFloat (ticker, 'last'); - const relativeChange = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const relativeChange = this.safeNumber (ticker, 'percentChange'); if (relativeChange !== -1) { open = last / this.sum (1, relativeChange); change = last - open; @@ -429,11 +413,11 @@ module.exports = class poloniex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24hr'), - 'low': this.safeFloat (ticker, 'low24hr'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high24hr'), + 'low': this.safeNumber (ticker, 'low24hr'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -443,8 +427,8 @@ module.exports = class poloniex extends Exchange { 'change': change, 'percentage': relativeChange * 100, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -485,7 +469,7 @@ module.exports = class poloniex extends Exchange { const code = this.safeCurrencyCode (id); const active = (currency['delisted'] === 0) && !currency['disabled']; const numericId = this.safeInteger (currency, 'id'); - const fee = this.safeFloat (currency, 'txFee'); + const fee = this.safeNumber (currency, 'txFee'); result[code] = { 'id': id, 'numericId': numericId, @@ -576,13 +560,18 @@ module.exports = class poloniex extends Exchange { } const side = this.safeString (trade, 'type'); let fee = undefined; - const price = this.safeFloat (trade, 'rate'); - const cost = this.safeFloat (trade, 'total'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const feeDisplay = this.safeString (trade, 'feeDisplay'); if (feeDisplay !== undefined) { const parts = feeDisplay.split (' '); - const feeCost = this.safeFloat (parts, 0); + const feeCost = this.safeNumber (parts, 0); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -601,7 +590,7 @@ module.exports = class poloniex extends Exchange { } } let takerOrMaker = undefined; - const takerAdjustment = this.safeFloat (trade, 'takerAdjustment'); + const takerAdjustment = this.safeNumber (trade, 'takerAdjustment'); if (takerAdjustment !== undefined) { takerOrMaker = 'taker'; } @@ -847,9 +836,9 @@ module.exports = class poloniex extends Exchange { if (resultingTrades !== undefined) { trades = this.parseTrades (resultingTrades, market); } - const price = this.safeFloat2 (order, 'price', 'rate'); - let remaining = this.safeFloat (order, 'amount'); - let amount = this.safeFloat (order, 'startingAmount'); + const price = this.safeNumber2 (order, 'price', 'rate'); + let remaining = this.safeNumber (order, 'amount'); + let amount = this.safeNumber (order, 'startingAmount'); let filled = undefined; let cost = 0; if (amount !== undefined) { @@ -899,7 +888,7 @@ module.exports = class poloniex extends Exchange { } const id = this.safeString (order, 'orderNumber'); let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -1396,11 +1385,11 @@ module.exports = class poloniex extends Exchange { const defaultType = ('withdrawalNumber' in transaction) ? 'withdrawal' : 'deposit'; const type = this.safeString (transaction, 'type', defaultType); const id = this.safeString2 (transaction, 'withdrawalNumber', 'depositNumber'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'paymentID'); // according to https://poloniex.com/fees/ - const feeCost = this.safeFloat (transaction, 'fee', 0); + const feeCost = this.safeNumber (transaction, 'fee', 0); if (type === 'withdrawal') { // poloniex withdrawal amount includes the fee amount = amount - feeCost; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/probit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/probit.js index 522045f2c..2b551ca0a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/probit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/probit.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, BadResponse, BadRequest, InvalidOrder, InsufficientFunds, AuthenticationError, ArgumentsRequired, InvalidAddress, RateLimitExceeded, DDoSProtection, BadSymbol } = require ('./base/errors'); const { TRUNCATE, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -140,9 +141,11 @@ module.exports = class probit extends Exchange { }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', 'CBC': 'CryptoBharatCoin', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'HBC': 'Hybrid Bank Cash', 'UNI': 'UNICORN Token', }, @@ -191,11 +194,11 @@ module.exports = class probit extends Exchange { const costPrecision = this.safeInteger (market, 'cost_precision'); const precision = { 'amount': 1 / Math.pow (10, amountPrecision), - 'price': this.safeFloat (market, 'price_increment'), + 'price': this.safeNumber (market, 'price_increment'), 'cost': 1 / Math.pow (10, costPrecision), }; - const takerFeeRate = this.safeFloat (market, 'taker_fee_rate'); - const makerFeeRate = this.safeFloat (market, 'maker_fee_rate'); + const takerFeeRate = this.safeNumber (market, 'taker_fee_rate'); + const makerFeeRate = this.safeNumber (market, 'maker_fee_rate'); result.push ({ 'id': id, 'info': market, @@ -210,16 +213,16 @@ module.exports = class probit extends Exchange { 'maker': makerFeeRate / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_cost'), - 'max': this.safeFloat (market, 'max_cost'), + 'min': this.safeNumber (market, 'min_cost'), + 'max': this.safeNumber (market, 'max_cost'), }, }, }); @@ -306,7 +309,7 @@ module.exports = class probit extends Exchange { // [ { 'amount': '0.015', 'priority': 1, 'currency_id': 'ETH' }, {} ] for (let j = 0; j < withdrawalFees.length; j++) { const withdrawalFee = withdrawalFees[j]; - const amount = this.safeFloat (withdrawalFee, 'amount'); + const amount = this.safeNumber (withdrawalFee, 'amount'); const priority = this.safeInteger (withdrawalFee, 'priority'); if ((amount !== undefined) && (priority !== undefined)) { fees.push (withdrawalFee); @@ -314,7 +317,7 @@ module.exports = class probit extends Exchange { } const withdrawalFeesByPriority = this.sortBy (fees, 'priority'); const withdrawalFee = this.safeValue (withdrawalFeesByPriority, 0, {}); - const fee = this.safeFloat (withdrawalFee, 'amount'); + const fee = this.safeNumber (withdrawalFee, 'amount'); result[code] = { 'id': id, 'code': code, @@ -337,11 +340,11 @@ module.exports = class probit extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (platform, 'min_deposit_amount'), + 'min': this.safeNumber (platform, 'min_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (platform, 'min_withdrawal_amount'), + 'min': this.safeNumber (platform, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -371,11 +374,11 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (balance, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'total'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -427,14 +430,6 @@ module.exports = class probit extends Exchange { return this.parseTickers (data, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -482,8 +477,8 @@ module.exports = class probit extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); - const close = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); + const close = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); let percentage = undefined; let open = undefined; if (change !== undefined) { @@ -492,15 +487,15 @@ module.exports = class probit extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -642,16 +637,13 @@ module.exports = class probit extends Exchange { marketId = this.safeString (trade, 'market_id', marketId); const symbol = this.safeSymbol (marketId, market, '-'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'order_id'); - const feeCost = this.safeFloat (trade, 'fee_amount'); + const feeCost = this.safeNumber (trade, 'fee_amount'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency_id'); @@ -795,11 +787,11 @@ module.exports = class probit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'start_time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_volume'), ]; } @@ -898,37 +890,24 @@ module.exports = class probit extends Exchange { const marketId = this.safeString (order, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'time')); - let price = this.safeFloat (order, 'limit_price'); - const filled = this.safeFloat (order, 'filled_quantity'); - let remaining = this.safeFloat (order, 'open_quantity'); - const canceledAmount = this.safeFloat (order, 'cancelled_quantity'); + let price = this.safeNumber (order, 'limit_price'); + const filled = this.safeNumber (order, 'filled_quantity'); + let remaining = this.safeNumber (order, 'open_quantity'); + const canceledAmount = this.safeNumber (order, 'cancelled_quantity'); if (canceledAmount !== undefined) { remaining = this.sum (remaining, canceledAmount); } - const amount = this.safeFloat (order, 'quantity', this.sum (filled, remaining)); - let cost = this.safeFloat2 (order, 'filled_cost', 'cost'); + const amount = this.safeNumber (order, 'quantity', this.sum (filled, remaining)); + const cost = this.safeNumber2 (order, 'filled_cost', 'cost'); if (type === 'market') { price = undefined; } - let average = undefined; - if (filled !== undefined) { - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if (cost !== undefined) { - if (filled > 0) { - average = cost / filled; - } - } - } let clientOrderId = this.safeString (order, 'client_order_id'); if (clientOrderId === '') { clientOrderId = undefined; } const timeInForce = this.safeStringUpper (order, 'time_in_force'); - return { + return this.safeOrder ({ 'id': id, 'info': order, 'clientOrderId': clientOrderId, @@ -945,11 +924,11 @@ module.exports = class probit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'average': average, + 'average': undefined, 'cost': cost, 'fee': undefined, 'trades': undefined, - }; + }); } costToPrecision (symbol, cost) { @@ -979,7 +958,7 @@ module.exports = class probit extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -1104,16 +1083,6 @@ module.exports = class probit extends Exchange { return this.parseDepositAddresses (data); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { // In order to use this method // you need to allow API withdrawal from the API Settings Page, and @@ -1144,7 +1113,7 @@ module.exports = class probit extends Exchange { parseTransaction (transaction, currency = undefined) { const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'destination_tag'); const txid = this.safeString (transaction, 'hash'); @@ -1153,7 +1122,7 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (transaction, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined && feeCost !== 0) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/qtrade.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/qtrade.js index aa66545bf..d77b576c4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/qtrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/qtrade.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -179,11 +180,11 @@ module.exports = class qtrade extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_buy_value'), + 'min': this.safeNumber (market, 'minimum_buy_value'), 'max': undefined, }, 'price': { @@ -264,12 +265,12 @@ module.exports = class qtrade extends Exchange { 'info': currency, 'type': type, 'name': name, - 'fee': this.safeFloat (config, 'withdraw_fee'), + 'fee': this.safeNumber (config, 'withdraw_fee'), 'precision': this.safeInteger (currency, 'precision'), 'active': active, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimum_order'), + 'min': this.safeNumber (currency, 'minimum_order'), 'max': undefined, }, 'price': { @@ -304,11 +305,11 @@ module.exports = class qtrade extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'market_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'market_volume'), ]; } @@ -370,8 +371,8 @@ module.exports = class qtrade extends Exchange { const result = []; for (let j = 0; j < prices.length; j++) { const priceAsString = prices[j]; - const price = this.safeFloat (prices, j); - const amount = this.safeFloat (bidasks, priceAsString); + const price = this.safeNumber (prices, j); + const amount = this.safeNumber (bidasks, priceAsString); result.push ([ price, amount ]); } orderbook[side] = result; @@ -403,12 +404,12 @@ module.exports = class qtrade extends Exchange { const marketId = this.safeString (ticker, 'id_hr'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeIntegerProduct (ticker, 'last_change', 0.001); - const previous = this.safeFloat (ticker, 'day_open'); - const last = this.safeFloat (ticker, 'last'); - const day_change = this.safeFloat (ticker, 'day_change'); + const previous = this.safeNumber (ticker, 'day_open'); + const last = this.safeNumber (ticker, 'last'); + const day_change = this.safeNumber (ticker, 'day_change'); let percentage = undefined; let change = undefined; - let average = this.safeFloat (ticker, 'day_avg_price'); + let average = this.safeNumber (ticker, 'day_avg_price'); if (day_change !== undefined) { percentage = day_change * 100; if (previous !== undefined) { @@ -418,18 +419,18 @@ module.exports = class qtrade extends Exchange { if ((average === undefined) && (last !== undefined) && (previous !== undefined)) { average = this.sum (last, previous) / 2; } - const baseVolume = this.safeFloat (ticker, 'day_volume_market'); - const quoteVolume = this.safeFloat (ticker, 'day_volume_base'); + const baseVolume = this.safeNumber (ticker, 'day_volume_market'); + const quoteVolume = this.safeNumber (ticker, 'day_volume_base'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'day_high'), - 'low': this.safeFloat (ticker, 'day_low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'day_high'), + 'low': this.safeNumber (ticker, 'day_low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': previous, @@ -637,16 +638,16 @@ module.exports = class qtrade extends Exchange { const side = this.safeString (trade, 'side'); const marketId = this.safeString (trade, 'market_string'); const symbol = this.safeSymbol (marketId, market, '_'); - let cost = this.safeFloat2 (trade, 'base_volume', 'base_amount'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'market_amount', 'amount'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - if (price !== undefined) { - cost = price * amount; - } + let cost = this.safeNumber2 (trade, 'base_volume', 'base_amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'market_amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'base_fee'); + const feeCost = this.safeNumber (trade, 'base_fee'); if (feeCost !== undefined) { const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; fee = { @@ -703,7 +704,7 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); account['used'] = 0; result[code] = account; } @@ -713,10 +714,10 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -845,10 +846,9 @@ module.exports = class qtrade extends Exchange { side = this.safeString (parts, 0); orderType = this.safeString (parts, 1); } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'market_amount'); - let remaining = this.safeFloat (order, 'market_amount_remaining'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'market_amount'); + const remaining = this.safeNumber (order, 'market_amount_remaining'); const open = this.safeValue (order, 'open', false); const closeReason = this.safeString (order, 'close_reason'); let status = undefined; @@ -860,58 +860,21 @@ module.exports = class qtrade extends Exchange { status = 'closed'; } const marketId = this.safeString (order, 'market_string'); - const symbol = this.safeSymbol (marketId, market, '_'); + market = this.safeMarket (marketId, market, '_'); + const symbol = market['symbol']; const rawTrades = this.safeValue (order, 'trades', []); const parsedTrades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id, 'side': side, 'type': orderType, }); - const numTrades = parsedTrades.length; - let lastTradeTimestamp = undefined; - let feeCost = undefined; - let cost = undefined; - if (numTrades > 0) { - feeCost = 0; - cost = 0; - filled = 0; - remaining = amount; - for (let i = 0; i < parsedTrades.length; i++) { - const trade = parsedTrades[i]; - feeCost = this.sum (trade['fee']['cost'], feeCost); - lastTradeTimestamp = this.safeInteger (trade, 'timestamp'); - cost = this.sum (trade['cost'], cost); - filled = this.sum (trade['amount'], filled); - remaining = Math.max (0, remaining - trade['amount']); - } - } - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; - fee = { - 'currency': feeCurrencyCode, - 'cost': feeCost, - }; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let average = undefined; - if (filled !== undefined) { - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': orderType, 'timeInForce': undefined, @@ -919,15 +882,16 @@ module.exports = class qtrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, - 'fee': fee, - 'cost': cost, + 'fee': undefined, + 'fees': undefined, + 'cost': undefined, 'trades': parsedTrades, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -1396,7 +1360,7 @@ module.exports = class qtrade extends Exchange { const tagTo = tag; const cancelRequested = this.safeValue (transaction, 'cancel_requested'); const type = (cancelRequested === undefined) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); let status = this.parseTransactionStatus (this.safeString (transaction, 'status')); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/rightbtc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/rightbtc.js index d22048303..c1cc6bc9b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/rightbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/rightbtc.js @@ -185,8 +185,8 @@ module.exports = class rightbtc extends Exchange { return result; } - divideSafeFloat (x, key, divisor) { - const value = this.safeFloat (x, key); + divideSafeNumber (x, key, divisor) { + const value = this.safeNumber (x, key); if (value !== undefined) { return value / divisor; } @@ -196,12 +196,12 @@ module.exports = class rightbtc extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); - const last = this.divideSafeFloat (ticker, 'last', 1e8); - const high = this.divideSafeFloat (ticker, 'high', 1e8); - const low = this.divideSafeFloat (ticker, 'low', 1e8); - const bid = this.divideSafeFloat (ticker, 'buy', 1e8); - const ask = this.divideSafeFloat (ticker, 'sell', 1e8); - const baseVolume = this.divideSafeFloat (ticker, 'vol24h', 1e8); + const last = this.divideSafeNumber (ticker, 'last', 1e8); + const high = this.divideSafeNumber (ticker, 'high', 1e8); + const low = this.divideSafeNumber (ticker, 'low', 1e8); + const bid = this.divideSafeNumber (ticker, 'buy', 1e8); + const ask = this.divideSafeNumber (ticker, 'sell', 1e8); + const baseVolume = this.divideSafeNumber (ticker, 'vol24h', 1e8); return { 'symbol': symbol, 'timestamp': timestamp, @@ -305,9 +305,9 @@ module.exports = class rightbtc extends Exchange { let id = this.safeString (trade, 'tid'); id = this.safeString (trade, 'trade_id', id); const orderId = this.safeString (trade, 'order_id'); - const price = this.divideSafeFloat (trade, 'price', 1e8); - let amount = this.safeFloat (trade, 'amount'); - amount = this.safeFloat (trade, 'quantity', amount); + const price = this.divideSafeNumber (trade, 'price', 1e8); + let amount = this.safeNumber (trade, 'amount'); + amount = this.safeNumber (trade, 'quantity', amount); if (amount !== undefined) { amount = amount / 1e8; } @@ -404,8 +404,8 @@ module.exports = class rightbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); // https://github.com/ccxt/ccxt/issues/3873 - account['free'] = this.divideSafeFloat (balance, 'balance', 1e8); - account['used'] = this.divideSafeFloat (balance, 'frozen', 1e8); + account['free'] = this.divideSafeNumber (balance, 'balance', 1e8); + account['used'] = this.divideSafeNumber (balance, 'frozen', 1e8); result[code] = account; } return this.parseBalance (result); @@ -494,30 +494,18 @@ module.exports = class rightbtc extends Exchange { } else if ('transactTime' in order) { timestamp = order['transactTime']; } - let price = this.safeFloat2 (order, 'limit', 'price'); + let price = this.safeNumber2 (order, 'limit', 'price'); if (price !== undefined) { price = price / 1e8; } - const amount = this.divideSafeFloat (order, 'quantity', 1e8); - let filled = this.divideSafeFloat (order, 'filled_quantity', 1e8); - let remaining = this.divideSafeFloat (order, 'rest', 1e8); - const cost = this.divideSafeFloat (order, 'cost', 1e8); + const amount = this.divideSafeNumber (order, 'quantity', 1e8); + const filled = this.divideSafeNumber (order, 'filled_quantity', 1e8); + const remaining = this.divideSafeNumber (order, 'rest', 1e8); + const cost = this.divideSafeNumber (order, 'cost', 1e8); // lines 483-494 should be generalized into a base class method - if (amount !== undefined) { - if (remaining === undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - if (filled === undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } - } const type = 'limit'; const side = this.safeStringLower (order, 'side'); - const feeCost = this.divideSafeFloat (order, 'min_fee', 1e8); + const feeCost = this.divideSafeNumber (order, 'min_fee', 1e8); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -525,13 +513,13 @@ module.exports = class rightbtc extends Exchange { feeCurrency = market['quote']; } fee = { - 'rate': this.safeFloat (order, 'fee'), + 'rate': this.safeNumber (order, 'fee'), 'cost': feeCost, 'currency': feeCurrency, }; } const trades = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -553,7 +541,7 @@ module.exports = class rightbtc extends Exchange { 'fee': fee, 'trades': trades, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ripio.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ripio.js index b3a30607e..8155014d3 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ripio.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/ripio.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, BadSymbol, BadRequest, InvalidOrder, ArgumentsRequired, OrderNotFound, InsufficientFunds, DDoSProtection } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -149,12 +150,12 @@ module.exports = class ripio extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'min_amount'), - 'price': this.safeFloat (market, 'price_tick'), + 'amount': this.safeNumber (market, 'min_amount'), + 'price': this.safeNumber (market, 'price_tick'), }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -162,15 +163,15 @@ module.exports = class ripio extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_value'), + 'min': this.safeNumber (market, 'min_value'), 'max': undefined, }, }; const active = this.safeValue (market, 'enabled', true); const fees = this.safeValue (market, 'fees', []); const firstFee = this.safeValue (fees, 0, {}); - const maker = this.safeFloat (firstFee, 'maker_fee', 0.0); - const taker = this.safeFloat (firstFee, 'taker_fee', 0.0); + const maker = this.safeNumber (firstFee, 'maker_fee', 0.0); + const taker = this.safeNumber (firstFee, 'taker_fee', 0.0); result.push ({ 'id': id, 'symbol': symbol, @@ -277,18 +278,18 @@ module.exports = class ripio extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); const marketId = this.safeString (ticker, 'pair'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const average = this.safeFloat (ticker, 'avg'); + const last = this.safeNumber (ticker, 'last_price'); + const average = this.safeNumber (ticker, 'avg'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bid_volume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'ask_volume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bid_volume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'ask_volume'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -430,15 +431,14 @@ module.exports = class ripio extends Exchange { if (side !== undefined) { side = side.toLowerCase (); } - const price = this.safeFloat2 (trade, 'price', 'match_price'); - const amount = this.safeFloat2 (trade, 'amount', 'exchanged'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString2 (trade, 'price', 'match_price'); + const amountString = this.safeString2 (trade, 'amount', 'exchanged'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'pair'); market = this.safeMarket (marketId, market); - const feeCost = this.safeFloat (trade, takerOrMaker + '_fee'); + const feeCost = this.safeNumber (trade, takerOrMaker + '_fee'); const orderId = this.safeString (trade, takerOrMaker); let fee = undefined; if (feeCost !== undefined) { @@ -512,11 +512,11 @@ module.exports = class ripio extends Exchange { const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -775,16 +775,16 @@ module.exports = class ripio extends Exchange { // } // const id = this.safeString (order, 'order_id'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat (order, 'notional'); + const amount = this.safeNumber (order, 'amount'); + let cost = this.safeNumber (order, 'notional'); const type = this.safeStringLower (order, 'order_type'); const priceField = (type === 'market') ? 'fill_price' : 'limit_price'; - const price = this.safeFloat (order, priceField); + const price = this.safeNumber (order, priceField); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeTimestamp (order, 'created_at'); let average = this.safeValue (order, 'fill_price'); - let filled = this.safeFloat (order, 'filled'); + let filled = this.safeNumber (order, 'filled'); let remaining = undefined; const fills = this.safeValue (order, 'fills'); let trades = undefined; @@ -819,7 +819,7 @@ module.exports = class ripio extends Exchange { } const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); return { 'id': id, 'clientOrderId': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/southxchange.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/southxchange.js index d2bdd8cec..96ca247a0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/southxchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/southxchange.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -114,14 +115,14 @@ module.exports = class southxchange extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const deposited = this.safeFloat (balance, 'Deposited'); - const unconfirmed = this.safeFloat (balance, 'Unconfirmed'); + const deposited = this.safeString (balance, 'Deposited'); + const unconfirmed = this.safeString (balance, 'Unconfirmed'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'Available'); - account['total'] = this.sum (deposited, unconfirmed); + account['free'] = this.safeString (balance, 'Available'); + account['total'] = Precise.stringAdd (deposited, unconfirmed); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -139,16 +140,16 @@ module.exports = class southxchange extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'Last'); + const last = this.safeNumber (ticker, 'Last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'Bid'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -156,9 +157,9 @@ module.exports = class southxchange extends Exchange { 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'Variation24Hr'), + 'percentage': this.safeNumber (ticker, 'Variation24Hr'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume24Hr'), + 'baseVolume': this.safeNumber (ticker, 'Volume24Hr'), 'quoteVolume': undefined, 'info': ticker, }; @@ -192,14 +193,11 @@ module.exports = class southxchange extends Exchange { parseTrade (trade, market) { const timestamp = this.safeTimestamp (trade, 'At'); - const price = this.safeFloat (trade, 'Price'); - const amount = this.safeFloat (trade, 'Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'Price'); + const amountString = this.safeString (trade, 'Amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'Type'); let symbol = undefined; if (market !== undefined) { @@ -240,21 +238,13 @@ module.exports = class southxchange extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const timestamp = undefined; - const price = this.safeFloat (order, 'LimitPrice'); - const amount = this.safeFloat (order, 'OriginalAmount'); - const remaining = this.safeFloat (order, 'Amount'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - cost = price * amount; - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'LimitPrice'); + const amount = this.safeNumber (order, 'OriginalAmount'); + const remaining = this.safeNumber (order, 'Amount'); const type = 'limit'; const side = this.safeStringLower (order, 'Type'); const id = this.safeString (order, 'Code'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -269,15 +259,14 @@ module.exports = class southxchange extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'filled': filled, + 'cost': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -410,8 +399,8 @@ module.exports = class southxchange extends Exchange { const type = this.safeString (item, 'Type'); const ledgerEntryType = this.parseLedgerEntryType (type); const code = this.safeCurrencyCode (this.safeString (item, 'CurrencyCode'), currency); - let amount = this.safeFloat (item, 'Amount'); - const after = this.safeFloat (item, 'TotalBalance'); + let amount = this.safeNumber (item, 'Amount'); + const after = this.safeNumber (item, 'TotalBalance'); let before = undefined; if (amount !== undefined) { if (after !== undefined) { @@ -582,7 +571,7 @@ module.exports = class southxchange extends Exchange { // } // const id = this.safeString (transaction, 'MovementId'); - const amount = this.safeFloat (transaction, 'Amount'); + const amount = this.safeNumber (transaction, 'Amount'); const address = this.safeString (transaction, 'Address'); const addressTo = address; const addressFrom = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/stex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/stex.js index af2e256f3..f4979c48a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/stex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/stex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, OrderNotFound, PermissionDenied, BadRequest, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -186,6 +187,7 @@ module.exports = class stex extends Exchange { 'BITSW': 'BITS', 'BHD': 'Bithold', 'BTH': 'Bithereum', + 'MPH': 'Chasyr Token', 'SBTC': 'SBTCT', // SiamBitcoin }, 'options': { @@ -249,7 +251,7 @@ module.exports = class stex extends Exchange { // differentiated fees for each particular method const code = this.safeCurrencyCode (this.safeString (currency, 'code')); const precision = this.safeInteger (currency, 'precision'); - const fee = this.safeFloat (currency, 'withdrawal_fee_const'); // todo: redesign + const fee = this.safeNumber (currency, 'withdrawal_fee_const'); // todo: redesign const active = this.safeValue (currency, 'active', true); result[code] = { 'id': id, @@ -266,11 +268,11 @@ module.exports = class stex extends Exchange { 'price': { 'min': Math.pow (10, -precision), 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (currency, 'minimum_deposit_amount'), + 'min': this.safeNumber (currency, 'minimum_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal_amount'), + 'min': this.safeNumber (currency, 'minimum_withdrawal_amount'), 'max': undefined, }, }, @@ -331,11 +333,11 @@ module.exports = class stex extends Exchange { 'price': this.safeInteger (market, 'market_precision'), }; const active = this.safeValue (market, 'active'); - const minBuyPrice = this.safeFloat (market, 'min_buy_price'); - const minSellPrice = this.safeFloat (market, 'min_sell_price'); + const minBuyPrice = this.safeNumber (market, 'min_buy_price'); + const minSellPrice = this.safeNumber (market, 'min_sell_price'); const minPrice = Math.max (minBuyPrice, minSellPrice); - const buyFee = this.safeFloat (market, 'buy_fee_percent') / 100; - const sellFee = this.safeFloat (market, 'sell_fee_percent') / 100; + const buyFee = this.safeNumber (market, 'buy_fee_percent') / 100; + const sellFee = this.safeNumber (market, 'sell_fee_percent') / 100; const fee = Math.max (buyFee, sellFee); result.push ({ 'id': id, @@ -354,7 +356,7 @@ module.exports = class stex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_order_amount'), + 'min': this.safeNumber (market, 'min_order_amount'), 'max': undefined, }, 'price': { 'min': minPrice, 'max': undefined }, @@ -518,8 +520,8 @@ module.exports = class stex extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString2 (ticker, 'id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -532,11 +534,11 @@ module.exports = class stex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -546,20 +548,12 @@ module.exports = class stex extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volumeQuote'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volumeQuote'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -625,11 +619,11 @@ module.exports = class stex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -704,12 +698,11 @@ module.exports = class stex extends Exchange { // const id = this.safeString (trade, 'id'); const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; @@ -822,11 +815,11 @@ module.exports = class stex extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'currency_id')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen_balance'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -885,9 +878,9 @@ module.exports = class stex extends Exchange { const marketId = this.safeString2 (order, 'currency_pair_id', 'currency_pair_name'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (order, 'timestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'initial_amount'); - const filled = this.safeFloat (order, 'processed_amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'initial_amount'); + const filled = this.safeNumber (order, 'processed_amount'); let remaining = undefined; let cost = undefined; if (filled !== undefined) { @@ -917,7 +910,7 @@ module.exports = class stex extends Exchange { 'order': id, }); } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); const result = { 'info': order, 'id': id, @@ -948,7 +941,7 @@ module.exports = class stex extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'amount'); + const feeCost = this.safeNumber (fees[i], 'amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1532,13 +1525,13 @@ module.exports = class stex extends Exchange { code = currency['code']; } const type = ('deposit_status_id' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeStringLower (transaction, 'status')); const timestamp = this.safeTimestamp2 (transaction, 'timestamp', 'created_ts'); const updated = this.safeTimestamp (transaction, 'updated_ts'); const txid = this.safeString (transaction, 'txid'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'fee_currency_id', 'deposit_fee_currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1774,8 +1767,8 @@ module.exports = class stex extends Exchange { for (let i = 0; i < data.length; i++) { const id = this.safeString (data[i], 'id'); const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (data[i], 'withdrawal_fee_const'); - depositFees[code] = this.safeFloat (data[i], 'deposit_fee_const'); + withdrawFees[code] = this.safeNumber (data[i], 'withdrawal_fee_const'); + depositFees[code] = this.safeNumber (data[i], 'deposit_fee_const'); } return { 'withdraw': withdrawFees, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/Exchange/test.ticker.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/Exchange/test.ticker.js index 7d91ea0ba..201873531 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/Exchange/test.ticker.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/Exchange/test.ticker.js @@ -74,6 +74,7 @@ module.exports = (exchange, ticker, method, symbol) => { if (![ + 'bybit', 'coinmarketcap', 'xbtce', 'coss', diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/functions/test.number.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/functions/test.number.js index f2e5eedd3..23e9f7926 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/functions/test.number.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/functions/test.number.js @@ -1,6 +1,7 @@ 'use strict' const { numberToString, decimalToPrecision, ROUND, TRUNCATE, DECIMAL_PLACES, TICK_SIZE, PAD_WITH_ZERO, SIGNIFICANT_DIGITS, toWei, fromWei } = require ('../../../../ccxt'); +const Precise = require ('../../../base/Precise') const assert = require ('assert'); // ---------------------------------------------------------------------------- @@ -287,3 +288,58 @@ assert (decimalToPrecision ('1602000000000000000000', TRUNCATE, 3, SIGNIFICANT_D // throws (() => // decimalToPrecision ('0.01', TRUNCATE, -1, TICK_SIZE), // "TICK_SIZE cant be used with negative numPrecisionDigits") + +// ---------------------------------------------------------------------------- + +const w = '-1.123e-6'; +const x = '0.00000002'; +const y = '69696900000'; +const z = '0'; +const a = '1e8'; + +assert (Precise.stringMul (x, y) === '1393.938'); +assert (Precise.stringMul (y, x) === '1393.938'); +assert (Precise.stringAdd (x, y) === '69696900000.00000002'); +assert (Precise.stringAdd (y, x) === '69696900000.00000002'); +assert (Precise.stringSub (x, y) === '-69696899999.99999998'); +assert (Precise.stringSub (y, x) === '69696899999.99999998'); +assert (Precise.stringDiv (x, y, 1) === '0'); +assert (Precise.stringDiv (x, y) === '0'); +assert (Precise.stringDiv (x, y, 19) === '0.0000000000000000002'); +assert (Precise.stringDiv (x, y, 20) === '0.00000000000000000028'); +assert (Precise.stringDiv (x, y, 21) === '0.000000000000000000286'); +assert (Precise.stringDiv (x, y, 22) === '0.0000000000000000002869'); +assert (Precise.stringDiv (y, x) === '3484845000000000000'); + +assert (Precise.stringMul (x, w) === '-0.00000000000002246'); +assert (Precise.stringMul (w, x) === '-0.00000000000002246'); +assert (Precise.stringAdd (x, w) === '-0.000001103'); +assert (Precise.stringAdd (w, x) === '-0.000001103'); +assert (Precise.stringSub (x, w) === '0.000001143'); +assert (Precise.stringSub (w, x) === '-0.000001143'); +assert (Precise.stringDiv (x, w) === '-0.017809439002671415'); +assert (Precise.stringDiv (w, x) === '-56.15'); + +assert (Precise.stringMul (z, w) === '0'); +assert (Precise.stringMul (z, x) === '0'); +assert (Precise.stringMul (z, y) === '0'); +assert (Precise.stringMul (w, z) === '0'); +assert (Precise.stringMul (x, z) === '0'); +assert (Precise.stringMul (y, z) === '0'); +assert (Precise.stringAdd (z, w) === '-0.000001123'); +assert (Precise.stringAdd (z, x) === '0.00000002'); +assert (Precise.stringAdd (z, y) === '69696900000'); +assert (Precise.stringAdd (w, z) === '-0.000001123'); +assert (Precise.stringAdd (x, z) === '0.00000002'); +assert (Precise.stringAdd (y, z) === '69696900000'); + +assert (Precise.stringMul (x, a) === '2'); +assert (Precise.stringMul (a, x) === '2'); +assert (Precise.stringMul (y, a) === '6969690000000000000'); +assert (Precise.stringMul (a, y) === '6969690000000000000'); +assert (Precise.stringDiv (y, a) === '696.969'); +assert (Precise.stringDiv (y, a, -1) === '690'); +assert (Precise.stringDiv (y, a, 0) === '696'); +assert (Precise.stringDiv (y, a, 1) === '696.9'); +assert (Precise.stringDiv (y, a, 2) === '696.96'); +assert (Precise.stringDiv (a, y) === '0.001434784043479695'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/test.base.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/test.base.js index 0eb7fcffa..6068fa10a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/test.base.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/test/base/test.base.js @@ -167,7 +167,7 @@ describe ('ccxt base code', () => { const exchange = new Exchange ({ 'id': 'mock' }) const propsSeenBefore = index ( - ["isNode", "empty", "keys", "values", "extend", "clone", "index", "ordered", "unique", "keysort", "indexBy", "groupBy", "filterBy", "sortBy", "flatten", "pluck", "omit", "sum", "deepExtend", "uuid", "unCamelCase", "capitalize", "isNumber", "isArray", "isObject", "isString", "isStringCoercible", "isDictionary", "hasProps", "prop", "asFloat", "asInteger", "safeFloat", "safeInteger", "safeValue", "safeString", "decimal", "toFixed", "truncate", "truncateToString", "precisionFromString", "stringToBinary", "stringToBase64", "base64ToBinary", "base64ToString", "binaryToString", "binaryConcat", "urlencode", "rawencode", "urlencodeBase64", "hash", "hmac", "jwt", "time", "setTimeout_safe", "sleep", "TimedOut", "timeout", "throttle", "json", "unjson", "aggregate", "is_node", "index_by", "group_by", "filter_by", "sort_by", "deep_extend", "un_camel_case", "is_number", "is_array", "is_object", "is_string", "is_string_coercible", "is_dictionary", "has_props", "as_float", "as_integer", "safe_float", "safe_integer", "safe_value", "safe_string", "to_fixed", "truncate_to_string", "precision_from_string", "string_to_binary", "string_to_base64", "utf16To_base64", "base64To_binary", "base64To_string", "binary_to_string", "binary_concat", "urlencode_base64", "set_timeout_safe", "Timed_out", "encode", "decode", "userAgents", "headers", "proxy", "origin", "iso8601", "parse8601", "milliseconds", "microseconds", "seconds", "id", "enableRateLimit", "rateLimit", "parseJsonResponse", "substituteCommonCurrencyCodes", "parseBalanceFromOpenOrders", "verbose", "debug", "journal", "userAgent", "twofa", "timeframes", "hasPublicAPI", "hasPrivateAPI", "hasCORS", "hasDeposit", "hasFetchBalance", "hasFetchClosedOrders", "hasFetchCurrencies", "hasFetchMyTrades", "hasFetchOHLCV", "hasFetchOpenOrders", "hasFetchOrder", "hasFetchOrderBook", "hasFetchOrders", "hasFetchTicker", "hasFetchTickers", "hasFetchBidsAsks", "hasFetchTrades", "hasWithdraw", "hasCreateOrder", "hasCancelOrder", "apiKey", "secret", "uid", "login", "password", "requiredCredentials", "exceptions", "balance", "orderbooks", "tickers", "fees", "orders", "trades", "currencies", "last_http_response", "last_json_response", "arrayConcat", "market_id", "market_ids", "array_concat", "implode_params", "extract_params", "fetch_balance", "fetch_free_balance", "fetch_used_balance","fetch_total_balance", "fetch_l2_order_book", "fetch_order_book", "fetch_bids_asks", "fetch_tickers", "fetch_ticker", "fetch_trades", "fetch_order", "fetch_orders", "fetch_open_orders", "fetch_closed_orders", "fetch_order_status", "fetch_markets", "load_markets", "set_markets", "parse_balance", "parse_bid_ask", "parse_bids_asks", "parse_order_book", "parse_trades", "parse_orders", "parse_ohlcv", "parse_ohlcvs", "edit_limit_buy_order", "edit_limit_sell_order", "edit_limit_order", "edit_order", "create_limit_buy_order", "create_limit_sell_order", "create_market_buy_order", "create_market_sell_order", "create_order", "calculate_fee", "common_currency_code", "price_to_precision", "amount_to_precision", "amount_to_string", "fee_to_precision", "cost_to_precision", "constructor", "getMarket", "describe", "defaults", "nonce", "encodeURIComponent", "checkRequiredCredentials", "initRestRateLimiter", "defineRestApi", "fetch", "fetch2", "request", "handleErrors", "defaultErrorHandler", "handleRestErrors", "handleRestResponse", "setMarkets", "loadMarkets", "fetchBidsAsks", "fetchTickers", "fetchOrder", "fetchOrders", "fetchOpenOrders", "fetchClosedOrders", "fetchMyTrades", "fetchCurrencies", "fetchMarkets", "fetchOrderStatus", "account", "commonCurrencyCode", "currency", "market", "marketId", "marketIds", "symbol", "extractParams", "implodeParams", "url", "parseBidAsk", "parseBidsAsks", "fetchL2OrderBook", "parseOrderBook", "parseBalance", "fetchPartialBalance", "fetchFreeBalance", "fetchUsedBalance", "fetchTotalBalance", "filterBySinceLimit", "parseTrades", "parseOrders", "filterOrdersBySymbol", "parseOHLCV", "parseOHLCVs", "editLimitBuyOrder", "editLimitSellOrder", "editLimitOrder", "editOrder", "createLimitBuyOrder", "createLimitSellOrder", "createMarketBuyOrder", "createMarketSellOrder", "costToPrecision", "priceToPrecision", "amountToPrecision", "amountToLots", "feeToPrecision", "calculateFee", "Ymd", "YmdHMS"] + ["isNode", "empty", "keys", "values", "extend", "clone", "index", "ordered", "unique", "keysort", "indexBy", "groupBy", "filterBy", "sortBy", "flatten", "pluck", "omit", "sum", "deepExtend", "uuid", "unCamelCase", "capitalize", "isNumber", "isArray", "isObject", "isString", "isStringCoercible", "isDictionary", "hasProps", "prop", "asFloat", "asInteger", "safeFloat", "safeInteger", "safeValue", "safeString", "decimal", "toFixed", "truncate", "truncateToString", "precisionFromString", "stringToBinary", "stringToBase64", "base64ToBinary", "base64ToString", "binaryToString", "binaryConcat", "urlencode", "rawencode", "urlencodeBase64", "hash", "hmac", "jwt", "time", "setTimeout_safe", "sleep", "TimedOut", "timeout", "throttle", "json", "aggregate", "is_node", "index_by", "group_by", "filter_by", "sort_by", "deep_extend", "un_camel_case", "is_number", "is_array", "is_object", "is_string", "is_string_coercible", "is_dictionary", "has_props", "as_float", "as_integer", "safe_float", "safe_integer", "safe_value", "safe_string", "to_fixed", "truncate_to_string", "precision_from_string", "string_to_binary", "string_to_base64", "utf16To_base64", "base64To_binary", "base64To_string", "binary_to_string", "binary_concat", "urlencode_base64", "set_timeout_safe", "Timed_out", "encode", "decode", "userAgents", "headers", "proxy", "origin", "iso8601", "parse8601", "milliseconds", "microseconds", "seconds", "id", "enableRateLimit", "rateLimit", "parseJsonResponse", "substituteCommonCurrencyCodes", "parseBalanceFromOpenOrders", "verbose", "debug", "journal", "userAgent", "twofa", "timeframes", "hasPublicAPI", "hasPrivateAPI", "hasCORS", "hasDeposit", "hasFetchBalance", "hasFetchClosedOrders", "hasFetchCurrencies", "hasFetchMyTrades", "hasFetchOHLCV", "hasFetchOpenOrders", "hasFetchOrder", "hasFetchOrderBook", "hasFetchOrders", "hasFetchTicker", "hasFetchTickers", "hasFetchBidsAsks", "hasFetchTrades", "hasWithdraw", "hasCreateOrder", "hasCancelOrder", "apiKey", "secret", "uid", "login", "password", "requiredCredentials", "exceptions", "balance", "orderbooks", "tickers", "fees", "orders", "trades", "currencies", "last_http_response", "last_json_response", "arrayConcat", "market_id", "market_ids", "array_concat", "implode_params", "extract_params", "fetch_balance", "fetch_free_balance", "fetch_used_balance","fetch_total_balance", "fetch_l2_order_book", "fetch_order_book", "fetch_bids_asks", "fetch_tickers", "fetch_ticker", "fetch_trades", "fetch_order", "fetch_orders", "fetch_open_orders", "fetch_closed_orders", "fetch_order_status", "fetch_markets", "load_markets", "set_markets", "parse_balance", "parse_bid_ask", "parse_bids_asks", "parse_order_book", "parse_trades", "parse_orders", "parse_ohlcv", "parse_ohlcvs", "edit_limit_buy_order", "edit_limit_sell_order", "edit_limit_order", "edit_order", "create_limit_buy_order", "create_limit_sell_order", "create_market_buy_order", "create_market_sell_order", "create_order", "calculate_fee", "common_currency_code", "price_to_precision", "amount_to_precision", "amount_to_string", "fee_to_precision", "cost_to_precision", "constructor", "getMarket", "describe", "defaults", "nonce", "encodeURIComponent", "checkRequiredCredentials", "initRestRateLimiter", "defineRestApi", "fetch", "fetch2", "request", "handleErrors", "defaultErrorHandler", "handleRestErrors", "handleRestResponse", "setMarkets", "loadMarkets", "fetchBidsAsks", "fetchTickers", "fetchOrder", "fetchOrders", "fetchOpenOrders", "fetchClosedOrders", "fetchMyTrades", "fetchCurrencies", "fetchMarkets", "fetchOrderStatus", "account", "commonCurrencyCode", "currency", "market", "marketId", "marketIds", "symbol", "extractParams", "implodeParams", "url", "parseBidAsk", "parseBidsAsks", "fetchL2OrderBook", "parseOrderBook", "parseBalance", "fetchPartialBalance", "fetchFreeBalance", "fetchUsedBalance", "fetchTotalBalance", "filterBySinceLimit", "parseTrades", "parseOrders", "filterOrdersBySymbol", "parseOHLCV", "parseOHLCVs", "editLimitBuyOrder", "editLimitSellOrder", "editLimitOrder", "editOrder", "createLimitBuyOrder", "createLimitSellOrder", "createMarketBuyOrder", "createMarketSellOrder", "costToPrecision", "priceToPrecision", "amountToPrecision", "amountToLots", "feeToPrecision", "calculateFee", "Ymd", "YmdHMS"] ) const props = index (Object.getOwnPropertyNames (exchange).concat ( diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/therock.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/therock.js index 12217e2b2..88ccb385d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/therock.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/therock.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -171,8 +172,8 @@ module.exports = class therock extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const buy_fee = this.safeFloat (market, 'buy_fee'); - const sell_fee = this.safeFloat (market, 'sell_fee'); + const buy_fee = this.safeNumber (market, 'buy_fee'); + const sell_fee = this.safeNumber (market, 'sell_fee'); let taker = Math.max (buy_fee, sell_fee); taker = taker / 100; const maker = taker; @@ -193,11 +194,11 @@ module.exports = class therock extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_quantity_offer'), + 'min': this.safeNumber (market, 'minimum_quantity_offer'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'minimum_price_offer'), + 'min': this.safeNumber (market, 'minimum_price_offer'), 'max': undefined, }, 'cost': { @@ -221,11 +222,11 @@ module.exports = class therock extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'trading_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'trading_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -244,27 +245,27 @@ module.exports = class therock extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'close'), // previous day close, if any + 'previousClose': this.safeNumber (ticker, 'close'), // previous day close, if any 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_traded'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume_traded'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -339,14 +340,11 @@ module.exports = class therock extends Exchange { const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; let feeCost = undefined; const transactions = this.safeValue (trade, 'transactions', []); @@ -356,7 +354,7 @@ module.exports = class therock extends Exchange { if (feeCost === undefined) { feeCost = 0; } - feeCost = this.sum (feeCost, this.safeFloat (feeTransactions[i], 'price')); + feeCost = this.sum (feeCost, this.safeNumber (feeTransactions[i], 'price')); } if (feeCost !== undefined) { fee = { @@ -511,7 +509,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (item, 'price'); + const amount = this.safeNumber (item, 'price'); const timestamp = this.parse8601 (this.safeString (item, 'date')); const status = 'ok'; return { @@ -743,7 +741,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'price'); + const amount = this.safeNumber (transaction, 'price'); const timestamp = this.parse8601 (this.safeString (transaction, 'date')); const status = 'ok'; // todo parse tags @@ -918,15 +916,15 @@ module.exports = class therock extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'date')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'amount_unfilled'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amount_unfilled'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let trades = this.safeValue (order, 'trades'); let cost = undefined; let average = undefined; @@ -953,7 +951,7 @@ module.exports = class therock extends Exchange { cost = 0; } } - const stopPrice = this.safeFloat (order, 'conditional_price'); + const stopPrice = this.safeNumber (order, 'conditional_price'); return { 'id': id, 'clientOrderId': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidebit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidebit.js index acf65de25..05efc673a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidebit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidebit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, OrderNotFound, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -182,11 +183,11 @@ module.exports = class tidebit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -211,15 +212,15 @@ module.exports = class tidebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'ask': this.safeFloat (ticker, 'sell'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'ask': this.safeNumber (ticker, 'sell'), 'bidVolume': undefined, 'askVolume': undefined, 'vwap': undefined, @@ -230,7 +231,7 @@ module.exports = class tidebit extends Exchange { 'percentage': undefined, 'previousClose': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -264,9 +265,14 @@ module.exports = class tidebit extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -311,11 +317,11 @@ module.exports = class tidebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -401,18 +407,12 @@ module.exports = class tidebit extends Exchange { const id = this.safeString (order, 'id'); const type = this.safeString (order, 'ord_type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const filled = this.safeFloat (order, 'executed_volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - let cost = undefined; - if (price !== undefined) { - if (filled !== undefined) { - cost = price * filled; - } - } - const average = this.safeFloat (order, 'avg_price'); - return { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const filled = this.safeNumber (order, 'executed_volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -429,12 +429,12 @@ module.exports = class tidebit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': average, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidex.js index 0988a4ad1..65c0e6d9e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/tidex.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class tidex extends Exchange { describe () { @@ -83,6 +84,7 @@ module.exports = class tidex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.1 / 100, @@ -127,19 +129,48 @@ module.exports = class tidex extends Exchange { async fetchCurrencies (params = {}) { const response = await this.webGetCurrency (params); + // + // [ + // { + // "id":2, + // "symbol":"BTC", + // "type":2, + // "name":"Bitcoin", + // "amountPoint":8, + // "depositEnable":true, + // "depositMinAmount":0.0005, + // "withdrawEnable":true, + // "withdrawFee":0.0004, + // "withdrawMinAmount":0.0005, + // "settings":{ + // "Blockchain":"https://blockchair.com/bitcoin/", + // "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}", + // "AddrUrl":"https://blockchair.com/bitcoin/address/{0}", + // "ConfirmationCount":3, + // "NeedMemo":false + // }, + // "visible":true, + // "isDelisted":false + // } + // ] + // const result = {}; for (let i = 0; i < response.length; i++) { const currency = response[i]; const id = this.safeString (currency, 'symbol'); - const precision = currency['amountPoint']; + const precision = this.safeInteger (currency, 'amountPoint'); const code = this.safeCurrencyCode (id); - let active = currency['visible'] === true; - const canWithdraw = currency['withdrawEnable'] === true; - const canDeposit = currency['depositEnable'] === true; + const visible = this.safeValue (currency, 'visible'); + let active = visible === true; + const withdrawEnable = this.safeValue (currency, 'withdrawEnable'); + const depositEnable = this.safeValue (currency, 'depositEnable'); + const canWithdraw = withdrawEnable === true; + const canDeposit = depositEnable === true; if (!canWithdraw || !canDeposit) { active = false; } const name = this.safeString (currency, 'name'); + const fee = this.safeNumber (currency, 'withdrawFee'); result[code] = { 'id': id, 'code': code, @@ -149,7 +180,7 @@ module.exports = class tidex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': currency['withdrawFee'], + 'fee': fee, }, 'deposit': { 'active': canDeposit, @@ -170,11 +201,11 @@ module.exports = class tidex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawMinAmount'), + 'min': this.safeNumber (currency, 'withdrawMinAmount'), 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'depositMinAmount'), + 'min': this.safeNumber (currency, 'depositMinAmount'), 'max': undefined, }, }, @@ -184,26 +215,25 @@ module.exports = class tidex extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615861869, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":3.0, + // "min_amount":0.001, + // "max_amount":1000000.0, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.1, + // }, + // }, + // } + // const markets = response['pairs']; const keys = Object.keys (markets); const result = []; @@ -220,19 +250,20 @@ module.exports = class tidex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }, }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -241,7 +272,7 @@ module.exports = class tidex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -262,11 +293,11 @@ module.exports = class tidex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (funds, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'value'); - account['used'] = this.safeFloat (balance, 'inOrders'); + account['free'] = this.safeString (balance, 'value'); + account['used'] = this.safeString (balance, 'inOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -338,16 +369,16 @@ module.exports = class tidex extends Exchange { timestamp = undefined; } } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -356,9 +387,9 @@ module.exports = class tidex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -406,16 +437,19 @@ module.exports = class tidex extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const orderId = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = 'limit'; // all trades are still limit trades let takerOrMaker = undefined; let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -434,12 +468,6 @@ module.exports = class tidex extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': orderId, @@ -495,17 +523,18 @@ module.exports = class tidex extends Exchange { let status = 'open'; let filled = 0.0; let remaining = amount; - if ('return' in response) { - id = this.safeString (response['return'], 'order_id'); + const returnResult = this.safeValue (response, 'return'); + if (returnResult !== undefined) { + id = this.safeString (returnResult, 'order_id'); if (id === '0') { - id = this.safeString (response['return'], 'init_order_id'); + id = this.safeString (returnResult, 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (returnResult, 'received', filled); + remaining = this.safeNumber (returnResult, 'remains', amount); } const timestamp = this.milliseconds (); - return { + return this.safeOrder ({ 'id': id, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -515,7 +544,7 @@ module.exports = class tidex extends Exchange { 'type': type, 'side': side, 'price': price, - 'cost': price * filled, + 'cost': undefined, 'amount': amount, 'remaining': remaining, 'filled': filled, @@ -525,7 +554,7 @@ module.exports = class tidex extends Exchange { 'clientOrderId': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -554,23 +583,15 @@ module.exports = class tidex extends Exchange { const symbol = this.safeSymbol (marketId, market); let remaining = undefined; let amount = undefined; - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; + const price = this.safeNumber (order, 'rate'); if ('start_amount' in order) { - amount = this.safeFloat (order, 'start_amount'); - remaining = this.safeFloat (order, 'amount'); + amount = this.safeNumber (order, 'start_amount'); + remaining = this.safeNumber (order, 'amount'); } else { - remaining = this.safeFloat (order, 'amount'); - } - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } + remaining = this.safeNumber (order, 'amount'); } const fee = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -584,15 +605,15 @@ module.exports = class tidex extends Exchange { 'side': this.safeString (order, 'type'), 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/timex.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/timex.js index 4c71ac4ff..227f97553 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/timex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/timex.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, PermissionDenied, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, RateLimitExceeded, NotSupported, BadRequest, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class timex extends Exchange { describe () { @@ -450,11 +451,11 @@ module.exports = class timex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'totalBalance'); - account['used'] = this.safeFloat (balance, 'lockedBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + account['used'] = this.safeString (balance, 'lockedBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -815,7 +816,7 @@ module.exports = class timex extends Exchange { const result = this.safeValue (response, 0, {}); return { 'info': response, - 'maker': this.safeFloat (result, 'fee'), + 'maker': this.safeNumber (result, 'fee'), 'taker': undefined, }; } @@ -852,18 +853,18 @@ module.exports = class timex extends Exchange { 'amount': this.precisionFromString (this.safeString (market, 'quantityIncrement')), 'price': this.precisionFromString (this.safeString (market, 'tickSize')), }; - const amountIncrement = this.safeFloat (market, 'quantityIncrement'); - const minBase = this.safeFloat (market, 'baseMinSize'); + const amountIncrement = this.safeNumber (market, 'quantityIncrement'); + const minBase = this.safeNumber (market, 'baseMinSize'); const minAmount = Math.max (amountIncrement, minBase); - const priceIncrement = this.safeFloat (market, 'tickSize'); - const minCost = this.safeFloat (market, 'quoteMinSize'); + const priceIncrement = this.safeNumber (market, 'tickSize'); + const minCost = this.safeNumber (market, 'quoteMinSize'); const limits = { 'amount': { 'min': minAmount, 'max': undefined }, 'price': { 'min': priceIncrement, 'max': undefined }, 'cost': { 'min': Math.max (minCost, minAmount * priceIncrement), 'max': undefined }, }; - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); return { 'id': id, 'symbol': symbol, @@ -924,7 +925,7 @@ module.exports = class timex extends Exchange { const name = this.safeString (currency, 'name'); const precision = this.safeInteger (currency, 'decimals'); const active = this.safeValue (currency, 'active'); - // const fee = this.safeFloat (currency, 'withdrawalFee'); + // const fee = this.safeNumber (currency, 'withdrawalFee'); const feeString = this.safeString (currency, 'withdrawalFee'); const tradeDecimals = this.safeInteger (currency, 'tradeDecimals'); let fee = undefined; @@ -961,14 +962,6 @@ module.exports = class timex extends Exchange { }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // // { @@ -988,8 +981,8 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '/'); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -1005,11 +998,11 @@ module.exports = class timex extends Exchange { 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -1019,8 +1012,8 @@ module.exports = class timex extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'volumeQuote'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volumeQuote'), }; } @@ -1039,23 +1032,27 @@ module.exports = class timex extends Exchange { // fetchMyTrades, fetchOrder (private) // // { - // "fee": "0.3", - // "id": 100, - // "makerOrTaker": "MAKER", - // "makerOrderId": "string", - // "price": "0.017", - // "quantity": "0.3", + // "id": "7613414", + // "makerOrderId": "0x8420af060722f560098f786a2894d4358079b6ea5d14b395969ed77bc87a623a", + // "takerOrderId": "0x1235ef158a361815b54c9988b6241c85aedcbc1fe81caf8df8587d5ab0373d1a", + // "symbol": "LTCUSDT", // "side": "BUY", - // "symbol": "TIMEETH", - // "takerOrderId": "string", - // "timestamp": "2019-12-08T04:54:11.171Z" - // } + // "quantity": "0.2", + // "fee": "0.22685", + // "feeToken": "USDT", + // "price": "226.85", + // "makerOrTaker": "TAKER", + // "timestamp": "2021-04-09T15:39:45.608" + // } // const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeStringLower2 (trade, 'direction', 'side'); const takerOrMaker = this.safeStringLower (trade, 'makerOrTaker'); @@ -1064,18 +1061,14 @@ module.exports = class timex extends Exchange { orderId = this.safeString (trade, takerOrMaker + 'OrderId'); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); + const feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'feeToken')); if (feeCost !== undefined) { - const feeCurrency = (market === undefined) ? undefined : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrency, }; } - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = this.costToPrecision (symbol, amount * price); - } return { 'info': trade, 'id': id, @@ -1107,11 +1100,11 @@ module.exports = class timex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1142,14 +1135,12 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'filledQuantity'); - const canceledQuantity = this.safeFloat (order, 'cancelledQuantity'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'filledQuantity'); + const canceledQuantity = this.safeNumber (order, 'cancelledQuantity'); let status = undefined; if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0.0); if (filled >= amount) { status = 'closed'; } else if ((canceledQuantity !== undefined) && (canceledQuantity > 0)) { @@ -1158,30 +1149,19 @@ module.exports = class timex extends Exchange { status = 'open'; } } - const cost = parseFloat (this.costToPrecision (symbol, price * filled)); - const fee = undefined; - let lastTradeTimestamp = undefined; - let trades = undefined; - const rawTrades = this.safeValue (order, 'trades'); - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'order': id, - }); - } - if (trades !== undefined) { - const numTrades = trades.length; - if (numTrades > 0) { - lastTradeTimestamp = trades[numTrades - 1]['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'order': id, + 'type': type, + }); const clientOrderId = this.safeString (order, 'clientOrderId'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': undefined, @@ -1190,14 +1170,14 @@ module.exports = class timex extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/upbit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/upbit.js index 829aa6586..890c30126 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/upbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/upbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, PermissionDenied, AddressPending } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -229,9 +230,9 @@ module.exports = class upbit extends Exchange { } else if ((locked !== undefined) && locked) { active = false; } - const maxOnetimeWithdrawal = this.safeFloat (withdrawLimits, 'onetime'); - const maxDailyWithdrawal = this.safeFloat (withdrawLimits, 'daily', maxOnetimeWithdrawal); - const remainingDailyWithdrawal = this.safeFloat (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); + const maxOnetimeWithdrawal = this.safeNumber (withdrawLimits, 'onetime'); + const maxDailyWithdrawal = this.safeNumber (withdrawLimits, 'daily', maxOnetimeWithdrawal); + const remainingDailyWithdrawal = this.safeNumber (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); let maxWithdrawLimit = undefined; if (remainingDailyWithdrawal > 0) { maxWithdrawLimit = remainingDailyWithdrawal; @@ -247,11 +248,11 @@ module.exports = class upbit extends Exchange { 'code': code, 'name': code, 'active': active, - 'fee': this.safeFloat (currencyInfo, 'withdraw_fee'), + 'fee': this.safeNumber (currencyInfo, 'withdraw_fee'), 'precision': precision, 'limits': { 'withdraw': { - 'min': this.safeFloat (withdrawLimits, 'minimum'), + 'min': this.safeNumber (withdrawLimits, 'minimum'), 'max': maxWithdrawLimit, }, }, @@ -314,8 +315,8 @@ module.exports = class upbit extends Exchange { }; const state = this.safeString (marketInfo, 'state'); const active = (state === 'active'); - const bidFee = this.safeFloat (response, 'bid_fee'); - const askFee = this.safeFloat (response, 'ask_fee'); + const bidFee = this.safeNumber (response, 'bid_fee'); + const askFee = this.safeNumber (response, 'ask_fee'); const fee = Math.max (bidFee, askFee); return { 'info': response, @@ -331,7 +332,7 @@ module.exports = class upbit extends Exchange { 'taker': fee, 'limits': { 'amount': { - 'min': this.safeFloat (ask, 'min_total'), + 'min': this.safeNumber (ask, 'min_total'), 'max': undefined, }, 'price': { @@ -339,8 +340,8 @@ module.exports = class upbit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (bid, 'min_total'), - 'max': this.safeFloat (marketInfo, 'max_total'), + 'min': this.safeNumber (bid, 'min_total'), + 'max': this.safeNumber (marketInfo, 'max_total'), }, }, }; @@ -379,8 +380,8 @@ module.exports = class upbit extends Exchange { 'price': 8, }; const active = true; - const makerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); - const takerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); + const makerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); + const takerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); result.push ({ 'id': id, 'symbol': symbol, @@ -433,11 +434,11 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { @@ -540,30 +541,30 @@ module.exports = class upbit extends Exchange { const timestamp = this.safeInteger (ticker, 'trade_timestamp'); const marketId = this.safeString2 (ticker, 'market', 'code'); const symbol = this.safeSymbol (marketId, market, '-'); - const previous = this.safeFloat (ticker, 'prev_closing_price'); - const last = this.safeFloat (ticker, 'trade_price'); - const change = this.safeFloat (ticker, 'signed_change_price'); - const percentage = this.safeFloat (ticker, 'signed_change_rate'); + const previous = this.safeNumber (ticker, 'prev_closing_price'); + const last = this.safeNumber (ticker, 'trade_price'); + const change = this.safeNumber (ticker, 'signed_change_price'); + const percentage = this.safeNumber (ticker, 'signed_change_rate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price'), - 'low': this.safeFloat (ticker, 'low_price'), + 'high': this.safeNumber (ticker, 'high_price'), + 'low': this.safeNumber (ticker, 'low_price'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'opening_price'), + 'open': this.safeNumber (ticker, 'opening_price'), 'close': last, 'last': last, 'previousClose': previous, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'acc_trade_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'acc_trade_price_24h'), + 'baseVolume': this.safeNumber (ticker, 'acc_trade_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'acc_trade_price_24h'), 'info': ticker, }; } @@ -670,15 +671,13 @@ module.exports = class upbit extends Exchange { } else if (askOrBid === 'bid') { side = 'buy'; } - let cost = this.safeFloat (trade, 'funds'); - const price = this.safeFloat2 (trade, 'trade_price', 'price'); - const amount = this.safeFloat2 (trade, 'trade_volume', 'volume'); + let cost = this.safeNumber (trade, 'funds'); + const priceString = this.safeString2 (trade, 'trade_price', 'price'); + const amountString = this.safeString2 (trade, 'trade_volume', 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString2 (trade, 'market', 'code'); market = this.safeMarket (marketId, market); @@ -773,11 +772,11 @@ module.exports = class upbit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'candle_date_time_utc')), - this.safeFloat (ohlcv, 'opening_price'), - this.safeFloat (ohlcv, 'high_price'), - this.safeFloat (ohlcv, 'low_price'), - this.safeFloat (ohlcv, 'trade_price'), - this.safeFloat (ohlcv, 'candle_acc_trade_volume'), // base volume + this.safeNumber (ohlcv, 'opening_price'), + this.safeNumber (ohlcv, 'high_price'), + this.safeNumber (ohlcv, 'low_price'), + this.safeNumber (ohlcv, 'trade_price'), + this.safeNumber (ohlcv, 'candle_acc_trade_volume'), // base volume ]; } @@ -1046,7 +1045,7 @@ module.exports = class upbit extends Exchange { // } // const id = this.safeString (transaction, 'uuid'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = undefined; // not present in the data structure received from the exchange const tag = undefined; // not present in the data structure received from the exchange const txid = this.safeString (transaction, 'txid'); @@ -1059,7 +1058,7 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -1144,10 +1143,10 @@ module.exports = class upbit extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const status = this.parseOrderStatus (this.safeString (order, 'state')); let lastTradeTimestamp = undefined; - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - const filled = this.safeFloat (order, 'executed_volume'); + let price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const filled = this.safeNumber (order, 'executed_volume'); let cost = undefined; if (type === 'price') { type = 'market'; @@ -1156,7 +1155,7 @@ module.exports = class upbit extends Exchange { } let average = undefined; let fee = undefined; - let feeCost = this.safeFloat (order, 'paid_fee'); + let feeCost = this.safeNumber (order, 'paid_fee'); const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); let trades = this.safeValue (order, 'trades', []); @@ -1179,7 +1178,7 @@ module.exports = class upbit extends Exchange { cost = this.sum (cost, trade['cost']); if (getFeesFromTrades) { const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); + const tradeFeeCost = this.safeNumber (tradeFee, 'cost'); if (tradeFeeCost !== undefined) { feeCost = this.sum (feeCost, tradeFeeCost); } @@ -1321,16 +1320,6 @@ module.exports = class upbit extends Exchange { return this.parseOrder (response); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetDepositsCoinAddresses (params); diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vaultoro.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vaultoro.js deleted file mode 100644 index abc1ba387..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vaultoro.js +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); - -// --------------------------------------------------------------------------- - -module.exports = class vaultoro extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'vaultoro', - 'name': 'Vaultoro', - 'countries': [ 'CH' ], - 'rateLimit': 1000, - 'version': '1', - 'has': { - 'CORS': true, - 'fetchMarkets': true, - 'fetchOrderBook': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'fetchTrades': true, - 'fetchTicker': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg', - 'api': 'https://api.vaultoro.com', - 'www': 'https://www.vaultoro.com', - 'doc': 'https://api.vaultoro.com', - }, - 'commonCurrencies': { - 'GLD': 'Gold', - }, - 'api': { - 'public': { - 'get': [ - 'bidandask', - 'buyorders', - 'latest', - 'latesttrades', - 'markets', - 'orderbook', - 'sellorders', - 'transactions/day', - 'transactions/hour', - 'transactions/month', - ], - }, - 'private': { - 'get': [ - 'balance', - 'mytrades', - 'orders', - ], - 'post': [ - 'buy/{symbol}/{type}', - 'cancel/{id}', - 'sell/{symbol}/{type}', - 'withdraw', - ], - }, - }, - }); - } - - async fetchMarkets (params = {}) { - const result = []; - const response = await this.publicGetMarkets (params); - const market = this.safeValue (response, 'data'); - const baseId = this.safeString (market, 'MarketCurrency'); - const quoteId = this.safeString (market, 'BaseCurrency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const id = this.safeString (market, 'MarketName'); - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'active': undefined, - 'precision': this.precision, - 'limits': this.limits, - }); - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetBalance (params); - const balances = this.safeValue (response, 'data'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency_code'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'cash'); - account['used'] = this.safeFloat (balance, 'reserved'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetOrderbook (params); - const orderbook = { - 'bids': response['data'][0]['b'], - 'asks': response['data'][1]['s'], - }; - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'Gold_Price', 'Gold_Amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'Time')); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const price = this.safeFloat (trade, 'Gold_Price'); - const amount = this.safeFloat (trade, 'Gold_Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } - return { - 'id': undefined, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': undefined, - 'side': undefined, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const response = await this.publicGetTransactionsDay (params); - return this.parseTrades (response, market, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const method = 'privatePost' + this.capitalize (side) + 'SymbolType'; - const request = { - 'symbol': market['quoteId'].toLowerCase (), - 'type': type, - 'gld': amount, - 'price': price || 1, - }; - const response = await this[method] (this.extend (request, params)); - return { - 'info': response, - 'id': response['data']['Order_ID'], - }; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - return await this.privatePostCancelId (this.extend (request, params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/'; - if (api === 'public') { - url += path; - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce (); - url += this.version + '/' + this.implodeParams (path, params); - const query = this.extend ({ - 'nonce': nonce, - 'apikey': this.apiKey, - }, this.omit (params, this.extractParams (path))); - url += '?' + this.urlencode (query); - headers = { - 'Content-Type': 'application/json', - 'X-Signature': this.hmac (this.encode (url), this.encode (this.secret)), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vcc.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vcc.js index bd3a9602d..5b182adcb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vcc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/vcc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, OrderNotFound, InvalidOrder, BadRequest, AuthenticationError, RateLimitExceeded, RequestTimeout, BadSymbol, AddressPending, PermissionDenied, InsufficientFunds } = require ('./base/errors'); const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -196,15 +197,15 @@ module.exports = class vcc extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, 'min'), + 'min': this.safeNumber (amountLimits, 'min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (priceLimits, 'min'), + 'min': this.safeNumber (priceLimits, 'min'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (costLimits, 'min'), + 'min': this.safeNumber (costLimits, 'min'), 'max': undefined, }, }, @@ -251,12 +252,12 @@ module.exports = class vcc extends Exchange { 'code': code, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': this.safeInteger (currency, 'decimal'), 'limits': { 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw'), - 'max': this.safeFloat (currency, 'max_withdraw'), + 'min': this.safeNumber (currency, 'min_withdraw'), + 'max': this.safeNumber (currency, 'max_withdraw'), }, }, }; @@ -279,8 +280,8 @@ module.exports = class vcc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } @@ -306,11 +307,11 @@ module.exports = class vcc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (data, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -328,11 +329,11 @@ module.exports = class vcc extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -421,10 +422,10 @@ module.exports = class vcc extends Exchange { // } // const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); - const open = this.safeFloat (ticker, 'open_price'); - const last = this.safeFloat (ticker, 'last_price'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); + const open = this.safeNumber (ticker, 'open_price'); + const last = this.safeNumber (ticker, 'last_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -441,11 +442,11 @@ module.exports = class vcc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -559,17 +560,17 @@ module.exports = class vcc extends Exchange { } market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'base_volume', 'quantity'); - let cost = this.safeFloat2 (trade, 'quote_volume', 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'base_volume', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber2 (trade, 'quote_volume', 'amount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const side = this.safeString2 (trade, 'type', 'trade_type'); const id = this.safeString2 (trade, 'trade_id', 'id'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -754,7 +755,7 @@ module.exports = class vcc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -762,7 +763,7 @@ module.exports = class vcc extends Exchange { const txid = this.safeString (transaction, 'transaction_id'); const tag = this.safeString (transaction, 'destination_tag'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1007,46 +1008,27 @@ module.exports = class vcc extends Exchange { const marketId = baseId + '_' + quoteId; market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'executed_quantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - let cost = this.safeFloat (order, 'ceiling'); + const cost = this.safeNumber (order, 'ceiling'); const id = this.safeString (order, 'id'); - let average = undefined; - let price = this.safeFloat (order, 'price'); - // in case of market order - if (!price) { - price = this.safeFloat (order, 'executed_price'); - average = price; - } - let remaining = this.safeFloat (order, 'remaining'); - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if (filled !== undefined) { - if ((amount !== undefined) && (remaining === undefined)) { - remaining = Math.max (0, amount - filled); - } - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((average === undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'executed_price'); + const remaining = this.safeNumber (order, 'remaining'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'trade_type'); const fee = { 'currency': market['quote'], - 'cost': this.safeFloat (order, 'fee'), - 'rate': this.safeFloat (order, 'fee_rate'), + 'cost': this.safeNumber (order, 'fee'), + 'rate': this.safeNumber (order, 'fee_rate'), }; let lastTradeTimestamp = undefined; if (updated !== created) { lastTradeTimestamp = updated; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': id, 'timestamp': created, @@ -1068,7 +1050,7 @@ module.exports = class vcc extends Exchange { 'fee': fee, 'trades': undefined, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/wavesexchange.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/wavesexchange.js index 139780062..bd422c073 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/wavesexchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/wavesexchange.js @@ -565,13 +565,13 @@ module.exports = class wavesexchange extends Exchange { symbol = market['symbol']; } const data = this.safeValue (ticker, 'data', {}); - const last = this.safeFloat (data, 'lastPrice'); - const low = this.safeFloat (data, 'low'); - const high = this.safeFloat (data, 'high'); - const vwap = this.safeFloat (data, 'weightedAveragePrice'); - const baseVolume = this.safeFloat (data, 'volume'); - const quoteVolume = this.safeFloat (data, 'quoteVolume'); - const open = this.safeValue (data, 'firstPrice'); + const last = this.safeNumber (data, 'lastPrice'); + const low = this.safeNumber (data, 'low'); + const high = this.safeNumber (data, 'high'); + const vwap = this.safeNumber (data, 'weightedAveragePrice'); + const baseVolume = this.safeNumber (data, 'volume'); + const quoteVolume = this.safeNumber (data, 'quoteVolume'); + const open = this.safeNumber (data, 'firstPrice'); let change = undefined; let average = undefined; let percentage = undefined; @@ -725,11 +725,11 @@ module.exports = class wavesexchange extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.parse8601 (this.safeString (data, 'time')), - this.safeFloat (data, 'open'), - this.safeFloat (data, 'high'), - this.safeFloat (data, 'low'), - this.safeFloat (data, 'close'), - this.safeFloat (data, 'volume', 0), + this.safeNumber (data, 'open'), + this.safeNumber (data, 'high'), + this.safeNumber (data, 'low'), + this.safeNumber (data, 'close'), + this.safeNumber (data, 'volume', 0), ]; } @@ -944,7 +944,7 @@ module.exports = class wavesexchange extends Exchange { } if (matcherFee === undefined) { const wavesPrecision = this.safeInteger (this.options, 'wavesPrecision', 8); - const rate = this.safeFloat (rates, matcherFeeAssetId); + const rate = this.safeNumber (rates, matcherFeeAssetId); const code = this.safeCurrencyCode (matcherFeeAssetId); const currency = this.currency (code); const newPrecison = Math.pow (10, wavesPrecision - currency['precision']); @@ -1354,7 +1354,7 @@ module.exports = class wavesexchange extends Exchange { const issueTransaction = this.safeValue (entry, 'issueTransaction'); const decimals = this.safeInteger (issueTransaction, 'decimals'); const currencyId = this.safeString (entry, 'assetId'); - const balance = this.safeFloat (entry, 'balance'); + const balance = this.safeNumber (entry, 'balance'); let code = undefined; if (currencyId in this.currencies_by_id) { code = this.safeCurrencyCode (currencyId); @@ -1384,7 +1384,7 @@ module.exports = class wavesexchange extends Exchange { if (!(code in result)) { result[code] = this.account (); } - const amount = this.safeFloat (reservedBalance, currencyId); + const amount = this.safeNumber (reservedBalance, currencyId); result[code]['used'] = this.currencyFromPrecision (code, amount); } const wavesRequest = { @@ -1397,7 +1397,7 @@ module.exports = class wavesexchange extends Exchange { // "balance": 909085978 // } result['WAVES'] = this.safeValue (result, 'WAVES', {}); - result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeFloat (wavesTotal, 'balance')); + result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeNumber (wavesTotal, 'balance')); const codes = Object.keys (result); for (let i = 0; i < codes.length; i++) { const code = codes[i]; @@ -1489,8 +1489,8 @@ module.exports = class wavesexchange extends Exchange { const datetime = this.safeString (data, 'timestamp'); const timestamp = this.parse8601 (datetime); const id = this.safeString (data, 'id'); - const price = this.safeFloat (data, 'price'); - const amount = this.safeFloat (data, 'amount'); + const price = this.safeNumber (data, 'price'); + const amount = this.safeNumber (data, 'amount'); const order1 = this.safeValue (data, 'order1'); const order2 = this.safeValue (data, 'order2'); let order = undefined; @@ -1514,7 +1514,7 @@ module.exports = class wavesexchange extends Exchange { cost = price * amount; } const fee = { - 'cost': this.safeFloat (data, 'fee'), + 'cost': this.safeNumber (data, 'fee'), 'currency': this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES')), }; return { @@ -1596,7 +1596,7 @@ module.exports = class wavesexchange extends Exchange { const withdrawAddress = await this.privateGetWithdrawAddressesCurrencyAddress (withdrawAddressRequest); const currency = this.safeValue (withdrawAddress, 'currency'); const allowedAmount = this.safeValue (currency, 'allowed_amount'); - const minimum = this.safeFloat (allowedAmount, 'min'); + const minimum = this.safeNumber (allowedAmount, 'min'); if (amount <= minimum) { throw new BadRequest (this.id + ' ' + code + ' withdraw failed, amount ' + amount.toString () + ' must be greater than the minimum allowed amount of ' + minimum.toString ()); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/whitebit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/whitebit.js index 9e4418141..769cd5b8b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/whitebit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/whitebit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeNotAvailable, ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,7 +165,7 @@ module.exports = class whitebit extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -172,7 +173,7 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minTotal'), + 'min': this.safeNumber (market, 'minTotal'), 'max': undefined, }, }, @@ -237,8 +238,8 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -250,8 +251,8 @@ module.exports = class whitebit extends Exchange { const response = await this.publicV2GetFee (params); const fees = this.safeValue (response, 'result'); return { - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), }; } @@ -321,8 +322,8 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let change = undefined; if (percentage !== undefined) { change = this.numberToString (percentage * 0.01); @@ -331,22 +332,22 @@ module.exports = class whitebit extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'deal'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'deal'), 'info': ticker, }; } @@ -514,8 +515,11 @@ module.exports = class whitebit extends Exchange { } else { timestamp = parseInt (timestamp * 1000); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'volume'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'volume'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const id = this.safeString2 (trade, 'id', 'tradeId'); let side = this.safeString (trade, 'type'); if (side === undefined) { @@ -526,10 +530,6 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined && price !== undefined) { - cost = amount * price; - } return { 'info': trade, 'timestamp': timestamp, @@ -599,11 +599,11 @@ module.exports = class whitebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 5), // volume ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xbtce.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xbtce.js index e0d137f67..c8cabae42 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xbtce.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xbtce.js @@ -152,14 +152,13 @@ module.exports = class xbtce extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'FreeAmount'), - 'used': this.safeFloat (balance, 'LockedAmount'), - 'total': this.safeFloat (balance, 'Amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'FreeAmount'); + account['used'] = this.safeString (balance, 'LockedAmount'); + account['total'] = this.safeString (balance, 'Amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -271,11 +270,11 @@ module.exports = class xbtce extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeInteger (ohlcv, 'Timestamp'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xena.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xena.js index 2facd429b..e55a5332b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xena.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/xena.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, InsufficientFunds, InvalidAddress, BadSymbol, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class xena extends Exchange { describe () { @@ -277,8 +278,8 @@ module.exports = class xena extends Exchange { 'price': pricePrecision, 'amount': 0, }; - const maxCost = this.safeFloat (market, 'maxOrderQty'); - const minCost = this.safeFloat (market, 'minOrderQuantity'); + const maxCost = this.safeNumber (market, 'maxOrderQty'); + const minCost = this.safeNumber (market, 'minOrderQuantity'); const limits = { 'amount': { 'min': undefined, @@ -363,7 +364,7 @@ module.exports = class xena extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (withdraw, 'commission'), + 'fee': this.safeNumber (withdraw, 'commission'), 'precision': precision, 'limits': { 'amount': { @@ -379,7 +380,7 @@ module.exports = class xena extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'minAmount'), + 'min': this.safeNumber (withdraw, 'minAmount'), 'max': undefined, }, }, @@ -407,8 +408,8 @@ module.exports = class xena extends Exchange { const timestamp = this.milliseconds (); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPx'); - const open = this.safeFloat (ticker, 'firstPx'); + const last = this.safeNumber (ticker, 'lastPx'); + const open = this.safeNumber (ticker, 'firstPx'); let percentage = undefined; let change = undefined; let average = undefined; @@ -419,18 +420,18 @@ module.exports = class xena extends Exchange { percentage = change / open * 100; } } - const buyVolume = this.safeFloat (ticker, 'buyVolume'); - const sellVolume = this.safeFloat (ticker, 'sellVolume'); + const buyVolume = this.safeNumber (ticker, 'buyVolume'); + const sellVolume = this.safeNumber (ticker, 'sellVolume'); const baseVolume = this.sum (buyVolume, sellVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPx'), - 'low': this.safeFloat (ticker, 'lowPx'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'highPx'), + 'low': this.safeNumber (ticker, 'lowPx'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -607,11 +608,11 @@ module.exports = class xena extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onHold'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onHold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTrade (trade, market = undefined) { @@ -665,20 +666,17 @@ module.exports = class xena extends Exchange { const orderId = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat2 (trade, 'lastPx', 'mdEntryPx'); - const amount = this.safeFloat2 (trade, 'lastQty', 'mdEntrySize'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'lastPx', 'mdEntryPx'); + const amountString = this.safeString2 (trade, 'lastQty', 'mdEntrySize'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (trade, 'commRate'); + const feeRate = this.safeNumber (trade, 'commRate'); fee = { 'cost': feeCost, 'rate': feeRate, @@ -793,15 +791,15 @@ module.exports = class xena extends Exchange { // const transactTime = this.safeInteger (ohlcv, 'transactTime'); const timestamp = parseInt (transactTime / 1000000); - const buyVolume = this.safeFloat (ohlcv, 'buyVolume'); - const sellVolume = this.safeFloat (ohlcv, 'sellVolume'); + const buyVolume = this.safeNumber (ohlcv, 'buyVolume'); + const sellVolume = this.safeNumber (ohlcv, 'sellVolume'); const volume = this.sum (buyVolume, sellVolume); return [ timestamp, - this.safeFloat (ohlcv, 'firstPx'), - this.safeFloat (ohlcv, 'highPx'), - this.safeFloat (ohlcv, 'lowPx'), - this.safeFloat (ohlcv, 'lastPx'), + this.safeNumber (ohlcv, 'firstPx'), + this.safeNumber (ohlcv, 'highPx'), + this.safeNumber (ohlcv, 'lowPx'), + this.safeNumber (ohlcv, 'lastPx'), volume, ]; } @@ -926,11 +924,10 @@ module.exports = class xena extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); - let cost = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); let side = this.safeStringLower (order, 'side'); if (side === '1') { side = 'buy'; @@ -947,12 +944,7 @@ module.exports = class xena extends Exchange { } else if (type === '4') { type = 'stop-limit'; } - if (cost === undefined) { - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -967,14 +959,14 @@ module.exports = class xena extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1027,7 +1019,7 @@ module.exports = class xena extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if ((type === 'stop') || (type === 'stop-limit')) { - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPx param for order type ' + type); } @@ -1106,12 +1098,12 @@ module.exports = class xena extends Exchange { if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); } - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx !== undefined) { request['stopPx'] = this.priceToPrecision (symbol, stopPx); params = this.omit (params, 'stopPx'); } - const capPrice = this.safeFloat (params, 'capPrice'); + const capPrice = this.safeNumber (params, 'capPrice'); if (capPrice !== undefined) { request['capPrice'] = this.priceToPrecision (symbol, capPrice); params = this.omit (params, 'capPrice'); @@ -1466,7 +1458,7 @@ module.exports = class xena extends Exchange { const address = this.safeString (transaction, 'address'); const addressFrom = undefined; const addressTo = address; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const fee = undefined; return { @@ -1563,7 +1555,7 @@ module.exports = class xena extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'kind')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); @@ -1575,11 +1567,11 @@ module.exports = class xena extends Exchange { timestamp = parseInt (timestamp / 1000000); } const fee = { - 'cost': this.safeFloat (item, 'commission'), + 'cost': this.safeNumber (item, 'commission'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/yobit.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/yobit.js index 0ab100f68..82d86ea71 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/yobit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/yobit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError, RateLimitExceeded } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -138,6 +139,7 @@ module.exports = class yobit extends Exchange { 'NAV': 'NavajoCoin', 'NBT': 'NiceBytes', 'OMG': 'OMGame', + 'ONX': 'Onix', 'PAC': '$PAC', 'PLAY': 'PlayCoin', 'PIVX': 'Darknet', @@ -236,15 +238,33 @@ module.exports = class yobit extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['total'] = this.safeFloat (total, currencyId); + account['free'] = this.safeString (free, currencyId); + account['total'] = this.safeString (total, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615856752, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":10000, + // "min_amount":0.0001, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.2, + // "fee_buyer":0.2, + // "fee_seller":0.2 + // }, + // }, + // } + // const markets = this.safeValue (response, 'pairs'); const keys = Object.keys (markets); const result = []; @@ -262,15 +282,15 @@ module.exports = class yobit extends Exchange { 'price': this.safeInteger (market, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }; const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }; const costLimits = { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }; const limits = { 'amount': amountLimits, @@ -279,6 +299,7 @@ module.exports = class yobit extends Exchange { }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -287,7 +308,7 @@ module.exports = class yobit extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -363,16 +384,16 @@ module.exports = class yobit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -381,9 +402,9 @@ module.exports = class yobit extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -432,15 +453,18 @@ module.exports = class yobit extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const order = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const type = 'limit'; // all trades are still limit trades let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -455,12 +479,6 @@ module.exports = class yobit extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, 'taker'); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': order, @@ -522,8 +540,8 @@ module.exports = class yobit extends Exchange { id = this.safeString (response['return'], 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (response['return'], 'received', 0.0); + remaining = this.safeNumber (response['return'], 'remains', amount); } const timestamp = this.milliseconds (); return { @@ -573,21 +591,13 @@ module.exports = class yobit extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp_created'); const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const remaining = this.safeFloat (order, 'amount'); - const amount = this.safeFloat (order, 'start_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - cost = price * filled; - } - } + const remaining = this.safeNumber (order, 'amount'); + const amount = this.safeNumber (order, 'start_amount'); + const price = this.safeNumber (order, 'rate'); const fee = undefined; const type = 'limit'; const side = this.safeString (order, 'type'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -601,16 +611,15 @@ module.exports = class yobit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zaif.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zaif.js index 2c6454a05..a94f9dddb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zaif.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zaif.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -127,6 +128,27 @@ module.exports = class zaif extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetCurrencyPairsAll (params); + // + // [ + // { + // "aux_unit_point": 0, + // "item_japanese": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3", + // "aux_unit_step": 5.0, + // "description": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30fb\u65e5\u672c\u5186\u306e\u53d6\u5f15\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059", + // "item_unit_min": 0.001, + // "event_number": 0, + // "currency_pair": "btc_jpy", + // "is_token": false, + // "aux_unit_min": 5.0, + // "aux_japanese": "\u65e5\u672c\u5186", + // "id": 1, + // "item_unit_step": 0.0001, + // "name": "BTC/JPY", + // "seq": 0, + // "title": "BTC/JPY" + // } + // ] + // const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -137,8 +159,8 @@ module.exports = class zaif extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': -Math.log10 (market['item_unit_step']), - 'price': market['aux_unit_point'], + 'amount': -Math.log10 (this.safeNumber (market, 'item_unit_step')), + 'price': this.safeInteger (market, 'aux_unit_point'), }; const fees = this.safeValue (this.options['fees'], symbol, this.fees['trading']); const taker = fees['taker']; @@ -156,11 +178,11 @@ module.exports = class zaif extends Exchange { 'maker': maker, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'item_unit_min'), + 'min': this.safeNumber (market, 'item_unit_min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'aux_unit_min'), + 'min': this.safeNumber (market, 'aux_unit_min'), 'max': undefined, }, 'cost': { @@ -192,7 +214,7 @@ module.exports = class zaif extends Exchange { }; if ('deposit' in balances) { if (currencyId in balances['deposit']) { - account['total'] = this.safeFloat (balances['deposit'], currencyId); + account['total'] = this.safeNumber (balances['deposit'], currencyId); account['used'] = account['total'] - account['free']; } } @@ -217,22 +239,22 @@ module.exports = class zaif extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.milliseconds (); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -253,14 +275,11 @@ module.exports = class zaif extends Exchange { side = (side === 'bid') ? 'buy' : 'sell'; const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString2 (trade, 'id', 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); return { @@ -338,16 +357,10 @@ module.exports = class zaif extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp'); const marketId = this.safeString (order, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -361,7 +374,7 @@ module.exports = class zaif extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': undefined, 'remaining': undefined, @@ -369,7 +382,7 @@ module.exports = class zaif extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zb.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zb.js index 1f8f61cdf..29bea651d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zb.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/zb.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadRequest, ExchangeError, ArgumentsRequired, AuthenticationError, InsufficientFunds, OrderNotFound, ExchangeNotAvailable, DDoSProtection, InvalidOrder, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89,8 +90,8 @@ module.exports = class zb extends Exchange { 'urls': { 'logo': 'https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg', 'api': { - 'public': 'http://api.zb.cn/data', // no https for public API - 'private': 'https://trade.zb.cn/api', + 'public': 'https://api.zb.today/data', + 'private': 'https://trade.zb.today/api', }, 'www': 'https://www.zb.com', 'doc': 'https://www.zb.com/i/developer', @@ -205,6 +206,16 @@ module.exports = class zb extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetMarkets (params); + // + // { + // "zb_qc":{ + // "amountScale":2, + // "minAmount":0.01, + // "minSize":5, + // "priceScale":4, + // }, + // } + // const keys = Object.keys (markets); const result = []; for (let i = 0; i < keys.length; i++) { @@ -268,11 +279,11 @@ module.exports = class zb extends Exchange { const account = this.account (); const currencyId = this.safeString (balance, 'key'); const code = this.safeCurrencyCode (currencyId); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'freez'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'freez'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -321,18 +332,6 @@ module.exports = class zb extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetGetPayinAddress (params); @@ -439,16 +438,16 @@ module.exports = class zb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -458,12 +457,23 @@ module.exports = class zb extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; } + parseOHLCV (ohlcv, market = undefined) { + return [ + this.safeInteger (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + ]; + } + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -488,14 +498,12 @@ module.exports = class zb extends Exchange { let side = this.safeString (trade, 'trade_type'); side = (side === 'bid') ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const costString = Precise.stringMul (priceString, amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (costString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -674,23 +682,13 @@ module.exports = class zb extends Exchange { const timestamp = this.safeInteger (order, 'trade_date'); const marketId = this.safeString (order, 'currency'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'trade_amount'); - const amount = this.safeFloat (order, 'total_amount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'trade_money'); - let average = undefined; + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'trade_amount'); + const amount = this.safeNumber (order, 'total_amount'); + const cost = this.safeNumber (order, 'trade_money'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((cost !== undefined) && (filled !== undefined) && (filled > 0)) { - average = cost / filled; - } const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fees'); + const feeCost = this.safeNumber (order, 'fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -705,7 +703,7 @@ module.exports = class zb extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -719,15 +717,15 @@ module.exports = class zb extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -790,7 +788,7 @@ module.exports = class zb extends Exchange { // const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'hash'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let timestamp = this.parse8601 (this.safeString (transaction, 'submit_time')); timestamp = this.safeInteger (transaction, 'submitTime', timestamp); let address = this.safeString2 (transaction, 'toAddress', 'address'); @@ -810,7 +808,7 @@ module.exports = class zb extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -843,7 +841,7 @@ module.exports = class zb extends Exchange { if (password === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires exchange.password or a safePwd parameter'); } - const fees = this.safeFloat (params, 'fees'); + const fees = this.safeNumber (params, 'fees'); if (fees === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires a fees parameter'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/package.json b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/package.json index a5305f19f..8e0bd3de4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/package.json +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/package.json @@ -1,27 +1,27 @@ { - "_from": "ccxt@1.42.77", - "_id": "ccxt@1.42.77", + "_from": "ccxt@1.47.49", + "_id": "ccxt@1.47.49", "_inBundle": false, - "_integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==", + "_integrity": "sha512-aGjOGKX/wfStwD24dH7FweP2ktdbZBjhgLxkipFVaewnjsftyiuzCCikMS7IvSRON/aAMG0oqKUdVHL382BFMA==", "_location": "/ccxt", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "ccxt@1.42.77", + "raw": "ccxt@1.47.49", "name": "ccxt", "escapedName": "ccxt", - "rawSpec": "1.42.77", + "rawSpec": "1.47.49", "saveSpec": null, - "fetchSpec": "1.42.77" + "fetchSpec": "1.47.49" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz", - "_shasum": "8ab5f8e7190854e163da6d4fcf44530794d0a21c", - "_spec": "ccxt@1.42.77", + "_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.47.49.tgz", + "_shasum": "ef9c41b5573b85d3b83cf1292d0aa891c4d5b6bc", + "_spec": "ccxt@1.47.49", "_where": "C:\\Superalgos\\Projects\\Superalgos\\TS\\Bot-Modules\\Sensor-Bot\\Exchange-Raw-Data", "author": { "name": "Igor Kroitor", @@ -543,7 +543,9 @@ "equos.io", "EQUOS", "ndax.io", - "NDAX" + "NDAX", + "ascendex.com", + "AscendEX" ], "license": "MIT", "main": "./ccxt.js", @@ -587,5 +589,5 @@ }, "types": "./ccxt.d.ts", "unpkg": "dist/ccxt.browser.js", - "version": "1.42.77" + "version": "1.47.49" } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/package-lock.json b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/package-lock.json index 976144cc2..cd3bb8d9e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/package-lock.json +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/package-lock.json @@ -3,9 +3,9 @@ "lockfileVersion": 1, "dependencies": { "ccxt": { - "version": "1.42.77", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz", - "integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==" + "version": "1.47.49", + "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.47.49.tgz", + "integrity": "sha512-aGjOGKX/wfStwD24dH7FweP2ktdbZBjhgLxkipFVaewnjsftyiuzCCikMS7IvSRON/aAMG0oqKUdVHL382BFMA==" } } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js index cdb03a1e7..fe6392225 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js @@ -28,12 +28,14 @@ let key let secret let uid + let password if (TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference !== undefined) { if (TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference.referenceParent !== undefined) { key = TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.codeName secret = TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.secret uid = TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.uid + password = TS.projects.superalgos.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.password } } const exchangeClass = ccxt[exchangeId] @@ -41,6 +43,7 @@ 'apiKey': key, 'secret': secret, 'uid': uid, + 'password': password, 'timeout': 30000, 'enableRateLimit': true, verbose: false, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/CONTRIBUTING.md b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/CONTRIBUTING.md index 1d3ff05d1..7ff3d7ae6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/CONTRIBUTING.md +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/CONTRIBUTING.md @@ -261,7 +261,7 @@ These files containing derived exchange classes are transpiled from JS into PHP: These PHP base classes and files are not transpiled: -- `php/base/*` +- `php/Exchange.php php/ExchangeError.php php/Precise.php ... #### Typescript @@ -385,7 +385,7 @@ async fetchTicker (symbol, params = {}) { #### Parsing Symbols -When sending requests to the exchange unified symbols have to be _"converted"_ to exchange-specific market-`id`s like shown above. The same is true on the other side – when receiving an exchange response it has an exchange-specific market-`id` inside it that has to be _"converted back"_ to a unified CCXT symbol. +When sending requests to the exchange unified symbols have to be _"converted"_ to exchange-specific market-`id`s like shown above. The same is true on the other end – when receiving an exchange response it has an exchange-specific market-`id` inside it that has to be _"converted back"_ to a unified CCXT symbol. **We don't put exchange-specific market-`id`s in unified structures directly!** We can't freely interchange symbols with ids! There is a significant difference between an *exchange-specific market-ids* and *unified symbols*! This is explained in the Manual, here: @@ -444,7 +444,7 @@ In JavaScript, dictionary keys can be accessed in two notations: Both work almost identically, and one is implicitly converted to another upon executing the JavaScript code. -While the above does work in JavaScript, it will not work in Python or PHP. In most languages, associative dictionary keys are not treated in the same way as properties. Therefore, in Python `object.key` is not the same as `object['key']`. In PHP `$object->key` is not the same as `$object['key']` as well. Languages that differentiate between associative keys and properties use different notations for the two. +While the above does work in JavaScript, **it will not work in Python or PHP**. In most languages, associative dictionary keys are not treated in the same way as properties. Therefore, in Python `object.key` is not the same as `object['key']`. In PHP `$object->key` is not the same as `$object['key']` as well. Languages that differentiate between associative keys and properties use different notations for the two. To keep the code transpileable, please, remember this simple rule: *always use the single-quoted string key notation `object['key']` for accessing all associative dictionary keys in all languages everywhere throughout this library!* @@ -572,7 +572,7 @@ The `hmac()` method also supports `'base64'` for the `digest` argument. This is #### Timestamps -**All timestamps throughout all unified structures within this library are integer timestamp _in milliseconds_!** +**All timestamps throughout all unified structures within this library are integer UTC timestamps _in milliseconds_!** In order to convert to milliseconds timestamps, CCXT implements the following methods: diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/README.md b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/README.md index 3f8dfeea4..7ec80167e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/README.md +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/README.md @@ -1,6 +1,6 @@ # CCXT – CryptoCurrency eXchange Trading Library -[![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/dhzSKYU) [![Supported Exchanges](https://img.shields.io/badge/exchanges-126-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) +[![Build Status](https://travis-ci.com/ccxt/ccxt.svg?branch=master)](https://travis-ci.com/ccxt/ccxt) [![npm](https://img.shields.io/npm/v/ccxt.svg)](https://npmjs.com/package/ccxt) [![PyPI](https://img.shields.io/pypi/v/ccxt.svg)](https://pypi.python.org/pypi/ccxt) [![NPM Downloads](https://img.shields.io/npm/dy/ccxt.svg)](https://www.npmjs.com/package/ccxt) [![Discord](https://img.shields.io/discord/690203284119617602?logo=discord&logoColor=white)](https://discord.gg/dhzSKYU) [![Supported Exchanges](https://img.shields.io/badge/exchanges-121-blue.svg)](https://github.com/ccxt/ccxt/wiki/Exchange-Markets) [![Open Collective](https://opencollective.com/ccxt/backers/badge.svg)](https://opencollective.com/ccxt) [![Twitter Follow](https://img.shields.io/twitter/follow/ccxt_official.svg?style=social&label=CCXT)](https://twitter.com/ccxt_official) A JavaScript / Python / PHP library for cryptocurrency trading and e-commerce with support for many bitcoin/ether/altcoin exchange markets and merchant APIs. @@ -25,10 +25,10 @@ Current feature list: ## See Also -- [![Quadency](https://user-images.githubusercontent.com/1294454/69334382-a0618100-0c6b-11ea-9ba9-40aa97440cfa.png)](https://quadency.com?utm_source=ccxt)  **[Quadency](https://quadency.com?utm_source=ccxt)** — trading automation terminal for leading exchanges with streaming APIs + Python IDE. - [![TabTrader](https://user-images.githubusercontent.com/1294454/66755907-9c3e8880-eea1-11e9-846e-0bff349ceb87.png)](https://tab-trader.com/?utm_source=ccxt)  **[TabTrader](https://tab-trader.com/?utm_source=ccxt)** — trading on all exchanges in one app. Avaliable on [Android](https://play.google.com/store/apps/details?id=com.tabtrader.android&referrer=utm_source%3Dccxt) and [iOS](https://itunes.apple.com/app/apple-store/id1095716562?mt=8). - [![Pionex](https://user-images.githubusercontent.com/1294454/106112806-c2ec0580-615e-11eb-870c-0b7aef021db2.png)](https://www.pionex.com/en-US/sign?r=8wSFCbNk&utm_source=ad&utm_medium=banner&utm_campaign=ccxt-2)  **[Pionex](https://www.pionex.com/en-US/sign?r=8wSFCbNk&utm_source=ad&utm_medium=banner&utm_campaign=ccxt-2)** — 6 grid bots, spot-futures arb bot, smart trade and DCA bots. Free for [Android](https://play.google.com/store/apps/details?id=com.pionex.client&referrer=utm_source%3Dccxt) and [iOS](https://apps.apple.com/us/app/pionex/id1485348891?pt=ccxt&ct=inline)! - [![AAX](https://user-images.githubusercontent.com/1294454/106509642-ef957980-64de-11eb-92e0-8323cda7874e.png)](https://www.aaxpro.com/en-US/ad-sign-up/?utm_source=ccxt&utm_medium=one-liner&utm_campaign=futures)  **[AAX](https://www.aaxpro.com/en-US/ad-sign-up/?utm_source=ccxt&utm_medium=one-liner&utm_campaign=futures)** — trade bitcoin futures with fees as low as 0.02% and up to 100x leverage! +- [![Freqtrade](https://user-images.githubusercontent.com/1294454/114340585-8e35fa80-9b60-11eb-860f-4379125e2db6.png)](https://www.freqtrade.io)  **[Freqtrade](https://www.freqtrade.io)** — leading opensource cryptocurrency algorithmic trading software! ## Certified Cryptocurrency Exchanges @@ -52,13 +52,13 @@ Current feature list: ## Supported Cryptocurrency Exchange Markets -The CCXT library currently supports the following 126 cryptocurrency exchange markets and trading APIs: +The CCXT library currently supports the following 121 cryptocurrency exchange markets and trading APIs: | logo | id | name | ver | doc | certified | pro | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|-----------------------------------------------------------------------------------------|:---:|:-------------------------------------------------------------------------------------------:|-----------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------| | [![aax](https://user-images.githubusercontent.com/1294454/104140087-a27f2580-53c0-11eb-87c1-5d9e81208fe9.jpg)](https://www.aaxpro.com/invite/sign-up?inviteCode=JXGm5Fy7R2MB) | aax | [AAX](https://www.aaxpro.com/invite/sign-up?inviteCode=JXGm5Fy7R2MB) | 2 | [API](https://www.aaxpro.com/apidoc/index.html) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | -| [![acx](https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg)](https://acx.io) | acx | [ACX](https://acx.io) | 2 | [API](https://acx.io/documents/api_v2) | | | | [![aofex](https://user-images.githubusercontent.com/51840849/77670271-056d1080-6f97-11ea-9ac2-4268e9ed0c1f.jpg)](https://aofex.com/#/register?key=9763840) | aofex | [AOFEX](https://aofex.com/#/register?key=9763840) | * | [API](https://aofex.zendesk.com/hc/en-us/sections/360005576574-API) | | | +| [![ascendex](https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg)](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | ascendex | [AscendEX](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | 1 | [API](https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation) | | | | [![bequant](https://user-images.githubusercontent.com/1294454/55248342-a75dfe00-525a-11e9-8aa2-05e9dca943c6.jpg)](https://bequant.io) | bequant | [Bequant](https://bequant.io) | 2 | [API](https://api.bequant.io/) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bibox](https://user-images.githubusercontent.com/51840849/77257418-3262b000-6c85-11ea-8fb8-20bdf20b3592.jpg)](https://w2.bibox365.com/login/register?invite_code=05Kj3I) | bibox | [Bibox](https://w2.bibox365.com/login/register?invite_code=05Kj3I) | 1 | [API](https://biboxcom.github.io/en/) | | | | [![bigone](https://user-images.githubusercontent.com/1294454/69354403-1d532180-0c91-11ea-88ed-44c06cefdf87.jpg)](https://b1.run/users/new?code=D3LLBVFT) | bigone | [BigONE](https://b1.run/users/new?code=D3LLBVFT) | 3 | [API](https://open.big.one/docs/api.html) | | | @@ -76,7 +76,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bithumb](https://user-images.githubusercontent.com/1294454/30597177-ea800172-9d5e-11e7-804c-b9d4fa9b56b0.jpg)](https://www.bithumb.com) | bithumb | [Bithumb](https://www.bithumb.com) | * | [API](https://apidocs.bithumb.com) | | | | [![bitkk](https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg)](https://www.bitkk.com) | bitkk | [bitkk](https://www.bitkk.com) | 1 | [API](https://www.bitkk.com/i/developer) | | | | [![bitmart](https://user-images.githubusercontent.com/1294454/61835713-a2662f80-ae85-11e9-9d00-6442919701fd.jpg)](http://www.bitmart.com/?r=rQCFLh) | bitmart | [BitMart](http://www.bitmart.com/?r=rQCFLh) | 1 | [API](https://developer-pro.bitmart.com/) | | | -| [![bitmax](https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg)](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | bitmax | [BitMax](https://bitmax.io/#/register?inviteCode=EL6BXBQM) | 1 | [API](https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation) | | | | [![bitmex](https://user-images.githubusercontent.com/1294454/27766319-f653c6e6-5ed4-11e7-933d-f0bc3699ae8f.jpg)](https://www.bitmex.com/register/upZpOX) | bitmex | [BitMEX](https://www.bitmex.com/register/upZpOX) | 1 | [API](https://www.bitmex.com/app/apiOverview) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bitpanda](https://user-images.githubusercontent.com/51840849/87591171-9a377d80-c6f0-11ea-94ac-97a126eac3bc.jpg)](https://www.bitpanda.com/en/pro) | bitpanda | [Bitpanda Pro](https://www.bitpanda.com/en/pro) | 1 | [API](https://developers.bitpanda.com/exchange/) | | | | [![bitso](https://user-images.githubusercontent.com/51840849/87295554-11f98280-c50e-11ea-80d6-15b3bafa8cbf.jpg)](https://bitso.com/?ref=itej) | bitso | [Bitso](https://bitso.com/?ref=itej) | 3 | [API](https://bitso.com/api_info) | | | @@ -84,7 +83,7 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bitstamp1](https://user-images.githubusercontent.com/1294454/27786377-8c8ab57e-5fe9-11e7-8ea4-2b05b6bcceec.jpg)](https://www.bitstamp.net) | bitstamp1 | [Bitstamp](https://www.bitstamp.net) | 1 | [API](https://www.bitstamp.net/api) | | | | [![bittrex](https://user-images.githubusercontent.com/51840849/87153921-edf53180-c2c0-11ea-96b9-f2a9a95a455b.jpg)](https://bittrex.com/Account/Register?referralCode=1ZE-G0G-M3B) | bittrex | [Bittrex](https://bittrex.com/Account/Register?referralCode=1ZE-G0G-M3B) | 3 | [API](https://bittrex.github.io/api/v3) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![bitvavo](https://user-images.githubusercontent.com/1294454/83165440-2f1cf200-a116-11ea-9046-a255d09fb2ed.jpg)](https://bitvavo.com/?a=24F34952F7) | bitvavo | [Bitvavo](https://bitvavo.com/?a=24F34952F7) | 2 | [API](https://docs.bitvavo.com/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![bitz](https://user-images.githubusercontent.com/51840849/87443304-fec5e000-c5fd-11ea-98f8-ba8e67f7eaff.jpg)](https://u.bitz.com/register?invite_code=1429193) | bitz | [Bit-Z](https://u.bitz.com/register?invite_code=1429193) | 2 | [API](https://apidoc.bitz.com/en/) | | | +| [![bitz](https://user-images.githubusercontent.com/51840849/87443304-fec5e000-c5fd-11ea-98f8-ba8e67f7eaff.jpg)](https://u.bitz.com/register?invite_code=1429193) | bitz | [Bit-Z](https://u.bitz.com/register?invite_code=1429193) | 2 | [API](https://apidocv2.bitz.plus/en/) | | | | [![bl3p](https://user-images.githubusercontent.com/1294454/28501752-60c21b82-6feb-11e7-818b-055ee6d0e754.jpg)](https://bl3p.eu) | bl3p | [BL3P](https://bl3p.eu) | 1 | [API](https://github.com/BitonicNL/bl3p-api/tree/master/docs) | | | | [![bleutrade](https://user-images.githubusercontent.com/1294454/30303000-b602dbe6-976d-11e7-956d-36c5049c01e7.jpg)](https://bleutrade.com) | bleutrade | [Bleutrade](https://bleutrade.com) | * | [API](https://app.swaggerhub.com/apis-docs/bleu/white-label/3.0.0) | | | | [![braziliex](https://user-images.githubusercontent.com/1294454/34703593-c4498674-f504-11e7-8d14-ff8e44fb78c1.jpg)](https://braziliex.com/?ref=5FE61AB6F6D67DA885BC98BA27223465) | braziliex | [Braziliex](https://braziliex.com/?ref=5FE61AB6F6D67DA885BC98BA27223465) | * | [API](https://braziliex.com/exchange/api.php) | | | @@ -99,7 +98,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![bytetrade](https://user-images.githubusercontent.com/1294454/67288762-2f04a600-f4e6-11e9-9fd6-c60641919491.jpg)](https://www.byte-trade.com) | bytetrade | [ByteTrade](https://www.byte-trade.com) | * | [API](https://docs.byte-trade.com/#description) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | | [![cdax](https://user-images.githubusercontent.com/1294454/102157692-fd406280-3e90-11eb-8d46-4511b617cd17.jpg)](https://cdax.io/invite?invite_code=esc74) | cdax | [CDAX](https://cdax.io/invite?invite_code=esc74) | 1 | [API](https://github.com/cloudapidoc/API_Docs) | | | | [![cex](https://user-images.githubusercontent.com/1294454/27766442-8ddc33b0-5ed8-11e7-8b98-f786aef0f3c9.jpg)](https://cex.io/r/0/up105393824/0/) | cex | [CEX.IO](https://cex.io/r/0/up105393824/0/) | * | [API](https://cex.io/cex-api) | | | -| [![chilebit](https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg)](https://chilebit.net) | chilebit | [ChileBit](https://chilebit.net) | 1 | [API](https://blinktrade.com/docs) | | | | [![coinbase](https://user-images.githubusercontent.com/1294454/40811661-b6eceae2-653a-11e8-829e-10bfadb078cf.jpg)](https://www.coinbase.com/join/58cbe25a355148797479dbd2) | coinbase | [Coinbase](https://www.coinbase.com/join/58cbe25a355148797479dbd2) | 2 | [API](https://developers.coinbase.com/api/v2) | | | | [![coinbaseprime](https://user-images.githubusercontent.com/1294454/44539184-29f26e00-a70c-11e8-868f-e907fc236a7c.jpg)](https://prime.coinbase.com) | coinbaseprime | [Coinbase Prime](https://prime.coinbase.com) | * | [API](https://docs.prime.coinbase.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![coinbasepro](https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg)](https://pro.coinbase.com/) | coinbasepro | [Coinbase Pro](https://pro.coinbase.com/) | * | [API](https://docs.pro.coinbase.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | @@ -118,7 +116,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![delta](https://user-images.githubusercontent.com/1294454/99450025-3be60a00-2931-11eb-9302-f4fd8d8589aa.jpg)](https://www.delta.exchange/app/signup/?code=IULYNB) | delta | [Delta Exchange](https://www.delta.exchange/app/signup/?code=IULYNB) | 2 | [API](https://docs.delta.exchange) | | | | [![deribit](https://user-images.githubusercontent.com/1294454/41933112-9e2dd65a-798b-11e8-8440-5bab2959fcb8.jpg)](https://www.deribit.com/reg-1189.4038) | deribit | [Deribit](https://www.deribit.com/reg-1189.4038) | 2 | [API](https://docs.deribit.com/v2) | | | | [![digifinex](https://user-images.githubusercontent.com/51840849/87443315-01283a00-c5fe-11ea-8628-c2a0feaf07ac.jpg)](https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp) | digifinex | [DigiFinex](https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp) | 3 | [API](https://docs.digifinex.com) | | | -| [![dsx](https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg)](https://dsxglobal.com) | dsx | [DSX](https://dsxglobal.com) | 3 | [API](https://dsxglobal.com/developers/publicApi) | | | | [![equos](https://user-images.githubusercontent.com/1294454/107758499-05edd180-6d38-11eb-9e09-0b69602a7a15.jpg)](https://equos.io?referredByCode=zpa8kij4ouvBFup3) | equos | [EQUOS](https://equos.io?referredByCode=zpa8kij4ouvBFup3) | * | [API](https://developer.equos.io) | | | | [![eterbase](https://user-images.githubusercontent.com/1294454/82067900-faeb0f80-96d9-11ea-9f22-0071cfcb9871.jpg)](https://eterbase.exchange/invite/1wjjh4Pe) | eterbase | [Eterbase](https://eterbase.exchange/invite/1wjjh4Pe) | 1 | [API](https://developers.eterbase.exchange) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | | [![exmo](https://user-images.githubusercontent.com/1294454/27766491-1b0ea956-5eda-11e7-9225-40d67b481b8d.jpg)](https://exmo.me/?ref=131685) | exmo | [EXMO](https://exmo.me/?ref=131685) | 1.1 | [API](https://exmo.me/en/api_doc?ref=131685) | | | @@ -133,10 +130,9 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![gopax](https://user-images.githubusercontent.com/1294454/102897212-ae8a5e00-4478-11eb-9bab-91507c643900.jpg)](https://www.gopax.co.kr) | gopax | [GOPAX](https://www.gopax.co.kr) | 1 | [API](https://gopax.github.io/API/index.en.html) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![hbtc](https://user-images.githubusercontent.com/51840849/80134449-70663300-85a7-11ea-8942-e204cdeaab5d.jpg)](https://www.hbtc.com/register/O2S8NS) | hbtc | [HBTC](https://www.hbtc.com/register/O2S8NS) | 1 | [API](https://github.com/bhexopen/BHEX-OpenApi/tree/master/doc) | | | | [![hitbtc](https://user-images.githubusercontent.com/1294454/27766555-8eaec20e-5edc-11e7-9c5b-6dc69fc42f5e.jpg)](https://hitbtc.com/?ref_id=5a5d39a65d466) | hitbtc | [HitBTC](https://hitbtc.com/?ref_id=5a5d39a65d466) | 2 | [API](https://api.hitbtc.com) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![hollaex](https://user-images.githubusercontent.com/1294454/75841031-ca375180-5ddd-11ea-8417-b975674c23cb.jpg)](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | hollaex | [HollaEx](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | 1 | [API](https://apidocs.hollaex.com) | | | +| [![hollaex](https://user-images.githubusercontent.com/1294454/75841031-ca375180-5ddd-11ea-8417-b975674c23cb.jpg)](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | hollaex | [HollaEx](https://pro.hollaex.com/signup?affiliation_code=QSWA6G) | 2 | [API](https://apidocs.hollaex.com) | | | | [![huobijp](https://user-images.githubusercontent.com/1294454/85734211-85755480-b705-11ea-8b35-0b7f1db33a2f.jpg)](https://www.huobi.co.jp/register/?invite_code=znnq3) | huobijp | [Huobi Japan](https://www.huobi.co.jp/register/?invite_code=znnq3) | 1 | [API](https://api-doc.huobi.co.jp) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![huobipro](https://user-images.githubusercontent.com/1294454/76137448-22748a80-604e-11ea-8069-6e389271911d.jpg)](https://www.huobi.com/en-us/topic/invited/?invite_code=rwrd3) | huobipro | [Huobi Pro](https://www.huobi.com/en-us/topic/invited/?invite_code=rwrd3) | 1 | [API](https://huobiapi.github.io/docs/spot/v1/cn/) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![ice3x](https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg)](https://ice3x.com?ref=14341802) | ice3x | [ICE3X](https://ice3x.com?ref=14341802) | 1 | [API](https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017) | | | | [![idex](https://user-images.githubusercontent.com/51840849/94481303-2f222100-01e0-11eb-97dd-bc14c5943a86.jpg)](https://idex.io) | idex | [IDEX](https://idex.io) | 2 | [API](https://docs.idex.io/) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | | [![independentreserve](https://user-images.githubusercontent.com/51840849/87182090-1e9e9080-c2ec-11ea-8e49-563db9a38f37.jpg)](https://www.independentreserve.com) | independentreserve | [Independent Reserve](https://www.independentreserve.com) | * | [API](https://www.independentreserve.com/API) | | | | [![indodax](https://user-images.githubusercontent.com/51840849/87070508-9358c880-c221-11ea-8dc5-5391afbbb422.jpg)](https://indodax.com/ref/testbitcoincoid/1) | indodax | [INDODAX](https://indodax.com/ref/testbitcoincoid/1) | 2.0 | [API](https://github.com/btcid/indodax-official-api-docs) | | | @@ -172,7 +168,6 @@ The CCXT library currently supports the following 126 cryptocurrency exchange ma | [![tidex](https://user-images.githubusercontent.com/1294454/30781780-03149dc4-a12e-11e7-82bb-313b269d24d4.jpg)](https://tidex.com/exchange/?ref=57f5638d9cd7) | tidex | [Tidex](https://tidex.com/exchange/?ref=57f5638d9cd7) | 3 | [API](https://tidex.com/exchange/public-api) | | | | [![timex](https://user-images.githubusercontent.com/1294454/70423869-6839ab00-1a7f-11ea-8f94-13ae72c31115.jpg)](https://timex.io/?refcode=1x27vNkTbP1uwkCck) | timex | [TimeX](https://timex.io/?refcode=1x27vNkTbP1uwkCck) | 1 | [API](https://docs.timex.io) | | | | [![upbit](https://user-images.githubusercontent.com/1294454/49245610-eeaabe00-f423-11e8-9cba-4b0aed794799.jpg)](https://upbit.com) | upbit | [Upbit](https://upbit.com) | 1 | [API](https://docs.upbit.com/docs/%EC%9A%94%EC%B2%AD-%EC%88%98-%EC%A0%9C%ED%95%9C) | | [![CCXT Pro](https://img.shields.io/badge/CCXT-Pro-black)](https://ccxt.pro) | -| [![vaultoro](https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg)](https://www.vaultoro.com) | vaultoro | [Vaultoro](https://www.vaultoro.com) | 1 | [API](https://api.vaultoro.com) | | | | [![vbtc](https://user-images.githubusercontent.com/1294454/27991481-1f53d1d8-6481-11e7-884e-21d17e7939db.jpg)](https://vbtc.exchange) | vbtc | [VBTC](https://vbtc.exchange) | 1 | [API](https://blinktrade.com/docs) | | | | [![vcc](https://user-images.githubusercontent.com/1294454/100545356-8427f500-326c-11eb-9539-7d338242d61b.jpg)](https://vcc.exchange?ref=l4xhrH) | vcc | [VCC Exchange](https://vcc.exchange?ref=l4xhrH) | 3 | [API](https://vcc.exchange/api) | | | | [![wavesexchange](https://user-images.githubusercontent.com/1294454/84547058-5fb27d80-ad0b-11ea-8711-78ac8b3c7f31.jpg)](https://waves.exchange) | wavesexchange | [Waves.Exchange](https://waves.exchange) | * | [API](https://docs.waves.exchange) | [![CCXT Certified](https://img.shields.io/badge/CCXT-Certified-green.svg)](https://github.com/ccxt/ccxt/wiki/Certification) | | @@ -229,13 +224,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.77/dist/ccxt.browser.js -* unpkg: https://unpkg.com/ccxt@1.42.77/dist/ccxt.browser.js +* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@1.47.49/dist/ccxt.browser.js +* unpkg: https://unpkg.com/ccxt@1.47.49/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 - + ``` Creates a global `ccxt` object: diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/export-exchanges.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/export-exchanges.js index 580d2cb2c..24ee4806f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/export-exchanges.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/export-exchanges.js @@ -195,7 +195,6 @@ function createMarkdownTable (array, markdownMethod, centeredColumns) { // const columns = underline.split ('|') - for (const i of centeredColumns) { columns[i] = ':' + columns[i].slice (1, columns[i].length - 1) + ':' } @@ -219,51 +218,45 @@ function exportSupportedAndCertifiedExchanges (exchanges, { allExchangesPaths, c const exchangesNotListedInDocs = [ 'hitbtc2' ] const arrayOfExchanges = values (exchanges) + const numExchanges = arrayOfExchanges.length - if (allExchangesPaths) { - + if (allExchangesPaths && numExchanges) { const supportedExchangesMarkdownTable = createMarkdownTable (arrayOfExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , numExchanges = arrayOfExchanges.length , beginning = "The CCXT library currently supports the following " , ending = " cryptocurrency exchange markets and trading APIs:\n\n" , totalString = beginning + numExchanges + ending , allExchangesReplacement = totalString + supportedExchangesMarkdownTable + "$1" , allExchangesRegex = new RegExp ("[^\n]+[\n]{2}\\| logo[^`]+\\|([\n][\n]|[\n]$|$)", 'm') - for (const path of allExchangesPaths) { logExportExchanges (path, allExchangesRegex, allExchangesReplacement) } } - if (proExchangesPaths) { - - const proExchanges = arrayOfExchanges.filter (exchange => exchange.pro) - , proExchangesMarkdownTable = createMarkdownTable (proExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , numExchanges = proExchanges.length + const proExchanges = arrayOfExchanges.filter (exchange => exchange.pro) + const numProExchanges = proExchanges.length + if (proExchangesPaths && numProExchanges) { + const proExchangesMarkdownTable = createMarkdownTable (proExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) , beginning = "The CCXT Pro library currently supports the following " , ending = " cryptocurrency exchange markets and WebSocket trading APIs:\n\n" - , totalString = beginning + numExchanges + ending + , totalString = beginning + numProExchanges + ending , proExchangesReplacement = totalString + proExchangesMarkdownTable + "$1" , proExchangesRegex = new RegExp ("[^\n]+[\n]{2}\\|[^`]+\\|([\n][\n]|[\n]$|$)", 'm') - for (const path of proExchangesPaths) { logExportExchanges (path, proExchangesRegex, proExchangesReplacement) } } - if (certifiedExchangesPaths) { - const certifiedExchanges = arrayOfExchanges.filter (exchange => exchange.certified) - , certifiedExchangesMarkdownTable = createMarkdownTable (certifiedExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) - , certifiedExchangesReplacement = '$1' + certifiedExchangesMarkdownTable + "\n" - , certifiedExchangesRegex = new RegExp ("^(## Certified Cryptocurrency Exchanges\n{3})(?:\\|.+\\|$\n)+", 'm') - + const certifiedExchanges = arrayOfExchanges.filter (exchange => exchange.certified) + if (certifiedExchangesPaths && certifiedExchanges.length) { + const certifiedExchangesMarkdownTable = createMarkdownTable (certifiedExchanges, createMarkdownListOfExchanges, [ 3, 4 ]) + , certifiedExchangesReplacement = '$1' + certifiedExchangesMarkdownTable + "\n" + , certifiedExchangesRegex = new RegExp ("^(## Certified Cryptocurrency Exchanges\n{3})(?:\\|.+\\|$\n)+", 'm') for (const path of certifiedExchangesPaths) { logExportExchanges (path, certifiedExchangesRegex, certifiedExchangesReplacement) } } if (exchangesByCountriesPaths) { - const exchangesByCountriesMarkdownTable = createMarkdownTable (arrayOfExchanges, createMarkdownListOfExchangesByCountries, [ 4, 5 ]) const result = "# Exchanges By Country\n\nThe ccxt library currently supports the following cryptocurrency exchange markets and trading APIs:\n\n" + exchangesByCountriesMarkdownTable + "\n\n" for (const path of exchangesByCountriesPaths) { @@ -385,7 +378,7 @@ function exportEverything () { replacement: "exchanges = [\n" + " '" + ids.join ("',\n '") + "'," + "\n]", }, { - file: './php/base/Exchange.php', + file: './php/Exchange.php', regex: /public static \$exchanges \= array\s*\([^\)]+\)/, replacement: "public static $exchanges = array(\n '" + ids.join ("',\n '") + "',\n )", }, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/transpile.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/transpile.js index 948a34c0f..233d15e6c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/transpile.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/build/transpile.js @@ -34,6 +34,7 @@ class Transpiler { [ /\.safeIntegerProduct2\s/g, '.safe_integer_product_2'], [ /\.safeTimestamp2\s/g, '.safe_timestamp_2'], [ /\.safeString2\s/g, '.safe_string_2'], + [ /\.safeNumber2\s/g, '.safe_number_2'], [ /\.safeStringLower2\s/g, '.safe_string_lower_2'], [ /\.safeStringUpper2\s/g, '.safe_string_upper_2'], [ /\.safeValue2\s/g, '.safe_value_2'], @@ -195,6 +196,10 @@ class Transpiler { [ /Number\.MAX_SAFE_INTEGER/g, 'float(\'inf\')'], [ /function\s*(\w+\s*\([^)]+\))\s*{/g, 'def $1:'], [ /assert\s*\((.+)\);/g, 'assert $1'], + [ /Precise\.stringAdd\s/g, 'Precise.string_add' ], + [ /Precise\.stringMul\s/g, 'Precise.string_mul' ], + [ /Precise\.stringDiv\s/g, 'Precise.string_div' ], + [ /Precise\.stringSub\s/g, 'Precise.string_sub' ], // insert common regexes in the middle (critical) ].concat (this.getCommonRegexes ()).concat ([ @@ -227,7 +232,7 @@ class Transpiler { [ /for\s+\(([a-zA-Z0-9_]+)\s*=\s*([^\;\s]+\s*)\;[^\<\>\=]+(?:\<=|\>=|<|>)\s*(.*)\s*\;[^\)]+\)\s*{/g, 'for $1 in range($2, $3):'], [ /\s\|\|\s/g, ' or ' ], [ /\s\&\&\s/g, ' and ' ], - [ /\!([^\='"])/g, 'not $1'], + [ /\!([^\s\='"])/g, 'not $1'], [ /\.push\s*\(([\s\S]+?)\);/g, '.append($1);' ], [ /^(\s*}\s*$)+/gm, '' ], [ /\;(\s+?\/\/.+?)/g, '$1' ], @@ -243,9 +248,6 @@ class Transpiler { [ /parseFloat\s*/g, 'float'], [ /parseInt\s*/g, 'int'], [ /self\[([^\]+]+)\]/g, 'getattr(self, $1)' ], - [ /([^\s]+)\.slice \(([^\,\)]+)\,\s?([^\)]+)\)/g, '$1[$2:$3]' ], - [ /([^\s]+)\.slice \(([^\)\:]+)\)/g, '$1[$2:]' ], - [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /Math\.floor\s*\(([^\)]+)\)/g, 'int(math.floor($1))' ], [ /Math\.abs\s*\(([^\)]+)\)/g, 'abs($1)' ], [ /Math\.pow\s*\(([^\)]+)\)/g, 'math.pow($1)' ], @@ -253,6 +255,9 @@ class Transpiler { [ /Math\.ceil\s*\(([^\)]+)\)/g, 'int(math.ceil($1))' ], [ /Math\.log/g, 'math.log' ], [ /([a-zA-Z0-9_\.]*\([^\)]+\)|[^\s]+)\s+\?\s*([^\:]+)\s+\:\s*([^\n]+)/g, '$2 if $1 else $3'], + [ /([^\s]+)\.slice \(([^\,\)]+)\,\s?([^\)]+)\)/g, '$1[$2:$3]' ], + [ /([^\s]+)\.slice \(([^\)\:]+)\)/g, '$1[$2:]' ], + [ /([^\s(:]+)\.length/g, 'len($1)' ], [ /(^|\s)\/\//g, '$1#' ], [ /([^\n\s]) #/g, '$1 #' ], // PEP8 E261 [ /\.indexOf/g, '.find'], @@ -336,6 +341,10 @@ class Transpiler { [ /(\w+)\.shift\s*\(\)/g, 'array_shift($1)' ], [ /(\w+)\.pop\s*\(\)/g, 'array_pop($1)' ], [ /Number\.MAX_SAFE_INTEGER/g, 'PHP_INT_MAX' ], + [ /Precise\.stringAdd\s/g, 'Precise::string_add' ], + [ /Precise\.stringDiv\s/g, 'Precise::string_div' ], + [ /Precise\.stringMul\s/g, 'Precise::string_mul' ], + [ /Precise\.stringSub\s/g, 'Precise::string_sub' ], // insert common regexes in the middle (critical) ].concat (this.getCommonRegexes ()).concat ([ @@ -404,6 +413,7 @@ class Transpiler { [ /([^\(\s]+)\s+%\s+([^\s\,\;\)]+)/g, 'fmod($1, $2)' ], [ /\(([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\>\=\s*0\)/g, '(mb_strpos($1, $2) !== false)' ], [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\>\=\s*0/g, 'mb_strpos($1, $2) !== false' ], + [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)\s*\<\s*0/g, 'mb_strpos($1, $2) === false' ], [ /([^\s\(]+)\.indexOf\s*\(([^\)]+)\)/g, 'mb_strpos($1, $2)' ], [ /\(([^\s\(]+)\sin\s([^\)]+)\)/g, '(is_array($2) && array_key_exists($1, $2))' ], [ /([^\s]+)\.join\s*\(\s*([^\)]+?)\s*\)/g, 'implode($2, $1)' ], @@ -578,6 +588,9 @@ class Transpiler { precisionImports.push ('from ccxt.base.decimal_to_precision import ' + constant) } } + if (bodyAsString.match (/[\s(]Precise/)) { + precisionImports.push ('from ccxt.base.precise import Precise') + } header = header.concat (libraries, errorImports, precisionImports) @@ -633,7 +646,13 @@ class Transpiler { } } - header = header.concat (errorImports) + const precisionImports = [] + + if (async && bodyAsString.match (/[\s(]Precise/)) { + precisionImports.push ('use \\ccxt\\Precise;') + } + + header = header.concat (errorImports).concat (precisionImports) methods = methods.concat (this.getPHPBaseMethods ()) @@ -1179,7 +1198,7 @@ class Transpiler { function phpMakeErrorClassFile (name, parent) { const useClause = "\nuse " + parent + ";\n" - const requireClause = "\nrequire_once PATH_TO_CCXT_BASE . '" + parent + ".php';\n" + const requireClause = "\nrequire_once PATH_TO_CCXT . '" + parent + ".php';\n" const phpBody = [ '; - createLimitOrder (symbol: string, side: Order['side'], amount: number, price?: number, params?: Params): Promise; + createLimitOrder (symbol: string, side: Order['side'], amount: number, price: number, params?: Params): Promise; + createLimitBuyOrder (symbol: string, amount: number, price: number, params?: Params): Promise; + createLimitSellOrder (symbol: string, amount: number, price: number, params?: Params): Promise; createMarketOrder (symbol: string, side: Order['side'], amount: number, price?: number, params?: Params): Promise; createOrder (symbol: string, type: Order['type'], side: Order['side'], amount: number, price?: number, params?: Params): Promise; decode (str: string): string; @@ -423,8 +425,8 @@ declare module 'ccxt' { /* tslint:disable */ export class aax extends Exchange {} - export class acx extends Exchange {} export class aofex extends Exchange {} + export class ascendex extends Exchange {} export class bequant extends hitbtc {} export class bibox extends Exchange {} export class bigone extends Exchange {} @@ -442,7 +444,6 @@ declare module 'ccxt' { export class bithumb extends Exchange {} export class bitkk extends zb {} export class bitmart extends Exchange {} - export class bitmax extends Exchange {} export class bitmex extends Exchange {} export class bitpanda extends Exchange {} export class bitso extends Exchange {} @@ -465,7 +466,6 @@ declare module 'ccxt' { export class bytetrade extends Exchange {} export class cdax extends huobipro {} export class cex extends Exchange {} - export class chilebit extends foxbit {} export class coinbase extends Exchange {} export class coinbaseprime extends coinbasepro {} export class coinbasepro extends Exchange {} @@ -484,7 +484,6 @@ declare module 'ccxt' { export class delta extends Exchange {} export class deribit extends Exchange {} export class digifinex extends Exchange {} - export class dsx extends Exchange {} export class equos extends Exchange {} export class eterbase extends Exchange {} export class exmo extends Exchange {} @@ -502,14 +501,13 @@ declare module 'ccxt' { export class hollaex extends Exchange {} export class huobijp extends huobipro {} export class huobipro extends Exchange {} - export class ice3x extends Exchange {} export class idex extends Exchange {} export class independentreserve extends Exchange {} export class indodax extends Exchange {} export class itbit extends Exchange {} export class kraken extends Exchange {} export class kucoin extends Exchange {} - export class kuna extends acx {} + export class kuna extends Exchange {} export class lakebtc extends Exchange {} export class latoken extends Exchange {} export class lbank extends Exchange {} @@ -538,7 +536,6 @@ declare module 'ccxt' { export class tidex extends Exchange {} export class timex extends Exchange {} export class upbit extends Exchange {} - export class vaultoro extends Exchange {} export class vbtc extends foxbit {} export class vcc extends Exchange {} export class wavesexchange extends Exchange {} @@ -553,8 +550,8 @@ declare module 'ccxt' { export type ExchangeId = | 'aax' - | 'acx' | 'aofex' + | 'ascendex' | 'bequant' | 'bibox' | 'bigone' @@ -572,7 +569,6 @@ declare module 'ccxt' { | 'bithumb' | 'bitkk' | 'bitmart' - | 'bitmax' | 'bitmex' | 'bitpanda' | 'bitso' @@ -595,7 +591,6 @@ declare module 'ccxt' { | 'bytetrade' | 'cdax' | 'cex' - | 'chilebit' | 'coinbase' | 'coinbaseprime' | 'coinbasepro' @@ -614,7 +609,6 @@ declare module 'ccxt' { | 'delta' | 'deribit' | 'digifinex' - | 'dsx' | 'equos' | 'eterbase' | 'exmo' @@ -632,7 +626,6 @@ declare module 'ccxt' { | 'hollaex' | 'huobijp' | 'huobipro' - | 'ice3x' | 'idex' | 'independentreserve' | 'indodax' @@ -668,7 +661,6 @@ declare module 'ccxt' { | 'tidex' | 'timex' | 'upbit' - | 'vaultoro' | 'vbtc' | 'vcc' | 'wavesexchange' diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/ccxt.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/ccxt.js index 1d5c72642..27dc35101 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/ccxt.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/ccxt.js @@ -35,7 +35,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.42.77' +const version = '1.47.49' Exchange.ccxtVersion = version @@ -43,8 +43,8 @@ Exchange.ccxtVersion = version const exchanges = { 'aax': require ('./js/aax.js'), - 'acx': require ('./js/acx.js'), 'aofex': require ('./js/aofex.js'), + 'ascendex': require ('./js/ascendex.js'), 'bequant': require ('./js/bequant.js'), 'bibox': require ('./js/bibox.js'), 'bigone': require ('./js/bigone.js'), @@ -62,7 +62,6 @@ const exchanges = { 'bithumb': require ('./js/bithumb.js'), 'bitkk': require ('./js/bitkk.js'), 'bitmart': require ('./js/bitmart.js'), - 'bitmax': require ('./js/bitmax.js'), 'bitmex': require ('./js/bitmex.js'), 'bitpanda': require ('./js/bitpanda.js'), 'bitso': require ('./js/bitso.js'), @@ -85,7 +84,6 @@ const exchanges = { 'bytetrade': require ('./js/bytetrade.js'), 'cdax': require ('./js/cdax.js'), 'cex': require ('./js/cex.js'), - 'chilebit': require ('./js/chilebit.js'), 'coinbase': require ('./js/coinbase.js'), 'coinbaseprime': require ('./js/coinbaseprime.js'), 'coinbasepro': require ('./js/coinbasepro.js'), @@ -104,7 +102,6 @@ const exchanges = { 'delta': require ('./js/delta.js'), 'deribit': require ('./js/deribit.js'), 'digifinex': require ('./js/digifinex.js'), - 'dsx': require ('./js/dsx.js'), 'equos': require ('./js/equos.js'), 'eterbase': require ('./js/eterbase.js'), 'exmo': require ('./js/exmo.js'), @@ -122,7 +119,6 @@ const exchanges = { 'hollaex': require ('./js/hollaex.js'), 'huobijp': require ('./js/huobijp.js'), 'huobipro': require ('./js/huobipro.js'), - 'ice3x': require ('./js/ice3x.js'), 'idex': require ('./js/idex.js'), 'independentreserve': require ('./js/independentreserve.js'), 'indodax': require ('./js/indodax.js'), @@ -158,7 +154,6 @@ const exchanges = { 'tidex': require ('./js/tidex.js'), 'timex': require ('./js/timex.js'), 'upbit': require ('./js/upbit.js'), - 'vaultoro': require ('./js/vaultoro.js'), 'vbtc': require ('./js/vbtc.js'), 'vcc': require ('./js/vcc.js'), 'wavesexchange': require ('./js/wavesexchange.js'), diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/dist/ccxt.browser.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/dist/ccxt.browser.js index e8b439fb1..334681baa 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/dist/ccxt.browser.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/dist/ccxt.browser.js @@ -43,7 +43,7 @@ const Exchange = require ('./js/base/Exchange') //----------------------------------------------------------------------------- // this is updated by vss.js when building -const version = '1.42.77' +const version = '1.47.49' Exchange.ccxtVersion = version @@ -51,8 +51,8 @@ Exchange.ccxtVersion = version const exchanges = { 'aax': require ('./js/aax.js'), - 'acx': require ('./js/acx.js'), 'aofex': require ('./js/aofex.js'), + 'ascendex': require ('./js/ascendex.js'), 'bequant': require ('./js/bequant.js'), 'bibox': require ('./js/bibox.js'), 'bigone': require ('./js/bigone.js'), @@ -70,7 +70,6 @@ const exchanges = { 'bithumb': require ('./js/bithumb.js'), 'bitkk': require ('./js/bitkk.js'), 'bitmart': require ('./js/bitmart.js'), - 'bitmax': require ('./js/bitmax.js'), 'bitmex': require ('./js/bitmex.js'), 'bitpanda': require ('./js/bitpanda.js'), 'bitso': require ('./js/bitso.js'), @@ -93,7 +92,6 @@ const exchanges = { 'bytetrade': require ('./js/bytetrade.js'), 'cdax': require ('./js/cdax.js'), 'cex': require ('./js/cex.js'), - 'chilebit': require ('./js/chilebit.js'), 'coinbase': require ('./js/coinbase.js'), 'coinbaseprime': require ('./js/coinbaseprime.js'), 'coinbasepro': require ('./js/coinbasepro.js'), @@ -112,7 +110,6 @@ const exchanges = { 'delta': require ('./js/delta.js'), 'deribit': require ('./js/deribit.js'), 'digifinex': require ('./js/digifinex.js'), - 'dsx': require ('./js/dsx.js'), 'equos': require ('./js/equos.js'), 'eterbase': require ('./js/eterbase.js'), 'exmo': require ('./js/exmo.js'), @@ -130,7 +127,6 @@ const exchanges = { 'hollaex': require ('./js/hollaex.js'), 'huobijp': require ('./js/huobijp.js'), 'huobipro': require ('./js/huobipro.js'), - 'ice3x': require ('./js/ice3x.js'), 'idex': require ('./js/idex.js'), 'independentreserve': require ('./js/independentreserve.js'), 'indodax': require ('./js/indodax.js'), @@ -166,7 +162,6 @@ const exchanges = { 'tidex': require ('./js/tidex.js'), 'timex': require ('./js/timex.js'), 'upbit': require ('./js/upbit.js'), - 'vaultoro': require ('./js/vaultoro.js'), 'vbtc': require ('./js/vbtc.js'), 'vcc': require ('./js/vcc.js'), 'wavesexchange': require ('./js/wavesexchange.js'), @@ -184,7 +179,7 @@ module.exports = Object.assign ({ version, Exchange, 'exchanges': Object.keys (e //----------------------------------------------------------------------------- -},{"./js/aax.js":3,"./js/acx.js":4,"./js/aofex.js":5,"./js/base/Exchange":6,"./js/base/errors":8,"./js/base/functions":9,"./js/bequant.js":20,"./js/bibox.js":21,"./js/bigone.js":22,"./js/binance.js":23,"./js/binanceus.js":24,"./js/bit2c.js":25,"./js/bitbank.js":26,"./js/bitbay.js":27,"./js/bitcoincom.js":28,"./js/bitfinex.js":29,"./js/bitfinex2.js":30,"./js/bitflyer.js":31,"./js/bitforex.js":32,"./js/bitget.js":33,"./js/bithumb.js":34,"./js/bitkk.js":35,"./js/bitmart.js":36,"./js/bitmax.js":37,"./js/bitmex.js":38,"./js/bitpanda.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitvavo.js":44,"./js/bitz.js":45,"./js/bl3p.js":46,"./js/bleutrade.js":47,"./js/braziliex.js":48,"./js/btcalpha.js":49,"./js/btcbox.js":50,"./js/btcmarkets.js":51,"./js/btctradeua.js":52,"./js/btcturk.js":53,"./js/buda.js":54,"./js/bw.js":55,"./js/bybit.js":56,"./js/bytetrade.js":57,"./js/cdax.js":58,"./js/cex.js":59,"./js/chilebit.js":60,"./js/coinbase.js":61,"./js/coinbaseprime.js":62,"./js/coinbasepro.js":63,"./js/coincheck.js":64,"./js/coinegg.js":65,"./js/coinex.js":66,"./js/coinfalcon.js":67,"./js/coinfloor.js":68,"./js/coingi.js":69,"./js/coinmarketcap.js":70,"./js/coinmate.js":71,"./js/coinone.js":72,"./js/coinspot.js":73,"./js/crex24.js":74,"./js/currencycom.js":75,"./js/delta.js":76,"./js/deribit.js":77,"./js/digifinex.js":78,"./js/dsx.js":79,"./js/equos.js":80,"./js/eterbase.js":81,"./js/exmo.js":82,"./js/exx.js":83,"./js/fcoin.js":84,"./js/fcoinjp.js":85,"./js/flowbtc.js":86,"./js/foxbit.js":87,"./js/ftx.js":88,"./js/gateio.js":89,"./js/gemini.js":90,"./js/gopax.js":91,"./js/hbtc.js":92,"./js/hitbtc.js":93,"./js/hollaex.js":94,"./js/huobijp.js":95,"./js/huobipro.js":96,"./js/ice3x.js":97,"./js/idex.js":98,"./js/independentreserve.js":99,"./js/indodax.js":100,"./js/itbit.js":101,"./js/kraken.js":102,"./js/kucoin.js":103,"./js/kuna.js":104,"./js/lakebtc.js":105,"./js/latoken.js":106,"./js/lbank.js":107,"./js/liquid.js":108,"./js/luno.js":109,"./js/lykke.js":110,"./js/mercado.js":111,"./js/mixcoins.js":112,"./js/ndax.js":113,"./js/novadax.js":114,"./js/oceanex.js":115,"./js/okcoin.js":116,"./js/okex.js":117,"./js/paymium.js":118,"./js/phemex.js":119,"./js/poloniex.js":120,"./js/probit.js":121,"./js/qtrade.js":122,"./js/rightbtc.js":123,"./js/ripio.js":124,"./js/southxchange.js":125,"./js/stex.js":166,"./js/surbitcoin.js":167,"./js/therock.js":168,"./js/tidebit.js":169,"./js/tidex.js":170,"./js/timex.js":171,"./js/upbit.js":172,"./js/vaultoro.js":173,"./js/vbtc.js":174,"./js/vcc.js":175,"./js/wavesexchange.js":176,"./js/whitebit.js":177,"./js/xbtce.js":178,"./js/xena.js":179,"./js/yobit.js":180,"./js/zaif.js":181,"./js/zb.js":182}],3:[function(require,module,exports){ +},{"./js/aax.js":3,"./js/aofex.js":4,"./js/ascendex.js":5,"./js/base/Exchange":6,"./js/base/errors":9,"./js/base/functions":10,"./js/bequant.js":21,"./js/bibox.js":22,"./js/bigone.js":23,"./js/binance.js":24,"./js/binanceus.js":25,"./js/bit2c.js":26,"./js/bitbank.js":27,"./js/bitbay.js":28,"./js/bitcoincom.js":29,"./js/bitfinex.js":30,"./js/bitfinex2.js":31,"./js/bitflyer.js":32,"./js/bitforex.js":33,"./js/bitget.js":34,"./js/bithumb.js":35,"./js/bitkk.js":36,"./js/bitmart.js":37,"./js/bitmex.js":38,"./js/bitpanda.js":39,"./js/bitso.js":40,"./js/bitstamp.js":41,"./js/bitstamp1.js":42,"./js/bittrex.js":43,"./js/bitvavo.js":44,"./js/bitz.js":45,"./js/bl3p.js":46,"./js/bleutrade.js":47,"./js/braziliex.js":48,"./js/btcalpha.js":49,"./js/btcbox.js":50,"./js/btcmarkets.js":51,"./js/btctradeua.js":52,"./js/btcturk.js":53,"./js/buda.js":54,"./js/bw.js":55,"./js/bybit.js":56,"./js/bytetrade.js":57,"./js/cdax.js":58,"./js/cex.js":59,"./js/coinbase.js":60,"./js/coinbaseprime.js":61,"./js/coinbasepro.js":62,"./js/coincheck.js":63,"./js/coinegg.js":64,"./js/coinex.js":65,"./js/coinfalcon.js":66,"./js/coinfloor.js":67,"./js/coingi.js":68,"./js/coinmarketcap.js":69,"./js/coinmate.js":70,"./js/coinone.js":71,"./js/coinspot.js":72,"./js/crex24.js":73,"./js/currencycom.js":74,"./js/delta.js":75,"./js/deribit.js":76,"./js/digifinex.js":77,"./js/equos.js":78,"./js/eterbase.js":79,"./js/exmo.js":80,"./js/exx.js":81,"./js/fcoin.js":82,"./js/fcoinjp.js":83,"./js/flowbtc.js":84,"./js/foxbit.js":85,"./js/ftx.js":86,"./js/gateio.js":87,"./js/gemini.js":88,"./js/gopax.js":89,"./js/hbtc.js":90,"./js/hitbtc.js":91,"./js/hollaex.js":92,"./js/huobijp.js":93,"./js/huobipro.js":94,"./js/idex.js":95,"./js/independentreserve.js":96,"./js/indodax.js":97,"./js/itbit.js":98,"./js/kraken.js":99,"./js/kucoin.js":100,"./js/kuna.js":101,"./js/lakebtc.js":102,"./js/latoken.js":103,"./js/lbank.js":104,"./js/liquid.js":105,"./js/luno.js":106,"./js/lykke.js":107,"./js/mercado.js":108,"./js/mixcoins.js":109,"./js/ndax.js":110,"./js/novadax.js":111,"./js/oceanex.js":112,"./js/okcoin.js":113,"./js/okex.js":114,"./js/paymium.js":115,"./js/phemex.js":116,"./js/poloniex.js":117,"./js/probit.js":118,"./js/qtrade.js":119,"./js/rightbtc.js":120,"./js/ripio.js":121,"./js/southxchange.js":122,"./js/stex.js":163,"./js/surbitcoin.js":164,"./js/therock.js":165,"./js/tidebit.js":166,"./js/tidex.js":167,"./js/timex.js":168,"./js/upbit.js":169,"./js/vbtc.js":170,"./js/vcc.js":171,"./js/wavesexchange.js":172,"./js/whitebit.js":173,"./js/xbtce.js":174,"./js/xena.js":175,"./js/yobit.js":176,"./js/zaif.js":177,"./js/zb.js":178}],3:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -192,6 +187,7 @@ module.exports = Object.assign ({ version, Exchange, 'exchanges': Object.keys (e const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, ExchangeNotAvailable, OrderNotFound, InvalidOrder, CancelPending, RateLimitExceeded, InsufficientFunds, BadRequest, BadSymbol, PermissionDenied } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -222,6 +218,7 @@ module.exports = class aax extends Exchange { 'fetchOrder': true, 'fetchOrderBook': true, 'fetchOrders': true, + 'fetchStatus': true, 'fetchTicker': 'emulated', 'fetchTickers': true, 'fetchTrades': true, @@ -420,6 +417,37 @@ module.exports = class aax extends Exchange { }); } + async fetchStatus (params = {}) { + const response = await this.publicGetAnnouncementMaintenance (params); + // + // { + // "code": 1, + // "data": { + // "startTime":"2020-06-25T02:15:00.000Z", + // "endTime":"2020-06-25T02:45:00.000Z", + // "description":"Spot Trading :UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45),Futures Trading: UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45).We apologize for any inconvenience caused. Thank you for your patience and understanding.Should you have any enquiries, please do not hesitate our live chat support or via email at cs@aax.com." + // }, + // "message":"success", + // "ts":1593043237000 + // } + // + const data = this.safeValue (response, 'data', {}); + const timestamp = this.milliseconds (); + const startTime = this.parse8601 (this.safeString (data, 'startTime')); + const endTime = this.parse8601 (this.safeString (data, 'endTime')); + const update = { + 'updated': this.safeInteger (response, 'ts', timestamp), + }; + if (endTime !== undefined) { + const startTimeIsOk = (startTime === undefined) ? true : (timestamp < startTime); + const isOk = (timestamp > endTime) || startTimeIsOk; + update['eta'] = endTime; + update['status'] = isOk ? 'ok' : 'maintenance'; + } + this.status = this.extend (this.status, update); + return this.status; + } + async fetchMarkets (params = {}) { const response = await this.publicGetInstruments (params); // @@ -505,8 +533,8 @@ module.exports = class aax extends Exchange { const quote = this.safeCurrencyCode (quoteId); const status = this.safeString (market, 'status'); const active = (status === 'enable'); - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); const type = this.safeString (market, 'type'); let inverse = undefined; let linear = undefined; @@ -524,8 +552,8 @@ module.exports = class aax extends Exchange { symbol = base + '/' + quote; } const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; result.push ({ 'id': id, @@ -583,8 +611,8 @@ module.exports = class aax extends Exchange { const timestamp = this.safeInteger (ticker, 't'); const marketId = this.safeString (ticker, 's'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'c'); - const open = this.safeFloat (ticker, 'o'); + const last = this.safeNumber (ticker, 'c'); + const open = this.safeNumber (ticker, 'o'); let change = undefined; let percentage = undefined; let average = undefined; @@ -595,13 +623,13 @@ module.exports = class aax extends Exchange { } average = this.sum (last, open) / 2; } - const quoteVolume = this.safeFloat (ticker, 'v'); + const quoteVolume = this.safeNumber (ticker, 'v'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'h'), - 'low': this.safeFloat (ticker, 'l'), + 'high': this.safeNumber (ticker, 'h'), + 'low': this.safeNumber (ticker, 'l'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -748,8 +776,8 @@ module.exports = class aax extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let price = this.safeFloat2 (trade, 'p', 'filledPrice'); - const amount = this.safeFloat2 (trade, 'q', 'filledQty'); + let priceString = this.safeString2 (trade, 'p', 'filledPrice'); + const amountString = this.safeString2 (trade, 'q', 'filledQty'); const orderId = this.safeString (trade, 'orderID'); const isTaker = this.safeValue (trade, 'taker'); let takerOrMaker = undefined; @@ -763,17 +791,15 @@ module.exports = class aax extends Exchange { side = 'sell'; } if (side === undefined) { - side = (price > 0) ? 'buy' : 'sell'; - } - side = (price > 0) ? 'buy' : 'sell'; - price = Math.abs (price); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; + side = (priceString[0] === '-') ? 'sell' : 'buy'; } + priceString = (priceString[0] === '-') ? priceString.slice (1) : priceString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderType = this.parseOrderType (this.safeString (trade, 'orderType')); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -841,11 +867,11 @@ module.exports = class aax extends Exchange { // return [ this.safeTimestamp (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -930,12 +956,12 @@ module.exports = class aax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'unavailable'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'unavailable'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -963,7 +989,7 @@ module.exports = class aax extends Exchange { request['clOrdID'] = clientOrderId; params = this.omit (params, [ 'clOrdID', 'clientOrderId' ]); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { if ((orderType === 'STOP-LIMIT') || (orderType === 'STOP')) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders'); @@ -1081,7 +1107,7 @@ module.exports = class aax extends Exchange { // 'price': this.priceToPrecision (symbol, price), // 'stopPrice': this.priceToPrecision (symbol, stopPrice), }; - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1718,15 +1744,18 @@ module.exports = class aax extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const price = this.safeFloat (order, 'price'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const price = this.safeNumber (order, 'price'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'Post-Only'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeString (order, 'leavesQty'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + let remaining = this.safeNumber (order, 'leavesQty'); + if ((filled === 0) && (remaining === 0)) { + remaining = undefined; + } let cost = undefined; let lastTradeTimestamp = undefined; if (filled !== undefined) { @@ -1741,7 +1770,7 @@ module.exports = class aax extends Exchange { } } let fee = undefined; - const feeCost = this.safeFloat (order, 'commission'); + const feeCost = this.safeNumber (order, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -1970,496 +1999,7 @@ module.exports = class aax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],4:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { InsufficientFunds, OrderNotFound } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class acx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'acx', - 'name': 'ACX', - 'countries': [ 'AU' ], - 'rateLimit': 1000, - 'version': 'v2', - 'has': { - 'cancelOrder': true, - 'CORS': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchMarkets': true, - 'fetchOHLCV': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTime': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '12h': '720', - '1d': '1440', - '3d': '4320', - '1w': '10080', - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg', - 'extension': '.json', - 'api': 'https://acx.io/api', - 'www': 'https://acx.io', - 'doc': 'https://acx.io/documents/api_v2', - }, - 'api': { - 'public': { - 'get': [ - 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. - 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator - 'k', // Get OHLC(k line) of specific market - 'markets', // Get all available markets - 'order_book', // Get the order book of specified market - 'order_book/{market}', - 'tickers', // Get ticker of all markets - 'tickers/{market}', // Get ticker of specific market - 'timestamp', // Get server current time, in seconds since Unix epoch - 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. - 'trades/{market}', - ], - }, - 'private': { - 'get': [ - 'members/me', // Get your profile and accounts info - 'deposits', // Get your deposits history - 'deposit', // Get details of specific deposit - 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. - 'orders', // Get your orders, results is paginated - 'order', // Get information of specified order - 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. - 'withdraws', // Get your cryptocurrency withdraws - 'withdraw', // Get your cryptocurrency withdraw - ], - 'post': [ - 'orders', // Create a Sell/Buy order - 'orders/multi', // Create multiple sell/buy orders - 'orders/clear', // Cancel all my orders - 'order/delete', // Cancel an order - 'withdraw', // Create a withdraw - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': false, - 'percentage': true, - 'maker': 0.2 / 100, - 'taker': 0.2 / 100, - }, - 'funding': { - 'tierBased': false, - 'percentage': true, - 'withdraw': {}, // There is only 1% fee on withdrawals to your bank account. - }, - }, - 'commonCurrencies': { - 'PLA': 'Plair', - }, - 'exceptions': { - '2002': InsufficientFunds, - '2003': OrderNotFound, - }, - }); - } - - async fetchMarkets (params = {}) { - const markets = await this.publicGetMarkets (params); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = market['id']; - const symbol = market['name']; - let baseId = this.safeString (market, 'base_unit'); - let quoteId = this.safeString (market, 'quote_unit'); - if ((baseId === undefined) || (quoteId === undefined)) { - const ids = symbol.split ('/'); - baseId = ids[0].toLowerCase (); - quoteId = ids[1].toLowerCase (); - } - let base = baseId.toUpperCase (); - let quote = quoteId.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - // todo: find out their undocumented precision and limits - const precision = { - 'amount': 8, - 'price': 8, - }; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'precision': precision, - 'info': market, - 'active': undefined, - 'limits': this.limits, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetMembersMe (params); - const balances = this.safeValue (response, 'accounts'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 300 - } - const orderbook = await this.publicGetDepth (this.extend (request, params)); - const timestamp = this.safeTimestamp (orderbook, 'timestamp'); - return this.parseOrderBook (orderbook, timestamp); - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.safeTimestamp (ticker, 'at'); - ticker = ticker['ticker']; - let symbol = undefined; - if (market) { - symbol = market['symbol']; - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetTickers (params); - const ids = Object.keys (response); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let market = undefined; - let symbol = id; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } else { - let base = id.slice (0, 3); - let quote = id.slice (3, 6); - base = base.toUpperCase (); - quote = quote.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - symbol = base + '/' + quote; - } - result[symbol] = this.parseTicker (response[id], market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTickersMarket (this.extend (request, params)); - return this.parseTicker (response, market); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const id = this.safeString (trade, 'tid'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': undefined, - 'side': undefined, - 'order': undefined, - 'takerOrMaker': undefined, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), - 'cost': this.safeFloat (trade, 'funds'), - 'fee': undefined, - }; - } - - async fetchTime (params = {}) { - const response = await this.publicGetTimestamp (params); - // - // 1594911427 - // - return response * 1000; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - return [ - this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (limit === undefined) { - limit = 500; // default is 30 - } - const request = { - 'market': market['id'], - 'period': this.timeframes[timeframe], - 'limit': limit, - }; - if (since !== undefined) { - request['timestamp'] = parseInt (since / 1000); - } - const response = await this.publicGetK (this.extend (request, params)); - return this.parseOHLCVs (response, market, timeframe, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'done': 'closed', - 'wait': 'open', - 'cancel': 'canceled', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - const marketId = this.safeString (order, 'market'); - const symbol = this.safeSymbol (marketId, market); - const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const status = this.parseOrderStatus (this.safeString (order, 'state')); - const type = this.safeString (order, 'type'); - const side = this.safeString (order, 'side'); - const id = this.safeString (order, 'id'); - return { - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': this.safeFloat (order, 'price'), - 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'volume'), - 'filled': this.safeFloat (order, 'executed_volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'trades': undefined, - 'fee': undefined, - 'info': order, - 'cost': undefined, - 'average': undefined, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': parseInt (id), - }; - const response = await this.privateGetOrder (this.extend (request, params)); - return this.parseOrder (response); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'market': this.marketId (symbol), - 'side': side, - 'volume': amount.toString (), - 'ord_type': type, - }; - if (type === 'limit') { - request['price'] = price.toString (); - } - const response = await this.privatePostOrders (this.extend (request, params)); - const marketId = this.safeValue (response, 'market'); - const market = this.safeValue (this.markets_by_id, marketId); - return this.parseOrder (response, market); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - const response = await this.privatePostOrderDelete (this.extend (request, params)); - const order = this.parseOrder (response); - const status = order['status']; - if (status === 'closed' || status === 'canceled') { - throw new OrderNotFound (this.id + ' ' + this.json (order)); - } - return order; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - // they have XRP but no docs on memo/tag - const request = { - 'currency': currency['id'], - 'sum': amount, - 'address': address, - }; - const response = await this.privatePostWithdraw (this.extend (request, params)); - // withdrawal response is undocumented - return { - 'info': response, - 'id': undefined, - }; - } - - nonce () { - return this.milliseconds (); - } - - encodeParams (params) { - if ('orders' in params) { - const orders = params['orders']; - let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); - for (let i = 0; i < orders.length; i++) { - const order = orders[i]; - const keys = Object.keys (order); - for (let k = 0; k < keys.length; k++) { - const key = keys[k]; - const value = order[key]; - query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); - } - } - return query; - } - return this.urlencode (this.keysort (params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let request = '/api/' + this.version + '/' + this.implodeParams (path, params); - if ('extension' in this.urls) { - request += this.urls['extension']; - } - const query = this.omit (params, this.extractParams (path)); - let url = this.urls['api'] + request; - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce ().toString (); - const query = this.encodeParams (this.extend ({ - 'access_key': this.apiKey, - 'tonce': nonce, - }, params)); - const auth = method + '|' + request + '|' + query; - const signed = this.hmac (this.encode (auth), this.encode (this.secret)); - const suffix = query + '&signature=' + signed; - if (method === 'GET') { - url += '?' + suffix; - } else { - body = suffix; - headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; - } - if (code === 400) { - const error = this.safeValue (response, 'error'); - const errorCode = this.safeString (error, 'code'); - const feedback = this.id + ' ' + this.json (response); - this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); - // fallback to default error handler - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],5:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],4:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -2467,6 +2007,7 @@ module.exports = class acx extends Exchange { const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, BadSymbol, InvalidOrder, PermissionDenied, InvalidAddress, AuthenticationError, InvalidNonce, BadRequest, InsufficientFunds, OrderNotFound } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -2655,8 +2196,8 @@ module.exports = class aofex extends Exchange { const symbol = base + '/' + quote; const numericId = this.safeInteger (market, 'id'); const precision = this.safeValue (precisions, id, {}); - const makerFee = this.safeFloat (market, 'maker_fee'); - const takerFee = this.safeFloat (market, 'taker_fee'); + const makerFee = this.safeNumber (market, 'maker_fee'); + const takerFee = this.safeNumber (market, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -2674,12 +2215,12 @@ module.exports = class aofex extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -2707,11 +2248,11 @@ module.exports = class aofex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -2790,11 +2331,11 @@ module.exports = class aofex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -2817,8 +2358,8 @@ module.exports = class aofex extends Exchange { return { 'info': response, 'symbol': symbol, - 'maker': this.safeFloat (result, 'fromFee'), - 'taker': this.safeFloat (result, 'toFee'), + 'maker': this.safeNumber (result, 'fromFee'), + 'taker': this.safeNumber (result, 'toFee'), }; } @@ -2875,8 +2416,8 @@ module.exports = class aofex extends Exchange { if (market) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); let change = undefined; if (symbol !== undefined) { change = parseFloat (this.priceToPrecision (symbol, last - open)); @@ -2885,8 +2426,8 @@ module.exports = class aofex extends Exchange { } const average = this.sum (last, open) / 2; const percentage = change / open * 100; - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); let vwap = this.vwap (baseVolume, quoteVolume); if (vwap !== undefined) { vwap = parseFloat (this.priceToPrecision (symbol, vwap)); @@ -2895,8 +2436,8 @@ module.exports = class aofex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -3014,13 +2555,15 @@ module.exports = class aofex extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'number'); - let cost = this.safeFloat (trade, 'total_price'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'number'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total_price'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -3164,21 +2707,21 @@ module.exports = class aofex extends Exchange { const orderType = this.safeString (order, 'type'); const type = (orderType === '2') ? 'limit' : 'market'; const side = this.safeString (order, 'side'); - // const amount = this.safeFloat (order, 'number'); - // const price = this.safeFloat (order, 'price'); + // const amount = this.safeNumber (order, 'number'); + // const price = this.safeNumber (order, 'price'); let cost = undefined; let price = undefined; let amount = undefined; let average = undefined; - const number = this.safeFloat (order, 'number'); - const totalPrice = this.safeFloat (order, 'total_price'); + const number = this.safeNumber (order, 'number'); + const totalPrice = this.safeNumber (order, 'total_price'); if (type === 'limit') { amount = number; - price = this.safeFloat (order, 'price'); + price = this.safeNumber (order, 'price'); } else { - average = this.safeFloat (order, 'deal_price'); + average = this.safeNumber (order, 'deal_price'); if (side === 'buy') { - amount = this.safeFloat (order, 'deal_number'); + amount = this.safeNumber (order, 'deal_number'); } else { amount = number; } @@ -3561,7 +3104,1693 @@ module.exports = class aofex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],6:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],5:[function(require,module,exports){ +'use strict'; + +// --------------------------------------------------------------------------- + +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); + +// --------------------------------------------------------------------------- + +module.exports = class ascendex extends Exchange { + describe () { + return this.deepExtend (super.describe (), { + 'id': 'ascendex', + 'name': 'AscendEX', + 'countries': [ 'SG', 'CN' ], // Singapore, China + 'rateLimit': 500, + // new metainfo interface + 'has': { + 'CORS': false, + 'fetchMarkets': true, + 'fetchCurrencies': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchOHLCV': true, + 'fetchTrades': true, + 'fetchAccounts': true, + 'fetchBalance': true, + 'createOrder': true, + 'cancelOrder': true, + 'cancelAllOrders': true, + 'fetchDepositAddress': true, + 'fetchTransactions': true, + 'fetchDeposits': true, + 'fetchWithdrawals': true, + 'fetchOrder': true, + 'fetchOrders': true, + 'fetchOpenOrders': true, + 'fetchClosedOrders': true, + }, + 'timeframes': { + '1m': '1', + '5m': '5', + '15m': '15', + '30m': '30', + '1h': '60', + '2h': '120', + '4h': '240', + '6h': '360', + '12h': '720', + '1d': '1d', + '1w': '1w', + '1M': '1m', + }, + 'version': 'v1', + 'urls': { + 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg', + 'api': 'https://ascendex.com', + 'test': 'https://bitmax-test.io', + 'www': 'https://ascendex.com', + 'doc': [ + 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', + ], + 'fees': 'https://ascendex.com/en/feerate/transactionfee-traderate', + 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', + }, + 'api': { + 'public': { + 'get': [ + 'assets', + 'products', + 'ticker', + 'barhist/info', + 'barhist', + 'depth', + 'trades', + 'cash/assets', // not documented + 'cash/products', // not documented + 'margin/assets', // not documented + 'margin/products', // not documented + 'futures/collateral', + 'futures/contracts', + 'futures/ref-px', + 'futures/market-data', + 'futures/funding-rates', + ], + }, + 'accountCategory': { + 'get': [ + 'balance', + 'order/open', + 'order/status', + 'order/hist/current', + 'risk', + ], + 'post': [ + 'order', + 'order/batch', + ], + 'delete': [ + 'order', + 'order/all', + 'order/batch', + ], + }, + 'accountGroup': { + 'get': [ + 'cash/balance', + 'margin/balance', + 'margin/risk', + 'transfer', + 'futures/collateral-balance', + 'futures/position', + 'futures/risk', + 'futures/funding-payments', + 'order/hist', + ], + 'post': [ + 'futures/transfer/deposit', + 'futures/transfer/withdraw', + ], + }, + 'private': { + 'get': [ + 'info', + 'wallet/transactions', + 'wallet/deposit/address', // not documented + ], + }, + }, + 'fees': { + 'trading': { + 'feeSide': 'get', + 'tierBased': true, + 'percentage': true, + 'taker': 0.002, + 'maker': 0.002, + }, + }, + 'precisionMode': TICK_SIZE, + 'options': { + 'account-category': 'cash', // 'cash'/'margin'/'futures' + 'account-group': undefined, + 'fetchClosedOrders': { + 'method': 'accountGroupGetOrderHist', // 'accountGroupGetAccountCategoryOrderHistCurrent' + }, + }, + 'exceptions': { + 'exact': { + // not documented + '1900': BadRequest, // {"code":1900,"message":"Invalid Http Request Input"} + '2100': AuthenticationError, // {"code":2100,"message":"ApiKeyFailure"} + '5002': BadSymbol, // {"code":5002,"message":"Invalid Symbol"} + '6001': BadSymbol, // {"code":6001,"message":"Trading is disabled on symbol."} + '6010': InsufficientFunds, // {'code': 6010, 'message': 'Not enough balance.'} + '60060': InvalidOrder, // { 'code': 60060, 'message': 'The order is already filled or canceled.' } + '600503': InvalidOrder, // {"code":600503,"message":"Notional is too small."} + // documented + '100001': BadRequest, // INVALID_HTTP_INPUT Http request is invalid + '100002': BadRequest, // DATA_NOT_AVAILABLE Some required data is missing + '100003': BadRequest, // KEY_CONFLICT The same key exists already + '100004': BadRequest, // INVALID_REQUEST_DATA The HTTP request contains invalid field or argument + '100005': BadRequest, // INVALID_WS_REQUEST_DATA Websocket request contains invalid field or argument + '100006': BadRequest, // INVALID_ARGUMENT The arugment is invalid + '100007': BadRequest, // ENCRYPTION_ERROR Something wrong with data encryption + '100008': BadSymbol, // SYMBOL_ERROR Symbol does not exist or not valid for the request + '100009': AuthenticationError, // AUTHORIZATION_NEEDED Authorization is require for the API access or request + '100010': BadRequest, // INVALID_OPERATION The action is invalid or not allowed for the account + '100011': BadRequest, // INVALID_TIMESTAMP Not a valid timestamp + '100012': BadRequest, // INVALID_STR_FORMAT String format does not + '100013': BadRequest, // INVALID_NUM_FORMAT Invalid number input + '100101': ExchangeError, // UNKNOWN_ERROR Some unknown error + '150001': BadRequest, // INVALID_JSON_FORMAT Require a valid json object + '200001': AuthenticationError, // AUTHENTICATION_FAILED Authorization failed + '200002': ExchangeError, // TOO_MANY_ATTEMPTS Tried and failed too many times + '200003': ExchangeError, // ACCOUNT_NOT_FOUND Account not exist + '200004': ExchangeError, // ACCOUNT_NOT_SETUP Account not setup properly + '200005': ExchangeError, // ACCOUNT_ALREADY_EXIST Account already exist + '200006': ExchangeError, // ACCOUNT_ERROR Some error related with error + '200007': ExchangeError, // CODE_NOT_FOUND + '200008': ExchangeError, // CODE_EXPIRED Code expired + '200009': ExchangeError, // CODE_MISMATCH Code does not match + '200010': AuthenticationError, // PASSWORD_ERROR Wrong assword + '200011': ExchangeError, // CODE_GEN_FAILED Do not generate required code promptly + '200012': ExchangeError, // FAKE_COKE_VERIFY + '200013': ExchangeError, // SECURITY_ALERT Provide security alert message + '200014': PermissionDenied, // RESTRICTED_ACCOUNT Account is restricted for certain activity, such as trading, or withdraw. + '200015': PermissionDenied, // PERMISSION_DENIED No enough permission for the operation + '300001': InvalidOrder, // INVALID_PRICE Order price is invalid + '300002': InvalidOrder, // INVALID_QTY Order size is invalid + '300003': InvalidOrder, // INVALID_SIDE Order side is invalid + '300004': InvalidOrder, // INVALID_NOTIONAL Notional is too small or too large + '300005': InvalidOrder, // INVALID_TYPE Order typs is invalid + '300006': InvalidOrder, // INVALID_ORDER_ID Order id is invalid + '300007': InvalidOrder, // INVALID_TIME_IN_FORCE Time In Force in order request is invalid + '300008': InvalidOrder, // INVALID_ORDER_PARAMETER Some order parameter is invalid + '300009': InvalidOrder, // TRADING_VIOLATION Trading violation on account or asset + '300011': InsufficientFunds, // INVALID_BALANCE No enough account or asset balance for the trading + '300012': BadSymbol, // INVALID_PRODUCT Not a valid product supported by exchange + '300013': InvalidOrder, // INVALID_BATCH_ORDER Some or all orders are invalid in batch order request + '300020': InvalidOrder, // TRADING_RESTRICTED There is some trading restriction on account or asset + '300021': InvalidOrder, // TRADING_DISABLED Trading is disabled on account or asset + '300031': InvalidOrder, // NO_MARKET_PRICE No market price for market type order trading + '310001': InsufficientFunds, // INVALID_MARGIN_BALANCE No enough margin balance + '310002': InvalidOrder, // INVALID_MARGIN_ACCOUNT Not a valid account for margin trading + '310003': InvalidOrder, // MARGIN_TOO_RISKY Leverage is too high + '310004': BadSymbol, // INVALID_MARGIN_ASSET This asset does not support margin trading + '310005': InvalidOrder, // INVALID_REFERENCE_PRICE There is no valid reference price + '510001': ExchangeError, // SERVER_ERROR Something wrong with server. + '900001': ExchangeError, // HUMAN_CHALLENGE Human change do not pass + }, + 'broad': {}, + }, + 'commonCurrencies': { + 'BOND': 'BONDED', + 'BTCBEAR': 'BEAR', + 'BTCBULL': 'BULL', + }, + }); + } + + getAccount (params = {}) { + // get current or provided bitmax sub-account + const account = this.safeValue (params, 'account', this.options['account']); + return account.toLowerCase ().capitalize (); + } + + async fetchCurrencies (params = {}) { + const assets = await this.publicGetAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode" : "LTCBULL", + // "assetName" : "3X Long LTC Token", + // "precisionScale" : 9, + // "nativeScale" : 4, + // "withdrawalFee" : "0.2", + // "minWithdrawalAmt" : "1.0", + // "status" : "Normal" + // }, + // ] + // } + // + const margin = await this.publicGetMarginAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode":"BTT", + // "borrowAssetCode":"BTT-B", + // "interestAssetCode":"BTT-I", + // "nativeScale":0, + // "numConfirmations":1, + // "withdrawFee":"100.0", + // "minWithdrawalAmt":"1000.0", + // "statusCode":"Normal", + // "statusMessage":"", + // "interestRate":"0.001" + // } + // ] + // } + // + const cash = await this.publicGetCashAssets (params); + // + // { + // "code":0, + // "data":[ + // { + // "assetCode":"LTCBULL", + // "nativeScale":4, + // "numConfirmations":20, + // "withdrawFee":"0.2", + // "minWithdrawalAmt":"1.0", + // "statusCode":"Normal", + // "statusMessage":"" + // } + // ] + // } + // + const assetsData = this.safeValue (assets, 'data', []); + const marginData = this.safeValue (margin, 'data', []); + const cashData = this.safeValue (cash, 'data', []); + const assetsById = this.indexBy (assetsData, 'assetCode'); + const marginById = this.indexBy (marginData, 'assetCode'); + const cashById = this.indexBy (cashData, 'assetCode'); + const dataById = this.deepExtend (assetsById, marginById, cashById); + const ids = Object.keys (dataById); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + const currency = dataById[id]; + const code = this.safeCurrencyCode (id); + const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); + // why would the exchange API have different names for the same field + const fee = this.safeNumber2 (currency, 'withdrawFee', 'withdrawalFee'); + const status = this.safeString2 (currency, 'status', 'statusCode'); + const active = (status === 'Normal'); + const margin = ('borrowAssetCode' in currency); + result[code] = { + 'id': id, + 'code': code, + 'info': currency, + 'type': undefined, + 'margin': margin, + 'name': this.safeString (currency, 'assetName'), + 'active': active, + 'fee': fee, + 'precision': precision, + 'limits': { + 'amount': { + 'min': Math.pow (10, -precision), + 'max': undefined, + }, + 'price': { + 'min': Math.pow (10, -precision), + 'max': undefined, + }, + 'cost': { + 'min': undefined, + 'max': undefined, + }, + 'withdraw': { + 'min': this.safeNumber (currency, 'minWithdrawalAmt'), + 'max': undefined, + }, + }, + }; + } + return result; + } + + async fetchMarkets (params = {}) { + const products = await this.publicGetProducts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"LBA/BTC", + // "baseAsset":"LBA", + // "quoteAsset":"BTC", + // "status":"Normal", + // "minNotional":"0.000625", + // "maxNotional":"6.25", + // "marginTradable":false, + // "commissionType":"Quote", + // "commissionReserveRate":"0.001", + // "tickSize":"0.000000001", + // "lotSize":"1" + // }, + // ] + // } + // + const cash = await this.publicGetCashProducts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"QTUM/BTC", + // "domain":"BTC", + // "tradingStartTime":1569506400000, + // "collapseDecimals":"0.0001,0.000001,0.00000001", + // "minQty":"0.000000001", + // "maxQty":"1000000000", + // "minNotional":"0.000625", + // "maxNotional":"12.5", + // "statusCode":"Normal", + // "statusMessage":"", + // "tickSize":"0.00000001", + // "useTick":false, + // "lotSize":"0.1", + // "useLot":false, + // "commissionType":"Quote", + // "commissionReserveRate":"0.001", + // "qtyScale":1, + // "priceScale":8, + // "notionalScale":4 + // } + // ] + // } + // + const futures = await this.publicGetFuturesContracts (params); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"BTC-PERP", + // "tradingStartTime":1579701600000, + // "collapseDecimals":"1,0.1,0.01", + // "minQty":"0.000000001", + // "maxQty":"1000000000", + // "minNotional":"5", + // "maxNotional":"1000000", + // "statusCode":"Normal", + // "statusMessage":"", + // "tickSize":"0.25", + // "lotSize":"0.0001", + // "priceScale":2, + // "qtyScale":4, + // "notionalScale":2 + // } + // ] + // } + // + const productsData = this.safeValue (products, 'data', []); + const productsById = this.indexBy (productsData, 'symbol'); + const cashData = this.safeValue (cash, 'data', []); + const futuresData = this.safeValue (futures, 'data', []); + const cashAndFuturesData = this.arrayConcat (cashData, futuresData); + const cashAndFuturesById = this.indexBy (cashAndFuturesData, 'symbol'); + const dataById = this.deepExtend (productsById, cashAndFuturesById); + const ids = Object.keys (dataById); + const result = []; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + const market = dataById[id]; + const baseId = this.safeString (market, 'baseAsset'); + const quoteId = this.safeString (market, 'quoteAsset'); + const base = this.safeCurrencyCode (baseId); + const quote = this.safeCurrencyCode (quoteId); + const precision = { + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), + }; + const status = this.safeString (market, 'status'); + const active = (status === 'Normal'); + const type = ('useLot' in market) ? 'spot' : 'future'; + const spot = (type === 'spot'); + const future = (type === 'future'); + let symbol = id; + if (!future) { + symbol = base + '/' + quote; + } + result.push ({ + 'id': id, + 'symbol': symbol, + 'base': base, + 'quote': quote, + 'baseId': baseId, + 'quoteId': quoteId, + 'info': market, + 'type': type, + 'spot': spot, + 'future': future, + 'active': active, + 'precision': precision, + 'limits': { + 'amount': { + 'min': this.safeNumber (market, 'minQty'), + 'max': this.safeNumber (market, 'maxQty'), + }, + 'price': { + 'min': this.safeNumber (market, 'tickSize'), + 'max': undefined, + }, + 'cost': { + 'min': this.safeNumber (market, 'minNotional'), + 'max': this.safeNumber (market, 'maxNotional'), + }, + }, + }); + } + return result; + } + + async fetchAccounts (params = {}) { + let accountGroup = this.safeString (this.options, 'account-group'); + let response = undefined; + if (accountGroup === undefined) { + response = await this.privateGetInfo (params); + // + // { + // "code":0, + // "data":{ + // "email":"igor.kroitor@gmail.com", + // "accountGroup":8, + // "viewPermission":true, + // "tradePermission":true, + // "transferPermission":true, + // "cashAccount":["cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda"], + // "marginAccount":["martXoh1v1N3EMQC5FDtSj5VHso8aI2Z"], + // "futuresAccount":["futc9r7UmFJAyBY2rE3beA2JFxav2XFF"], + // "userUID":"U6491137460" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + accountGroup = this.safeString (data, 'accountGroup'); + this.options['account-group'] = accountGroup; + } + return [ + { + 'id': accountGroup, + 'type': undefined, + 'currency': undefined, + 'info': response, + }, + ]; + } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchBalance', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeString (account, 'id'); + const request = { + 'account-group': accountGroup, + }; + let method = 'accountCategoryGetBalance'; + if (accountCategory === 'futures') { + method = 'accountGroupGetFuturesCollateralBalance'; + } else { + request['account-category'] = accountCategory; + } + const response = await this[method] (this.extend (request, params)); + // + // cash + // + // { + // 'code': 0, + // 'data': [ + // { + // 'asset': 'BCHSV', + // 'totalBalance': '64.298000048', + // 'availableBalance': '64.298000048', + // }, + // ] + // } + // + // margin + // + // { + // 'code': 0, + // 'data': [ + // { + // 'asset': 'BCHSV', + // 'totalBalance': '64.298000048', + // 'availableBalance': '64.298000048', + // 'borrowed': '0', + // 'interest': '0', + // }, + // ] + // } + // + // futures + // + // { + // "code":0, + // "data":[ + // {"asset":"BTC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"9456.59"}, + // {"asset":"ETH","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"235.95"}, + // {"asset":"USDT","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"}, + // {"asset":"USDC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00035"}, + // {"asset":"PAX","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00045"}, + // {"asset":"USDTR","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"} + // ] + // } + // + const result = { 'info': response }; + const balances = this.safeValue (response, 'data', []); + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); + const account = this.account (); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async fetchOrderBook (symbol, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + const response = await this.publicGetDepth (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "m":"depth-snapshot", + // "symbol":"BTC-PERP", + // "data":{ + // "ts":1590223998202, + // "seqnum":115444921, + // "asks":[ + // ["9207.5","18.2383"], + // ["9207.75","18.8235"], + // ["9208","10.7873"], + // ], + // "bids":[ + // ["9207.25","0.4009"], + // ["9207","0.003"], + // ["9206.5","0.003"], + // ] + // } + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const orderbook = this.safeValue (data, 'data', {}); + const timestamp = this.safeInteger (orderbook, 'ts'); + const result = this.parseOrderBook (orderbook, timestamp); + result['nonce'] = this.safeInteger (orderbook, 'seqnum'); + return result; + } + + parseTicker (ticker, market = undefined) { + // + // { + // "symbol":"QTUM/BTC", + // "open":"0.00016537", + // "close":"0.00019077", + // "high":"0.000192", + // "low":"0.00016537", + // "volume":"846.6", + // "ask":["0.00018698","26.2"], + // "bid":["0.00018408","503.7"], + // "type":"spot" + // } + // + const timestamp = undefined; + const marketId = this.safeString (ticker, 'symbol'); + let symbol = undefined; + if (marketId in this.markets_by_id) { + market = this.markets_by_id[marketId]; + } else if (marketId !== undefined) { + const type = this.safeString (ticker, 'type'); + if (type === 'spot') { + const [ baseId, quoteId ] = marketId.split ('/'); + const base = this.safeCurrencyCode (baseId); + const quote = this.safeCurrencyCode (quoteId); + symbol = base + '/' + quote; + } + } + if ((symbol === undefined) && (market !== undefined)) { + symbol = market['symbol']; + } + const close = this.safeNumber (ticker, 'close'); + const bid = this.safeValue (ticker, 'bid', []); + const ask = this.safeValue (ticker, 'ask', []); + const open = this.safeNumber (ticker, 'open'); + let change = undefined; + let percentage = undefined; + let average = undefined; + if ((open !== undefined) && (close !== undefined)) { + change = close - open; + if (open > 0) { + percentage = change / open * 100; + } + average = this.sum (open, close) / 2; + } + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 0), + 'bidVolume': this.safeNumber (bid, 1), + 'ask': this.safeNumber (ask, 0), + 'askVolume': this.safeNumber (ask, 1), + 'vwap': undefined, + 'open': open, + 'close': close, + 'last': close, + 'previousClose': undefined, // previous day close + 'change': change, + 'percentage': percentage, + 'average': average, + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + const response = await this.publicGetTicker (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "symbol":"BTC-PERP", // or "BTC/USDT" + // "open":"9073", + // "close":"9185.75", + // "high":"9185.75", + // "low":"9185.75", + // "volume":"576.8334", + // "ask":["9185.75","15.5863"], + // "bid":["9185.5","0.003"], + // "type":"derivatives", // or "spot" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + return this.parseTicker (data, market); + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (symbols !== undefined) { + const marketIds = this.marketIds (symbols); + request['symbol'] = marketIds.join (','); + } + const response = await this.publicGetTicker (this.extend (request, params)); + // + // { + // "code":0, + // "data":[ + // { + // "symbol":"QTUM/BTC", + // "open":"0.00016537", + // "close":"0.00019077", + // "high":"0.000192", + // "low":"0.00016537", + // "volume":"846.6", + // "ask":["0.00018698","26.2"], + // "bid":["0.00018408","503.7"], + // "type":"spot" + // } + // ] + // } + // + const data = this.safeValue (response, 'data', []); + return this.parseTickers (data, symbols); + } + + parseOHLCV (ohlcv, market = undefined) { + // + // { + // "m":"bar", + // "s":"BTC/USDT", + // "data":{ + // "i":"1", + // "ts":1590228000000, + // "o":"9139.59", + // "c":"9131.94", + // "h":"9139.99", + // "l":"9121.71", + // "v":"25.20648" + // } + // } + // + const data = this.safeValue (ohlcv, 'data', {}); + return [ + this.safeInteger (data, 'ts'), + this.safeNumber (data, 'o'), + this.safeNumber (data, 'h'), + this.safeNumber (data, 'l'), + this.safeNumber (data, 'c'), + this.safeNumber (data, 'v'), + ]; + } + + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + 'interval': this.timeframes[timeframe], + }; + // if since and limit are not specified + // the exchange will return just 1 last candle by default + const duration = this.parseTimeframe (timeframe); + const options = this.safeValue (this.options, 'fetchOHLCV', {}); + const defaultLimit = this.safeInteger (options, 'limit', 500); + if (since !== undefined) { + request['from'] = since; + if (limit === undefined) { + limit = defaultLimit; + } else { + limit = Math.min (limit, defaultLimit); + } + request['to'] = this.sum (since, limit * duration * 1000, 1); + } else if (limit !== undefined) { + request['n'] = limit; // max 500 + } + const response = await this.publicGetBarhist (this.extend (request, params)); + // + // { + // "code":0, + // "data":[ + // { + // "m":"bar", + // "s":"BTC/USDT", + // "data":{ + // "i":"1", + // "ts":1590228000000, + // "o":"9139.59", + // "c":"9131.94", + // "h":"9139.99", + // "l":"9121.71", + // "v":"25.20648" + // } + // } + // ] + // } + // + const data = this.safeValue (response, 'data', []); + return this.parseOHLCVs (data, market, timeframe, since, limit); + } + + parseTrade (trade, market = undefined) { + // + // public fetchTrades + // + // { + // "p":"9128.5", // price + // "q":"0.0030", // quantity + // "ts":1590229002385, // timestamp + // "bm":false, // if true, the buyer is the market maker, we only use this field to "define the side" of a public trade + // "seqnum":180143985289898554 + // } + // + const timestamp = this.safeInteger (trade, 'ts'); + const priceString = this.safeString2 (trade, 'price', 'p'); + const amountString = this.safeString (trade, 'q'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const buyerIsMaker = this.safeValue (trade, 'bm', false); + const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; + const side = buyerIsMaker ? 'buy' : 'sell'; + let symbol = undefined; + if ((symbol === undefined) && (market !== undefined)) { + symbol = market['symbol']; + } + return { + 'info': trade, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'symbol': symbol, + 'id': undefined, + 'order': undefined, + 'type': undefined, + 'takerOrMaker': makerOrTaker, + 'side': side, + 'price': price, + 'amount': amount, + 'cost': cost, + 'fee': undefined, + }; + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'symbol': market['id'], + }; + if (limit !== undefined) { + request['n'] = limit; // max 100 + } + const response = await this.publicGetTrades (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "m":"trades", + // "symbol":"BTC-PERP", + // "data":[ + // {"p":"9128.5","q":"0.0030","ts":1590229002385,"bm":false,"seqnum":180143985289898554}, + // {"p":"9129","q":"0.0030","ts":1590229002642,"bm":false,"seqnum":180143985289898587}, + // {"p":"9129.5","q":"0.0030","ts":1590229021306,"bm":false,"seqnum":180143985289899043} + // ] + // } + // } + // + const records = this.safeValue (response, 'data', []); + const trades = this.safeValue (records, 'data', []); + return this.parseTrades (trades, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'PendingNew': 'open', + 'New': 'open', + 'PartiallyFilled': 'open', + 'Filled': 'closed', + 'Canceled': 'canceled', + 'Rejected': 'rejected', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + // + // createOrder + // + // { + // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", + // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", + // "orderType": "Market", + // "symbol": "BTC/USDT", + // "timestamp": 1573576916201 + // } + // + // fetchOrder, fetchOpenOrders, fetchClosedOrders + // + // { + // "symbol": "BTC/USDT", + // "price": "8131.22", + // "orderQty": "0.00082", + // "orderType": "Market", + // "avgPx": "7392.02", + // "cumFee": "0.005152238", + // "cumFilledQty": "0.00082", + // "errorCode": "", + // "feeAsset": "USDT", + // "lastExecTime": 1575953151764, + // "orderId": "a16eee20b6750866943712zWEDdAjt3", + // "seqNum": 2623469, + // "side": "Buy", + // "status": "Filled", + // "stopPrice": "", + // "execInst": "NULL_VAL" + // } + // + // { + // "ac": "FUTURES", + // "accountId": "testabcdefg", + // "avgPx": "0", + // "cumFee": "0", + // "cumQty": "0", + // "errorCode": "NULL_VAL", + // "execInst": "NULL_VAL", + // "feeAsset": "USDT", + // "lastExecTime": 1584072844085, + // "orderId": "r170d21956dd5450276356bbtcpKa74", + // "orderQty": "1.1499", + // "orderType": "Limit", + // "price": "4000", + // "sendingTime": 1584072841033, + // "seqNum": 24105338, + // "side": "Buy", + // "status": "Canceled", + // "stopPrice": "", + // "symbol": "BTC-PERP" + // }, + // + const status = this.parseOrderStatus (this.safeString (order, 'status')); + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '/'); + const timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); + const lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const average = this.safeNumber (order, 'avgPx'); + const filled = this.safeNumber2 (order, 'cumFilledQty', 'cumQty'); + const id = this.safeString (order, 'orderId'); + let clientOrderId = this.safeString (order, 'id'); + if (clientOrderId !== undefined) { + if (clientOrderId.length < 1) { + clientOrderId = undefined; + } + } + const type = this.safeStringLower (order, 'orderType'); + const side = this.safeStringLower (order, 'side'); + const feeCost = this.safeNumber (order, 'cumFee'); + let fee = undefined; + if (feeCost !== undefined) { + const feeCurrencyId = this.safeString (order, 'feeAsset'); + const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); + fee = { + 'cost': feeCost, + 'currency': feeCurrencyCode, + }; + } + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ + 'info': order, + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': lastTradeTimestamp, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': price, + 'stopPrice': stopPrice, + 'amount': amount, + 'cost': undefined, + 'average': average, + 'filled': filled, + 'remaining': undefined, + 'status': status, + 'fee': fee, + 'trades': undefined, + }); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const market = this.market (symbol); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'createOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'symbol': market['id'], + 'time': this.milliseconds (), + 'orderQty': this.amountToPrecision (symbol, amount), + 'orderType': type, // "limit", "market", "stop_market", "stop_limit" + 'side': side, // "buy" or "sell" + // 'orderPrice': this.priceToPrecision (symbol, price), + // 'stopPrice': this.priceToPrecision (symbol, stopPrice), // required for stop orders + // 'postOnly': 'false', // 'false', 'true' + // 'timeInForce': 'GTC', // GTC, IOC, FOK + // 'respInst': 'ACK', // ACK, 'ACCEPT, DONE + }; + if (clientOrderId !== undefined) { + request['id'] = clientOrderId; + params = this.omit (params, [ 'clientOrderId', 'id' ]); + } + if ((type === 'limit') || (type === 'stop_limit')) { + request['orderPrice'] = this.priceToPrecision (symbol, price); + } + if ((type === 'stop_limit') || (type === 'stop_market')) { + const stopPrice = this.safeNumber (params, 'stopPrice'); + if (stopPrice === undefined) { + throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); + } else { + request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); + params = this.omit (params, 'stopPrice'); + } + } + const response = await this.accountCategoryPostOrder (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "ac": "MARGIN", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "action": "place-order", + // "info": { + // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", + // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", + // "orderType": "Market", + // "symbol": "BTC/USDT", + // "timestamp": 1573576916201 + // }, + // "status": "Ack" + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const info = this.safeValue (data, 'info', {}); + return this.parseOrder (info, market); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'orderId': id, + }; + const response = await this.accountCategoryGetOrderStatus (this.extend (request, params)); + // + // { + // "code": 0, + // "accountCategory": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "data": [ + // { + // "symbol": "BTC/USDT", + // "price": "8131.22", + // "orderQty": "0.00082", + // "orderType": "Market", + // "avgPx": "7392.02", + // "cumFee": "0.005152238", + // "cumFilledQty": "0.00082", + // "errorCode": "", + // "feeAsset": "USDT", + // "lastExecTime": 1575953151764, + // "orderId": "a16eee20b6750866943712zWEDdAjt3", + // "seqNum": 2623469, + // "side": "Buy", + // "status": "Filled", + // "stopPrice": "", + // "execInst": "NULL_VAL" + // } + // ] + // } + // + const data = this.safeValue (response, 'data', {}); + return this.parseOrder (data); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + } + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'fetchOpenOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + }; + const response = await this.accountCategoryGetOrderOpen (this.extend (request, params)); + // + // { + // "ac": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "code": 0, + // "data": [ + // { + // "avgPx": "0", // Average filled price of the order + // "cumFee": "0", // cumulative fee paid for this order + // "cumFilledQty": "0", // cumulative filled quantity + // "errorCode": "", // error code; could be empty + // "feeAsset": "USDT", // fee asset + // "lastExecTime": 1576019723550, // The last execution time of the order + // "orderId": "s16ef21882ea0866943712034f36d83", // server provided orderId + // "orderQty": "0.0083", // order quantity + // "orderType": "Limit", // order type + // "price": "7105", // order price + // "seqNum": 8193258, // sequence number + // "side": "Buy", // order side + // "status": "New", // order status on matching engine + // "stopPrice": "", // only available for stop market and stop limit orders; otherwise empty + // "symbol": "BTC/USDT", + // "execInst": "NULL_VAL" // execution instruction + // }, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + if (accountCategory === 'futures') { + return this.parseOrders (data, market, since, limit); + } + // a workaround for https://github.com/ccxt/ccxt/issues/7187 + const orders = []; + for (let i = 0; i < data.length; i++) { + const order = this.parseOrder (data[i], market); + orders.push (order); + } + return this.filterBySymbolSinceLimit (orders, symbol, since, limit); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + } + const defaultAccountCategory = this.safeString (this.options, 'account-category'); + const options = this.safeValue (this.options, 'fetchClosedOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + // 'category': accountCategory, + // 'symbol': market['id'], + // 'orderType': 'market', // optional, string + // 'side': 'buy', // or 'sell', optional, case insensitive. + // 'status': 'Filled', // "Filled", "Canceled", or "Rejected" + // 'startTime': exchange.milliseconds (), + // 'endTime': exchange.milliseconds (), + // 'page': 1, + // 'pageSize': 100, + }; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const method = this.safeValue (options, 'method', 'accountGroupGetOrderHist'); + if (method === 'accountGroupGetOrderHist') { + if (accountCategory !== undefined) { + request['category'] = accountCategory; + } + } else { + request['account-category'] = accountCategory; + } + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['pageSize'] = limit; + } + const response = await this[method] (this.extend (request, params)); + // + // accountCategoryGetOrderHistCurrent + // + // { + // "code":0, + // "accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda", + // "ac":"CASH", + // "data":[ + // { + // "seqNum":15561826728, + // "orderId":"a17294d305c0U6491137460bethu7kw9", + // "symbol":"ETH/USDT", + // "orderType":"Limit", + // "lastExecTime":1591635618200, + // "price":"200", + // "orderQty":"0.1", + // "side":"Buy", + // "status":"Canceled", + // "avgPx":"0", + // "cumFilledQty":"0", + // "stopPrice":"", + // "errorCode":"", + // "cumFee":"0", + // "feeAsset":"USDT", + // "execInst":"NULL_VAL" + // } + // ] + // } + // + // accountGroupGetOrderHist + // + // { + // "code": 0, + // "data": { + // "data": [ + // { + // "ac": "FUTURES", + // "accountId": "testabcdefg", + // "avgPx": "0", + // "cumFee": "0", + // "cumQty": "0", + // "errorCode": "NULL_VAL", + // "execInst": "NULL_VAL", + // "feeAsset": "USDT", + // "lastExecTime": 1584072844085, + // "orderId": "r170d21956dd5450276356bbtcpKa74", + // "orderQty": "1.1499", + // "orderType": "Limit", + // "price": "4000", + // "sendingTime": 1584072841033, + // "seqNum": 24105338, + // "side": "Buy", + // "status": "Canceled", + // "stopPrice": "", + // "symbol": "BTC-PERP" + // }, + // ], + // "hasNext": False, + // "limit": 500, + // "page": 1, + // "pageSize": 20 + // } + // } + // + let data = this.safeValue (response, 'data'); + const isArray = Array.isArray (data); + if (!isArray) { + data = this.safeValue (data, 'data', []); + } + return this.parseOrders (data, market, since, limit); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); + } + await this.loadMarkets (); + await this.loadAccounts (); + const market = this.market (symbol); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'cancelOrder', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'symbol': market['id'], + 'time': this.milliseconds (), + 'id': 'foobar', + }; + if (clientOrderId === undefined) { + request['orderId'] = id; + } else { + request['id'] = clientOrderId; + params = this.omit (params, [ 'clientOrderId', 'id' ]); + } + const response = await this.accountCategoryDeleteOrder (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "ac": "CASH", + // "action": "cancel-order", + // "status": "Ack", + // "info": { + // "id": "wv8QGquoeamhssvQBeHOHGQCGlcBjj23", + // "orderId": "16e6198afb4s8bXHbAwwoqDo2ebc19dc", + // "orderType": "", // could be empty + // "symbol": "ETH/USDT", + // "timestamp": 1573594877822 + // } + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const info = this.safeValue (data, 'info', {}); + return this.parseOrder (info, market); + } + + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + await this.loadAccounts (); + const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); + const options = this.safeValue (this.options, 'cancelAllOrders', {}); + let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); + accountCategory = this.safeString (params, 'account-category', accountCategory); + params = this.omit (params, 'account-category'); + const account = this.safeValue (this.accounts, 0, {}); + const accountGroup = this.safeValue (account, 'id'); + const request = { + 'account-group': accountGroup, + 'account-category': accountCategory, + 'time': this.milliseconds (), + }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.accountCategoryDeleteOrderAll (this.extend (request, params)); + // + // { + // "code": 0, + // "data": { + // "ac": "CASH", + // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", + // "action": "cancel-all", + // "info": { + // "id": "2bmYvi7lyTrneMzpcJcf2D7Pe9V1P9wy", + // "orderId": "", + // "orderType": "NULL_VAL", + // "symbol": "", + // "timestamp": 1574118495462 + // }, + // "status": "Ack" + // } + // } + // + return response; + } + + parseDepositAddress (depositAddress, currency = undefined) { + // + // { + // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // destTag: "", + // tagType: "", + // tagId: "", + // chainName: "ERC20", + // numConfirmations: 20, + // withdrawalFee: 1, + // nativeScale: 4, + // tips: [] + // } + // + const address = this.safeString (depositAddress, 'address'); + const tagId = this.safeString (depositAddress, 'tagId'); + const tag = this.safeString (depositAddress, tagId); + this.checkAddress (address); + const code = (currency === undefined) ? undefined : currency['code']; + return { + 'currency': code, + 'address': address, + 'tag': tag, + 'info': depositAddress, + }; + } + + async fetchDepositAddress (code, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const chainName = this.safeString (params, 'chainName'); + params = this.omit (params, 'chainName'); + const request = { + 'asset': currency['id'], + }; + const response = await this.privateGetWalletDepositAddress (this.extend (request, params)); + // + // { + // "code":0, + // "data":{ + // "asset":"USDT", + // "assetName":"Tether", + // "address":[ + // { + // "address":"1N22odLHXnLPCjC8kwBJPTayarr9RtPod6", + // "destTag":"", + // "tagType":"", + // "tagId":"", + // "chainName":"Omni", + // "numConfirmations":3, + // "withdrawalFee":4.7, + // "nativeScale":4, + // "tips":[] + // }, + // { + // "address":"0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // "destTag":"", + // "tagType":"", + // "tagId":"", + // "chainName":"ERC20", + // "numConfirmations":20, + // "withdrawalFee":1.0, + // "nativeScale":4, + // "tips":[] + // } + // ] + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const addresses = this.safeValue (data, 'address', []); + const numAddresses = addresses.length; + let address = undefined; + if (numAddresses > 1) { + const addressesByChainName = this.indexBy (addresses, 'chainName'); + if (chainName === undefined) { + const chainNames = Object.keys (addressesByChainName); + const chains = chainNames.join (', '); + throw new ArgumentsRequired (this.id + ' fetchDepositAddress returned more than one address, a chainName parameter is required, one of ' + chains); + } + address = this.safeValue (addressesByChainName, chainName, {}); + } else { + // first address + address = this.safeValue (addresses, 0, {}); + } + const result = this.parseDepositAddress (address, currency); + return this.extend (result, { + 'info': response, + }); + } + + async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'txType': 'deposit', + }; + return await this.fetchTransactions (code, since, limit, this.extend (request, params)); + } + + async fetchWithdrawals (code = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'txType': 'withdrawal', + }; + return await this.fetchTransactions (code, since, limit, this.extend (request, params)); + } + + async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'asset': currency['id'], + // 'page': 1, + // 'pageSize': 20, + // 'startTs': this.milliseconds (), + // 'endTs': this.milliseconds (), + // 'txType': undefned, // deposit, withdrawal + }; + let currency = undefined; + if (code !== undefined) { + currency = this.currency (code); + request['asset'] = currency['id']; + } + if (since !== undefined) { + request['startTs'] = since; + } + if (limit !== undefined) { + request['pageSize'] = limit; + } + const response = await this.privateGetWalletTransactions (this.extend (request, params)); + // + // { + // code: 0, + // data: { + // data: [ + // { + // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", + // time: 1591606166000, + // asset: "USDT", + // transactionType: "deposit", + // amount: "25", + // commission: "0", + // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", + // status: "pending", + // numConfirmed: 8, + // numConfirmations: 20, + // destAddress: { address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722" } + // } + // ], + // page: 1, + // pageSize: 20, + // hasNext: false + // } + // } + // + const data = this.safeValue (response, 'data', {}); + const transactions = this.safeValue (data, 'data', []); + return this.parseTransactions (transactions, currency, since, limit); + } + + parseTransactionStatus (status) { + const statuses = { + 'reviewing': 'pending', + 'pending': 'pending', + 'confirmed': 'ok', + 'rejected': 'rejected', + }; + return this.safeString (statuses, status, status); + } + + parseTransaction (transaction, currency = undefined) { + // + // { + // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", + // time: 1591606166000, + // asset: "USDT", + // transactionType: "deposit", + // amount: "25", + // commission: "0", + // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", + // status: "pending", + // numConfirmed: 8, + // numConfirmations: 20, + // destAddress: { + // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", + // destTag: "..." // for currencies that have it + // } + // } + // + const id = this.safeString (transaction, 'requestId'); + const amount = this.safeNumber (transaction, 'amount'); + const destAddress = this.safeValue (transaction, 'destAddress', {}); + const address = this.safeString (destAddress, 'address'); + const tag = this.safeString (destAddress, 'destTag'); + const txid = this.safeString (transaction, 'networkTransactionId'); + const type = this.safeString (transaction, 'transactionType'); + const timestamp = this.safeInteger (transaction, 'time'); + const currencyId = this.safeString (transaction, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); + const feeCost = this.safeNumber (transaction, 'commission'); + return { + 'info': transaction, + 'id': id, + 'currency': code, + 'amount': amount, + 'address': address, + 'addressTo': address, + 'addressFrom': undefined, + 'tag': tag, + 'tagTo': tag, + 'tagFrom': undefined, + 'status': status, + 'type': type, + 'updated': undefined, + 'txid': txid, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'fee': { + 'currency': code, + 'cost': feeCost, + }, + }; + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let url = ''; + let query = params; + const accountCategory = (api === 'accountCategory'); + if (accountCategory || (api === 'accountGroup')) { + url += this.implodeParams ('/{account-group}', params); + query = this.omit (params, 'account-group'); + } + const request = this.implodeParams (path, query); + url += '/api/pro/' + this.version; + if (accountCategory) { + url += this.implodeParams ('/{account-category}', query); + query = this.omit (query, 'account-category'); + } + url += '/' + request; + query = this.omit (query, this.extractParams (path)); + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const timestamp = this.milliseconds ().toString (); + const payload = timestamp + '+' + request; + const hmac = this.hmac (this.encode (payload), this.encode (this.secret), 'sha256', 'base64'); + headers = { + 'x-auth-key': this.apiKey, + 'x-auth-timestamp': timestamp, + 'x-auth-signature': hmac, + }; + if (method === 'GET') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + headers['Content-Type'] = 'application/json'; + body = this.json (query); + } + } + url = this.urls['api'] + url; + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; // fallback to default error handler + } + // + // {'code': 6010, 'message': 'Not enough balance.'} + // {'code': 60060, 'message': 'The order is already filled or canceled.'} + // {"code":2100,"message":"ApiKeyFailure"} + // {"code":300001,"message":"Price is too low from market price.","reason":"INVALID_PRICE","accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda","ac":"CASH","action":"place-order","status":"Err","info":{"symbol":"BTC/USDT"}} + // + const code = this.safeString (response, 'code'); + const message = this.safeString (response, 'message'); + const error = (code !== undefined) && (code !== '0'); + if (error || (message !== undefined)) { + const feedback = this.id + ' ' + body; + this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); + this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); + this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); + throw new ExchangeError (feedback); // unknown message + } + } +}; + +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],6:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -3608,6 +4837,7 @@ const { // eslint-disable-line object-curly-newline const { TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING } = functions.precisionConstants const BN = require ('../static_dependencies/BN/bn') +const Precise = require ('./Precise') // ---------------------------------------------------------------------------- @@ -3788,6 +5018,11 @@ module.exports = class Exchange { this.minFundingAddressLength = 1 // used in checkAddress this.substituteCommonCurrencyCodes = true // reserved + this.quoteJsonNumbers = true // treat numbers in json as quoted precise strings + this.number = Number // or String (a pointer to a function) + + // whether fees should be summed by currency code + this.reduceFees = true // do not delete this line, it is needed for users to be able to define their own fetchImplementation this.fetchImplementation = defaultFetch @@ -4083,7 +5318,7 @@ module.exports = class Exchange { parseJson (jsonString) { try { if (this.isJsonEncodedObject (jsonString)) { - return JSON.parse (jsonString) + return JSON.parse (this.onJsonResponse (jsonString)) } } catch (e) { // SyntaxError @@ -4162,7 +5397,11 @@ module.exports = class Exchange { } onRestResponse (statusCode, statusText, url, method, responseHeaders, responseBody, requestHeaders, requestBody) { - return responseBody.trim ().replace (/:(\d{15,}),/g, ':"$1",'); + return responseBody.trim () + } + + onJsonResponse (responseBody) { + return this.quoteJsonNumbers ? responseBody.replace (/":([+.0-9eE-]+),/g, '":"$1",') : responseBody; } setMarkets (markets, currencies = undefined) { @@ -4482,8 +5721,8 @@ module.exports = class Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = parseFloat (bidask[priceKey]) - const amount = parseFloat (bidask[amountKey]) + const price = this.safeNumber (bidask, priceKey) + const amount = this.safeNumber (bidask, amountKey) return [ price, amount ] } @@ -4509,7 +5748,7 @@ module.exports = class Exchange { } } - parseBalance (balance) { + parseBalance (balance, legacy = true) { const codes = Object.keys (this.omit (balance, [ 'info', 'free', 'used', 'total' ])); @@ -4521,20 +5760,34 @@ module.exports = class Exchange { const code = codes[i] if (balance[code].total === undefined) { if (balance[code].free !== undefined && balance[code].used !== undefined) { - balance[code].total = this.sum (balance[code].free, balance[code].used) + if (legacy) { + balance[code].total = this.sum (balance[code].free, balance[code].used) + } else { + balance[code].total = Precise.stringAdd (balance[code].free, balance[code].used) + } } } if (balance[code].free === undefined) { if (balance[code].total !== undefined && balance[code].used !== undefined) { - balance[code].free = this.sum (balance[code].total, -balance[code].used) + if (legacy) { + balance[code].free = this.sum (balance[code].total, -balance[code].used) + } else { + balance[code].free = Precise.stringSub (balance[code].total, balance[code].used) + } } } if (balance[code].used === undefined) { if (balance[code].total !== undefined && balance[code].free !== undefined) { - balance[code].used = this.sum (balance[code].total, -balance[code].free) + if (legacy) { + balance[code].used = this.sum (balance[code].total, -balance[code].free) + } else { + balance[code].used = Precise.stringSub (balance[code].total, balance[code].free) + } } } - + balance[code].free = this.parseNumber (balance[code].free) + balance[code].used = this.parseNumber (balance[code].used) + balance[code].total = this.parseNumber (balance[code].total) balance.free[code] = balance[code].free balance.used[code] = balance[code].used balance.total[code] = balance[code].total @@ -4543,6 +5796,10 @@ module.exports = class Exchange { return balance } + async fetchBalance (params = {}) { + throw new NotSupported (this.id + ' fetchBalance not supported yet') + } + async fetchPartialBalance (part, params = {}) { const balance = await this.fetchBalance (params) return balance[part] @@ -4652,11 +5909,27 @@ module.exports = class Exchange { return indexed ? indexBy (result, key) : result } + parseTickers (tickers, symbols = undefined) { + const result = []; + for (let i = 0; i < tickers.length; i++) { + result.push (this.parseTicker (tickers[i])); + } + return this.filterByArray (result, 'symbol', symbols); + } + + parseDepositAddresses (addresses, codes = undefined) { + let result = []; + for (let i = 0; i < addresses.length; i++) { + const address = this.parseDepositAddress (addresses[i]); + result.push (address); + } + if (codes) { + result = this.filterByArray (result, 'currency', codes); + } + return this.indexBy (result, 'currency'); + } + parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (trades)) { - // throw new ExchangeError (this.id + ' parseTrades expected an array in the trades argument, but got ' + typeof trades); - // } let result = Object.values (trades || []).map ((trade) => this.extend (this.parseTrade (trade, market), params)) result = sortBy (result, 'timestamp') const symbol = (market !== undefined) ? market['symbol'] : undefined @@ -4665,10 +5938,6 @@ module.exports = class Exchange { } parseTransactions (transactions, currency = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (transactions)) { - // throw new ExchangeError (this.id + ' parseTransactions expected an array in the transactions argument, but got ' + typeof transactions); - // } let result = Object.values (transactions || []).map ((transaction) => this.extend (this.parseTransaction (transaction, currency), params)) result = this.sortBy (result, 'timestamp'); const code = (currency !== undefined) ? currency['code'] : undefined; @@ -4676,6 +5945,14 @@ module.exports = class Exchange { return this.filterByCurrencySinceLimit (result, code, since, limit, tail); } + parseTransfers (transfers, currency = undefined, since = undefined, limit = undefined, params = {}) { + let result = Object.values (transfers || []).map ((transfer) => this.extend (this.parseTransfer (transfer, currency), params)) + result = this.sortBy (result, 'timestamp'); + const code = (currency !== undefined) ? currency['code'] : undefined; + const tail = since === undefined; + return this.filterByCurrencySinceLimit (result, code, since, limit, tail); + } + parseLedger (data, currency = undefined, since = undefined, limit = undefined, params = {}) { let result = []; const array = Object.values (data || []); @@ -4820,19 +6097,19 @@ module.exports = class Exchange { return this.createOrder (symbol, ...args) } - createLimitOrder (symbol, side, amount, price = undefined, params = {}) { + createLimitOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'limit', side, amount, price, params) } - createMarketOrder (symbol, side, amount, price = undefined, params = {}) { + createMarketOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'market', side, amount, price, params) } - createLimitBuyOrder (symbol, amount, price = undefined, params = {}) { + createLimitBuyOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'buy', amount, price, params) } - createLimitSellOrder (symbol, amount, price = undefined, params = {}) { + createLimitSellOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'sell', amount, price, params) } @@ -4865,15 +6142,43 @@ module.exports = class Exchange { } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol] - const rate = market[takerOrMaker] - const cost = parseFloat (this.costToPrecision (symbol, amount * price)) + const market = this.markets[symbol]; + const feeSide = this.safeString (market, 'feeSide', 'quote'); + let key = 'quote'; + let cost = undefined; + if (feeSide === 'quote') { + // the fee is always in quote currency + cost = amount * price; + } else if (feeSide === 'base') { + // the fee is always in base currency + cost = amount; + } else if (feeSide === 'get') { + // the fee is always in the currency you get + cost = amount; + if (side === 'sell') { + cost *= price; + } else { + key = 'base'; + } + } else if (feeSide === 'give') { + // the fee is always in the currency you give + cost = amount; + if (side === 'buy') { + cost *= price; + } else { + key = 'base'; + } + } + const rate = market[takerOrMaker]; + if (cost !== undefined) { + cost *= rate; + } return { 'type': takerOrMaker, - 'currency': market['quote'], + 'currency': market[key], 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, rate * cost)), - } + 'cost': cost, + }; } checkRequiredDependencies () { @@ -4957,6 +6262,25 @@ module.exports = class Exchange { return new BN (a).pow (new BN (b)) } + reduceFeesByCurrency (fees) { + const reduced = {}; + for (let i = 0; i < fees.length; i++) { + const fee = fees[i]; + const feeCurrencyCode = this.safeValue (fee, 'currency'); + if (feeCurrencyCode !== undefined) { + if (feeCurrencyCode in reduced) { + reduced[feeCurrencyCode]['cost'] = this.sum (reduced[feeCurrencyCode]['cost'], fee['cost']); + } else { + reduced[feeCurrencyCode] = { + 'cost': fee['cost'], + 'currency': feeCurrencyCode, + }; + } + } + } + return Object.values (reduced); + } + safeOrder (order) { // Cost // Remaining @@ -4965,70 +6289,295 @@ module.exports = class Exchange { // 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']) + // first we try to calculate the order fields from the trades + let amount = this.safeValue (order, 'amount'); + let remaining = this.safeValue (order, 'remaining'); + let filled = this.safeValue (order, 'filled'); + let cost = this.safeValue (order, 'cost'); + let average = this.safeValue (order, 'average'); + let price = this.safeValue (order, 'price'); + let lastTradeTimeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); + const parseFilled = (filled === undefined); + const parseCost = (cost === undefined); + const parseLastTradeTimeTimestamp = (lastTradeTimeTimestamp === undefined); + const parseFee = this.safeValue (order, 'fee') === undefined; + const parseFees = this.safeValue (order, 'fees') === undefined; + const shouldParseFees = parseFee || parseFees; + const fees = shouldParseFees ? [] : undefined; + if (parseFilled || parseCost || shouldParseFees) { + const trades = this.safeValue (order, 'trades'); + if (trades !== undefined) { + if (parseFilled) { + filled = 0; + } + if (parseCost) { + cost = 0; + } + for (let i = 0; i < trades.length; i++) { + const trade = trades[i]; + const tradeAmount = this.safeValue (trade, 'amount'); + if (parseFilled && (tradeAmount !== undefined)) { + filled = this.sum (filled, tradeAmount); } - if (parseCost) { - order['cost'] = this.sum (order['cost'], trade['cost']) + const tradeCost = this.safeValue (trade, 'cost'); + if (parseCost && (tradeCost !== undefined)) { + cost = this.sum (cost, tradeCost); + } + const tradeTimestamp = this.safeValue (trade, 'timestamp'); + if (parseLastTradeTimeTimestamp && (tradeTimestamp !== undefined)) { + if (lastTradeTimeTimestamp === undefined) { + lastTradeTimeTimestamp = tradeTimestamp; + } else { + lastTradeTimeTimestamp = Math.max (lastTradeTimeTimestamp, tradeTimestamp); + } + } + if (shouldParseFees) { + const tradeFees = this.safeValue (trade, 'fees'); + if (tradeFees !== undefined) { + for (let j = 0; j < tradeFees.length; j++) { + const tradeFee = tradeFees[j]; + fees.push (this.extend ({}, tradeFee)); + } + } else { + const tradeFee = this.safeValue (trade, 'fee'); + if (tradeFee !== undefined) { + fees.push (this.extend ({}, tradeFee)); + } + } } } } } - // 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 (shouldParseFees) { + const reducedFees = this.reduceFees ? this.reduceFeesByCurrency (fees) : fees; + const reducedLength = reducedFees.length; + if (!parseFee && (reducedLength === 0)) { + reducedFees.push (order['fee']); + } + if (parseFees) { + order['fees'] = reducedFees; + } + if (parseFee && (reducedLength === 1)) { + order['fee'] = reducedFees[0]; } } - if (order['filled'] === undefined) { - if (order['amount'] !== undefined && order['remaining'] !== undefined) { - order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0) + if (amount === undefined) { + // ensure amount = filled + remaining + if (filled !== undefined && remaining !== undefined) { + amount = this.sum (filled, remaining); + } else if (this.safeString (order, 'status') === 'closed') { + amount = filled; } } - if (order['remaining'] === undefined) { - if (order['amount'] !== undefined && order['filled'] !== undefined) { - order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0) + if (filled === undefined) { + if (amount !== undefined && remaining !== undefined) { + filled = Math.max (this.sum (amount, -remaining), 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'] + if (remaining === undefined) { + if (amount !== undefined && filled !== undefined) { + remaining = Math.max (this.sum (amount, -filled), 0); } } - // 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'] + // ensure that the average field is calculated correctly + if (average === undefined) { + if ((filled !== undefined) && (cost !== undefined) && (cost > 0)) { + average = cost / filled; } - order['cost'] = costPrice * order['filled'] } - // We add support for market orders - if (order['price'] === undefined && order['type'] === 'market') { - order['price'] = order['average'] + // also ensure the cost field is calculated correctly + const costPriceExists = (average !== undefined) || (price !== undefined); + if (parseCost && (filled !== undefined) && costPriceExists) { + cost = (average === undefined) ? (price * filled) : (average * filled); } - return order + // support for market orders + const orderType = this.safeValue (order, 'type'); + const emptyPrice = (price === undefined) || (price === 0.0); + if (emptyPrice && (orderType === 'market')) { + price = average; + } + return this.extend (order, { + 'lastTradeTimestamp': lastTradeTimeTimestamp, + 'price': price, + 'amount': amount, + 'cost': cost, + 'average': average, + 'filled': filled, + 'remaining': remaining, + }); + } + + parseNumber (value, d = undefined) { + if (value === undefined) { + return d + } else { + try { + return this.number (value) + } catch (e) { + return d + } + } + } + + safeNumber (object, key, d = undefined) { + const value = this.safeString (object, key) + return this.parseNumber (value, d) + } + + safeNumber2 (object, key1, key2, d = undefined) { + const value = this.safeString2 (object, key1, key2) + return this.parseNumber (value, d) } } -},{"../static_dependencies/BN/bn":126,"./errors":8,"./functions":9}],7:[function(require,module,exports){ +},{"../static_dependencies/BN/bn":123,"./Precise":7,"./errors":9,"./functions":10}],7:[function(require,module,exports){ +'use strict' + +const BN = require ('../static_dependencies/BN/bn') + +class Precise { + constructor (number, decimals = 0) { + const isBN = number instanceof BN + const isString = typeof number === 'string' + if (!(isBN || isString)) { + throw new Error ('Precise initiated with something other than a string or BN') + } + if (isBN) { + this.integer = number + this.decimals = decimals + } else { + if (decimals) { + throw new Error ('Cannot set decimals when initializing with a string') + } + let modifier = 0 + number = number.toLowerCase () + if (number.indexOf ('e') > -1) { + [ number, modifier ] = number.split ('e') + modifier = parseInt (modifier) + } + const decimalIndex = number.indexOf ('.') + this.decimals = (decimalIndex > -1) ? number.length - decimalIndex - 1 : 0 + const integerString = number.replace ('.', '') + this.integer = new BN (integerString) + this.decimals = this.decimals - modifier + } + this.base = 10 + this.reduce () + } + + mul (other) { + // other must be another instance of Precise + const integerResult = this.integer.mul (other.integer) + return new Precise (integerResult, this.decimals + other.decimals) + } + + div (other, precision = 18) { + const distance = precision - this.decimals + other.decimals + let numerator + if (distance === 0) { + numerator = this.integer + } else if (distance < 0) { + const exponent = new BN (this.base).pow (new BN (-distance)) + numerator = this.integer.div (exponent) + } else { + const exponent = new BN (this.base).pow (new BN (distance)) + numerator = this.integer.mul (exponent) + } + const result = numerator.div (other.integer) + return new Precise (result, precision) + } + + add (other) { + if (this.decimals === other.decimals) { + const integerResult = this.integer.add (other.integer) + return new Precise (integerResult, this.decimals) + } else { + const [ smaller, bigger ] = + (this.decimals > other.decimals) ? [ other, this ] : [ this, other ] + const exponent = new BN (bigger.decimals - smaller.decimals) + const normalised = smaller.integer.mul (new BN (this.base).pow (exponent)) + const result = normalised.add (bigger.integer) + return new Precise (result, bigger.decimals) + } + } + + sub (other) { + const negative = new Precise (other.integer.neg (), other.decimals) + return this.add (negative) + } + + reduce () { + const zero = new BN (0) + if (this.integer.eq (zero)) { + this.decimals = 0 + return this + } + const base = new BN (this.base) + let divmod = this.integer.divmod (base) + while (divmod.mod.eq (zero)) { + this.integer = divmod.div + this.decimals-- + divmod = this.integer.divmod (base) + } + return this + } + + toString () { + const sign = this.integer.negative ? '-' : '' + const integerArray = Array.from (this.integer.abs ().toString (this.base).padStart (this.decimals, '0')) + const index = integerArray.length - this.decimals + let item + if (index === 0) { + // if we are adding to the front + item = '0.' + } else if (this.decimals < 0) { + item = '0'.repeat (-this.decimals) + } else if (this.decimals === 0) { + item = '' + } else { + item = '.' + } + integerArray.splice (index, 0, item) + return sign + integerArray.join ('') + } + + static stringMul (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).mul (new Precise (string2)).toString () + } + + static stringDiv (string1, string2, precision = 18) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).div (new Precise (string2), precision).toString () + } + + static stringAdd (string1, string2) { + if ((string1 === undefined) && (string2 === undefined)) { + return undefined + } + if (string1 === undefined) { + return string2 + } else if (string2 === undefined) { + return string1 + } + return (new Precise (string1)).add (new Precise (string2)).toString () + } + + static stringSub (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).sub (new Precise (string2)).toString () + } +} + +module.exports = Precise; + +},{"../static_dependencies/BN/bn":123}],8:[function(require,module,exports){ 'use strict'; const errorHierarchy = { @@ -5074,7 +6623,7 @@ const errorHierarchy = { module.exports = errorHierarchy; -},{}],8:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ 'use strict'; const errorHierarchy = require ('./errorHierarchy.js') @@ -5131,7 +6680,7 @@ module.exports = subclass ( errorHierarchy ) -},{"./errorHierarchy.js":7}],9:[function(require,module,exports){ +},{"./errorHierarchy.js":8}],10:[function(require,module,exports){ 'use strict'; /* ------------------------------------------------------------------------ */ @@ -5161,7 +6710,7 @@ module.exports = unCamelCasePropertyNames (Object.assign ({} /* ------------------------------------------------------------------------ */ -},{"./functions/crypto":10,"./functions/encode":11,"./functions/generic":12,"./functions/misc":13,"./functions/number":14,"./functions/platform":15,"./functions/string":16,"./functions/throttle":17,"./functions/time":18,"./functions/type":19}],10:[function(require,module,exports){ +},{"./functions/crypto":11,"./functions/encode":12,"./functions/generic":13,"./functions/misc":14,"./functions/number":15,"./functions/platform":16,"./functions/string":17,"./functions/throttle":18,"./functions/time":19,"./functions/type":20}],11:[function(require,module,exports){ 'use strict' /* ------------------------------------------------------------------------ */ @@ -5321,7 +6870,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"../../static_dependencies/BN/bn.js":126,"../../static_dependencies/crypto-js/crypto-js":127,"./../../static_dependencies/elliptic/lib/elliptic":128,"./../../static_dependencies/node-rsa/NodeRSA":146,"./../errors":8,"./encode":11,"./string":16}],11:[function(require,module,exports){ +},{"../../static_dependencies/BN/bn.js":123,"../../static_dependencies/crypto-js/crypto-js":124,"./../../static_dependencies/elliptic/lib/elliptic":125,"./../../static_dependencies/node-rsa/NodeRSA":143,"./../errors":9,"./encode":12,"./string":17}],12:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -5343,7 +6892,6 @@ let base58Encoder = null module.exports = { json: (data, params = undefined) => JSON.stringify (data) - , unjson: JSON.parse , isJsonEncodedObject: object => ( (typeof object === 'string') && @@ -5441,7 +6989,7 @@ module.exports['byteArrayToWordArray'] = byteArrayToWordArray /* ------------------------------------------------------------------------ */ -},{"../../static_dependencies/BN/bn":126,"../../static_dependencies/crypto-js/crypto-js":127,"../../static_dependencies/qs/index":162}],12:[function(require,module,exports){ +},{"../../static_dependencies/BN/bn":123,"../../static_dependencies/crypto-js/crypto-js":124,"../../static_dependencies/qs/index":159}],13:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -5679,7 +7227,7 @@ module.exports = { } -},{"./type":19}],13:[function(require,module,exports){ +},{"./type":20}],14:[function(require,module,exports){ 'use strict'; const { ROUND_UP, ROUND_DOWN } = require ('./number') @@ -5819,7 +7367,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"../errors":8,"./number":14}],14:[function(require,module,exports){ +},{"../errors":9,"./number":15}],15:[function(require,module,exports){ 'use strict' /* ------------------------------------------------------------------------ @@ -6160,7 +7708,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{}],15:[function(require,module,exports){ +},{}],16:[function(require,module,exports){ (function (process){ "use strict"; @@ -6201,7 +7749,7 @@ module.exports = { defaultFetch, } }).call(this,require('_process')) -},{"../../static_dependencies/fetch-ponyfill/fetch-node":144,"_process":210}],16:[function(require,module,exports){ +},{"../../static_dependencies/fetch-ponyfill/fetch-node":141,"_process":206}],17:[function(require,module,exports){ "use strict"; // ---------------------------------------------------------------------------- @@ -6221,7 +7769,7 @@ module.exports = { , strip: s => s.replace(/^\s+|\s+$/g, '') } -},{}],17:[function(require,module,exports){ +},{}],18:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -6287,7 +7835,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{"./time":18}],18:[function(require,module,exports){ +},{"./time":19}],19:[function(require,module,exports){ 'use strict'; /* ------------------------------------------------------------------------ */ @@ -6491,7 +8039,7 @@ module.exports = /* ------------------------------------------------------------------------ */ -},{}],19:[function(require,module,exports){ +},{}],20:[function(require,module,exports){ "use strict"; /* ------------------------------------------------------------------------ */ @@ -6559,7 +8107,7 @@ module.exports = { /* ------------------------------------------------------------------------ */ -},{}],20:[function(require,module,exports){ +},{}],21:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -6593,13 +8141,14 @@ module.exports = class bequant extends hitbtc { } }; -},{"./hitbtc":93}],21:[function(require,module,exports){ +},{"./hitbtc":91}],22:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AccountSuspended, ArgumentsRequired, AuthenticationError, DDoSProtection, ExchangeNotAvailable, InvalidOrder, OrderNotFound, PermissionDenied, InsufficientFunds, BadSymbol, RateLimitExceeded, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -6825,9 +8374,9 @@ module.exports = class bibox extends Exchange { const quote = this.safeCurrencyCode (quoteId); symbol = base + '/' + quote; } - const last = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); - const baseVolume = this.safeFloat2 (ticker, 'vol', 'vol24H'); + const last = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); + const baseVolume = this.safeNumber2 (ticker, 'vol', 'vol24H'); let open = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; @@ -6841,11 +8390,11 @@ module.exports = class bibox extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -6856,7 +8405,7 @@ module.exports = class bibox extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': baseVolume, - 'quoteVolume': this.safeFloat (ticker, 'amount'), + 'quoteVolume': this.safeNumber (ticker, 'amount'), 'info': ticker, }; } @@ -6872,17 +8421,6 @@ module.exports = class bibox extends Exchange { return this.parseTicker (response['result'], market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - const ticker = this.parseTicker (rawTickers[i]); - if ((symbols === undefined) || (this.inArray (ticker['symbol'], symbols))) { - tickers.push (ticker); - } - } - return tickers; - } - async fetchTickers (symbols = undefined, params = {}) { const request = { 'cmd': 'marketAll', @@ -6915,7 +8453,7 @@ module.exports = class bibox extends Exchange { symbol = market['symbol']; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = this.safeString (trade, 'fee_symbol'); if (feeCurrency !== undefined) { if (feeCurrency in this.currencies_by_id) { @@ -6925,12 +8463,11 @@ module.exports = class bibox extends Exchange { } } const feeRate = undefined; // todo: deduce from market if market is defined - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if (feeCost !== undefined) { fee = { 'cost': -feeCost, @@ -6981,7 +8518,7 @@ module.exports = class bibox extends Exchange { request['size'] = limit; // default = 200 } const response = await this.publicGetMdata (this.extend (request, params)); - return this.parseOrderBook (response['result'], this.safeFloat (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); + return this.parseOrderBook (response['result'], this.safeNumber (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); } parseOHLCV (ohlcv, market = undefined) { @@ -6997,11 +8534,11 @@ module.exports = class bibox extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -7093,7 +8630,7 @@ module.exports = class bibox extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw_min'), + 'min': this.safeNumber (currency, 'withdraw_min'), 'max': undefined, }, }, @@ -7225,19 +8762,17 @@ module.exports = class bibox extends Exchange { code = this.currencies_by_id[code]['code']; } const account = this.account (); - let balance = indexed[id]; + const balance = indexed[id]; if (typeof balance === 'string') { - balance = parseFloat (balance); account['free'] = balance; - account['used'] = 0.0; account['total'] = balance; } else { - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -7328,8 +8863,8 @@ module.exports = class bibox extends Exchange { let tag = this.safeString (transaction, 'addr_remark'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'fee'); if (type === 'deposit') { feeCost = 0; tag = undefined; @@ -7437,26 +8972,19 @@ module.exports = class bibox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const type = (order['order_type'] === 1) ? 'market' : 'limit'; - const timestamp = order['createdAt']; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'deal_price'); - const filled = this.safeFloat (order, 'deal_amount'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat2 (order, 'deal_money', 'money'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - cost = price * filled; - } - } - const side = (order['order_side'] === 1) ? 'buy' : 'sell'; + const rawType = this.safeString (order, 'order_type'); + const type = (rawType === '1') ? 'market' : 'limit'; + const timestamp = this.safeInteger (order, 'createdAt'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'deal_price'); + const filled = this.safeNumber (order, 'deal_amount'); + const amount = this.safeNumber (order, 'amount'); + const cost = this.safeNumber2 (order, 'deal_money', 'money'); + const rawSide = this.safeString (order, 'order_side'); + const side = (rawSide === '1') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -7464,8 +8992,7 @@ module.exports = class bibox extends Exchange { 'currency': undefined, }; } - cost = cost ? cost : (parseFloat (price) * filled); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -7483,11 +9010,11 @@ module.exports = class bibox extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -7655,7 +9182,7 @@ module.exports = class bibox extends Exchange { }; const response = await this.privatePostTransfer (request); info[code] = response; - withdrawFees[code] = this.safeFloat (response['result'], 'withdraw_fee'); + withdrawFees[code] = this.safeNumber (response['result'], 'withdraw_fee'); } return { 'info': info, @@ -7725,13 +9252,14 @@ module.exports = class bibox extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],22:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],23:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, OrderNotFound, InsufficientFunds, PermissionDenied, BadRequest, RateLimitExceeded, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -7988,28 +9516,28 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (ticker, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = undefined; - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', {}); const ask = this.safeValue (ticker, 'ask', {}); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 'price'), - 'bidVolume': this.safeFloat (bid, 'quantity'), - 'ask': this.safeFloat (ask, 'price'), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 'price'), + 'bidVolume': this.safeNumber (bid, 'quantity'), + 'ask': this.safeNumber (ask, 'price'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, 'last': close, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'daily_change'), + 'change': this.safeNumber (ticker, 'daily_change'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -8174,16 +9702,13 @@ module.exports = class bigone extends Exchange { // } // const timestamp = this.parse8601 (this.safeString2 (trade, 'created_at', 'inserted_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } let side = this.safeString (trade, 'side'); const takerSide = this.safeString (trade, 'taker_side'); let takerOrMaker = undefined; @@ -8257,8 +9782,8 @@ module.exports = class bigone extends Exchange { takerCurrencyCode = market['quote']; } } - const makerFeeCost = this.safeFloat (trade, 'maker_fee'); - const takerFeeCost = this.safeFloat (trade, 'taker_fee'); + const makerFeeCost = this.safeNumber (trade, 'maker_fee'); + const takerFeeCost = this.safeNumber (trade, 'taker_fee'); if (makerFeeCost !== undefined) { if (takerFeeCost !== undefined) { result['fees'] = [ @@ -8321,11 +9846,11 @@ module.exports = class bigone extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -8396,11 +9921,11 @@ module.exports = class bigone extends Exchange { const symbol = this.safeString (balance, 'asset_symbol'); const code = this.safeCurrencyCode (symbol); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -8422,13 +9947,9 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (order, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (amount !== undefined && filled !== undefined) { - remaining = Math.max (0, amount - filled); - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); const status = this.parseOrderStatus (this.safeString (order, 'state')); let side = this.safeString (order, 'side'); if (side === 'BID') { @@ -8436,15 +9957,9 @@ module.exports = class bigone extends Exchange { } else { side = 'sell'; } - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'updated_at')); - const average = this.safeFloat (order, 'avg_deal_price'); - return { + const average = this.safeNumber (order, 'avg_deal_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -8459,14 +9974,14 @@ module.exports = class bigone extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -8490,7 +10005,7 @@ module.exports = class bigone extends Exchange { const isStopLimit = (uppercaseType === 'STOP_LIMIT'); const isStopMarket = (uppercaseType === 'STOP_MARKET'); if (isStopLimit || isStopMarket) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price parameter'); } @@ -8829,7 +10344,7 @@ module.exports = class bigone extends Exchange { const currencyId = this.safeString (transaction, 'asset_symbol'); const code = this.safeCurrencyCode (currencyId); const id = this.safeInteger (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const timestamp = this.parse8601 (this.safeString (transaction, 'inserted_at')); const updated = this.parse8601 (this.safeString2 (transaction, 'updated_at', 'completed_at')); @@ -9000,14 +10515,15 @@ module.exports = class bigone extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],23:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],24:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, RateLimitExceeded, PermissionDenied, NotSupported, BadRequest, BadSymbol, AccountSuspended, OrderImmediatelyFillable } = require ('./base/errors'); -const { ROUND, TRUNCATE } = require ('./base/functions/number'); +const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -9050,6 +10566,8 @@ module.exports = class binance extends Exchange { 'fetchTransactions': false, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, + 'fetchTransfers': true, }, 'timeframes': { '1m': '1m', @@ -9198,6 +10716,26 @@ module.exports = class binance extends Exchange { 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/recentRecord', 'apiReferral/kickback/historicalRecord', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccount', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/info', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/recentRecord', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/status', + 'broker/subAccount/depositHist', + 'broker/subAccount/spotSummary', + 'broker/subAccount/marginSummary', + 'broker/subAccount/futuresSummary', + 'broker/rebate/futures/recentRecord', + 'broker/subAccountApi/ipRestriction', + 'broker/universalTransfer', + // v2 not supported yet + // GET /sapi/v2/broker/subAccount/futuresSummary ], 'post': [ 'asset/dust', @@ -9237,11 +10775,30 @@ module.exports = class binance extends Exchange { // leveraged token endpoints 'blvt/subscribe', 'blvt/redeem', - // broker api + // brokerage API 'apiReferral/customization', 'apiReferral/userCustomization', 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/historicalRecord', + 'broker/subAccount', + 'broker/subAccount/margin', + 'broker/subAccount/futures', + 'broker/subAccountApi', + 'broker/subAccountApi/permission', + 'broker/subAccountApi/commission', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/spot', + 'broker/subAccount/bnbBurn/marginInterest', + 'broker/subAccount/blvt', + 'broker/subAccountApi/ipRestriction', + 'broker/subAccountApi/ipRestriction/ipList', + 'broker/universalTransfer', + 'broker/subAccountApi/permission/universalTransfer', + 'broker/subAccountApi/permission/vanillaOptions', ], 'put': [ 'userDataStream', @@ -9252,6 +10809,9 @@ module.exports = class binance extends Exchange { 'margin/order', 'userDataStream', 'userDataStream/isolated', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccountApi/ipRestriction/ipList', ], }, 'wapi': { @@ -9388,6 +10948,8 @@ module.exports = class binance extends Exchange { 'positionSide/dual', 'userTrades', 'income', + 'commissionRate', + 'apiTradingStatus', // broker endpoints 'apiReferral/ifNewUser', 'apiReferral/customization', @@ -9477,6 +11039,7 @@ module.exports = class binance extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.001, @@ -9501,7 +11064,7 @@ module.exports = class binance extends Exchange { 'parseOrderToPrecision': false, // force amounts and costs in parseOrder to precision 'newOrderRespType': { 'market': 'FULL', // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills - 'limit': 'RESULT', // we change it from 'ACK' by default to 'RESULT' + 'limit': 'FULL', // we change it from 'ACK' by default to 'FULL' (returns immediately if limit is not hit) }, 'quoteOrderQty': true, // whether market orders support amounts in quote currency 'broker': { @@ -9510,6 +11073,25 @@ module.exports = class binance extends Exchange { 'future': 'x-xcKtGhcu', 'delivery': 'x-xcKtGhcu', }, + 'fetchPositions': { + 'future': 'fapiPrivateV2GetAccount', // 'fapiPrivateGetPositionRisk' + 'delivery': 'dapiPrivateGetAccount', // 'dapiPrivateGetPositionRisk' + }, + 'accountsByType': { + 'main': 'MAIN', + 'spot': 'MAIN', + 'margin': 'MARGIN', + 'future': 'UMFUTURE', + 'delivery': 'CMFUTURE', + 'mining': 'MINING', + }, + 'typesByAccount': { + 'MAIN': 'spot', + 'MARGIN': 'margin', + 'UMFUTURE': 'future', + 'CMFUTURE': 'delivery', + 'MINING': 'mining', + }, }, // https://binance-docs.github.io/apidocs/spot/en/#error-codes-2 'exceptions': { @@ -9567,6 +11149,8 @@ module.exports = class binance extends Exchange { '-3010': ExchangeError, // {"code":-3010,"msg":"Repay not allowed. Repay amount exceeds borrow amount."} '-3022': AccountSuspended, // You account's trading is banned. '-4028': BadRequest, // {"code":-4028,"msg":"Leverage 100 is not valid"} + '-3020': InsufficientFunds, // {"code":-3020,"msg":"Transfer out amount exceeds max amount."} + '-3041': InsufficientFunds, // {"code":-3041,"msg":"Balance is not enough"} '-5013': InsufficientFunds, // Asset transfer failed: insufficient balance" }, }); @@ -9709,13 +11293,14 @@ module.exports = class binance extends Exchange { let fee = undefined; for (let j = 0; j < networkList.length; j++) { const networkItem = networkList[j]; - const name = this.safeString (networkItem, 'name'); - const withdrawFee = this.safeFloat (networkItem, 'withdrawFee'); + const network = this.safeString (networkItem, 'network'); + // const name = this.safeString (networkItem, 'name'); + const withdrawFee = this.safeNumber (networkItem, 'withdrawFee'); const depositEnable = this.safeValue (networkItem, 'depositEnable'); const withdrawEnable = this.safeValue (networkItem, 'withdrawEnable'); isDepositEnabled = isDepositEnabled || depositEnable; isWithdrawEnabled = isWithdrawEnabled || withdrawEnable; - fees[name] = withdrawFee; + fees[network] = withdrawFee; const isDefault = this.safeValue (networkItem, 'isDefault'); if (isDefault || fee === undefined) { fee = withdrawFee; @@ -9901,7 +11486,7 @@ module.exports = class binance extends Exchange { if (this.options['adjustForTimeDifference']) { await this.loadTimeDifference (); } - const markets = this.safeValue (response, 'symbols'); + const markets = this.safeValue (response, 'symbols', []); const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -9966,10 +11551,10 @@ module.exports = class binance extends Exchange { // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } @@ -9980,47 +11565,26 @@ module.exports = class binance extends Exchange { const stepSize = this.safeString (filter, 'stepSize'); entry['precision']['amount'] = this.precisionFromString (stepSize); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat2 (filter, 'minNotional', 'notional'); + entry['limits']['cost']['min'] = this.safeNumber2 (filter, 'minNotional', 'notional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -10191,8 +11755,8 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -10205,13 +11769,13 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['used'] = this.safeFloat (balance, 'initialMargin'); - account['total'] = this.safeFloat2 (balance, 'marginBalance', 'balance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['used'] = this.safeString (balance, 'initialMargin'); + account['total'] = this.safeString2 (balance, 'marginBalance', 'balance'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -10264,36 +11828,36 @@ module.exports = class binance extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'openPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'openPrice'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } async fetchStatus (params = {}) { const response = await this.wapiGetSystemStatus (params); - let status = this.safeValue (response, 'status'); + let status = this.safeString (response, 'status'); if (status !== undefined) { - status = (status === 0) ? 'ok' : 'maintenance'; + status = (status === '0') ? 'ok' : 'maintenance'; this.status = this.extend (this.status, { 'status': status, 'updated': this.milliseconds (), @@ -10322,14 +11886,6 @@ module.exports = class binance extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -10384,11 +11940,11 @@ module.exports = class binance extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -10519,8 +12075,11 @@ module.exports = class binance extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -10538,7 +12097,7 @@ module.exports = class binance extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -10551,10 +12110,6 @@ module.exports = class binance extends Exchange { } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } return { 'info': trade, 'timestamp': timestamp, @@ -10673,7 +12228,7 @@ module.exports = class binance extends Exchange { parseOrder (order, market = undefined) { // - // spot + // spot // // { // "symbol": "LTCBTC", @@ -10694,7 +12249,7 @@ module.exports = class binance extends Exchange { // "isWorking": true // } // - // futures + // futures // // { // "symbol": "BTCUSDT", @@ -10712,6 +12267,33 @@ module.exports = class binance extends Exchange { // "updateTime": 1499827319559 // } // + // createOrder with { "newOrderRespType": "FULL" } + // + // { + // "symbol": "BTCUSDT", + // "orderId": 5403233939, + // "orderListId": -1, + // "clientOrderId": "x-R4BD3S825e669e75b6c14f69a2c43e", + // "transactTime": 1617151923742, + // "price": "0.00000000", + // "origQty": "0.00050000", + // "executedQty": "0.00050000", + // "cummulativeQuoteQty": "29.47081500", + // "status": "FILLED", + // "timeInForce": "GTC", + // "type": "MARKET", + // "side": "BUY", + // "fills": [ + // { + // "price": "58941.63000000", + // "qty": "0.00050000", + // "commission": "0.00007050", + // "commissionAsset": "BNB", + // "tradeId": 737466631 + // } + // ] + // } + // const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -10721,80 +12303,26 @@ module.exports = class binance extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); // - Spot/Margin market: cummulativeQuoteQty // - Futures market: cumQuote. // Note this is not the actual cost, since Binance futures uses leverage to calculate margins. - let cost = this.safeFloat2 (order, 'cummulativeQuoteQty', 'cumQuote'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const cost = this.safeNumber2 (order, 'cummulativeQuoteQty', 'cumQuote'); const id = this.safeString (order, 'orderId'); let type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - if (this.options['parseOrderToPrecision']) { - price = parseFloat (this.priceToPrecision (symbol, price)); - } - } - } - } - } else if (type === 'limit_maker') { + if (type === 'limit_maker') { type = 'limit'; } const side = this.safeStringLower (order, 'side'); - let fee = undefined; - let trades = undefined; - const fills = this.safeValue (order, 'fills'); - if (fills !== undefined) { - trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - if (this.options['parseOrderToPrecision']) { - average = parseFloat (this.priceToPrecision (symbol, average)); - } - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const fills = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (fills, market); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = (type === 'limit_maker') || (timeInForce === 'GTX'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -10810,13 +12338,13 @@ module.exports = class binance extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -10863,8 +12391,11 @@ module.exports = class binance extends Exchange { } else { request['newClientOrderId'] = clientOrderId; } - if (market['spot']) { + if ((orderType === 'spot') || (orderType === 'margin')) { request['newOrderRespType'] = this.safeValue (this.options['newOrderRespType'], type, 'RESULT'); // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills + } else { + // delivery and future + request['newOrderRespType'] = 'RESULT'; // "ACK", "RESULT", default "ACK" } // additional required fields depending on the order type let timeInForceIsRequired = false; @@ -10894,7 +12425,7 @@ module.exports = class binance extends Exchange { if (uppercaseType === 'MARKET') { const quoteOrderQty = this.safeValue (this.options, 'quoteOrderQty', false); if (quoteOrderQty) { - const quoteOrderQty = this.safeFloat (params, 'quoteOrderQty'); + const quoteOrderQty = this.safeNumber (params, 'quoteOrderQty'); const precision = market['precision']['price']; if (quoteOrderQty !== undefined) { request['quoteOrderQty'] = this.decimalToPrecision (quoteOrderQty, TRUNCATE, precision, this.precisionMode); @@ -10914,7 +12445,7 @@ module.exports = class binance extends Exchange { } else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) { stopPriceIsRequired = true; quantityIsRequired = true; - if (market['future']) { + if (market['future'] || market['delivery']) { priceIsRequired = true; } } else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) { @@ -10937,7 +12468,7 @@ module.exports = class binance extends Exchange { stopPriceIsRequired = true; } else if (uppercaseType === 'TRAILING_STOP_MARKET') { quantityIsRequired = true; - const callbackRate = this.safeFloat (params, 'callbackRate'); + const callbackRate = this.safeNumber (params, 'callbackRate'); if (callbackRate === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a callbackRate extra param for a ' + type + ' order'); } @@ -10955,7 +12486,7 @@ module.exports = class binance extends Exchange { request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -11171,10 +12702,15 @@ module.exports = class binance extends Exchange { } } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.fetchBalance (params); - const info = this.safeValue (response, 'info', {}); + const defaultType = this.safeString (this.options, 'defaultType', 'future'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + const options = this.safeValue (this.options, 'fetchPositions', {}); + const defaultMethod = (type === 'delivery') ? 'dapiPrivateGetAccount' : 'fapiPrivateV2GetAccount'; + const method = this.safeString (options, type, defaultMethod); + const response = await this[method] (params); // // futures, delivery // @@ -11217,9 +12753,44 @@ module.exports = class binance extends Exchange { // ] // } // - const positions = this.safeValue2 (info, 'positions', 'userAssets', []); - // todo unify parsePosition/parsePositions - return positions; + // fapiPrivateGetPositionRisk, dapiPrivateGetPositionRisk + // + // [ + // { + // symbol: 'XRPUSD_210625', + // positionAmt: '0', + // entryPrice: '0.00000000', + // markPrice: '0.00000000', + // unRealizedProfit: '0.00000000', + // liquidationPrice: '0', + // leverage: '20', + // maxQty: '500000', + // marginType: 'cross', + // isolatedMargin: '0.00000000', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0', + // isolatedWallet: '0' + // }, + // { + // symbol: 'BTCUSD_210326', + // positionAmt: '1', + // entryPrice: '60665.79999885', + // markPrice: '60696.76856843', + // unRealizedProfit: '0.00000084', + // liquidationPrice: '58034.68208092', + // leverage: '20', + // maxQty: '50', + // marginType: 'isolated', + // isolatedMargin: '0.00008345', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0.00164753', + // isolatedWallet: '0.00008261' + // }, + // ] + // + return this.safeValue (response, 'positions', response); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -11357,7 +12928,7 @@ module.exports = class binance extends Exchange { // const fee = { 'currency': earnedCurrency, - 'cost': this.safeFloat (trade, 'serviceChargeAmount'), + 'cost': this.safeNumber (trade, 'serviceChargeAmount'), }; let symbol = undefined; let amount = undefined; @@ -11365,13 +12936,13 @@ module.exports = class binance extends Exchange { let side = undefined; if (tradedCurrencyIsQuote) { symbol = applicantSymbol; - amount = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); - cost = this.safeFloat (trade, 'amount'); + amount = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); + cost = this.safeNumber (trade, 'amount'); side = 'buy'; } else { symbol = tradedCurrency + '/' + earnedCurrency; - amount = this.safeFloat (trade, 'amount'); - cost = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); + amount = this.safeNumber (trade, 'amount'); + cost = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); side = 'sell'; } let price = undefined; @@ -11544,8 +13115,8 @@ module.exports = class binance extends Exchange { } } const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'transactionFee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'transactionFee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -11572,6 +13143,151 @@ module.exports = class binance extends Exchange { }; } + parseTransferStatus (status) { + const statuses = { + 'CONFIRMED': 'ok', + }; + return this.safeString (statuses, status, status); + } + + parseTransfer (transfer, currency = undefined) { + // + // transfer + // + // { + // "tranId":13526853623 + // } + // + // fetchTransfers + // + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // } + // + const id = this.safeString (transfer, 'tranId'); + const currencyId = this.safeString (transfer, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const amount = this.safeNumber (transfer, 'amount'); + const type = this.safeString (transfer, 'type'); + let fromAccount = undefined; + let toAccount = undefined; + const typesByAccount = this.safeValue (this.options, 'typesByAccount', {}); + if (type !== undefined) { + const parts = type.split ('_'); + fromAccount = this.safeValue (parts, 0); + toAccount = this.safeValue (parts, 1); + fromAccount = this.safeString (typesByAccount, fromAccount, fromAccount); + toAccount = this.safeString (typesByAccount, toAccount, toAccount); + } + const timestamp = this.safeInteger (transfer, 'timestamp'); + const status = this.parseTransferStatus (this.safeString (transfer, 'status')); + return { + 'info': transfer, + 'id': id, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'currency': code, + 'amount': amount, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': status, + }; + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount, fromAccount); + const toId = this.safeString (accountsByType, toAccount, toAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'asset': currency['id'], + 'amount': this.currencyToPrecision (code, amount), + 'type': type, + }; + const response = await this.sapiPostAssetTransfer (this.extend (request, params)); + // + // { + // "tranId":13526853623 + // } + // + const transfer = this.parseTransfer (response, currency); + return this.extend (transfer, { + 'amount': amount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + }); + } + + async fetchTransfers (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const defaultType = this.safeString2 (this.options, 'fetchTransfers', 'defaultType', 'spot'); + const fromAccount = this.safeString (params, 'fromAccount', defaultType); + const defaultTo = (fromAccount === 'future') ? 'spot' : 'future'; + const toAccount = this.safeString (params, 'toAccount', defaultTo); + let type = this.safeString (params, 'type'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + if (type === undefined) { + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount parameter must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount parameter must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'type': type, + }; + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['size'] = limit; + } + const response = await this.sapiGetAssetTransfer (this.extend (request, params)); + // + // { + // total: 3, + // rows: [ + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // }, + // ] + // } + // + const rows = this.safeValue (response, 'rows', []); + return this.parseTransfers (rows, currency, since, limit); + } + async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -11634,7 +13350,7 @@ module.exports = class binance extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (detail[id], 'withdrawFee'); + withdrawFees[code] = this.safeNumber (detail[id], 'withdrawFee'); } return { 'withdraw': withdrawFees, @@ -11681,8 +13397,8 @@ module.exports = class binance extends Exchange { return { 'info': fee, 'symbol': symbol, - 'maker': this.safeFloat (fee, 'maker'), - 'taker': this.safeFloat (fee, 'taker'), + 'maker': this.safeNumber (fee, 'maker'), + 'taker': this.safeNumber (fee, 'taker'), }; } @@ -11744,7 +13460,6 @@ module.exports = class binance extends Exchange { if (api === 'wapi') { url += '.html'; } - const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); if (path === 'historicalTrades') { if (this.apiKey) { headers = { @@ -11753,19 +13468,22 @@ module.exports = class binance extends Exchange { } else { throw new AuthenticationError (this.id + ' historicalTrades endpoint requires `apiKey` credential'); } - } else if (userDataStream) { + } + const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); + if (userDataStream) { if (this.apiKey) { // v1 special case for userDataStream - body = this.urlencode (params); headers = { 'X-MBX-APIKEY': this.apiKey, 'Content-Type': 'application/x-www-form-urlencoded', }; + if (method !== 'GET') { + body = this.urlencode (params); + } } else { throw new AuthenticationError (this.id + ' userDataStream endpoint requires `apiKey` credential'); } - } - if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { + } else if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { this.checkRequiredCredentials (); let query = undefined; const recvWindow = this.safeInteger (this.options, 'recvWindow', 5000); @@ -11797,13 +13515,8 @@ module.exports = class binance extends Exchange { headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } else { - // userDataStream endpoints are public, but POST, PUT, DELETE - // therefore they don't accept URL query arguments - // https://github.com/ccxt/ccxt/issues/5224 - if (!userDataStream) { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } + if (Object.keys (params).length) { + url += '?' + this.urlencode (params); } } return { 'url': url, 'method': method, 'body': body, 'headers': headers }; @@ -11885,7 +13598,7 @@ module.exports = class binance extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],24:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],25:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -11937,13 +13650,14 @@ module.exports = class binanceus extends binance { }; -},{"./binance.js":23}],25:[function(require,module,exports){ +},{"./binance.js":24}],26:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, InvalidNonce, AuthenticationError, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -12095,12 +13809,12 @@ module.exports = class bit2c extends Exchange { const currencyId = this.currencyId (code); const uppercase = currencyId.toUpperCase (); if (uppercase in balance) { - account['free'] = this.safeFloat (balance, 'AVAILABLE_' + uppercase); - account['total'] = this.safeFloat (balance, uppercase); + account['free'] = this.safeString (balance, 'AVAILABLE_' + uppercase); + account['total'] = this.safeString (balance, uppercase); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -12119,22 +13833,22 @@ module.exports = class bit2c extends Exchange { }; const ticker = await this.publicGetExchangesPairTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const averagePrice = this.safeFloat (ticker, 'av'); - const baseVolume = this.safeFloat (ticker, 'a'); + const averagePrice = this.safeNumber (ticker, 'av'); + const baseVolume = this.safeNumber (ticker, 'a'); let quoteVolume = undefined; if (baseVolume !== undefined && averagePrice !== undefined) { quoteVolume = baseVolume * averagePrice; } - const last = this.safeFloat (ticker, 'll'); + const last = this.safeNumber (ticker, 'll'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'h'), + 'bid': this.safeNumber (ticker, 'h'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'l'), + 'ask': this.safeNumber (ticker, 'l'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -12216,14 +13930,8 @@ module.exports = class bit2c extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -12236,7 +13944,7 @@ module.exports = class bit2c extends Exchange { } const id = this.safeString (order, 'id'); const status = this.safeString (order, 'status'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -12253,12 +13961,12 @@ module.exports = class bit2c extends Exchange { 'amount': amount, 'filled': undefined, 'remaining': undefined, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -12284,16 +13992,16 @@ module.exports = class bit2c extends Exchange { parseTrade (trade, market = undefined) { let timestamp = undefined; let id = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let orderId = undefined; let feeCost = undefined; let side = undefined; const reference = this.safeString (trade, 'reference'); if (reference !== undefined) { timestamp = this.safeTimestamp (trade, 'ticks'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'firstAmount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'firstAmount'); const reference_parts = reference.split ('|'); // reference contains 'pair|orderId|tradeId' if (market === undefined) { const marketId = this.safeString (trade, 'pair'); @@ -12311,12 +14019,12 @@ module.exports = class bit2c extends Exchange { } else if (side === 1) { side = 'sell'; } - feeCost = this.safeFloat (trade, 'feeAmount'); + feeCost = this.safeNumber (trade, 'feeAmount'); } else { timestamp = this.safeTimestamp (trade, 'date'); id = this.safeString (trade, 'tid'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'amount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'amount'); side = this.safeValue (trade, 'isBid'); if (side !== undefined) { if (side) { @@ -12330,6 +14038,9 @@ module.exports = class bit2c extends Exchange { if (market !== undefined) { symbol = market['symbol']; } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -12342,7 +14053,7 @@ module.exports = class bit2c extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': { 'cost': feeCost, 'currency': 'NIS', @@ -12398,13 +14109,14 @@ module.exports = class bit2c extends Exchange { }; -},{"./base/Exchange":6,"./base/errors":8}],26:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],27:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -12479,21 +14191,23 @@ module.exports = class bitbank extends Exchange { }, }, 'markets': { + 'BAT/JPY': { 'id': 'bat_jpy', 'symbol': 'BAT/JPY', 'base': 'BAT', 'quote': 'JPY', 'baseId': 'bat', 'quoteId': 'jpy' }, + 'BAT/BTC': { 'id': 'bat_btc', 'symbol': 'BAT/BTC', 'base': 'BAT', 'quote': 'BTC', 'baseId': 'bat', 'quoteId': 'btc' }, 'BCH/BTC': { 'id': 'bcc_btc', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC', 'baseId': 'bcc', 'quoteId': 'btc' }, 'BCH/JPY': { 'id': 'bcc_jpy', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bcc', 'quoteId': 'jpy' }, + 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, + 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, + 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, + 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, + 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, 'MONA/BTC': { 'id': 'mona_btc', 'symbol': 'MONA/BTC', 'base': 'MONA', 'quote': 'BTC', 'baseId': 'mona', 'quoteId': 'btc' }, 'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' }, 'QTUM/BTC': { 'id': 'qtum_btc', 'symbol': 'QTUM/BTC', 'base': 'QTUM', 'quote': 'BTC', 'baseId': 'qtum', 'quoteId': 'btc' }, 'QTUM/JPY': { 'id': 'qtum_jpy', 'symbol': 'QTUM/JPY', 'base': 'QTUM', 'quote': 'JPY', 'baseId': 'qtum', 'quoteId': 'jpy' }, - 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, - 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, - 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, - 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, - 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, - 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, - 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, - 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, 'XLM/BTC': { 'id': 'xlm_btc', 'symbol': 'XLM/BTC', 'base': 'XLM', 'quote': 'BTC', 'baseId': 'xlm', 'quoteId': 'btc' }, + 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, + 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, + 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, }, 'fees': { 'trading': { @@ -12542,16 +14256,16 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -12561,7 +14275,7 @@ module.exports = class bitbank extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -12597,18 +14311,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; feeCurrency = market['quote']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'transaction_id', 'trade_id'); const takerOrMaker = this.safeString (trade, 'maker_taker'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee_amount_quote'); + const feeCost = this.safeNumber (trade, 'fee_amount_quote'); if (feeCost !== undefined) { fee = { 'currency': feeCurrency, @@ -12660,11 +14371,11 @@ module.exports = class bitbank extends Exchange { // return [ this.safeInteger (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -12715,14 +14426,13 @@ module.exports = class bitbank extends Exchange { const balance = assets[i]; const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'free_amount'), - 'used': this.safeFloat (balance, 'locked_amount'), - 'total': this.safeFloat (balance, 'onhand_amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'free_amount'); + account['used'] = this.safeString (balance, 'locked_amount'); + account['total'] = this.safeString (balance, 'onhand_amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -12747,21 +14457,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (order, 'ordered_at'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'start_amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const average = this.safeFloat (order, 'average_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'start_amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const average = this.safeNumber (order, 'average_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -12775,7 +14479,7 @@ module.exports = class bitbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, @@ -12783,7 +14487,7 @@ module.exports = class bitbank extends Exchange { 'trades': undefined, 'fee': undefined, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -13026,13 +14730,14 @@ module.exports = class bitbank extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],27:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],28:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { InvalidNonce, InsufficientFunds, AuthenticationError, InvalidOrder, ExchangeError, OrderNotFound, AccountSuspended, BadSymbol, OrderImmediatelyFillable, RateLimitExceeded, OnMaintenance, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -13307,8 +15012,8 @@ module.exports = class bitbay extends Exchange { if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) { fees = this.safeValue (this.fees, 'fiat', {}); } - const maker = this.safeFloat (fees, 'maker'); - const taker = this.safeFloat (fees, 'taker'); + const maker = this.safeNumber (fees, 'maker'); + const taker = this.safeNumber (fees, 'taker'); // todo: check that the limits have ben interpreted correctly // todo: parse the fees page result.push ({ @@ -13324,7 +15029,7 @@ module.exports = class bitbay extends Exchange { 'taker': taker, 'limits': { 'amount': { - 'min': this.safeFloat (first, 'minOffer'), + 'min': this.safeNumber (first, 'minOffer'), 'max': undefined, }, 'price': { @@ -13332,7 +15037,7 @@ module.exports = class bitbay extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (second, 'minOffer'), + 'min': this.safeNumber (second, 'minOffer'), 'max': undefined, }, }, @@ -13372,16 +15077,10 @@ module.exports = class bitbay extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (order, 'time'); - const amount = this.safeFloat (order, 'startAmount'); - const remaining = this.safeFloat (order, 'currentAmount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } + const amount = this.safeNumber (order, 'startAmount'); + const remaining = this.safeNumber (order, 'currentAmount'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'info': order, @@ -13394,16 +15093,16 @@ module.exports = class bitbay extends Exchange { 'timeInForce': undefined, 'postOnly': postOnly, 'side': this.safeStringLower (order, 'offerType'), - 'price': this.safeFloat (order, 'rate'), + 'price': this.safeNumber (order, 'rate'), 'stopPrice': undefined, 'amount': amount, 'cost': undefined, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'average': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -13456,11 +15155,11 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lockedFunds'); - account['free'] = this.safeFloat (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'lockedFunds'); + account['free'] = this.safeString (balance, 'availableFunds'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -13479,22 +15178,22 @@ module.exports = class bitbay extends Exchange { }; const ticker = await this.publicGetIdTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'volume'); - const vwap = this.safeFloat (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max'), + 'low': this.safeNumber (ticker, 'min'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -13503,7 +15202,7 @@ module.exports = class bitbay extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), + 'average': this.safeNumber (ticker, 'average'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -13804,7 +15503,7 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const change = this.safeValue (item, 'change', {}); - let amount = this.safeFloat (change, 'total'); + let amount = this.safeNumber (change, 'total'); let direction = 'in'; if (amount < 0) { direction = 'out'; @@ -13816,9 +15515,9 @@ module.exports = class bitbay extends Exchange { const referenceId = this.safeString (item, 'detailId'); const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const fundsBefore = this.safeValue (item, 'fundsBefore', {}); - const before = this.safeFloat (fundsBefore, 'total'); + const before = this.safeNumber (fundsBefore, 'total'); const fundsAfter = this.safeValue (item, 'fundsAfter', {}); - const after = this.safeFloat (fundsAfter, 'total'); + const after = this.safeNumber (fundsAfter, 'total'); return { 'info': item, 'id': id, @@ -13875,11 +15574,11 @@ module.exports = class bitbay extends Exchange { const first = this.safeValue (ohlcv, 1, {}); return [ this.safeInteger (ohlcv, 0), - this.safeFloat (first, 'o'), - this.safeFloat (first, 'h'), - this.safeFloat (first, 'l'), - this.safeFloat (first, 'c'), - this.safeFloat (first, 'v'), + this.safeNumber (first, 'o'), + this.safeNumber (first, 'h'), + this.safeNumber (first, 'l'), + this.safeNumber (first, 'c'), + this.safeNumber (first, 'v'), ]; } @@ -13962,15 +15661,12 @@ module.exports = class bitbay extends Exchange { if (wasTaker !== undefined) { takerOrMaker = wasTaker ? 'taker' : 'maker'; } - const price = this.safeFloat2 (trade, 'rate', 'r'); - const amount = this.safeFloat2 (trade, 'amount', 'a'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'commissionValue'); + const priceString = this.safeString2 (trade, 'rate', 'r'); + const amountString = this.safeString2 (trade, 'amount', 'a'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'commissionValue'); const marketId = this.safeString (trade, 'market'); market = this.safeMarket (marketId, market, '-'); const symbol = market['symbol']; @@ -14302,7 +15998,7 @@ module.exports = class bitbay extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],28:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],29:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -14338,7 +16034,7 @@ module.exports = class bitcoincom extends hitbtc { } }; -},{"./hitbtc.js":93}],29:[function(require,module,exports){ +},{"./hitbtc.js":91}],30:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -14346,6 +16042,7 @@ module.exports = class bitcoincom extends hitbtc { const Exchange = require ('./base/Exchange'); const { NotSupported, RateLimitExceeded, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, InvalidNonce, BadSymbol } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -14386,6 +16083,7 @@ module.exports = class bitfinex extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': '1m', @@ -14499,6 +16197,7 @@ module.exports = class bitfinex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'maker': 0.1 / 100, @@ -14685,6 +16384,8 @@ module.exports = class bitfinex extends Exchange { 'No summary found.': ExchangeError, // fetchTradingFees (summary) endpoint can give this vague error message 'Cannot evaluate your available balance, please try again': ExchangeNotAvailable, 'Unknown symbol': BadSymbol, + 'Cannot complete transfer. Exchange balance insufficient.': InsufficientFunds, + 'Momentary balance check. Please wait few seconds and try the transfer again.': ExchangeError, }, 'broad': { 'Invalid X-BFX-SIGNATURE': AuthenticationError, @@ -14782,6 +16483,15 @@ module.exports = class bitfinex extends Exchange { 'limit': 'exchange limit', 'market': 'exchange market', }, + 'accountsByType': { + 'spot': 'exchange', + 'margin': 'trading', + 'funding': 'deposit', + 'exchange': 'exchange', + 'trading': 'trading', + 'deposit': 'deposit', + 'derivatives': 'trading', + }, }, }); } @@ -14795,7 +16505,7 @@ module.exports = class bitfinex extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdraw[code] = this.safeFloat (fees, id); + withdraw[code] = this.safeNumber (fees, id); } return { 'info': response, @@ -14831,14 +16541,31 @@ module.exports = class bitfinex extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } async fetchMarkets (params = {}) { const ids = await this.publicGetSymbols (); + // + // [ "btcusd", "ltcusd", "ltcbtc" ] + // const details = await this.publicGetSymbolsDetails (); + // + // [ + // { + // "pair":"btcusd", + // "price_precision":5, + // "initial_margin":"10.0", + // "minimum_margin":"5.0", + // "maximum_order_size":"2000.0", + // "minimum_order_size":"0.0002", + // "expiration":"NA", + // "margin":true + // }, + // ] + // const result = []; for (let i = 0; i < details.length; i++) { const market = details[i]; @@ -14869,8 +16596,8 @@ module.exports = class bitfinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -14881,6 +16608,7 @@ module.exports = class bitfinex extends Exchange { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -14889,6 +16617,8 @@ module.exports = class bitfinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': true, + 'type': 'spot', + 'margin': margin, 'precision': precision, 'limits': limits, 'info': market, @@ -14913,40 +16643,15 @@ module.exports = class bitfinex extends Exchange { return this.decimalToPrecision (price, TRUNCATE, 8, DECIMAL_PLACES); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - const code = market[key]; - const currency = this.safeValue (this.currencies, code); - if (currency !== undefined) { - const precision = this.safeInteger (currency, 'precision'); - if (precision !== undefined) { - cost = parseFloat (this.currencyToPrecision (code, cost)); - } - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); - const types = { - 'exchange': 'exchange', - 'deposit': 'funding', - 'trading': 'margin', - }; - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } const query = this.omit (params, 'type'); const response = await this.privatePostBalances (query); // [ { type: 'deposit', @@ -14962,12 +16667,16 @@ module.exports = class bitfinex extends Exchange { // amount: '0.0005', // available: '0.0005' } ], const result = { 'info': response }; + const isDerivative = requestedType === 'derivatives'; for (let i = 0; i < response.length; i++) { const balance = response[i]; const type = this.safeString (balance, 'type'); - const parsedType = this.safeString (types, type); - if ((parsedType === balanceType) || (type === balanceType)) { - const currencyId = this.safeString (balance, 'currency'); + const currencyId = this.safeStringLower (balance, 'currency', ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { const code = this.safeCurrencyCode (currencyId); // bitfinex had BCH previously, now it's BAB, but the old // BCH symbol is kept for backward-compatibility @@ -14976,13 +16685,80 @@ module.exports = class bitfinex extends Exchange { // https://github.com/ccxt/ccxt/issues/4989 if (!(code in result)) { const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currencyId = this.currencyId (code); + const fromCurrencyId = this.convertDerivativesId (currencyId, fromAccount); + const toCurrencyId = this.convertDerivativesId (currencyId, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'walletfrom': fromId, + 'walletto': toId, + }; + const response = await this.privatePostTransfer (this.extend (request, params)); + // [ + // { + // status: 'success', + // message: '0.0001 Bitcoin transfered from Margin to Exchange' + // } + // ] + const result = this.safeValue (response, 0); + const status = this.safeString (result, 'status'); + const message = this.safeString (result, 'message'); + if (message === undefined) { + throw new ExchangeError (this.id + ' transfer failed'); + } + // [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}] + if (status === 'error') { + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + return { + 'info': response, + 'status': status, + 'amount': requestedAmount, + 'code': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'timestamp': undefined, + 'datetime': undefined, + }; + } + + convertDerivativesId (currencyId, type) { + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if ((type !== 'derivatives' && type !== 'trading' && type !== 'margin') && isDerivativeCode) { + currencyId = currencyId.slice (0, start); + } else if (type === 'derivatives' && !isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + return currencyId; } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -15021,7 +16797,7 @@ module.exports = class bitfinex extends Exchange { } parseTicker (ticker, market = undefined) { - let timestamp = this.safeFloat (ticker, 'timestamp'); + let timestamp = this.safeNumber (ticker, 'timestamp'); if (timestamp !== undefined) { timestamp *= 1000; } @@ -15044,16 +16820,16 @@ module.exports = class bitfinex extends Exchange { } } } - const last = this.safeFloat (ticker, 'last_price'); + const last = this.safeNumber (ticker, 'last_price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -15062,8 +16838,8 @@ module.exports = class bitfinex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'mid'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'mid'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -15071,24 +16847,21 @@ module.exports = class bitfinex extends Exchange { parseTrade (trade, market) { const id = this.safeString (trade, 'tid'); - let timestamp = this.safeFloat (trade, 'timestamp'); + let timestamp = this.safeNumber (trade, 'timestamp'); if (timestamp !== undefined) { timestamp = parseInt (timestamp) * 1000; } const type = undefined; const side = this.safeStringLower (trade, 'type'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; if ('fee_amount' in trade) { - const feeCost = -this.safeFloat (trade, 'fee_amount'); + const feeCost = -this.safeNumber (trade, 'fee_amount'); const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { @@ -15203,6 +16976,30 @@ module.exports = class bitfinex extends Exchange { } parseOrder (order, market = undefined) { + // + // { + // id: 57334010955, + // cid: 1611584840966, + // cid_date: null, + // gid: null, + // symbol: 'ltcbtc', + // exchange: null, + // price: '0.0042125', + // avg_execution_price: '0.0042097', + // side: 'sell', + // type: 'exchange market', + // timestamp: '1611584841.0', + // is_live: false, + // is_cancelled: false, + // is_hidden: 0, + // oco_order: 0, + // was_forced: false, + // original_amount: '0.205176', + // remaining_amount: '0.0', + // executed_amount: '0.205176', + // src: 'web' + // } + // const side = this.safeString (order, 'side'); const open = this.safeValue (order, 'is_live'); const canceled = this.safeValue (order, 'is_cancelled'); @@ -15214,30 +17011,17 @@ module.exports = class bitfinex extends Exchange { } else { status = 'closed'; } - let symbol = undefined; - if (market === undefined) { - const marketId = this.safeStringUpper (order, 'symbol'); - if (marketId !== undefined) { - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } - } - } - if (market !== undefined) { - symbol = market['symbol']; - } - let orderType = order['type']; + const marketId = this.safeStringUpper (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market); + let orderType = this.safeString (order, 'type', ''); const exchange = orderType.indexOf ('exchange ') >= 0; if (exchange) { const parts = order['type'].split (' '); orderType = parts[1]; } - let timestamp = this.safeFloat (order, 'timestamp'); - if (timestamp !== undefined) { - timestamp = parseInt (timestamp) * 1000; - } + const timestamp = this.safeTimestamp (order, 'timestamp'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -15249,17 +17033,17 @@ module.exports = class bitfinex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': side, - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_execution_price'), - 'amount': this.safeFloat (order, 'original_amount'), - 'remaining': this.safeFloat (order, 'remaining_amount'), - 'filled': this.safeFloat (order, 'executed_amount'), + 'average': this.safeNumber (order, 'avg_execution_price'), + 'amount': this.safeNumber (order, 'original_amount'), + 'remaining': this.safeNumber (order, 'remaining_amount'), + 'filled': this.safeNumber (order, 'executed_amount'), 'status': status, 'fee': undefined, 'cost': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -15314,11 +17098,11 @@ module.exports = class bitfinex extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -15466,11 +17250,11 @@ module.exports = class bitfinex extends Exchange { // "timestamp_created": "1561716066.0" // } // - let timestamp = this.safeFloat (transaction, 'timestamp_created'); + let timestamp = this.safeNumber (transaction, 'timestamp_created'); if (timestamp !== undefined) { timestamp = parseInt (timestamp * 1000); } - let updated = this.safeFloat (transaction, 'timestamp'); + let updated = this.safeNumber (transaction, 'timestamp'); if (updated !== undefined) { updated = parseInt (updated * 1000); } @@ -15478,7 +17262,7 @@ module.exports = class bitfinex extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const type = this.safeStringLower (transaction, 'type'); // DEPOSIT or WITHDRAWAL const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -15491,7 +17275,7 @@ module.exports = class bitfinex extends Exchange { 'address': this.safeString (transaction, 'address'), // todo: this is actually the tag for XRP transfers (the address is missing) 'tag': undefined, // refix it properly for the tag from description 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -15545,7 +17329,7 @@ module.exports = class bitfinex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // @@ -15623,7 +17407,7 @@ module.exports = class bitfinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],30:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],31:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -15912,6 +17696,15 @@ module.exports = class bitfinex2 extends bitfinex { 'JPY': 'JPY', 'GBP': 'GBP', }, + // actually the correct names unlike the v1 + // we don't want to extend this with accountsByType in v1 + 'v2AccountsByType': { + 'spot': 'exchange', + 'exchange': 'exchange', + 'funding': 'funding', + 'margin': 'margin', + 'derivatives': 'margin', + }, }, 'exceptions': { 'exact': { @@ -15993,8 +17786,8 @@ module.exports = class bitfinex2 extends bitfinex { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -16005,6 +17798,7 @@ module.exports = class bitfinex2 extends bitfinex { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -16019,6 +17813,7 @@ module.exports = class bitfinex2 extends bitfinex { 'type': type, 'swap': false, 'spot': spot, + 'margin': margin, 'futures': futures, }); } @@ -16131,7 +17926,7 @@ module.exports = class bitfinex2 extends bitfinex { const ids = this.safeValue (response, 0, []); const result = {}; for (let i = 0; i < ids.length; i++) { - let id = ids[i]; + const id = ids[i]; const code = this.safeCurrencyCode (id); const label = this.safeValue (indexed['label'], id, []); const name = this.safeString (label, 1); @@ -16139,13 +17934,14 @@ module.exports = class bitfinex2 extends bitfinex { const type = this.safeString (pool, 1); const feeValues = this.safeValue (indexed['fees'], id, []); const fees = this.safeValue (feeValues, 1, []); - const fee = this.safeFloat (fees, 1); + const fee = this.safeNumber (fees, 1); + const undl = this.safeValue (indexed['undl'], id, []); const precision = 8; // default precision, todo: fix "magic constants" - id = 'f' + id; + const fid = 'f' + id; result[code] = { - 'id': id, + 'id': fid, 'code': code, - 'info': [ id, label, pool, feeValues ], + 'info': [ id, label, pool, feeValues, undl ], 'type': type, 'name': name, 'active': true, @@ -16176,40 +17972,117 @@ module.exports = class bitfinex2 extends bitfinex { async fetchBalance (params = {}) { // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances) + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 await this.loadMarkets (); - const response = await this.privatePostAuthRWallets (params); - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } + const isDerivative = requestedType === 'derivatives'; + const query = this.omit (params, 'type'); + const response = await this.privatePostAuthRWallets (query); const result = { 'info': response }; - for (let b = 0; b < response.length; b++) { - const balance = response[b]; - const accountType = balance[0]; - let currency = balance[1]; - const total = balance[2]; - const available = balance[4]; - if (accountType === balanceType) { - if (currency[0] === 't') { - currency = currency.slice (1); - } - const code = this.safeCurrencyCode (currency); + for (let i = 0; i < response.length; i++) { + const balance = response[i]; + const type = this.safeString (balance, 0); + const currencyId = this.safeStringLower (balance, 1, ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { + const code = this.safeCurrencyCode (currencyId); const account = this.account (); - // do not fill in zeroes and missing values in the parser - // rewrite and unify the following to use the unified parseBalance - account['total'] = total; - if (!available) { - if (available === 0) { - account['free'] = 0; - account['used'] = total; - } else { - account['free'] = total; - } - } else { - account['free'] = available; - account['used'] = account['total'] - account['free']; - } + account['total'] = this.safeString (balance, 2); + account['free'] = this.safeString (balance, 4); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currency = this.currency (code); + const fromCurrencyId = this.convertDerivativesId (currency, fromAccount); + const toCurrencyId = this.convertDerivativesId (currency, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + // this request is slightly different from v1 fromAccount -> from + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'from': fromId, + 'to': toId, + }; + const response = await this.privatePostAuthWTransfer (this.extend (request, params)); + // [1616451183763,"acc_tf",null,null,[1616451183763,"exchange","margin",null,"UST","UST",null,1],null,"SUCCESS","1.0 Tether USDt transfered from Exchange to Margin"] + const timestamp = this.safeInteger (response, 0); + // ["error",10001,"Momentary balance check. Please wait few seconds and try the transfer again."] + const error = this.safeString (response, 0); + if (error === 'error') { + const message = this.safeString (response, 2, ''); + // same message as in v1 + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + const info = this.safeValue (response, 4); + const fromResponse = this.safeString (info, 1); + const toResponse = this.safeString (info, 2); + const toCode = this.safeCurrencyCode (this.safeString (info, 5)); + const success = this.safeString (response, 6); + const status = (success === 'SUCCESS') ? 'ok' : undefined; + return { + 'info': response, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'status': status, + 'amount': requestedAmount, + 'code': toCode, + 'fromAccount': fromResponse, + 'toAccount': toResponse, + }; + } + + convertDerivativesId (currency, type) { + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 + // { + // id: 'fUSTF0', + // code: 'USTF0', + // info: [ 'USTF0', [], [], [], [ 'USTF0', 'UST' ] ], + const info = this.safeValue (currency, 'info'); + const transferId = this.safeString (info, 0); + const underlying = this.safeValue (info, 4, []); + let currencyId = undefined; + if (type === 'derivatives') { + currencyId = this.safeString (underlying, 0, transferId); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if (!isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + } else if (type !== 'margin') { + currencyId = this.safeString (underlying, 1, transferId); + } else { + currencyId = transferId; + } + return currencyId; } async fetchOrder (id, symbol = undefined, params = {}) { @@ -16239,9 +18112,10 @@ module.exports = class bitfinex2 extends bitfinex { const priceIndex = (fullRequest['precision'] === 'R0') ? 1 : 0; for (let i = 0; i < orderbook.length; i++) { const order = orderbook[i]; - const price = order[priceIndex]; - const amount = Math.abs (order[2]); - const side = (order[2] > 0) ? 'bids' : 'asks'; + const price = this.safeNumber (order, priceIndex); + const signedAmount = this.safeNumber (order, 2); + const amount = Math.abs (signedAmount); + const side = (signedAmount > 0) ? 'bids' : 'asks'; result[side].push ([ price, amount ]); } result['bids'] = this.sortBy (result['bids'], 0, true); @@ -16256,26 +18130,26 @@ module.exports = class bitfinex2 extends bitfinex { symbol = market['symbol']; } const length = ticker.length; - const last = ticker[length - 4]; + const last = this.safeNumber (ticker, length - 4); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': ticker[length - 2], - 'low': ticker[length - 1], - 'bid': ticker[length - 10], + 'high': this.safeNumber (ticker, length - 2), + 'low': this.safeNumber (ticker, length - 1), + 'bid': this.safeNumber (ticker, length - 10), 'bidVolume': undefined, - 'ask': ticker[length - 8], + 'ask': this.safeNumber (ticker, length - 8), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': ticker[length - 6], - 'percentage': ticker[length - 5] * 100, + 'change': this.safeNumber (ticker, length - 6), + 'percentage': this.safeNumber (ticker, length - 5) * 100, 'average': undefined, - 'baseVolume': ticker[length - 3], + 'baseVolume': this.safeNumber (ticker, length - 3), 'quoteVolume': undefined, 'info': ticker, }; @@ -16364,12 +18238,12 @@ module.exports = class bitfinex2 extends bitfinex { // const tradeLength = trade.length; const isPrivate = (tradeLength > 5); - const id = trade[0].toString (); + const id = this.safeString (trade, 0); const amountIndex = isPrivate ? 4 : 2; - let amount = trade[amountIndex]; + let amount = this.safeNumber (trade, amountIndex); let cost = undefined; const priceIndex = isPrivate ? 5 : 3; - const price = trade[priceIndex]; + const price = this.safeNumber (trade, priceIndex); let side = undefined; let orderId = undefined; let takerOrMaker = undefined; @@ -16377,7 +18251,7 @@ module.exports = class bitfinex2 extends bitfinex { let fee = undefined; let symbol = undefined; const timestampIndex = isPrivate ? 2 : 1; - const timestamp = trade[timestampIndex]; + const timestamp = this.safeInteger (trade, timestampIndex); if (isPrivate) { const marketId = trade[1]; if (marketId in this.markets_by_id) { @@ -16386,10 +18260,12 @@ module.exports = class bitfinex2 extends bitfinex { } else { symbol = this.parseSymbol (marketId); } - orderId = trade[3].toString (); - takerOrMaker = (trade[8] === 1) ? 'maker' : 'taker'; - let feeCost = trade[9]; - const feeCurrency = this.safeCurrencyCode (trade[10]); + orderId = this.safeString (trade, 3); + const maker = this.safeInteger (trade, 8); + takerOrMaker = (maker === 1) ? 'maker' : 'taker'; + let feeCost = this.safeNumber (trade, 9); + const feeCurrencyId = this.safeString (trade, 10); + const feeCurrency = this.safeCurrencyCode (feeCurrencyId); if (feeCost !== undefined) { feeCost = -feeCost; if (symbol in this.markets) { @@ -16530,10 +18406,10 @@ module.exports = class bitfinex2 extends bitfinex { // https://github.com/ccxt/ccxt/issues/6686 // const timestamp = this.safeTimestamp (order, 5); const timestamp = this.safeInteger (order, 5); - const remaining = Math.abs (this.safeFloat (order, 6)); - const amount = Math.abs (this.safeFloat (order, 7)); - const filled = amount - remaining; - const side = (order[7] < 0) ? 'sell' : 'buy'; + const remaining = Math.abs (this.safeNumber (order, 6)); + const signedAmount = this.safeNumber (order, 7); + const amount = Math.abs (signedAmount); + const side = (signedAmount < 0) ? 'sell' : 'buy'; const orderType = this.safeString (order, 8); const type = this.safeString (this.safeValue (this.options, 'exchangeTypes'), orderType); let status = undefined; @@ -16542,11 +18418,10 @@ module.exports = class bitfinex2 extends bitfinex { const parts = statusString.split (' @ '); status = this.parseOrderStatus (this.safeString (parts, 0)); } - const price = this.safeFloat (order, 16); - const average = this.safeFloat (order, 17); - const cost = price * filled; + const price = this.safeNumber (order, 16); + const average = this.safeNumber (order, 17); const clientOrderId = this.safeString (order, 2); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -16561,14 +18436,14 @@ module.exports = class bitfinex2 extends bitfinex { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -16585,11 +18460,11 @@ module.exports = class bitfinex2 extends bitfinex { if ((orderType === 'LIMIT') || (orderType === 'EXCHANGE LIMIT')) { request['price'] = this.numberToString (price); } else if ((orderType === 'STOP') || (orderType === 'EXCHANGE STOP')) { - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'STOP LIMIT') || (orderType === 'EXCHANGE STOP LIMIT')) { - const priceAuxLimit = this.safeFloat (params, 'price_aux_limit'); - let stopPrice = this.safeFloat (params, 'stopPrice'); + const priceAuxLimit = this.safeNumber (params, 'price_aux_limit'); + let stopPrice = this.safeNumber (params, 'stopPrice'); if (priceAuxLimit === undefined) { if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter or a price_aux_limit parameter for a ' + orderType + ' order'); @@ -16604,9 +18479,9 @@ module.exports = class bitfinex2 extends bitfinex { } request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'TRAILING STOP') || (orderType === 'EXCHANGE TRAILING STOP')) { - const priceTrailing = this.safeFloat (params, 'price_trailing'); + const priceTrailing = this.safeNumber (params, 'price_trailing'); request['price_trailing'] = this.numberToString (priceTrailing); - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'FOK') || (orderType === 'EXCHANGE FOK') || (orderType === 'IOC') || (orderType === 'EXCHANGE IOC')) { request['price'] = this.numberToString (price); @@ -16938,11 +18813,11 @@ module.exports = class bitfinex2 extends bitfinex { if (currency !== undefined) { code = currency['code']; } - feeCost = this.safeFloat (data, 8); + feeCost = this.safeNumber (data, 8); if (feeCost !== undefined) { feeCost = -feeCost; } - amount = this.safeFloat (data, 5); + amount = this.safeNumber (data, 5); id = this.safeValue (data, 0); status = 'ok'; if (id === 0) { @@ -16956,7 +18831,7 @@ module.exports = class bitfinex2 extends bitfinex { timestamp = this.safeInteger (transaction, 5); updated = this.safeInteger (transaction, 6); status = this.parseTransactionStatus (this.safeString (transaction, 9)); - amount = this.safeFloat (transaction, 12); + amount = this.safeNumber (transaction, 12); if (amount !== undefined) { if (amount < 0) { type = 'withdrawal'; @@ -16964,7 +18839,7 @@ module.exports = class bitfinex2 extends bitfinex { type = 'deposit'; } } - feeCost = this.safeFloat (transaction, 13); + feeCost = this.safeNumber (transaction, 13); if (feeCost !== undefined) { feeCost = -feeCost; } @@ -17092,7 +18967,7 @@ module.exports = class bitfinex2 extends bitfinex { }); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // @@ -17197,13 +19072,14 @@ module.exports = class bitfinex2 extends bitfinex { } }; -},{"./base/errors":8,"./bitfinex.js":29}],31:[function(require,module,exports){ +},{"./base/errors":9,"./bitfinex.js":30}],32:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -17385,11 +19261,11 @@ module.exports = class bitflyer extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'amount'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -17408,16 +19284,16 @@ module.exports = class bitflyer extends Exchange { }; const ticker = await this.publicGetGetticker (this.extend (request, params)); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'ltp'); + const last = this.safeNumber (ticker, 'ltp'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'best_bid'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -17427,7 +19303,7 @@ module.exports = class bitflyer extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_by_product'), + 'baseVolume': this.safeNumber (ticker, 'volume_by_product'), 'quoteVolume': undefined, 'info': ticker, }; @@ -17451,14 +19327,11 @@ module.exports = class bitflyer extends Exchange { order = this.safeString (trade, 'child_order_acceptance_id'); } const timestamp = this.parse8601 (this.safeString (trade, 'exec_date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -17534,18 +19407,17 @@ module.exports = class bitflyer extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'child_order_date')); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'outstanding_size'); - const filled = this.safeFloat (order, 'executed_size'); - const price = this.safeFloat (order, 'price'); - const cost = price * filled; + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'outstanding_size'); + const filled = this.safeNumber (order, 'executed_size'); + const price = this.safeNumber (order, 'price'); const status = this.parseOrderStatus (this.safeString (order, 'child_order_state')); const type = this.safeStringLower (order, 'child_order_type'); const side = this.safeStringLower (order, 'side'); const marketId = this.safeString (order, 'product_code'); const symbol = this.safeSymbol (marketId, market); let fee = undefined; - const feeCost = this.safeFloat (order, 'total_commission'); + const feeCost = this.safeNumber (order, 'total_commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -17554,7 +19426,7 @@ module.exports = class bitflyer extends Exchange { }; } const id = this.safeString (order, 'child_order_acceptance_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -17569,14 +19441,14 @@ module.exports = class bitflyer extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrders (symbol = undefined, since = undefined, limit = 100, params = {}) { @@ -17639,7 +19511,7 @@ module.exports = class bitflyer extends Exchange { return this.parseTrades (response, market, since, limit); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchPositions() requires a `symbols` argument, exactly one symbol in an array'); } @@ -17723,13 +19595,14 @@ module.exports = class bitflyer extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],32:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],33:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, OrderNotFound, InsufficientFunds, DDoSProtection, PermissionDenied, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -17985,7 +19858,7 @@ module.exports = class bitforex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -18021,14 +19894,11 @@ module.exports = class bitforex extends Exchange { const timestamp = this.safeInteger (trade, 'time'); const id = this.safeString (trade, 'tid'); const orderId = undefined; - const amount = this.safeFloat (trade, 'amount'); - const price = this.safeFloat (trade, 'price'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const sideId = this.safeInteger (trade, 'direction'); const side = this.parseSide (sideId); return { @@ -18071,12 +19941,12 @@ module.exports = class bitforex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'active'); - account['total'] = this.safeFloat (balance, 'fix'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'active'); + account['total'] = this.safeString (balance, 'fix'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTicker (symbol, params = {}) { @@ -18092,21 +19962,21 @@ module.exports = class bitforex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (data, 'high'), - 'low': this.safeFloat (data, 'low'), - 'bid': this.safeFloat (data, 'buy'), + 'high': this.safeNumber (data, 'high'), + 'low': this.safeNumber (data, 'low'), + 'bid': this.safeNumber (data, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (data, 'sell'), + 'ask': this.safeNumber (data, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (data, 'last'), - 'last': this.safeFloat (data, 'last'), + 'close': this.safeNumber (data, 'last'), + 'last': this.safeNumber (data, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (data, 'vol'), + 'baseVolume': this.safeNumber (data, 'vol'), 'quoteVolume': undefined, 'info': response, }; @@ -18126,11 +19996,11 @@ module.exports = class bitforex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -18198,26 +20068,24 @@ module.exports = class bitforex extends Exchange { parseOrder (order, market = undefined) { const id = this.safeString (order, 'orderId'); - const timestamp = this.safeFloat (order, 'createTime'); - const lastTradeTimestamp = this.safeFloat (order, 'lastTime'); + const timestamp = this.safeNumber (order, 'createTime'); + const lastTradeTimestamp = this.safeNumber (order, 'lastTime'); const symbol = market['symbol']; const sideId = this.safeInteger (order, 'tradeType'); const side = this.parseSide (sideId); const type = undefined; - const price = this.safeFloat (order, 'orderPrice'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderAmount'); - const filled = this.safeFloat (order, 'dealAmount'); - const remaining = amount - filled; + const price = this.safeNumber (order, 'orderPrice'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderAmount'); + const filled = this.safeNumber (order, 'dealAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderState')); - const cost = filled * price; const feeSide = (side === 'buy') ? 'base' : 'quote'; const feeCurrency = market[feeSide]; const fee = { - 'cost': this.safeFloat (order, 'tradeFee'), + 'cost': this.safeNumber (order, 'tradeFee'), 'currency': feeCurrency, }; - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -18231,16 +20099,15 @@ module.exports = class bitforex extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -18356,7 +20223,7 @@ module.exports = class bitforex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],33:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],34:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -18364,6 +20231,7 @@ module.exports = class bitforex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -19152,7 +21020,7 @@ module.exports = class bitget extends Exchange { let swap = false; const baseId = this.safeString2 (market, 'base_currency', 'coin'); const quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { marketType = 'swap'; spot = false; @@ -19170,7 +21038,7 @@ module.exports = class bitget extends Exchange { 'amount': parseFloat ('1e-' + sizeIncrement), 'price': parseFloat ('1e-' + tickSize), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const status = this.safeString (market, 'status'); let active = undefined; if (status !== undefined) { @@ -19427,26 +21295,26 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat2 (ticker, 'last', 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'last', 'close'); + const open = this.safeNumber (ticker, 'open'); let bidVolume = undefined; let askVolume = undefined; let bid = this.safeValue (ticker, 'bid'); if (bid === undefined) { - bid = this.safeFloat (ticker, 'best_bid'); + bid = this.safeNumber (ticker, 'best_bid'); } else { - bidVolume = this.safeFloat (bid, 1); - bid = this.safeFloat (bid, 0); + bidVolume = this.safeNumber (bid, 1); + bid = this.safeNumber (bid, 0); } let ask = this.safeValue (ticker, 'ask'); if (ask === undefined) { - ask = this.safeFloat (ticker, 'best_ask'); + ask = this.safeNumber (ticker, 'best_ask'); } else { - askVolume = this.safeFloat (ask, 1); - ask = this.safeFloat (ask, 0); + askVolume = this.safeNumber (ask, 1); + ask = this.safeNumber (ask, 0); } - const baseVolume = this.safeFloat2 (ticker, 'amount', 'volume_24h'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber2 (ticker, 'amount', 'volume_24h'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; @@ -19460,8 +21328,8 @@ module.exports = class bitget extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -19696,9 +21564,12 @@ module.exports = class bitget extends Exchange { } let timestamp = this.safeInteger (trade, 'created_at'); timestamp = this.safeInteger2 (trade, 'timestamp', 'ts', timestamp); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'filled_amount', 'order_qty'); - amount = this.safeFloat2 (trade, 'size', 'amount', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'filled_amount', 'order_qty'); + amountString = this.safeString2 (trade, 'size', 'amount', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -19717,18 +21588,13 @@ module.exports = class bitget extends Exchange { type = this.parseOrderType (side); side = this.parseOrderSide (side); } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - let feeCost = this.safeFloat (trade, 'fee'); - if (feeCost === undefined) { - feeCost = this.safeFloat (trade, 'filled_fees'); + let feeCostString = this.safeString (trade, 'fee'); + if (feeCostString === undefined) { + feeCostString = this.safeString (trade, 'filled_fees'); } else { - feeCost = -feeCost; + feeCostString = (feeCostString[0] === '-') ? feeCostString.slice (1) : feeCostString; } + const feeCost = this.parseNumber (feeCostString); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -19851,23 +21717,23 @@ module.exports = class bitget extends Exchange { const volumeIndex = this.safeString (volume, market['type'], 'amount'); return [ this.safeInteger (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets ]; } else { const volumeIndex = this.safeValue (volume, market['type'], 6); return [ this.safeInteger (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, volumeIndex), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, volumeIndex), // Base Volume ]; } } @@ -19969,13 +21835,13 @@ module.exports = class bitget extends Exchange { } const type = this.safeValue (balance, 'type'); if (type === 'trade') { - result[code]['free'] = this.safeFloat (balance, 'balance'); + result[code]['free'] = this.safeString (balance, 'balance'); } else if ((type === 'frozen') || (type === 'lock')) { - const used = this.safeFloat (result[code], 'used'); - result[code]['used'] = this.sum (used, this.safeFloat (balance, 'balance')); + const used = this.safeString (result[code], 'used'); + result[code]['used'] = Precise.stringAdd (used, this.safeString (balance, 'balance')); } } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseSwapBalance (response) { @@ -19999,11 +21865,11 @@ module.exports = class bitget extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeString (balance, 'equity'); + account['free'] = this.safeString (balance, 'total_avail_balance'); result[symbol] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchAccounts (params = {}) { @@ -20280,26 +22146,13 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let amount = this.safeFloat2 (order, 'amount', 'size'); - const filled = this.safeFloat2 (order, 'filled_amount', 'filled_qty'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - amount = Math.max (amount, filled); - remaining = Math.max (0, amount - filled); - } - } - if (type === 'market') { - remaining = 0; - } - const cost = this.safeFloat (order, 'filled_cash_amount'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); - if ((average === undefined) && (filled !== undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } + const amount = this.safeNumber2 (order, 'amount', 'size'); + const filled = this.safeNumber2 (order, 'filled_amount', 'filled_qty'); + const cost = this.safeNumber (order, 'filled_cash_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'price_avg'); const status = this.parseOrderStatus (this.safeString2 (order, 'state', 'status')); - const feeCost = this.safeFloat2 (order, 'filled_fees', 'fee'); + const feeCost = this.safeNumber2 (order, 'filled_fees', 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -20309,7 +22162,7 @@ module.exports = class bitget extends Exchange { }; } const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -20327,11 +22180,11 @@ module.exports = class bitget extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -20378,7 +22231,7 @@ module.exports = class bitget extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'amount'); + let cost = this.safeNumber (params, 'amount'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -20928,12 +22781,12 @@ module.exports = class bitget extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const txid = this.safeString (transaction, 'tx_hash'); const timestamp = this.safeInteger (transaction, 'created_at'); const updated = this.safeInteger (transaction, 'updated_at'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -21123,7 +22976,7 @@ module.exports = class bitget extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.swapGetPositionAllPosition (params); // @@ -21264,7 +23117,7 @@ module.exports = class bitget extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],34:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],35:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -21272,6 +23125,7 @@ module.exports = class bitget extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, AuthenticationError, BadRequest, PermissionDenied, InvalidAddress, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); const { DECIMAL_PLACES, SIGNIFICANT_DIGITS, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -21465,12 +23319,12 @@ module.exports = class bithumb extends Exchange { const account = this.account (); const currency = this.currency (code); const lowerCurrencyId = this.safeStringLower (currency, 'id'); - account['total'] = this.safeFloat (balances, 'total_' + lowerCurrencyId); - account['used'] = this.safeFloat (balances, 'in_use_' + lowerCurrencyId); - account['free'] = this.safeFloat (balances, 'available_' + lowerCurrencyId); + account['total'] = this.safeString (balances, 'total_' + lowerCurrencyId); + account['used'] = this.safeString (balances, 'in_use_' + lowerCurrencyId); + account['free'] = this.safeString (balances, 'available_' + lowerCurrencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -21532,8 +23386,8 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'opening_price'); - const close = this.safeFloat (ticker, 'closing_price'); + const open = this.safeNumber (ticker, 'opening_price'); + const close = this.safeNumber (ticker, 'closing_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -21544,18 +23398,18 @@ module.exports = class bithumb extends Exchange { } average = this.sum (open, close) / 2; } - const baseVolume = this.safeFloat (ticker, 'units_traded_24H'); - const quoteVolume = this.safeFloat (ticker, 'acc_trade_value_24H'); + const baseVolume = this.safeNumber (ticker, 'units_traded_24H'); + const quoteVolume = this.safeNumber (ticker, 'acc_trade_value_24H'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -21661,11 +23515,11 @@ module.exports = class bithumb extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -21755,18 +23609,16 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'units_traded', 'units'); - let cost = this.safeFloat (trade, 'total'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'units_traded', 'units'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.commonCurrencyCode (feeCurrencyId); @@ -21969,14 +23821,14 @@ module.exports = class bithumb extends Exchange { const sideProperty = this.safeValue2 (order, 'type', 'side'); const side = (sideProperty === 'bid') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'order_status')); - let price = this.safeFloat2 (order, 'order_price', 'price'); + let price = this.safeNumber2 (order, 'order_price', 'price'); let type = 'limit'; if (price === 0) { price = undefined; type = 'market'; } - const amount = this.safeFloat2 (order, 'order_qty', 'units'); - let remaining = this.safeFloat (order, 'units_remaining'); + const amount = this.safeNumber2 (order, 'order_qty', 'units'); + let remaining = this.safeNumber (order, 'units_remaining'); if (remaining === undefined) { if (status === 'closed') { remaining = 0; @@ -21995,65 +23847,14 @@ module.exports = class bithumb extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let filled = undefined; - let cost = undefined; - let average = undefined; const id = this.safeString (order, 'order_id'); - const rawTrades = this.safeValue (order, 'contract'); - let trades = undefined; - let fee = undefined; - let fees = undefined; - let feesByCurrency = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'side': side, - 'symbol': symbol, - 'order': id, - }); - filled = 0; - feesByCurrency = {}; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - filled = this.sum (filled, trade['amount']); - cost = this.sum (cost, trade['cost']); - const tradeFee = trade['fee']; - const feeCurrency = tradeFee['currency']; - if (feeCurrency in feesByCurrency) { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': this.sum (feesByCurrency[feeCurrency]['cost'], tradeFee['cost']), - }; - } else { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': tradeFee['cost'], - }; - } - } - const feeCurrencies = Object.keys (feesByCurrency); - const feeCurrenciesLength = feeCurrencies.length; - if (feeCurrenciesLength > 1) { - fees = []; - for (let i = 0; i < feeCurrencies.length; i++) { - const feeCurrency = feeCurrencies[i]; - fees.push (feesByCurrency[feeCurrency]); - } - } else { - fee = this.safeValue (feesByCurrency, feeCurrencies[0]); - } - if (filled !== 0) { - average = cost / filled; - } - } - if (amount !== undefined) { - if ((filled === undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if ((remaining === undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const result = { + const rawTrades = this.safeValue (order, 'contract', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'side': side, + 'symbol': symbol, + 'order': id, + }); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -22068,20 +23869,14 @@ module.exports = class bithumb extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, + 'cost': undefined, + 'average': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': trades, - }; - if (fee !== undefined) { - result['fee'] = fee; - } else if (fees !== undefined) { - result['fees'] = fees; - } - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -22241,7 +24036,7 @@ module.exports = class bithumb extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],35:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],36:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -22272,7 +24067,7 @@ module.exports = class bitkk extends zb { } }; -},{"./zb.js":182}],36:[function(require,module,exports){ +},{"./zb.js":178}],37:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -22710,16 +24505,16 @@ module.exports = class bitmart extends Exchange { // const pricePrecision = this.safeInteger (market, 'price_max_precision'); const precision = { - 'amount': this.safeFloat (market, 'base_min_size'), + 'amount': this.safeNumber (market, 'base_min_size'), 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 10)), }; - const minBuyCost = this.safeFloat (market, 'min_buy_amount'); - const minSellCost = this.safeFloat (market, 'min_sell_amount'); + const minBuyCost = this.safeNumber (market, 'min_buy_amount'); + const minSellCost = this.safeNumber (market, 'min_sell_amount'); const minCost = Math.max (minBuyCost, minSellCost); const limits = { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': { 'min': undefined, @@ -22829,16 +24624,16 @@ module.exports = class bitmart extends Exchange { // // the docs are wrong: https://github.com/ccxt/ccxt/issues/5612 // - const amountPrecision = this.safeFloat (contract, 'vol_unit'); - const pricePrecision = this.safeFloat (contract, 'price_unit'); + const amountPrecision = this.safeNumber (contract, 'vol_unit'); + const pricePrecision = this.safeNumber (contract, 'price_unit'); const precision = { 'amount': amountPrecision, 'price': pricePrecision, }; const limits = { 'amount': { - 'min': this.safeFloat (contract, 'min_vol'), - 'max': this.safeFloat (contract, 'max_vol'), + 'min': this.safeNumber (contract, 'min_vol'), + 'max': this.safeNumber (contract, 'max_vol'), }, 'price': { 'min': undefined, @@ -22861,8 +24656,8 @@ module.exports = class bitmart extends Exchange { future = true; } const feeConfig = this.safeValue (market, 'fee_config', {}); - const maker = this.safeFloat (feeConfig, 'maker_fee'); - const taker = this.safeFloat (feeConfig, 'taker_fee'); + const maker = this.safeNumber (feeConfig, 'maker_fee'); + const taker = this.safeNumber (feeConfig, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -22950,33 +24745,33 @@ module.exports = class bitmart extends Exchange { const timestamp = this.safeTimestamp (ticker, 'timestamp', this.milliseconds ()); const marketId = this.safeString2 (ticker, 'symbol', 'contract_id'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat2 (ticker, 'close_24h', 'last_price'); - let percentage = this.safeFloat (ticker, 'fluctuation', 'rise_fall_rate'); + const last = this.safeNumber2 (ticker, 'close_24h', 'last_price'); + let percentage = this.safeNumber (ticker, 'fluctuation', 'rise_fall_rate'); if (percentage !== undefined) { percentage *= 100; } - const baseVolume = this.safeFloat2 (ticker, 'base_volume_24h', 'base_coin_volume'); - const quoteVolume = this.safeFloat2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); + const baseVolume = this.safeNumber2 (ticker, 'base_volume_24h', 'base_coin_volume'); + const quoteVolume = this.safeNumber2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const open = this.safeFloat2 (ticker, 'open_24h', 'open'); + const open = this.safeNumber2 (ticker, 'open_24h', 'open'); let average = undefined; if ((last !== undefined) && (open !== undefined)) { average = this.sum (last, open) / 2; } - average = this.safeFloat (ticker, 'avg_price', average); + average = this.safeNumber (ticker, 'avg_price', average); const price = this.safeValue (ticker, 'depth_price', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), - 'bid': this.safeFloat (price, 'best_bid', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (price, 'best_ask', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), + 'bid': this.safeNumber (price, 'best_bid', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (price, 'best_ask', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open_24h'), + 'open': this.safeNumber (ticker, 'open_24h'), 'close': last, 'last': last, 'previousClose': undefined, @@ -23280,18 +25075,18 @@ module.exports = class bitmart extends Exchange { if (execType !== undefined) { takerOrMaker = (execType === 'M') ? 'maker' : 'taker'; } - let price = this.safeFloat2 (trade, 'price', 'deal_price'); - price = this.safeFloat (trade, 'price_avg', price); - let amount = this.safeFloat2 (trade, 'amount', 'deal_vol'); - amount = this.safeFloat (trade, 'size', amount); - let cost = this.safeFloat2 (trade, 'count', 'notional'); + let price = this.safeNumber2 (trade, 'price', 'deal_price'); + price = this.safeNumber (trade, 'price_avg', price); + let amount = this.safeNumber2 (trade, 'amount', 'deal_vol'); + amount = this.safeNumber (trade, 'size', amount); + let cost = this.safeNumber2 (trade, 'count', 'notional'); if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { cost = amount * price; } const orderId = this.safeInteger (trade, 'order_id'); const marketId = this.safeString2 (trade, 'contract_id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (trade, 'fees'); + const feeCost = this.safeNumber (trade, 'fees'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_coin_name'); @@ -23419,11 +25214,11 @@ module.exports = class bitmart extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -23750,11 +25545,11 @@ module.exports = class bitmart extends Exchange { currencyId = this.safeString (balance, 'coind_code', currencyId); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat2 (balance, 'available', 'available_vol'); - account['used'] = this.safeFloat2 (balance, 'frozen', 'freeze_vol'); + account['free'] = this.safeString2 (balance, 'available', 'available_vol'); + account['used'] = this.safeString2 (balance, 'frozen', 'freeze_vol'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -23823,29 +25618,10 @@ module.exports = class bitmart extends Exchange { if (market !== undefined) { status = this.parseOrderStatusByType (market['type'], this.safeString (order, 'status')); } - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat2 (order, 'price_avg', 'done_avg_price'); - const amount = this.safeFloat2 (order, 'size', 'vol'); - let cost = undefined; - let filled = this.safeFloat2 (order, 'filled_size', 'done_vol'); - let remaining = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - if (filled === undefined) { - filled = Math.max (0, amount - remaining); - } - } - if (filled !== undefined) { - if (remaining === undefined) { - remaining = Math.max (0, amount - filled); - } - if (cost === undefined) { - if (average !== undefined) { - cost = average * filled; - } - } - } - } + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber2 (order, 'price_avg', 'done_avg_price'); + const amount = this.safeNumber2 (order, 'size', 'vol'); + const filled = this.safeNumber2 (order, 'filled_size', 'done_vol'); let side = this.safeString (order, 'side'); // 1 = Open long // 2 = Close short @@ -23867,7 +25643,7 @@ module.exports = class bitmart extends Exchange { average = undefined; } } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -23882,14 +25658,14 @@ module.exports = class bitmart extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatusByType (type, status) { @@ -23930,7 +25706,7 @@ module.exports = class bitmart extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -24516,12 +26292,12 @@ module.exports = class bitmart extends Exchange { type = 'deposit'; id = depositId; } - const amount = this.safeFloat (transaction, 'arrival_amount'); + const amount = this.safeNumber (transaction, 'arrival_amount'); const timestamp = this.safeInteger (transaction, 'tapply_timeime'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -24637,1735 +26413,7 @@ module.exports = class bitmart extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],37:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); - -// --------------------------------------------------------------------------- - -module.exports = class bitmax extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'bitmax', - 'name': 'BitMax', - 'countries': [ 'CN' ], // China - 'rateLimit': 500, - // new metainfo interface - 'has': { - 'CORS': false, - 'fetchMarkets': true, - 'fetchCurrencies': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchOHLCV': true, - 'fetchTrades': true, - 'fetchAccounts': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'cancelAllOrders': true, - 'fetchDepositAddress': true, - 'fetchTransactions': true, - 'fetchDeposits': true, - 'fetchWithdrawals': true, - 'fetchOrder': true, - 'fetchOrders': true, - 'fetchOpenOrders': true, - 'fetchClosedOrders': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '6h': '360', - '12h': '720', - '1d': '1d', - '1w': '1w', - '1M': '1m', - }, - 'version': 'v1', - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg', - 'api': 'https://bitmax.io', - 'test': 'https://bitmax-test.io', - 'www': 'https://bitmax.io', - 'doc': [ - 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', - ], - 'fees': 'https://bitmax.io/#/feeRate/tradeRate', - 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', - }, - 'api': { - 'public': { - 'get': [ - 'assets', - 'products', - 'ticker', - 'barhist/info', - 'barhist', - 'depth', - 'trades', - 'cash/assets', // not documented - 'cash/products', // not documented - 'margin/assets', // not documented - 'margin/products', // not documented - 'futures/collateral', - 'futures/contracts', - 'futures/ref-px', - 'futures/market-data', - 'futures/funding-rates', - ], - }, - 'accountCategory': { - 'get': [ - 'balance', - 'order/open', - 'order/status', - 'order/hist/current', - 'risk', - ], - 'post': [ - 'order', - 'order/batch', - ], - 'delete': [ - 'order', - 'order/all', - 'order/batch', - ], - }, - 'accountGroup': { - 'get': [ - 'cash/balance', - 'margin/balance', - 'margin/risk', - 'transfer', - 'futures/collateral-balance', - 'futures/position', - 'futures/risk', - 'futures/funding-payments', - 'order/hist', - ], - 'post': [ - 'futures/transfer/deposit', - 'futures/transfer/withdraw', - ], - }, - 'private': { - 'get': [ - 'info', - 'wallet/transactions', - 'wallet/deposit/address', // not documented - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'taker': 0.002, - 'maker': 0.002, - }, - }, - 'precisionMode': TICK_SIZE, - 'options': { - 'account-category': 'cash', // 'cash'/'margin'/'futures' - 'account-group': undefined, - 'fetchClosedOrders': { - 'method': 'accountGroupGetOrderHist', // 'accountGroupGetAccountCategoryOrderHistCurrent' - }, - }, - 'exceptions': { - 'exact': { - // not documented - '1900': BadRequest, // {"code":1900,"message":"Invalid Http Request Input"} - '2100': AuthenticationError, // {"code":2100,"message":"ApiKeyFailure"} - '5002': BadSymbol, // {"code":5002,"message":"Invalid Symbol"} - '6001': BadSymbol, // {"code":6001,"message":"Trading is disabled on symbol."} - '6010': InsufficientFunds, // {'code': 6010, 'message': 'Not enough balance.'} - '60060': InvalidOrder, // { 'code': 60060, 'message': 'The order is already filled or canceled.' } - '600503': InvalidOrder, // {"code":600503,"message":"Notional is too small."} - // documented - '100001': BadRequest, // INVALID_HTTP_INPUT Http request is invalid - '100002': BadRequest, // DATA_NOT_AVAILABLE Some required data is missing - '100003': BadRequest, // KEY_CONFLICT The same key exists already - '100004': BadRequest, // INVALID_REQUEST_DATA The HTTP request contains invalid field or argument - '100005': BadRequest, // INVALID_WS_REQUEST_DATA Websocket request contains invalid field or argument - '100006': BadRequest, // INVALID_ARGUMENT The arugment is invalid - '100007': BadRequest, // ENCRYPTION_ERROR Something wrong with data encryption - '100008': BadSymbol, // SYMBOL_ERROR Symbol does not exist or not valid for the request - '100009': AuthenticationError, // AUTHORIZATION_NEEDED Authorization is require for the API access or request - '100010': BadRequest, // INVALID_OPERATION The action is invalid or not allowed for the account - '100011': BadRequest, // INVALID_TIMESTAMP Not a valid timestamp - '100012': BadRequest, // INVALID_STR_FORMAT String format does not - '100013': BadRequest, // INVALID_NUM_FORMAT Invalid number input - '100101': ExchangeError, // UNKNOWN_ERROR Some unknown error - '150001': BadRequest, // INVALID_JSON_FORMAT Require a valid json object - '200001': AuthenticationError, // AUTHENTICATION_FAILED Authorization failed - '200002': ExchangeError, // TOO_MANY_ATTEMPTS Tried and failed too many times - '200003': ExchangeError, // ACCOUNT_NOT_FOUND Account not exist - '200004': ExchangeError, // ACCOUNT_NOT_SETUP Account not setup properly - '200005': ExchangeError, // ACCOUNT_ALREADY_EXIST Account already exist - '200006': ExchangeError, // ACCOUNT_ERROR Some error related with error - '200007': ExchangeError, // CODE_NOT_FOUND - '200008': ExchangeError, // CODE_EXPIRED Code expired - '200009': ExchangeError, // CODE_MISMATCH Code does not match - '200010': AuthenticationError, // PASSWORD_ERROR Wrong assword - '200011': ExchangeError, // CODE_GEN_FAILED Do not generate required code promptly - '200012': ExchangeError, // FAKE_COKE_VERIFY - '200013': ExchangeError, // SECURITY_ALERT Provide security alert message - '200014': PermissionDenied, // RESTRICTED_ACCOUNT Account is restricted for certain activity, such as trading, or withdraw. - '200015': PermissionDenied, // PERMISSION_DENIED No enough permission for the operation - '300001': InvalidOrder, // INVALID_PRICE Order price is invalid - '300002': InvalidOrder, // INVALID_QTY Order size is invalid - '300003': InvalidOrder, // INVALID_SIDE Order side is invalid - '300004': InvalidOrder, // INVALID_NOTIONAL Notional is too small or too large - '300005': InvalidOrder, // INVALID_TYPE Order typs is invalid - '300006': InvalidOrder, // INVALID_ORDER_ID Order id is invalid - '300007': InvalidOrder, // INVALID_TIME_IN_FORCE Time In Force in order request is invalid - '300008': InvalidOrder, // INVALID_ORDER_PARAMETER Some order parameter is invalid - '300009': InvalidOrder, // TRADING_VIOLATION Trading violation on account or asset - '300011': InsufficientFunds, // INVALID_BALANCE No enough account or asset balance for the trading - '300012': BadSymbol, // INVALID_PRODUCT Not a valid product supported by exchange - '300013': InvalidOrder, // INVALID_BATCH_ORDER Some or all orders are invalid in batch order request - '300020': InvalidOrder, // TRADING_RESTRICTED There is some trading restriction on account or asset - '300021': InvalidOrder, // TRADING_DISABLED Trading is disabled on account or asset - '300031': InvalidOrder, // NO_MARKET_PRICE No market price for market type order trading - '310001': InsufficientFunds, // INVALID_MARGIN_BALANCE No enough margin balance - '310002': InvalidOrder, // INVALID_MARGIN_ACCOUNT Not a valid account for margin trading - '310003': InvalidOrder, // MARGIN_TOO_RISKY Leverage is too high - '310004': BadSymbol, // INVALID_MARGIN_ASSET This asset does not support margin trading - '310005': InvalidOrder, // INVALID_REFERENCE_PRICE There is no valid reference price - '510001': ExchangeError, // SERVER_ERROR Something wrong with server. - '900001': ExchangeError, // HUMAN_CHALLENGE Human change do not pass - }, - 'broad': {}, - }, - 'commonCurrencies': { - 'BTCBEAR': 'BEAR', - 'BTCBULL': 'BULL', - }, - }); - } - - getAccount (params = {}) { - // get current or provided bitmax sub-account - const account = this.safeValue (params, 'account', this.options['account']); - return account.toLowerCase ().capitalize (); - } - - async fetchCurrencies (params = {}) { - const assets = await this.publicGetAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode" : "LTCBULL", - // "assetName" : "3X Long LTC Token", - // "precisionScale" : 9, - // "nativeScale" : 4, - // "withdrawalFee" : "0.2", - // "minWithdrawalAmt" : "1.0", - // "status" : "Normal" - // }, - // ] - // } - // - const margin = await this.publicGetMarginAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode":"BTT", - // "borrowAssetCode":"BTT-B", - // "interestAssetCode":"BTT-I", - // "nativeScale":0, - // "numConfirmations":1, - // "withdrawFee":"100.0", - // "minWithdrawalAmt":"1000.0", - // "statusCode":"Normal", - // "statusMessage":"", - // "interestRate":"0.001" - // } - // ] - // } - // - const cash = await this.publicGetCashAssets (params); - // - // { - // "code":0, - // "data":[ - // { - // "assetCode":"LTCBULL", - // "nativeScale":4, - // "numConfirmations":20, - // "withdrawFee":"0.2", - // "minWithdrawalAmt":"1.0", - // "statusCode":"Normal", - // "statusMessage":"" - // } - // ] - // } - // - const assetsData = this.safeValue (assets, 'data', []); - const marginData = this.safeValue (margin, 'data', []); - const cashData = this.safeValue (cash, 'data', []); - const assetsById = this.indexBy (assetsData, 'assetCode'); - const marginById = this.indexBy (marginData, 'assetCode'); - const cashById = this.indexBy (cashData, 'assetCode'); - const dataById = this.deepExtend (assetsById, marginById, cashById); - const ids = Object.keys (dataById); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const currency = dataById[id]; - const code = this.safeCurrencyCode (id); - const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); - // why would the exchange API have different names for the same field - const fee = this.safeFloat2 (currency, 'withdrawFee', 'withdrawalFee'); - const status = this.safeString2 (currency, 'status', 'statusCode'); - const active = (status === 'Normal'); - const margin = ('borrowAssetCode' in currency); - result[code] = { - 'id': id, - 'code': code, - 'info': currency, - 'type': undefined, - 'margin': margin, - 'name': this.safeString (currency, 'assetName'), - 'active': active, - 'fee': fee, - 'precision': precision, - 'limits': { - 'amount': { - 'min': Math.pow (10, -precision), - 'max': undefined, - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': undefined, - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawalAmt'), - 'max': undefined, - }, - }, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - const products = await this.publicGetProducts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"LBA/BTC", - // "baseAsset":"LBA", - // "quoteAsset":"BTC", - // "status":"Normal", - // "minNotional":"0.000625", - // "maxNotional":"6.25", - // "marginTradable":false, - // "commissionType":"Quote", - // "commissionReserveRate":"0.001", - // "tickSize":"0.000000001", - // "lotSize":"1" - // }, - // ] - // } - // - const cash = await this.publicGetCashProducts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"QTUM/BTC", - // "domain":"BTC", - // "tradingStartTime":1569506400000, - // "collapseDecimals":"0.0001,0.000001,0.00000001", - // "minQty":"0.000000001", - // "maxQty":"1000000000", - // "minNotional":"0.000625", - // "maxNotional":"12.5", - // "statusCode":"Normal", - // "statusMessage":"", - // "tickSize":"0.00000001", - // "useTick":false, - // "lotSize":"0.1", - // "useLot":false, - // "commissionType":"Quote", - // "commissionReserveRate":"0.001", - // "qtyScale":1, - // "priceScale":8, - // "notionalScale":4 - // } - // ] - // } - // - const futures = await this.publicGetFuturesContracts (params); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"BTC-PERP", - // "tradingStartTime":1579701600000, - // "collapseDecimals":"1,0.1,0.01", - // "minQty":"0.000000001", - // "maxQty":"1000000000", - // "minNotional":"5", - // "maxNotional":"1000000", - // "statusCode":"Normal", - // "statusMessage":"", - // "tickSize":"0.25", - // "lotSize":"0.0001", - // "priceScale":2, - // "qtyScale":4, - // "notionalScale":2 - // } - // ] - // } - // - const productsData = this.safeValue (products, 'data', []); - const productsById = this.indexBy (productsData, 'symbol'); - const cashData = this.safeValue (cash, 'data', []); - const futuresData = this.safeValue (futures, 'data', []); - const cashAndFuturesData = this.arrayConcat (cashData, futuresData); - const cashAndFuturesById = this.indexBy (cashAndFuturesData, 'symbol'); - const dataById = this.deepExtend (productsById, cashAndFuturesById); - const ids = Object.keys (dataById); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const market = dataById[id]; - const baseId = this.safeString (market, 'baseAsset'); - const quoteId = this.safeString (market, 'quoteAsset'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), - }; - const status = this.safeString (market, 'status'); - const active = (status === 'Normal'); - const type = ('useLot' in market) ? 'spot' : 'future'; - const spot = (type === 'spot'); - const future = (type === 'future'); - let symbol = id; - if (!future) { - symbol = base + '/' + quote; - } - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'type': type, - 'spot': spot, - 'future': future, - 'active': active, - 'precision': precision, - 'limits': { - 'amount': { - 'min': this.safeFloat (market, 'minQty'), - 'max': this.safeFloat (market, 'maxQty'), - }, - 'price': { - 'min': this.safeFloat (market, 'tickSize'), - 'max': undefined, - }, - 'cost': { - 'min': this.safeFloat (market, 'minNotional'), - 'max': this.safeFloat (market, 'maxNotional'), - }, - }, - }); - } - return result; - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - // TODO: fee calculation here is incorrect, we need to support tiered fee calculation. - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - - async fetchAccounts (params = {}) { - let accountGroup = this.safeString (this.options, 'account-group'); - let response = undefined; - if (accountGroup === undefined) { - response = await this.privateGetInfo (params); - // - // { - // "code":0, - // "data":{ - // "email":"igor.kroitor@gmail.com", - // "accountGroup":8, - // "viewPermission":true, - // "tradePermission":true, - // "transferPermission":true, - // "cashAccount":["cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda"], - // "marginAccount":["martXoh1v1N3EMQC5FDtSj5VHso8aI2Z"], - // "futuresAccount":["futc9r7UmFJAyBY2rE3beA2JFxav2XFF"], - // "userUID":"U6491137460" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - accountGroup = this.safeString (data, 'accountGroup'); - this.options['account-group'] = accountGroup; - } - return [ - { - 'id': accountGroup, - 'type': undefined, - 'currency': undefined, - 'info': response, - }, - ]; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchBalance', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeString (account, 'id'); - const request = { - 'account-group': accountGroup, - }; - let method = 'accountCategoryGetBalance'; - if (accountCategory === 'futures') { - method = 'accountGroupGetFuturesCollateralBalance'; - } else { - request['account-category'] = accountCategory; - } - const response = await this[method] (this.extend (request, params)); - // - // cash - // - // { - // 'code': 0, - // 'data': [ - // { - // 'asset': 'BCHSV', - // 'totalBalance': '64.298000048', - // 'availableBalance': '64.298000048', - // }, - // ] - // } - // - // margin - // - // { - // 'code': 0, - // 'data': [ - // { - // 'asset': 'BCHSV', - // 'totalBalance': '64.298000048', - // 'availableBalance': '64.298000048', - // 'borrowed': '0', - // 'interest': '0', - // }, - // ] - // } - // - // futures - // - // { - // "code":0, - // "data":[ - // {"asset":"BTC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"9456.59"}, - // {"asset":"ETH","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"235.95"}, - // {"asset":"USDT","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"}, - // {"asset":"USDC","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00035"}, - // {"asset":"PAX","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1.00045"}, - // {"asset":"USDTR","totalBalance":"0","availableBalance":"0","maxTransferrable":"0","priceInUSDT":"1"} - // ] - // } - // - const result = { 'info': response }; - const balances = this.safeValue (response, 'data', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - const response = await this.publicGetDepth (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "m":"depth-snapshot", - // "symbol":"BTC-PERP", - // "data":{ - // "ts":1590223998202, - // "seqnum":115444921, - // "asks":[ - // ["9207.5","18.2383"], - // ["9207.75","18.8235"], - // ["9208","10.7873"], - // ], - // "bids":[ - // ["9207.25","0.4009"], - // ["9207","0.003"], - // ["9206.5","0.003"], - // ] - // } - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const orderbook = this.safeValue (data, 'data', {}); - const timestamp = this.safeInteger (orderbook, 'ts'); - const result = this.parseOrderBook (orderbook, timestamp); - result['nonce'] = this.safeInteger (orderbook, 'seqnum'); - return result; - } - - parseTicker (ticker, market = undefined) { - // - // { - // "symbol":"QTUM/BTC", - // "open":"0.00016537", - // "close":"0.00019077", - // "high":"0.000192", - // "low":"0.00016537", - // "volume":"846.6", - // "ask":["0.00018698","26.2"], - // "bid":["0.00018408","503.7"], - // "type":"spot" - // } - // - const timestamp = undefined; - const marketId = this.safeString (ticker, 'symbol'); - let symbol = undefined; - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } else if (marketId !== undefined) { - const type = this.safeString (ticker, 'type'); - if (type === 'spot') { - const [ baseId, quoteId ] = marketId.split ('/'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - } - } - if ((symbol === undefined) && (market !== undefined)) { - symbol = market['symbol']; - } - const close = this.safeFloat (ticker, 'close'); - const bid = this.safeValue (ticker, 'bid', []); - const ask = this.safeValue (ticker, 'ask', []); - const open = this.safeFloat (ticker, 'open'); - let change = undefined; - let percentage = undefined; - let average = undefined; - if ((open !== undefined) && (close !== undefined)) { - change = close - open; - if (open > 0) { - percentage = change / open * 100; - } - average = this.sum (open, close) / 2; - } - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 0), - 'bidVolume': this.safeFloat (bid, 1), - 'ask': this.safeFloat (ask, 0), - 'askVolume': this.safeFloat (ask, 1), - 'vwap': undefined, - 'open': open, - 'close': close, - 'last': close, - 'previousClose': undefined, // previous day close - 'change': change, - 'percentage': percentage, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - const response = await this.publicGetTicker (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "symbol":"BTC-PERP", // or "BTC/USDT" - // "open":"9073", - // "close":"9185.75", - // "high":"9185.75", - // "low":"9185.75", - // "volume":"576.8334", - // "ask":["9185.75","15.5863"], - // "bid":["9185.5","0.003"], - // "type":"derivatives", // or "spot" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - return this.parseTicker (data, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const request = {}; - if (symbols !== undefined) { - const marketIds = this.marketIds (symbols); - request['symbol'] = marketIds.join (','); - } - const response = await this.publicGetTicker (this.extend (request, params)); - // - // { - // "code":0, - // "data":[ - // { - // "symbol":"QTUM/BTC", - // "open":"0.00016537", - // "close":"0.00019077", - // "high":"0.000192", - // "low":"0.00016537", - // "volume":"846.6", - // "ask":["0.00018698","26.2"], - // "bid":["0.00018408","503.7"], - // "type":"spot" - // } - // ] - // } - // - const data = this.safeValue (response, 'data', []); - return this.parseTickers (data, symbols); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "m":"bar", - // "s":"BTC/USDT", - // "data":{ - // "i":"1", - // "ts":1590228000000, - // "o":"9139.59", - // "c":"9131.94", - // "h":"9139.99", - // "l":"9121.71", - // "v":"25.20648" - // } - // } - // - const data = this.safeValue (ohlcv, 'data', {}); - return [ - this.safeInteger (data, 'ts'), - this.safeFloat (data, 'o'), - this.safeFloat (data, 'h'), - this.safeFloat (data, 'l'), - this.safeFloat (data, 'c'), - this.safeFloat (data, 'v'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - 'interval': this.timeframes[timeframe], - }; - // if since and limit are not specified - // the exchange will return just 1 last candle by default - const duration = this.parseTimeframe (timeframe); - const options = this.safeValue (this.options, 'fetchOHLCV', {}); - const defaultLimit = this.safeInteger (options, 'limit', 500); - if (since !== undefined) { - request['from'] = since; - if (limit === undefined) { - limit = defaultLimit; - } else { - limit = Math.min (limit, defaultLimit); - } - request['to'] = this.sum (since, limit * duration * 1000, 1); - } else if (limit !== undefined) { - request['n'] = limit; // max 500 - } - const response = await this.publicGetBarhist (this.extend (request, params)); - // - // { - // "code":0, - // "data":[ - // { - // "m":"bar", - // "s":"BTC/USDT", - // "data":{ - // "i":"1", - // "ts":1590228000000, - // "o":"9139.59", - // "c":"9131.94", - // "h":"9139.99", - // "l":"9121.71", - // "v":"25.20648" - // } - // } - // ] - // } - // - const data = this.safeValue (response, 'data', []); - return this.parseOHLCVs (data, market, timeframe, since, limit); - } - - parseTrade (trade, market = undefined) { - // - // public fetchTrades - // - // { - // "p":"9128.5", // price - // "q":"0.0030", // quantity - // "ts":1590229002385, // timestamp - // "bm":false, // if true, the buyer is the market maker, we only use this field to "define the side" of a public trade - // "seqnum":180143985289898554 - // } - // - const timestamp = this.safeInteger (trade, 'ts'); - const price = this.safeFloat2 (trade, 'price', 'p'); - const amount = this.safeFloat (trade, 'q'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } - const buyerIsMaker = this.safeValue (trade, 'bm', false); - const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; - const side = buyerIsMaker ? 'buy' : 'sell'; - let symbol = undefined; - if ((symbol === undefined) && (market !== undefined)) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'id': undefined, - 'order': undefined, - 'type': undefined, - 'takerOrMaker': makerOrTaker, - 'side': side, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'symbol': market['id'], - }; - if (limit !== undefined) { - request['n'] = limit; // max 100 - } - const response = await this.publicGetTrades (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "m":"trades", - // "symbol":"BTC-PERP", - // "data":[ - // {"p":"9128.5","q":"0.0030","ts":1590229002385,"bm":false,"seqnum":180143985289898554}, - // {"p":"9129","q":"0.0030","ts":1590229002642,"bm":false,"seqnum":180143985289898587}, - // {"p":"9129.5","q":"0.0030","ts":1590229021306,"bm":false,"seqnum":180143985289899043} - // ] - // } - // } - // - const records = this.safeValue (response, 'data', []); - const trades = this.safeValue (records, 'data', []); - return this.parseTrades (trades, market, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'PendingNew': 'open', - 'New': 'open', - 'PartiallyFilled': 'open', - 'Filled': 'closed', - 'Canceled': 'canceled', - 'Rejected': 'rejected', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - // - // createOrder - // - // { - // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", - // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", - // "orderType": "Market", - // "symbol": "BTC/USDT", - // "timestamp": 1573576916201 - // } - // - // fetchOrder, fetchOpenOrders, fetchClosedOrders - // - // { - // "symbol": "BTC/USDT", - // "price": "8131.22", - // "orderQty": "0.00082", - // "orderType": "Market", - // "avgPx": "7392.02", - // "cumFee": "0.005152238", - // "cumFilledQty": "0.00082", - // "errorCode": "", - // "feeAsset": "USDT", - // "lastExecTime": 1575953151764, - // "orderId": "a16eee20b6750866943712zWEDdAjt3", - // "seqNum": 2623469, - // "side": "Buy", - // "status": "Filled", - // "stopPrice": "", - // "execInst": "NULL_VAL" - // } - // - // { - // "ac": "FUTURES", - // "accountId": "testabcdefg", - // "avgPx": "0", - // "cumFee": "0", - // "cumQty": "0", - // "errorCode": "NULL_VAL", - // "execInst": "NULL_VAL", - // "feeAsset": "USDT", - // "lastExecTime": 1584072844085, - // "orderId": "r170d21956dd5450276356bbtcpKa74", - // "orderQty": "1.1499", - // "orderType": "Limit", - // "price": "4000", - // "sendingTime": 1584072841033, - // "seqNum": 24105338, - // "side": "Buy", - // "status": "Canceled", - // "stopPrice": "", - // "symbol": "BTC-PERP" - // }, - // - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'symbol'); - const symbol = this.safeSymbol (marketId, market, '/'); - let timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); - let lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const average = this.safeFloat (order, 'avgPx'); - const filled = this.safeFloat2 (order, 'cumFilledQty', 'cumQty'); - let remaining = undefined; - if (filled !== undefined) { - if (filled === 0) { - timestamp = lastTradeTimestamp; - lastTradeTimestamp = undefined; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - let cost = undefined; - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - const id = this.safeString (order, 'orderId'); - let clientOrderId = this.safeString (order, 'id'); - if (clientOrderId !== undefined) { - if (clientOrderId.length < 1) { - clientOrderId = undefined; - } - } - const type = this.safeStringLower (order, 'orderType'); - const side = this.safeStringLower (order, 'side'); - const feeCost = this.safeFloat (order, 'cumFee'); - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (order, 'feeAsset'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': stopPrice, - 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, - 'remaining': remaining, - 'status': status, - 'fee': fee, - 'trades': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const market = this.market (symbol); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'createOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'symbol': market['id'], - 'time': this.milliseconds (), - 'orderQty': this.amountToPrecision (symbol, amount), - 'orderType': type, // "limit", "market", "stop_market", "stop_limit" - 'side': side, // "buy" or "sell" - // 'orderPrice': this.priceToPrecision (symbol, price), - // 'stopPrice': this.priceToPrecision (symbol, stopPrice), // required for stop orders - // 'postOnly': 'false', // 'false', 'true' - // 'timeInForce': 'GTC', // GTC, IOC, FOK - // 'respInst': 'ACK', // ACK, 'ACCEPT, DONE - }; - if (clientOrderId !== undefined) { - request['id'] = clientOrderId; - params = this.omit (params, [ 'clientOrderId', 'id' ]); - } - if ((type === 'limit') || (type === 'stop_limit')) { - request['orderPrice'] = this.priceToPrecision (symbol, price); - } - if ((type === 'stop_limit') || (type === 'stop_market')) { - const stopPrice = this.safeFloat (params, 'stopPrice'); - if (stopPrice === undefined) { - throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); - } else { - request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); - params = this.omit (params, 'stopPrice'); - } - } - const response = await this.accountCategoryPostOrder (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "ac": "MARGIN", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "action": "place-order", - // "info": { - // "id": "16e607e2b83a8bXHbAwwoqDo55c166fa", - // "orderId": "16e85b4d9b9a8bXHbAwwoqDoc3d66830", - // "orderType": "Market", - // "symbol": "BTC/USDT", - // "timestamp": 1573576916201 - // }, - // "status": "Ack" - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const info = this.safeValue (data, 'info', {}); - return this.parseOrder (info, market); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'orderId': id, - }; - const response = await this.accountCategoryGetOrderStatus (this.extend (request, params)); - // - // { - // "code": 0, - // "accountCategory": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "data": [ - // { - // "symbol": "BTC/USDT", - // "price": "8131.22", - // "orderQty": "0.00082", - // "orderType": "Market", - // "avgPx": "7392.02", - // "cumFee": "0.005152238", - // "cumFilledQty": "0.00082", - // "errorCode": "", - // "feeAsset": "USDT", - // "lastExecTime": 1575953151764, - // "orderId": "a16eee20b6750866943712zWEDdAjt3", - // "seqNum": 2623469, - // "side": "Buy", - // "status": "Filled", - // "stopPrice": "", - // "execInst": "NULL_VAL" - // } - // ] - // } - // - const data = this.safeValue (response, 'data', {}); - return this.parseOrder (data); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'fetchOpenOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - }; - const response = await this.accountCategoryGetOrderOpen (this.extend (request, params)); - // - // { - // "ac": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "code": 0, - // "data": [ - // { - // "avgPx": "0", // Average filled price of the order - // "cumFee": "0", // cumulative fee paid for this order - // "cumFilledQty": "0", // cumulative filled quantity - // "errorCode": "", // error code; could be empty - // "feeAsset": "USDT", // fee asset - // "lastExecTime": 1576019723550, // The last execution time of the order - // "orderId": "s16ef21882ea0866943712034f36d83", // server provided orderId - // "orderQty": "0.0083", // order quantity - // "orderType": "Limit", // order type - // "price": "7105", // order price - // "seqNum": 8193258, // sequence number - // "side": "Buy", // order side - // "status": "New", // order status on matching engine - // "stopPrice": "", // only available for stop market and stop limit orders; otherwise empty - // "symbol": "BTC/USDT", - // "execInst": "NULL_VAL" // execution instruction - // }, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - if (accountCategory === 'futures') { - return this.parseOrders (data, market, since, limit); - } - // a workaround for https://github.com/ccxt/ccxt/issues/7187 - const orders = []; - for (let i = 0; i < data.length; i++) { - const order = this.parseOrder (data[i], market); - orders.push (order); - } - return this.filterBySymbolSinceLimit (orders, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - const defaultAccountCategory = this.safeString (this.options, 'account-category'); - const options = this.safeValue (this.options, 'fetchClosedOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - // 'category': accountCategory, - // 'symbol': market['id'], - // 'orderType': 'market', // optional, string - // 'side': 'buy', // or 'sell', optional, case insensitive. - // 'status': 'Filled', // "Filled", "Canceled", or "Rejected" - // 'startTime': exchange.milliseconds (), - // 'endTime': exchange.milliseconds (), - // 'page': 1, - // 'pageSize': 100, - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['symbol'] = market['id']; - } - const method = this.safeValue (options, 'method', 'accountGroupGetOrderHist'); - if (method === 'accountGroupGetOrderHist') { - if (accountCategory !== undefined) { - request['category'] = accountCategory; - } - } else { - request['account-category'] = accountCategory; - } - if (since !== undefined) { - request['startTime'] = since; - } - if (limit !== undefined) { - request['pageSize'] = limit; - } - const response = await this[method] (this.extend (request, params)); - // - // accountCategoryGetOrderHistCurrent - // - // { - // "code":0, - // "accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda", - // "ac":"CASH", - // "data":[ - // { - // "seqNum":15561826728, - // "orderId":"a17294d305c0U6491137460bethu7kw9", - // "symbol":"ETH/USDT", - // "orderType":"Limit", - // "lastExecTime":1591635618200, - // "price":"200", - // "orderQty":"0.1", - // "side":"Buy", - // "status":"Canceled", - // "avgPx":"0", - // "cumFilledQty":"0", - // "stopPrice":"", - // "errorCode":"", - // "cumFee":"0", - // "feeAsset":"USDT", - // "execInst":"NULL_VAL" - // } - // ] - // } - // - // accountGroupGetOrderHist - // - // { - // "code": 0, - // "data": { - // "data": [ - // { - // "ac": "FUTURES", - // "accountId": "testabcdefg", - // "avgPx": "0", - // "cumFee": "0", - // "cumQty": "0", - // "errorCode": "NULL_VAL", - // "execInst": "NULL_VAL", - // "feeAsset": "USDT", - // "lastExecTime": 1584072844085, - // "orderId": "r170d21956dd5450276356bbtcpKa74", - // "orderQty": "1.1499", - // "orderType": "Limit", - // "price": "4000", - // "sendingTime": 1584072841033, - // "seqNum": 24105338, - // "side": "Buy", - // "status": "Canceled", - // "stopPrice": "", - // "symbol": "BTC-PERP" - // }, - // ], - // "hasNext": False, - // "limit": 500, - // "page": 1, - // "pageSize": 20 - // } - // } - // - let data = this.safeValue (response, 'data'); - const isArray = Array.isArray (data); - if (!isArray) { - data = this.safeValue (data, 'data', []); - } - return this.parseOrders (data, market, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' cancelOrder() requires a symbol argument'); - } - await this.loadMarkets (); - await this.loadAccounts (); - const market = this.market (symbol); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'cancelOrder', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const clientOrderId = this.safeString2 (params, 'clientOrderId', 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'symbol': market['id'], - 'time': this.milliseconds (), - 'id': 'foobar', - }; - if (clientOrderId === undefined) { - request['orderId'] = id; - } else { - request['id'] = clientOrderId; - params = this.omit (params, [ 'clientOrderId', 'id' ]); - } - const response = await this.accountCategoryDeleteOrder (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "ac": "CASH", - // "action": "cancel-order", - // "status": "Ack", - // "info": { - // "id": "wv8QGquoeamhssvQBeHOHGQCGlcBjj23", - // "orderId": "16e6198afb4s8bXHbAwwoqDo2ebc19dc", - // "orderType": "", // could be empty - // "symbol": "ETH/USDT", - // "timestamp": 1573594877822 - // } - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const info = this.safeValue (data, 'info', {}); - return this.parseOrder (info, market); - } - - async cancelAllOrders (symbol = undefined, params = {}) { - await this.loadMarkets (); - await this.loadAccounts (); - const defaultAccountCategory = this.safeString (this.options, 'account-category', 'cash'); - const options = this.safeValue (this.options, 'cancelAllOrders', {}); - let accountCategory = this.safeString (options, 'account-category', defaultAccountCategory); - accountCategory = this.safeString (params, 'account-category', accountCategory); - params = this.omit (params, 'account-category'); - const account = this.safeValue (this.accounts, 0, {}); - const accountGroup = this.safeValue (account, 'id'); - const request = { - 'account-group': accountGroup, - 'account-category': accountCategory, - 'time': this.milliseconds (), - }; - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - request['symbol'] = market['id']; - } - const response = await this.accountCategoryDeleteOrderAll (this.extend (request, params)); - // - // { - // "code": 0, - // "data": { - // "ac": "CASH", - // "accountId": "cshQtyfq8XLAA9kcf19h8bXHbAwwoqDo", - // "action": "cancel-all", - // "info": { - // "id": "2bmYvi7lyTrneMzpcJcf2D7Pe9V1P9wy", - // "orderId": "", - // "orderType": "NULL_VAL", - // "symbol": "", - // "timestamp": 1574118495462 - // }, - // "status": "Ack" - // } - // } - // - return response; - } - - parseDepositAddress (depositAddress, currency = undefined) { - // - // { - // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // destTag: "", - // tagType: "", - // tagId: "", - // chainName: "ERC20", - // numConfirmations: 20, - // withdrawalFee: 1, - // nativeScale: 4, - // tips: [] - // } - // - const address = this.safeString (depositAddress, 'address'); - const tagId = this.safeString (depositAddress, 'tagId'); - const tag = this.safeString (depositAddress, tagId); - this.checkAddress (address); - const code = (currency === undefined) ? undefined : currency['code']; - return { - 'currency': code, - 'address': address, - 'tag': tag, - 'info': depositAddress, - }; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const chainName = this.safeString (params, 'chainName'); - params = this.omit (params, 'chainName'); - const request = { - 'asset': currency['id'], - }; - const response = await this.privateGetWalletDepositAddress (this.extend (request, params)); - // - // { - // "code":0, - // "data":{ - // "asset":"USDT", - // "assetName":"Tether", - // "address":[ - // { - // "address":"1N22odLHXnLPCjC8kwBJPTayarr9RtPod6", - // "destTag":"", - // "tagType":"", - // "tagId":"", - // "chainName":"Omni", - // "numConfirmations":3, - // "withdrawalFee":4.7, - // "nativeScale":4, - // "tips":[] - // }, - // { - // "address":"0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // "destTag":"", - // "tagType":"", - // "tagId":"", - // "chainName":"ERC20", - // "numConfirmations":20, - // "withdrawalFee":1.0, - // "nativeScale":4, - // "tips":[] - // } - // ] - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const addresses = this.safeValue (data, 'address', []); - const numAddresses = addresses.length; - let address = undefined; - if (numAddresses > 1) { - const addressesByChainName = this.indexBy (addresses, 'chainName'); - if (chainName === undefined) { - const chainNames = Object.keys (addressesByChainName); - const chains = chainNames.join (', '); - throw new ArgumentsRequired (this.id + ' fetchDepositAddress returned more than one address, a chainName parameter is required, one of ' + chains); - } - address = this.safeValue (addressesByChainName, chainName, {}); - } else { - // first address - address = this.safeValue (addresses, 0, {}); - } - const result = this.parseDepositAddress (address, currency); - return this.extend (result, { - 'info': response, - }); - } - - async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { - const request = { - 'txType': 'deposit', - }; - return await this.fetchTransactions (code, since, limit, this.extend (request, params)); - } - - async fetchWithdrawals (code = undefined, since = undefined, limit = undefined, params = {}) { - const request = { - 'txType': 'withdrawal', - }; - return await this.fetchTransactions (code, since, limit, this.extend (request, params)); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'asset': currency['id'], - // 'page': 1, - // 'pageSize': 20, - // 'startTs': this.milliseconds (), - // 'endTs': this.milliseconds (), - // 'txType': undefned, // deposit, withdrawal - }; - let currency = undefined; - if (code !== undefined) { - currency = this.currency (code); - request['asset'] = currency['id']; - } - if (since !== undefined) { - request['startTs'] = since; - } - if (limit !== undefined) { - request['pageSize'] = limit; - } - const response = await this.privateGetWalletTransactions (this.extend (request, params)); - // - // { - // code: 0, - // data: { - // data: [ - // { - // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", - // time: 1591606166000, - // asset: "USDT", - // transactionType: "deposit", - // amount: "25", - // commission: "0", - // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", - // status: "pending", - // numConfirmed: 8, - // numConfirmations: 20, - // destAddress: { address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722" } - // } - // ], - // page: 1, - // pageSize: 20, - // hasNext: false - // } - // } - // - const data = this.safeValue (response, 'data', {}); - const transactions = this.safeValue (data, 'data', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - 'reviewing': 'pending', - 'pending': 'pending', - 'confirmed': 'ok', - 'rejected': 'rejected', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // requestId: "wuzd1Ojsqtz4bCA3UXwtUnnJDmU8PiyB", - // time: 1591606166000, - // asset: "USDT", - // transactionType: "deposit", - // amount: "25", - // commission: "0", - // networkTransactionId: "0xbc4eabdce92f14dbcc01d799a5f8ca1f02f4a3a804b6350ea202be4d3c738fce", - // status: "pending", - // numConfirmed: 8, - // numConfirmations: 20, - // destAddress: { - // address: "0xe7c70b4e73b6b450ee46c3b5c0f5fb127ca55722", - // destTag: "..." // for currencies that have it - // } - // } - // - const id = this.safeString (transaction, 'requestId'); - const amount = this.safeFloat (transaction, 'amount'); - const destAddress = this.safeValue (transaction, 'destAddress', {}); - const address = this.safeString (destAddress, 'address'); - const tag = this.safeString (destAddress, 'destTag'); - const txid = this.safeString (transaction, 'networkTransactionId'); - const type = this.safeString (transaction, 'transactionType'); - const timestamp = this.safeInteger (transaction, 'time'); - const currencyId = this.safeString (transaction, 'asset'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'commission'); - return { - 'info': transaction, - 'id': id, - 'currency': code, - 'amount': amount, - 'address': address, - 'addressTo': address, - 'addressFrom': undefined, - 'tag': tag, - 'tagTo': tag, - 'tagFrom': undefined, - 'status': status, - 'type': type, - 'updated': undefined, - 'txid': txid, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'fee': { - 'currency': code, - 'cost': feeCost, - }, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = ''; - let query = params; - const accountCategory = (api === 'accountCategory'); - if (accountCategory || (api === 'accountGroup')) { - url += this.implodeParams ('/{account-group}', params); - query = this.omit (params, 'account-group'); - } - const request = this.implodeParams (path, query); - url += '/api/pro/' + this.version; - if (accountCategory) { - url += this.implodeParams ('/{account-category}', query); - query = this.omit (query, 'account-category'); - } - url += '/' + request; - query = this.omit (query, this.extractParams (path)); - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const timestamp = this.milliseconds ().toString (); - const payload = timestamp + '+' + request; - const hmac = this.hmac (this.encode (payload), this.encode (this.secret), 'sha256', 'base64'); - headers = { - 'x-auth-key': this.apiKey, - 'x-auth-timestamp': timestamp, - 'x-auth-signature': hmac, - }; - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - headers['Content-Type'] = 'application/json'; - body = this.json (query); - } - } - url = this.urls['api'] + url; - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - // - // {'code': 6010, 'message': 'Not enough balance.'} - // {'code': 60060, 'message': 'The order is already filled or canceled.'} - // {"code":2100,"message":"ApiKeyFailure"} - // {"code":300001,"message":"Price is too low from market price.","reason":"INVALID_PRICE","accountId":"cshrHKLZCjlZ2ejqkmvIHHtPmLYqdnda","ac":"CASH","action":"place-order","status":"Err","info":{"symbol":"BTC/USDT"}} - // - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'message'); - const error = (code !== undefined) && (code !== '0'); - if (error || (message !== undefined)) { - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],38:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],38:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -26373,6 +26421,7 @@ module.exports = class bitmax extends Exchange { const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -26583,8 +26632,8 @@ module.exports = class bitmex extends Exchange { 'amount': undefined, 'price': undefined, }; - const lotSize = this.safeFloat (market, 'lotSize'); - const tickSize = this.safeFloat (market, 'tickSize'); + const lotSize = this.safeNumber (market, 'lotSize'); + const tickSize = this.safeNumber (market, 'tickSize'); if (lotSize !== undefined) { precision['amount'] = lotSize; } @@ -26598,7 +26647,7 @@ module.exports = class bitmex extends Exchange { }, 'price': { 'min': tickSize, - 'max': this.safeFloat (market, 'maxPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { 'min': undefined, @@ -26608,7 +26657,7 @@ module.exports = class bitmex extends Exchange { const limitField = (position === quote) ? 'cost' : 'amount'; limits[limitField] = { 'min': lotSize, - 'max': this.safeFloat (market, 'maxOrderQty'), + 'max': this.safeNumber (market, 'maxOrderQty'), }; result.push ({ 'id': id, @@ -26620,8 +26669,8 @@ module.exports = class bitmex extends Exchange { 'active': active, 'precision': precision, 'limits': limits, - 'taker': this.safeFloat (market, 'takerFee'), - 'maker': this.safeFloat (market, 'makerFee'), + 'taker': this.safeNumber (market, 'takerFee'), + 'maker': this.safeNumber (market, 'makerFee'), 'type': type, 'spot': false, 'swap': swap, @@ -26687,21 +26736,17 @@ module.exports = class bitmex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - let free = this.safeFloat (balance, 'availableMargin'); - let total = this.safeFloat (balance, 'marginBalance'); + let free = this.safeString (balance, 'availableMargin'); + let total = this.safeString (balance, 'marginBalance'); if (code === 'BTC') { - if (free !== undefined) { - free /= 100000000; - } - if (total !== undefined) { - total /= 100000000; - } + free = Precise.stringDiv (free, '1e8'); + total = Precise.stringDiv (total, '1e8'); } account['free'] = free; account['total'] = total; result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -26780,8 +26825,8 @@ module.exports = class bitmex extends Exchange { for (let i = 0; i < response.length; i++) { const order = response[i]; const side = (order['side'] === 'Sell') ? 'asks' : 'bids'; - const amount = this.safeFloat (order, 'size'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const price = this.safeNumber (order, 'price'); // https://github.com/ccxt/ccxt/issues/4926 // https://github.com/ccxt/ccxt/issues/4927 // the exchange sometimes returns null price in the orderbook @@ -26987,7 +27032,7 @@ module.exports = class bitmex extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'transactType')); const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount !== undefined) { amount = amount / 100000000; } @@ -26998,7 +27043,7 @@ module.exports = class bitmex extends Exchange { // for unrealized pnl and other transactions without a timestamp timestamp = 0; // see comments above } - let feeCost = this.safeFloat (item, 'fee', 0); + let feeCost = this.safeNumber (item, 'fee', 0); if (feeCost !== undefined) { feeCost = feeCost / 100000000; } @@ -27006,7 +27051,7 @@ module.exports = class bitmex extends Exchange { 'cost': feeCost, 'currency': code, }; - let after = this.safeFloat (item, 'walletBalance'); + let after = this.safeNumber (item, 'walletBalance'); if (after !== undefined) { after = after / 100000000; } @@ -27325,8 +27370,8 @@ module.exports = class bitmex extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const open = this.safeFloat (ticker, 'prevPrice24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'prevPrice24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; if (last !== undefined && open !== undefined) { @@ -27339,13 +27384,13 @@ module.exports = class bitmex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askPrice'), + 'ask': this.safeNumber (ticker, 'askPrice'), 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'vwap'), + 'vwap': this.safeNumber (ticker, 'vwap'), 'open': open, 'close': last, 'last': last, @@ -27353,8 +27398,8 @@ module.exports = class bitmex extends Exchange { 'change': change, 'percentage': percentage, 'average': this.sum (open, last) / 2, - 'baseVolume': this.safeFloat (ticker, 'homeNotional24h'), - 'quoteVolume': this.safeFloat (ticker, 'foreignNotional24h'), + 'baseVolume': this.safeNumber (ticker, 'homeNotional24h'), + 'quoteVolume': this.safeNumber (ticker, 'foreignNotional24h'), 'info': ticker, }; } @@ -27379,11 +27424,11 @@ module.exports = class bitmex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -27512,23 +27557,23 @@ module.exports = class bitmex extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat2 (trade, 'avgPx', 'price'); - const amount = this.safeFloat2 (trade, 'size', 'lastQty'); + const price = this.safeNumber2 (trade, 'avgPx', 'price'); + const amount = this.safeNumber2 (trade, 'size', 'lastQty'); const id = this.safeString (trade, 'trdMatchID'); const order = this.safeString (trade, 'orderID'); const side = this.safeStringLower (trade, 'side'); // price * amount doesn't work for all symbols (e.g. XBT, ETH) - let cost = this.safeFloat (trade, 'execCost'); + let cost = this.safeNumber (trade, 'execCost'); if (cost !== undefined) { cost = Math.abs (cost) / 100000000; } let fee = undefined; if ('execComm' in trade) { - let feeCost = this.safeFloat (trade, 'execComm'); + let feeCost = this.safeNumber (trade, 'execComm'); feeCost = feeCost / 100000000; const currencyId = this.safeString (trade, 'settlCurrency'); const feeCurrency = this.safeCurrencyCode (currencyId); - const feeRate = this.safeFloat (trade, 'commission'); + const feeRate = this.safeNumber (trade, 'commission'); fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -27630,33 +27675,19 @@ module.exports = class bitmex extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'transactTime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty', 0.0); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (amount - filled, 0.0); - } - } - const average = this.safeFloat (order, 'avgPx'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = average * filled; - } else if (price !== undefined) { - cost = price * filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty', 0.0); + const average = this.safeNumber (order, 'avgPx'); const id = this.safeString (order, 'orderID'); const type = this.safeStringLower (order, 'ordType'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'clOrdID'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'ParticipateDoNotInitiate'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -27671,14 +27702,14 @@ module.exports = class bitmex extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { @@ -27739,7 +27770,7 @@ module.exports = class bitmex extends Exchange { 'ordType': orderType, }; if ((orderType === 'Stop') || (orderType === 'StopLimit') || (orderType === 'MarketIfTouched') || (orderType === 'LimitIfTouched')) { - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPx or stopPrice parameter for the ' + orderType + ' order type'); } else { @@ -27856,7 +27887,7 @@ module.exports = class bitmex extends Exchange { return this.parseOrders (response, market); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPosition (params); // [ @@ -28051,7 +28082,7 @@ module.exports = class bitmex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],39:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],39:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -28382,7 +28413,7 @@ module.exports = class bitpanda extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; @@ -28455,9 +28486,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -28504,8 +28535,8 @@ module.exports = class bitpanda extends Exchange { const activeFeeTier = this.safeValue (response, 'active_fee_tier', {}); const result = { 'info': response, - 'maker': this.safeFloat (activeFeeTier, 'maker_fee'), - 'taker': this.safeFloat (activeFeeTier, 'taker_fee'), + 'maker': this.safeNumber (activeFeeTier, 'maker_fee'), + 'taker': this.safeNumber (activeFeeTier, 'taker_fee'), 'percentage': true, 'tierBased': true, }; @@ -28514,9 +28545,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -28554,27 +28585,27 @@ module.exports = class bitpanda extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last_price'); - const percentage = this.safeFloat (ticker, 'price_change_percentage'); - const change = this.safeFloat (ticker, 'price_change'); + const last = this.safeNumber (ticker, 'last_price'); + const percentage = this.safeNumber (ticker, 'price_change_percentage'); + const change = this.safeNumber (ticker, 'price_change'); let open = undefined; let average = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'best_bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -28759,11 +28790,11 @@ module.exports = class bitpanda extends Exchange { const volumeField = this.safeString (options, 'volume', 'total_amount'); return [ alignedTimestamp, - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -28849,21 +28880,21 @@ module.exports = class bitpanda extends Exchange { timestamp = this.parse8601 (this.safeString (trade, 'time')); } const side = this.safeStringLower2 (trade, 'side', 'taker_side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + let cost = this.safeNumber (trade, 'volume'); if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { cost = amount * price; } const marketId = this.safeString (trade, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (feeInfo, 'fee_amount'); + const feeCost = this.safeNumber (feeInfo, 'fee_amount'); let takerOrMaker = undefined; let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (feeInfo, 'fee_percentage'); + const feeRate = this.safeNumber (feeInfo, 'fee_percentage'); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, @@ -28946,11 +28977,11 @@ module.exports = class bitpanda extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -29204,12 +29235,12 @@ module.exports = class bitpanda extends Exchange { // } // const id = this.safeString (transaction, 'transaction_id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const currencyId = this.safeString (transaction, 'currency'); currency = this.safeCurrency (currencyId, currency); const status = 'ok'; // the exchange returns cleared transactions only - const feeCost = this.safeFloat2 (transaction, 'fee_amount', 'fee'); + const feeCost = this.safeNumber2 (transaction, 'fee_amount', 'fee'); let fee = undefined; const addressTo = this.safeString (transaction, 'recipient'); const tagTo = this.safeString (transaction, 'destination_tag'); @@ -29324,72 +29355,34 @@ module.exports = class bitpanda extends Exchange { // ] // } // - const rawTrades = this.safeValue (order, 'trades', []); - order = this.safeValue (order, 'order', order); - const id = this.safeString (order, 'order_id'); - const clientOrderId = this.safeString (order, 'client_id'); - const timestamp = this.parse8601 (this.safeString (order, 'time')); - let status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'instrument_code'); + const rawOrder = this.safeValue (order, 'order', order); + const id = this.safeString (rawOrder, 'order_id'); + const clientOrderId = this.safeString (rawOrder, 'client_id'); + const timestamp = this.parse8601 (this.safeString (rawOrder, 'time')); + const rawStatus = this.parseOrderStatus (this.safeString (rawOrder, 'status')); + const status = this.parseOrderStatus (rawStatus); + const marketId = this.safeString (rawOrder, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - if (status === undefined) { - if (remaining > 0) { - status = 'open'; - } else { - status = 'closed'; - } - } - } - } - const side = this.safeStringLower (order, 'side'); - const type = this.safeStringLower (order, 'type'); - const trades = this.parseTrades (rawTrades, market, undefined, undefined); - const fees = []; - const numTrades = trades.length; - let lastTradeTimestamp = undefined; - let tradeCost = undefined; - let tradeAmount = undefined; - if (numTrades > 0) { - lastTradeTimestamp = trades[0]['timestamp']; - tradeCost = 0; - tradeAmount = 0; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - fees.push (trade['fee']); - lastTradeTimestamp = Math.max (lastTradeTimestamp, trade['timestamp']); - tradeCost = this.sum (tradeCost, trade['cost']); - tradeAmount = this.sum (tradeAmount, trade['amount']); - } - } - let average = this.safeFloat (order, 'average_price'); - if (average === undefined) { - if ((tradeCost !== undefined) && (tradeAmount !== undefined) && (tradeAmount !== 0)) { - average = tradeCost / tradeAmount; - } - } - if (cost === undefined) { - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - } - const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'trigger_price'); - const postOnly = this.safeValue (order, 'is_post_only'); - const result = { + const price = this.safeNumber (rawOrder, 'price'); + const amount = this.safeNumber (rawOrder, 'amount'); + const filledString = this.safeString (rawOrder, 'filled_amount'); + const filled = this.parseNumber (filledString); + const side = this.safeStringLower (rawOrder, 'side'); + const type = this.safeStringLower (rawOrder, 'type'); + const timeInForce = this.parseTimeInForce (this.safeString (rawOrder, 'time_in_force')); + const stopPrice = this.safeNumber (rawOrder, 'trigger_price'); + const postOnly = this.safeValue (rawOrder, 'is_post_only'); + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'type': type, + }); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -29398,41 +29391,14 @@ module.exports = class bitpanda extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, // 'fee': undefined, 'trades': trades, - }; - const numFees = fees.length; - if (numFees > 0) { - if (numFees === 1) { - result['fee'] = fees[0]; - } else { - const feesByCurrency = this.groupBy (fees, 'currency'); - const feeCurrencies = Object.keys (feesByCurrency); - const numFeesByCurrency = feeCurrencies.length; - if (numFeesByCurrency === 1) { - const feeCurrency = feeCurrencies[0]; - const feeArray = this.safeValue (feesByCurrency, feeCurrency); - let feeCost = 0; - for (let i = 0; i < feeArray.length; i++) { - feeCost = this.sum (feeCost, feeArray[i]['cost']); - } - result['fee'] = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } else { - result['fees'] = fees; - } - } - } else { - result['fee'] = undefined; - } - return result; + }); } parseTimeInForce (timeInForce) { @@ -29466,7 +29432,7 @@ module.exports = class bitpanda extends Exchange { priceIsRequired = true; } if (uppercaseType === 'STOP') { - const triggerPrice = this.safeFloat (params, 'trigger_price'); + const triggerPrice = this.safeNumber (params, 'trigger_price'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a trigger_price param for ' + type + ' orders'); } @@ -29869,7 +29835,7 @@ module.exports = class bitpanda extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],40:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],40:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -30029,28 +29995,28 @@ module.exports = class bitso extends Exchange { const symbol = base + '/' + quote; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), - 'max': this.safeFloat (market, 'maximum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), + 'max': this.safeNumber (market, 'maximum_amount'), }, 'price': { - 'min': this.safeFloat (market, 'minimum_price'), - 'max': this.safeFloat (market, 'maximum_price'), + 'min': this.safeNumber (market, 'minimum_price'), + 'max': this.safeNumber (market, 'maximum_price'), }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), - 'max': this.safeFloat (market, 'maximum_value'), + 'min': this.safeNumber (market, 'minimum_value'), + 'max': this.safeNumber (market, 'maximum_value'), }, }; - const defaultPricePrecision = this.safeFloat (this.options['precision'], quote, this.options['defaultPrecision']); - const pricePrecision = this.safeFloat (market, 'tick_size', defaultPricePrecision); + const defaultPricePrecision = this.safeNumber (this.options['precision'], quote, this.options['defaultPrecision']); + const pricePrecision = this.safeNumber (market, 'tick_size', defaultPricePrecision); const precision = { - 'amount': this.safeFloat (this.options['precision'], base, this.options['defaultPrecision']), + 'amount': this.safeNumber (this.options['precision'], base, this.options['defaultPrecision']), 'price': pricePrecision, }; const fees = this.safeValue (market, 'fees', {}); const flatRate = this.safeValue (fees, 'flat_rate', {}); - const maker = this.safeFloat (flatRate, 'maker'); - const taker = this.safeFloat (flatRate, 'taker'); + const maker = this.safeNumber (flatRate, 'maker'); + const taker = this.safeNumber (flatRate, 'taker'); const feeTiers = this.safeValue (fees, 'structure', []); const fee = { 'taker': parseFloat (this.decimalToPrecision (taker / 100, ROUND, 0.00000001, TICK_SIZE)), @@ -30062,9 +30028,9 @@ module.exports = class bitso extends Exchange { const makerFees = []; for (let j = 0; j < feeTiers.length; j++) { const tier = feeTiers[j]; - const volume = this.safeFloat (tier, 'volume'); - const takerFee = this.safeFloat (tier, 'taker'); - const makerFee = this.safeFloat (tier, 'maker'); + const volume = this.safeNumber (tier, 'volume'); + const takerFee = this.safeNumber (tier, 'taker'); + const makerFee = this.safeNumber (tier, 'maker'); const takerFeeToPrecision = parseFloat (this.decimalToPrecision (takerFee / 100, ROUND, 0.00000001, TICK_SIZE)); const makerFeeToPrecision = parseFloat (this.decimalToPrecision (makerFee / 100, ROUND, 0.00000001, TICK_SIZE)); takerFees.push ([ volume, takerFeeToPrecision ]); @@ -30104,14 +30070,13 @@ module.exports = class bitso extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'locked'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -30133,22 +30098,22 @@ module.exports = class bitso extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'payload'); const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -30169,12 +30134,12 @@ module.exports = class bitso extends Exchange { const marketId = this.safeString (trade, 'book'); const symbol = this.safeSymbol (marketId, market, '_'); const side = this.safeString2 (trade, 'side', 'maker_side'); - let amount = this.safeFloat2 (trade, 'amount', 'major'); + let amount = this.safeNumber2 (trade, 'amount', 'major'); if (amount !== undefined) { amount = Math.abs (amount); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fees_amount'); + const feeCost = this.safeNumber (trade, 'fees_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fees_currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -30183,11 +30148,11 @@ module.exports = class bitso extends Exchange { 'currency': feeCurrency, }; } - let cost = this.safeFloat (trade, 'minor'); + let cost = this.safeNumber (trade, 'minor'); if (cost !== undefined) { cost = Math.abs (cost); } - const price = this.safeFloat (trade, 'price'); + const price = this.safeNumber (trade, 'price'); const orderId = this.safeString (trade, 'oid'); const id = this.safeString (trade, 'tid'); return { @@ -30288,17 +30253,11 @@ module.exports = class bitso extends Exchange { const symbol = this.safeSymbol (marketId, market, '_'); const orderType = this.safeString (order, 'type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'unfilled_amount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'unfilled_amount'); const clientOrderId = this.safeString (order, 'client_id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -30315,12 +30274,12 @@ module.exports = class bitso extends Exchange { 'amount': amount, 'cost': undefined, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = 25, params = {}) { @@ -30496,7 +30455,7 @@ module.exports = class bitso extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],41:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],41:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -30614,6 +30573,16 @@ module.exports = class bitstamp extends Exchange { 'usdc_address/', 'omg_withdrawal/', 'omg_address/', + 'dai_withdrawal/', + 'dai_address/', + 'knc_withdrawal/', + 'knc_address/', + 'mkr_withdrawal/', + 'mkr_address/', + 'zrx_withdrawal/', + 'zrx_address/', + 'gusd_withdrawal/', + 'gusd_address/', 'transfer-to-main/', 'transfer-from-main/', 'withdrawal-requests/', @@ -30748,13 +30717,15 @@ module.exports = class bitstamp extends Exchange { const symbolId = baseId + '_' + quoteId; const id = this.safeString (market, 'url_symbol'); const precision = { - 'amount': market['base_decimals'], - 'price': market['counter_decimals'], + 'amount': this.safeInteger (market, 'base_decimals'), + 'price': this.safeInteger (market, 'counter_decimals'), }; - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; // let [ cost, currency ] = market['minimum_order'].split (' '); - const active = (market['trading'] === 'Enabled'); + const trading = this.safeString (market, 'trading'); + const active = (trading === 'Enabled'); result.push ({ 'id': id, 'symbol': symbol, @@ -30798,7 +30769,7 @@ module.exports = class bitstamp extends Exchange { 'type': currencyType, 'name': name, 'active': true, - 'fee': this.safeFloat (description['fees']['funding']['withdraw'], code), + 'fee': this.safeNumber (description['fees']['funding']['withdraw'], code), 'precision': precision, 'limits': { 'amount': { @@ -30851,13 +30822,16 @@ module.exports = class bitstamp extends Exchange { quote = this.safeCurrencyCode (quote); const description = this.safeString (market, 'description'); const [ baseDescription, quoteDescription ] = description.split (' / '); - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; if (!(base in result)) { - result[base] = this.constructCurrencyObject (baseId, base, baseDescription, market['base_decimals'], undefined, market); + const baseDecimals = this.safeInteger (market, 'base_decimals'); + result[base] = this.constructCurrencyObject (baseId, base, baseDescription, baseDecimals, undefined, market); } if (!(quote in result)) { - result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, market['counter_decimals'], parseFloat (cost), market); + const counterDecimals = this.safeInteger (market, 'counter_decimals'); + result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, counterDecimals, parseFloat (cost), market); } } return result; @@ -30899,25 +30873,25 @@ module.exports = class bitstamp extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -30960,7 +30934,7 @@ module.exports = class bitstamp extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; if (id.indexOf ('_') < 0) { - const value = this.safeFloat (transaction, id); + const value = this.safeNumber (transaction, id); if ((value !== undefined) && (value !== 0)) { return id; } @@ -31042,11 +31016,11 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString2 (trade, 'id', 'tid'); let symbol = undefined; let side = undefined; - let price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat (trade, 'amount'); + let price = this.safeNumber (trade, 'price'); + let amount = this.safeNumber (trade, 'amount'); const orderId = this.safeString (trade, 'order_id'); const type = undefined; - let cost = this.safeFloat (trade, 'cost'); + let cost = this.safeNumber (trade, 'cost'); if (market === undefined) { const keys = Object.keys (trade); for (let i = 0; i < keys.length; i++) { @@ -31063,12 +31037,12 @@ module.exports = class bitstamp extends Exchange { market = this.getMarketFromTrade (trade); } } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = undefined; if (market !== undefined) { - price = this.safeFloat (trade, market['symbolId'], price); - amount = this.safeFloat (trade, market['baseId'], amount); - cost = this.safeFloat (trade, market['quoteId'], cost); + price = this.safeNumber (trade, market['symbolId'], price); + amount = this.safeNumber (trade, market['baseId'], amount); + cost = this.safeNumber (trade, market['quoteId'], cost); feeCurrency = market['quote']; symbol = market['symbol']; } @@ -31137,7 +31111,7 @@ module.exports = class bitstamp extends Exchange { parseTradingFee (balances, symbol) { const market = this.market (symbol); - const tradeFee = this.safeFloat (balances, market['id'] + '_fee'); + const tradeFee = this.safeNumber (balances, market['id'] + '_fee'); return { 'symbol': symbol, 'maker': tradeFee, @@ -31187,11 +31161,11 @@ module.exports = class bitstamp extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -31249,12 +31223,12 @@ module.exports = class bitstamp extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -31301,7 +31275,7 @@ module.exports = class bitstamp extends Exchange { if (id.indexOf ('_withdrawal_fee') >= 0) { const currencyId = id.split ('_')[0]; const code = this.safeCurrencyCode (currencyId); - withdraw[code] = this.safeFloat (balance, id); + withdraw[code] = this.safeNumber (balance, id); } } return { @@ -31547,16 +31521,16 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString (transaction, 'id'); const currencyId = this.getCurrencyIdFromTransaction (transaction); const code = this.safeCurrencyCode (currencyId, currency); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let feeCurrency = undefined; let amount = undefined; if ('amount' in transaction) { - amount = this.safeFloat (transaction, 'amount'); + amount = this.safeNumber (transaction, 'amount'); } else if (currency !== undefined) { - amount = this.safeFloat (transaction, currency['id'], amount); + amount = this.safeNumber (transaction, currency['id'], amount); feeCurrency = currency['code']; } else if ((code !== undefined) && (currencyId !== undefined)) { - amount = this.safeFloat (transaction, currencyId, amount); + amount = this.safeNumber (transaction, currencyId, amount); feeCurrency = code; } if (amount !== undefined) { @@ -31681,83 +31655,23 @@ module.exports = class bitstamp extends Exchange { } // there is no timestamp from fetchOrder const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - let lastTradeTimestamp = undefined; - let symbol = undefined; - let marketId = this.safeStringLower (order, 'currency_pair'); - if (marketId !== undefined) { - marketId = marketId.replace ('/', ''); - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - symbol = market['symbol']; - } - } - let amount = this.safeFloat (order, 'amount'); - let filled = 0.0; - const trades = []; - const transactions = this.safeValue (order, 'transactions', []); - let feeCost = undefined; - let cost = undefined; - const numTransactions = transactions.length; - if (numTransactions > 0) { - feeCost = 0.0; - for (let i = 0; i < numTransactions; i++) { - const trade = this.parseTrade (this.extend ({ - 'order_id': id, - 'side': side, - }, transactions[i]), market); - filled = this.sum (filled, trade['amount']); - feeCost = this.sum (feeCost, trade['fee']['cost']); - if (cost === undefined) { - cost = 0.0; - } - cost = this.sum (cost, trade['cost']); - trades.push (trade); - } - lastTradeTimestamp = trades[numTransactions - 1]['timestamp']; - } + const marketId = this.safeStringLower (order, 'currency_pair'); + let symbol = this.safeSymbol (marketId, market, '/'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((status === 'closed') && (amount === undefined)) { - amount = filled; + const amount = this.safeNumber (order, 'amount'); + const transactions = this.safeValue (order, 'transactions', []); + const trades = this.parseTrades (transactions, market); + const length = trades.length; + if (length) { + symbol = trades[0]['symbol']; } - let remaining = undefined; - if (amount !== undefined) { - remaining = amount - filled; - } - let price = this.safeFloat (order, 'price'); - if (market === undefined) { - market = this.getMarketFromTrades (trades); - } - let feeCurrency = undefined; - if (market !== undefined) { - if (symbol === undefined) { - symbol = market['symbol']; - } - feeCurrency = market['quote']; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if (price === undefined) { - if (filled > 0) { - price = cost / filled; - } - } - let fee = undefined; - if (feeCost !== undefined) { - if (feeCurrency !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { + const price = this.safeNumber (order, 'price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'status': status, 'symbol': symbol, 'type': undefined, @@ -31766,15 +31680,15 @@ module.exports = class bitstamp extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, - 'filled': filled, - 'remaining': remaining, + 'filled': undefined, + 'remaining': undefined, 'trades': trades, - 'fee': fee, + 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } parseLedgerEntryType (type) { @@ -31854,11 +31768,11 @@ module.exports = class bitstamp extends Exchange { const parsedTransaction = this.parseTransaction (item); let direction = undefined; if ('amount' in item) { - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); direction = amount > 0 ? 'in' : 'out'; } else if (('currency' in parsedTransaction) && parsedTransaction['currency'] !== undefined) { const currencyId = this.currencyId (parsedTransaction['currency']); - const amount = this.safeFloat (item, currencyId); + const amount = this.safeNumber (item, currencyId); direction = amount > 0 ? 'in' : 'out'; } return { @@ -32105,13 +32019,14 @@ module.exports = class bitstamp extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],42:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],42:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -32208,25 +32123,25 @@ module.exports = class bitstamp1 extends Exchange { await this.loadMarkets (); const ticker = await this.publicGetTicker (params); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -32249,14 +32164,11 @@ module.exports = class bitstamp1 extends Exchange { } } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -32300,12 +32212,12 @@ module.exports = class bitstamp1 extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -32406,7 +32318,7 @@ module.exports = class bitstamp1 extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],43:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],43:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -32414,6 +32326,7 @@ module.exports = class bitstamp1 extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, DDoSProtection, PermissionDenied, AddressPending, OnMaintenance, BadRequest, InvalidAddress } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -32689,7 +32602,7 @@ module.exports = class bittrex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeSize'), + 'min': this.safeNumber (market, 'minTradeSize'), 'max': undefined, }, 'price': { @@ -32717,11 +32630,11 @@ module.exports = class bittrex extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); const balance = indexed[currencyId]; - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -32781,7 +32694,7 @@ module.exports = class bittrex extends Exchange { const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); const precision = 8; // default precision, todo: fix "magic constants" - const fee = this.safeFloat (currency, 'txFee'); // todo: redesign + const fee = this.safeNumber (currency, 'txFee'); // todo: redesign const isActive = this.safeString (currency, 'status'); result[code] = { 'id': id, @@ -32842,17 +32755,17 @@ module.exports = class bittrex extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'updatedAt')); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const percentage = this.safeFloat (ticker, 'percentChange'); - const last = this.safeFloat (ticker, 'lastTradeRate'); + const percentage = this.safeNumber (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'lastTradeRate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidRate'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidRate'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askRate'), + 'ask': this.safeNumber (ticker, 'askRate'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -32862,8 +32775,8 @@ module.exports = class bittrex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -32976,21 +32889,18 @@ module.exports = class bittrex extends Exchange { const order = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'marketSymbol'); market = this.safeMarket (marketId, market, '-'); - let cost = undefined; - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'quantity'); - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = undefined; const isTaker = this.safeValue (trade, 'isTaker'); if (isTaker !== undefined) { takerOrMaker = isTaker ? 'taker' : 'maker'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -33060,11 +32970,11 @@ module.exports = class bittrex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'startsAt')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -33171,9 +33081,9 @@ module.exports = class bittrex extends Exchange { let cost = undefined; if (isCeilingLimit) { request['limit'] = this.priceToPrecision (symbol, price); - cost = this.safeFloat2 (params, 'ceiling', 'cost', amount); + cost = this.safeNumber2 (params, 'ceiling', 'cost', amount); } else if (isCeilingMarket) { - cost = this.safeFloat2 (params, 'ceiling', 'cost'); + cost = this.safeNumber2 (params, 'ceiling', 'cost'); if (cost === undefined) { if (price === undefined) { cost = amount; @@ -33332,7 +33242,7 @@ module.exports = class bittrex extends Exchange { // } // const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const address = this.safeString (transaction, 'cryptoAddress'); const txid = this.safeString (transaction, 'txId'); const updated = this.parse8601 (this.safeString (transaction, 'updatedAt')); @@ -33368,7 +33278,7 @@ module.exports = class bittrex extends Exchange { status = 'ok'; } } - let feeCost = this.safeFloat (transaction, 'txCost'); + let feeCost = this.safeNumber (transaction, 'txCost'); if (feeCost === undefined) { if (type === 'deposit') { // according to https://support.bittrex.com/hc/en-us/articles/115000199651-What-fees-does-Bittrex-charge- @@ -33425,15 +33335,9 @@ module.exports = class bittrex extends Exchange { // } // const marketSymbol = this.safeString (order, 'marketSymbol'); - let symbol = undefined; - let feeCurrency = undefined; - if (marketSymbol !== undefined) { - const [ baseId, quoteId ] = marketSymbol.split ('-'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - feeCurrency = quote; - } + market = this.safeMarket (marketSymbol, market, '-'); + const symbol = market['symbol']; + const feeCurrency = market['quote']; const direction = this.safeStringLower (order, 'direction'); const createdAt = this.safeString (order, 'createdAt'); const updatedAt = this.safeString (order, 'updatedAt'); @@ -33446,32 +33350,15 @@ module.exports = class bittrex extends Exchange { } const timestamp = this.parse8601 (createdAt); const type = this.safeStringLower (order, 'type'); - const quantity = this.safeFloat (order, 'quantity'); - const limit = this.safeFloat (order, 'limit'); - const fillQuantity = this.safeFloat (order, 'fillQuantity'); - const commission = this.safeFloat (order, 'commission'); - const proceeds = this.safeFloat (order, 'proceeds'); - let average = undefined; - let remaining = undefined; - if (fillQuantity !== undefined) { - if (proceeds !== undefined) { - if (fillQuantity > 0) { - average = proceeds / fillQuantity; - } else if (proceeds === 0) { - average = 0; - } - } - if (quantity !== undefined) { - remaining = quantity - fillQuantity; - } - } - let status = this.safeStringLower (order, 'status'); - if ((status === 'closed') && (remaining !== undefined) && (remaining > 0)) { - status = 'canceled'; - } + const quantity = this.safeNumber (order, 'quantity'); + const limit = this.safeNumber (order, 'limit'); + const fillQuantity = this.safeNumber (order, 'fillQuantity'); + const commission = this.safeNumber (order, 'commission'); + const proceeds = this.safeNumber (order, 'proceeds'); + const status = this.safeStringLower (order, 'status'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'timestamp': timestamp, @@ -33485,10 +33372,10 @@ module.exports = class bittrex extends Exchange { 'price': limit, 'stopPrice': undefined, 'cost': proceeds, - 'average': average, + 'average': undefined, 'amount': quantity, 'filled': fillQuantity, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': { 'cost': commission, @@ -33496,7 +33383,7 @@ module.exports = class bittrex extends Exchange { }, 'info': order, 'trades': undefined, - }; + }); } parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { @@ -33545,9 +33432,9 @@ module.exports = class bittrex extends Exchange { 'side': this.safeString (order, 'side'), 'order': this.safeString (order, 'id'), 'type': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'average'), - 'amount': this.safeFloat (order, 'filled'), - 'cost': this.safeFloat (order, 'cost'), + 'price': this.safeNumber (order, 'average'), + 'amount': this.safeNumber (order, 'filled'), + 'cost': this.safeNumber (order, 'cost'), 'symbol': this.safeString (order, 'symbol'), 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -33839,7 +33726,7 @@ module.exports = class bittrex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],44:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],44:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -33847,6 +33734,7 @@ module.exports = class bittrex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, BadSymbol, AuthenticationError, InsufficientFunds, InvalidOrder, ArgumentsRequired, OrderNotFound, InvalidAddress, BadRequest, RateLimitExceeded, PermissionDenied, ExchangeNotAvailable, AccountSuspended, OnMaintenance } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -34148,7 +34036,7 @@ module.exports = class bitvavo extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minOrderInBaseAsset'), + 'min': this.safeNumber (market, 'minOrderInBaseAsset'), 'max': undefined, }, 'price': { @@ -34156,7 +34044,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderInQuoteAsset'), + 'min': this.safeNumber (market, 'minOrderInQuoteAsset'), 'max': undefined, }, }, @@ -34219,7 +34107,7 @@ module.exports = class bitvavo extends Exchange { 'code': code, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -34235,7 +34123,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMinAmount'), + 'min': this.safeNumber (currency, 'withdrawalMinAmount'), 'max': undefined, }, }, @@ -34292,14 +34180,14 @@ module.exports = class bitvavo extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); + const last = this.safeNumber (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -34311,12 +34199,12 @@ module.exports = class bitvavo extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': vwap, 'open': open, 'close': last, @@ -34332,14 +34220,6 @@ module.exports = class bitvavo extends Exchange { return result; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24h (params); @@ -34453,12 +34333,11 @@ module.exports = class bitvavo extends Exchange { // feeCurrency: 'EUR' // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'side'); const id = this.safeString2 (trade, 'id', 'fillId'); @@ -34469,7 +34348,7 @@ module.exports = class bitvavo extends Exchange { if (taker !== undefined) { takerOrMaker = taker ? 'taker' : 'maker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); @@ -34540,11 +34419,11 @@ module.exports = class bitvavo extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -34592,13 +34471,12 @@ module.exports = class bitvavo extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'inOrder'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'inOrder'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDepositAddress (code, params = {}) { @@ -34648,7 +34526,7 @@ module.exports = class bitvavo extends Exchange { if (price !== undefined) { cost = amount * price; } else { - cost = this.safeFloat2 (params, 'cost', 'amountQuote'); + cost = this.safeNumber2 (params, 'cost', 'amountQuote'); } if (cost !== undefined) { const precision = market['precision']['price']; @@ -34661,7 +34539,7 @@ module.exports = class bitvavo extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['amount'] = this.amountToPrecision (symbol, amount); } else if (isStopMarket || isStopLimit) { - let stopPrice = this.safeFloat2 (params, 'stopPrice', 'triggerAmount'); + let stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerAmount'); if (stopPrice === undefined) { if (isStopLimit) { throw new ArgumentsRequired (this.id + ' createOrder requires a stopPrice parameter for a ' + type + ' order'); @@ -34723,7 +34601,7 @@ module.exports = class bitvavo extends Exchange { await this.loadMarkets (); const market = this.market (symbol); let request = {}; - const amountRemaining = this.safeFloat (params, 'amountRemaining'); + const amountRemaining = this.safeNumber (params, 'amountRemaining'); params = this.omit (params, 'amountRemaining'); if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); @@ -34788,7 +34666,6 @@ module.exports = class bitvavo extends Exchange { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); } await this.loadMarkets (); - await this.loadMarkets (); const market = this.market (symbol); const request = { 'orderId': id, @@ -35014,26 +34891,13 @@ module.exports = class bitvavo extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let remaining = this.safeFloat (order, 'amountRemaining'); - let filled = this.safeFloat (order, 'filledAmount'); - const remainingCost = this.safeFloat (order, 'remainingCost'); - if ((remainingCost !== undefined) && (remainingCost === 0.0)) { - remaining = 0; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - const cost = this.safeFloat (order, 'filledAmountQuote'); - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amountRemaining'); + const filled = this.safeNumber (order, 'filledAmount'); + const cost = this.safeNumber (order, 'filledAmountQuote'); let fee = undefined; - const feeCost = this.safeFloat (order, 'feePaid'); + const feeCost = this.safeNumber (order, 'feePaid'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -35042,32 +34906,24 @@ module.exports = class bitvavo extends Exchange { 'currency': feeCurrencyCode, }; } - let lastTradeTimestamp = undefined; - const rawTrades = this.safeValue (order, 'fills'); - let trades = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'symbol': symbol, - 'order': id, - 'side': side, - }); - const numTrades = trades.length; - if (numTrades > 0) { - const lastTrade = this.safeValue (trades, numTrades - 1); - lastTradeTimestamp = lastTrade['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'symbol': symbol, + 'order': id, + 'side': side, + 'type': type, + }); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = this.safeValue (order, 'postOnly'); // https://github.com/ccxt/ccxt/issues/8489 - const stopPrice = this.safeFloat (order, 'triggerPrice'); - return { + const stopPrice = this.safeNumber (order, 'triggerPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -35077,13 +34933,13 @@ module.exports = class bitvavo extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -35278,11 +35134,11 @@ module.exports = class bitvavo extends Exchange { const currencyId = this.safeString (transaction, 'symbol'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -35373,7 +35229,7 @@ module.exports = class bitvavo extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],45:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],45:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -35435,7 +35291,7 @@ module.exports = class bitz extends Exchange { 'assets': 'https://{hostname}', }, 'www': 'https://www.bitz.com', - 'doc': 'https://apidoc.bitz.com/en/', + 'doc': 'https://apidocv2.bitz.plus/en/', 'fees': 'https://www.bitz.com/fee?type=1', 'referral': 'https://u.bitz.com/register?invite_code=1429193', }, @@ -35452,6 +35308,11 @@ module.exports = class bitz extends Exchange { 'currencyRate', 'currencyCoinRate', 'coinRate', + 'getContractCoin', + 'getContractKline', + 'getContractOrderBook', + 'getContractTradesHistory', + 'getContractTickers', ], }, 'trade': { @@ -35464,6 +35325,10 @@ module.exports = class bitz extends Exchange { 'getUserNowEntrustSheet', // open orders 'getEntrustSheetInfo', // order 'depositOrWithdraw', // transactions + 'getCoinAddress', + 'getCoinAddressList', + 'marketTrade', + 'addEntrustSheetBatch', ], }, 'assets': { @@ -35471,6 +35336,20 @@ module.exports = class bitz extends Exchange { 'getUserAssets', ], }, + 'contract': { + 'post': [ + 'addContractTrade', + 'cancelContractTrade', + 'getContractActivePositions', + 'getContractAccountInfo', + 'getContractMyPositions', + 'getContractOrderResult', + 'getContractTradeResult', + 'getContractOrder', + 'getContractMyHistoryTrade', + 'getContractMyTrades', + ], + }, }, 'fees': { 'trading': { @@ -35657,8 +35536,8 @@ module.exports = class bitz extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTrade'), - 'max': this.safeFloat (market, 'maxTrade'), + 'min': this.safeNumber (market, 'minTrade'), + 'max': this.safeNumber (market, 'maxTrade'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -35707,12 +35586,12 @@ module.exports = class bitz extends Exchange { const currencyId = this.safeString (balance, 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lock'); - account['total'] = this.safeFloat (balance, 'num'); - account['free'] = this.safeFloat (balance, 'over'); + account['used'] = this.safeString (balance, 'lock'); + account['total'] = this.safeString (balance, 'num'); + account['free'] = this.safeString (balance, 'over'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTicker (ticker, market = undefined) { @@ -35742,8 +35621,8 @@ module.exports = class bitz extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'now'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'now'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -35754,22 +35633,22 @@ module.exports = class bitz extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': undefined, 'open': open, 'close': last, 'last': last, 'previousClose': undefined, 'change': change, - 'percentage': this.safeFloat (ticker, 'priceChange24h'), + 'percentage': this.safeNumber (ticker, 'priceChange24h'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -35959,8 +35838,8 @@ module.exports = class bitz extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'p'); - const amount = this.safeFloat (trade, 'n'); + const price = this.safeNumber (trade, 'p'); + const amount = this.safeNumber (trade, 'n'); let cost = undefined; if (price !== undefined) { if (amount !== undefined) { @@ -36028,11 +35907,11 @@ module.exports = class bitz extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -36130,22 +36009,17 @@ module.exports = class bitz extends Exchange { if (side !== undefined) { side = (side === 'sale') ? 'sell' : 'buy'; } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'number'); - const remaining = this.safeFloat (order, 'numberOver'); - const filled = this.safeFloat (order, 'numberDeal'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'number'); + const remaining = this.safeNumber (order, 'numberOver'); + const filled = this.safeNumber (order, 'numberDeal'); let timestamp = this.safeInteger (order, 'timestamp'); if (timestamp === undefined) { timestamp = this.safeTimestamp (order, 'created'); } - let cost = this.safeFloat (order, 'orderTotalPrice'); - if (price !== undefined) { - if (filled !== undefined) { - cost = filled * price; - } - } + const cost = this.safeNumber (order, 'orderTotalPrice'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -36167,7 +36041,7 @@ module.exports = class bitz extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -36494,7 +36368,7 @@ module.exports = class bitz extends Exchange { const type = this.safeStringLower (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'network_fee'); + const feeCost = this.safeNumber (transaction, 'network_fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -36509,7 +36383,7 @@ module.exports = class bitz extends Exchange { 'address': this.safeString (transaction, 'wallet'), 'tag': this.safeString (transaction, 'memo'), 'type': type, - 'amount': this.safeFloat (transaction, 'number'), + 'amount': this.safeNumber (transaction, 'number'), 'currency': code, 'status': status, 'updated': timestamp, @@ -36661,12 +36535,13 @@ module.exports = class bitz extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],46:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],46:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -36745,17 +36620,19 @@ module.exports = class bl3p extends Exchange { const available = this.safeValue (wallet, 'available', {}); const balance = this.safeValue (wallet, 'balance', {}); const account = this.account (); - account['free'] = this.safeFloat (available, 'value'); - account['total'] = this.safeFloat (balance, 'value'); + account['free'] = this.safeString (available, 'value'); + account['total'] = this.safeString (balance, 'value'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { + const price = this.safeNumber (bidask, priceKey); + const size = this.safeNumber (bidask, amountKey); return [ - bidask[priceKey] / 100000.0, - bidask[amountKey] / 100000000.0, + price / 100000.0, + size / 100000000.0, ]; } @@ -36775,16 +36652,16 @@ module.exports = class bl3p extends Exchange { }; const ticker = await this.publicGetMarketTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -36794,7 +36671,7 @@ module.exports = class bl3p extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker['volume'], '24h'), + 'baseVolume': this.safeNumber (ticker['volume'], '24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -36803,20 +36680,13 @@ module.exports = class bl3p extends Exchange { parseTrade (trade, market = undefined) { const id = this.safeString (trade, 'trade_id'); const timestamp = this.safeInteger (trade, 'date'); - let price = this.safeFloat (trade, 'price_int'); - if (price !== undefined) { - price /= 100000.0; - } - let amount = this.safeFloat (trade, 'amount_int'); - if (amount !== undefined) { - amount /= 100000000.0; - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + let priceString = this.safeString (trade, 'price_int'); + priceString = Precise.stringDiv (priceString, '100000'); + let amountString = this.safeString (trade, 'amount_int'); + amountString = Precise.stringDiv (amountString, '100000000'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -36899,7 +36769,7 @@ module.exports = class bl3p extends Exchange { } }; -},{"./base/Exchange":6}],47:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],47:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -37065,8 +36935,8 @@ module.exports = class bleutrade extends Exchange { 'code': code, 'name': this.safeString (item, 'AssetLong'), 'active': this.safeValue (item, 'IsActive') && !this.safeValue (item, 'MaintenanceMode'), - 'fee': this.safeFloat (item, 'WithdrawTxFee'), - 'precision': this.safeFloat (item, 'DecimalPlaces'), + 'fee': this.safeNumber (item, 'WithdrawTxFee'), + 'precision': this.safeNumber (item, 'DecimalPlaces'), 'info': item, 'limits': this.limits, }; @@ -37118,7 +36988,7 @@ module.exports = class bleutrade extends Exchange { 'taker': this.fees['trading']['taker'], 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinTradeSize'), + 'min': this.safeNumber (market, 'MinTradeSize'), 'max': undefined, }, 'price': { @@ -37194,8 +37064,8 @@ module.exports = class bleutrade extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'TimeStamp')); const marketId = this.safeString (ticker, 'MarketName'); const symbol = this.safeSymbol (marketId, market, '_'); - const previous = this.safeFloat (ticker, 'PrevDay'); - const last = this.safeFloat (ticker, 'Last'); + const previous = this.safeNumber (ticker, 'PrevDay'); + const last = this.safeNumber (ticker, 'Last'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -37210,11 +37080,11 @@ module.exports = class bleutrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'High'), - 'low': this.safeFloat (ticker, 'Low'), - 'bid': this.safeFloat (ticker, 'Bid'), + 'high': this.safeNumber (ticker, 'High'), + 'low': this.safeNumber (ticker, 'Low'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': previous, @@ -37224,8 +37094,8 @@ module.exports = class bleutrade extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume'), - 'quoteVolume': this.safeFloat (ticker, 'BaseVolume'), + 'baseVolume': this.safeNumber (ticker, 'Volume'), + 'quoteVolume': this.safeNumber (ticker, 'BaseVolume'), 'info': ticker, }; } @@ -37233,11 +37103,11 @@ module.exports = class bleutrade extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (ohlcv['TimeStamp'] + '+00:00'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -37313,11 +37183,11 @@ module.exports = class bleutrade extends Exchange { const currencyId = this.safeString (item, 'Asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (item, 'Available'); - account['total'] = this.safeFloat (item, 'Balance'); + account['free'] = this.safeString (item, 'Available'); + account['total'] = this.safeString (item, 'Balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -37460,7 +37330,7 @@ module.exports = class bleutrade extends Exchange { // } const timestamp = this.parse8601 (this.safeString (item, 'TimeStamp')); - let amount = this.safeFloat (item, 'Amount'); + let amount = this.safeNumber (item, 'Amount'); let direction = undefined; if (amount !== undefined) { direction = 'in'; @@ -37534,27 +37404,12 @@ module.exports = class bleutrade extends Exchange { if ('Created' in order) { timestamp = this.parse8601 (order['Created'] + '+00:00'); } - let price = this.safeFloat (order, 'Price'); - let cost = undefined; - const amount = this.safeFloat (order, 'Quantity'); - const remaining = this.safeFloat (order, 'QuantityRemaining'); - let filled = undefined; - if (amount !== undefined && remaining !== undefined) { - filled = amount - remaining; - } - if (!cost) { - if (price && filled) { - cost = price * filled; - } - } - if (!price) { - if (cost && filled) { - price = cost / filled; - } - } - const average = this.safeFloat (order, 'PricePerUnit'); + const price = this.safeNumber (order, 'Price'); + const amount = this.safeNumber (order, 'Quantity'); + const remaining = this.safeNumber (order, 'QuantityRemaining'); + const average = this.safeNumber (order, 'PricePerUnit'); const id = this.safeString (order, 'OrderID'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -37568,15 +37423,15 @@ module.exports = class bleutrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -37613,7 +37468,7 @@ module.exports = class bleutrade extends Exchange { // Symbol: 'BTC' } // const id = this.safeString (transaction, 'ID'); - let amount = this.safeFloat (transaction, 'Amount'); + let amount = this.safeNumber (transaction, 'Amount'); let type = 'deposit'; if (amount < 0) { amount = Math.abs (amount); @@ -37715,13 +37570,14 @@ module.exports = class bleutrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],48:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],48:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -37902,11 +37758,11 @@ module.exports = class braziliex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': this.safeFloat (currency, 'txWithdrawalFee'), + 'fee': this.safeNumber (currency, 'txWithdrawalFee'), }, 'deposit': { 'active': canDeposit, - 'fee': this.safeFloat (currency, 'txDepositFee'), + 'fee': this.safeNumber (currency, 'txDepositFee'), }, }, 'limits': { @@ -37923,11 +37779,11 @@ module.exports = class braziliex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'MinWithdrawal'), + 'min': this.safeNumber (currency, 'MinWithdrawal'), 'max': Math.pow (10, precision), }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, }, @@ -37975,9 +37831,9 @@ module.exports = class braziliex extends Exchange { const quoteIsFiat = this.safeInteger (quoteCurrency, 'is_fiat', 0); let minCost = undefined; if (quoteIsFiat) { - minCost = this.safeFloat (baseCurrency, 'minAmountTradeFIAT'); + minCost = this.safeNumber (baseCurrency, 'minAmountTradeFIAT'); } else { - minCost = this.safeFloat (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); + minCost = this.safeNumber (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); } const isActive = this.safeInteger (market, 'active'); const active = (isActive === 1); @@ -38020,27 +37876,27 @@ module.exports = class braziliex extends Exchange { symbol = market['symbol']; } const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highestBid24'), - 'low': this.safeFloat (ticker, 'lowestAsk24'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'highestBid24'), + 'low': this.safeNumber (ticker, 'lowestAsk24'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'percentChange'), + 'change': this.safeNumber (ticker, 'percentChange'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume24'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume24'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24'), 'info': ticker, }; } @@ -38080,13 +37936,18 @@ module.exports = class braziliex extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString2 (trade, 'date_exec', 'date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } - const cost = this.safeFloat (trade, 'total'); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_number'); const type = 'limit'; const side = this.safeString (trade, 'type'); @@ -38128,11 +37989,11 @@ module.exports = class braziliex extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -38154,21 +38015,16 @@ module.exports = class braziliex extends Exchange { if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'date')); } - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'total', 0.0); - const amount = this.safeFloat (order, 'amount'); - const filledPercentage = this.safeFloat (order, 'progress'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'total'); + const amount = this.safeNumber (order, 'amount'); + const filledPercentage = this.safeNumber (order, 'progress'); const filled = amount * filledPercentage; - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); - let info = order; - if ('info' in info) { - info = order['info']; - } const id = this.safeString (order, 'order_number'); const fee = this.safeValue (order, 'fee'); // propagated from createOrder const status = (filledPercentage === 1.0) ? 'closed' : 'open'; const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -38185,12 +38041,12 @@ module.exports = class braziliex extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, - 'info': info, + 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -38242,7 +38098,7 @@ module.exports = class braziliex extends Exchange { 'price': this.safeString (priceParts, 1), 'total': this.safeString (totalParts, 1), 'fee': { - 'cost': this.safeFloat (feeParts, 1), + 'cost': this.safeNumber (feeParts, 1), 'currency': this.safeString (feeParts, 2), }, 'progress': '0.0', @@ -38359,13 +38215,14 @@ module.exports = class braziliex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],49:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],49:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, DDoSProtection, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -38507,8 +38364,8 @@ module.exports = class btcalpha extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -38560,14 +38417,11 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'id', 'tid'); const side = this.safeString2 (trade, 'my_side', 'side'); const orderId = this.safeString (trade, 'o_id'); @@ -38616,11 +38470,11 @@ module.exports = class btcalpha extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -38657,11 +38511,11 @@ module.exports = class btcalpha extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'reserve'); - account['total'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserve'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -38682,8 +38536,8 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (order, 'date'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString2 (order, 'oid', 'id'); let trades = this.safeValue (order, 'trades', []); @@ -38864,13 +38718,14 @@ module.exports = class btcalpha extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],50:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],50:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, InvalidOrder, AuthenticationError, PermissionDenied, InvalidNonce, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -38955,12 +38810,12 @@ module.exports = class btcbox extends Exchange { if (free in response) { const account = this.account (); const used = currencyId + '_lock'; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -38981,16 +38836,16 @@ module.exports = class btcbox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -39000,8 +38855,8 @@ module.exports = class btcbox extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -39025,14 +38880,11 @@ module.exports = class btcbox extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeString (trade, 'type'); return { @@ -39132,15 +38984,15 @@ module.exports = class btcbox extends Exchange { if (datetimeString !== undefined) { timestamp = this.parse8601 (order['datetime'] + '+09:00'); // Tokyo time } - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let cost = undefined; if (price !== undefined) { if (filled !== undefined) { @@ -39292,7 +39144,7 @@ module.exports = class btcbox extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],51:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],51:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -39541,11 +39393,11 @@ module.exports = class btcmarkets extends Exchange { const tagTo = tag; const addressFrom = undefined; const tagFrom = undefined; - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const currencyId = this.safeString (transaction, 'assetName'); const code = this.safeCurrencyCode (currencyId); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (fee) { amount -= fee; } @@ -39598,10 +39450,10 @@ module.exports = class btcmarkets extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const fees = this.safeValue (this.safeValue (this.options, 'fees', {}), quote, this.fees); - const pricePrecision = this.safeFloat (market, 'priceDecimals'); - const amountPrecision = this.safeFloat (market, 'amountDecimals'); - const minAmount = this.safeFloat (market, 'minOrderAmount'); - const maxAmount = this.safeFloat (market, 'maxOrderAmount'); + const pricePrecision = this.safeNumber (market, 'priceDecimals'); + const amountPrecision = this.safeNumber (market, 'amountDecimals'); + const minAmount = this.safeNumber (market, 'minOrderAmount'); + const maxAmount = this.safeNumber (market, 'maxOrderAmount'); let minPrice = undefined; if (quote === 'AUD') { minPrice = Math.pow (10, -pricePrecision); @@ -39660,14 +39512,12 @@ module.exports = class btcmarkets extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetName'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance, 'balance'); - const used = this.safeFloat (balance, 'locked'); const account = this.account (); - account['used'] = used; - account['total'] = total; + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -39683,11 +39533,11 @@ module.exports = class btcmarkets extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 0)), - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 2), // high - this.safeFloat (ohlcv, 3), // low - this.safeFloat (ohlcv, 4), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 2), // high + this.safeNumber (ohlcv, 3), // low + this.safeNumber (ohlcv, 4), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -39783,21 +39633,21 @@ module.exports = class btcmarkets extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'lastPrice'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); - const quoteVolume = this.safeFloat (ticker, 'volumeQte24h'); + const last = this.safeNumber (ticker, 'lastPrice'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); + const quoteVolume = this.safeNumber (ticker, 'volumeQte24h'); const vwap = this.vwap (baseVolume, quoteVolume); - const change = this.safeFloat (ticker, 'price24h'); - const percentage = this.safeFloat (ticker, 'pricePct24h'); + const change = this.safeNumber (ticker, 'price24h'); + const percentage = this.safeNumber (ticker, 'pricePct24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bestBid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'bestAsk'), + 'ask': this.safeNumber (ticker, 'bestAsk'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -39908,8 +39758,8 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -39918,7 +39768,7 @@ module.exports = class btcmarkets extends Exchange { } const orderId = this.safeString (trade, 'orderId'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -40009,7 +39859,7 @@ module.exports = class btcmarkets extends Exchange { } } if (triggerPriceIsRequired) { - const triggerPrice = this.safeFloat (params, 'triggerPrice'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); params = this.omit (params, 'triggerPrice'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a triggerPrice parameter for a ' + type + 'order'); @@ -40142,9 +39992,9 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const type = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'openAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'openAmount'); let filled = undefined; if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); @@ -40159,7 +40009,7 @@ module.exports = class btcmarkets extends Exchange { const id = this.safeString (order, 'orderId'); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -40351,13 +40201,14 @@ module.exports = class btcmarkets extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],52:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],52:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -40460,10 +40311,10 @@ module.exports = class btctradeua extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -40603,14 +40454,11 @@ module.exports = class btctradeua extends Exchange { const id = this.safeString (trade, 'id'); const type = 'limit'; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amnt_trade'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amnt_trade'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -40691,11 +40539,11 @@ module.exports = class btctradeua extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'amnt_trade'), + 'amount': this.safeNumber (order, 'amnt_trade'), 'filled': 0, - 'remaining': this.safeFloat (order, 'amnt_trade'), + 'remaining': this.safeNumber (order, 'amnt_trade'), 'trades': undefined, 'info': order, 'cost': undefined, @@ -40747,7 +40595,7 @@ module.exports = class btctradeua extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],53:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],53:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -40875,13 +40723,13 @@ module.exports = class btcturk extends Exchange { const used = currency['id'] + '_reserved'; if (free in response) { const account = this.account (); - account['free'] = this.safeFloat (response, free); - account['total'] = this.safeFloat (response, total); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['total'] = this.safeString (response, total); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -40901,26 +40749,26 @@ module.exports = class btcturk extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'average'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -40954,8 +40802,8 @@ module.exports = class btcturk extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -40997,11 +40845,11 @@ module.exports = class btcturk extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (this.safeString (ohlcv, 'Time')), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -41076,13 +40924,14 @@ module.exports = class btcturk extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],54:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],54:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { AddressPending, AuthenticationError, ExchangeError, NotSupported, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -41299,7 +41148,7 @@ module.exports = class buda extends Exchange { } const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); - const precision = this.safeFloat (currency, 'input_decimals'); + const precision = this.safeNumber (currency, 'input_decimals'); const minimum = Math.pow (10, -precision); result[code] = { 'id': id, @@ -41460,24 +41309,25 @@ module.exports = class buda extends Exchange { let timestamp = undefined; let side = undefined; const type = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; const order = undefined; const fee = undefined; let symbol = undefined; - let cost = undefined; if (market) { symbol = market['symbol']; } if (Array.isArray (trade)) { - timestamp = parseInt (trade[0]); - price = parseFloat (trade[1]); - amount = parseFloat (trade[2]); - cost = price * amount; - side = trade[3]; - id = trade[4].toString (); + timestamp = this.safeInteger (trade, 0); + priceString = this.safeString (trade, 1); + amountString = this.safeString (trade, 2); + side = this.safeString (trade, 3); + id = this.safeString (trade, 4); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': order, @@ -41532,11 +41382,11 @@ module.exports = class buda extends Exchange { const currencyId = this.safeString (balance, 'id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = parseFloat (balance['available_amount'][0]); - account['total'] = parseFloat (balance['amount'][0]); + account['free'] = this.safeString (balance['available_amount'], 0); + account['total'] = this.safeString (balance['amount'], 0); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -41644,15 +41494,15 @@ module.exports = class buda extends Exchange { const side = this.safeStringLower (order, 'type'); const status = this.parseOrderStatus (this.safeString (order, 'state')); const originalAmount = this.safeValue (order, 'original_amount', []); - const amount = this.safeFloat (originalAmount, 0); + const amount = this.safeNumber (originalAmount, 0); const remainingAmount = this.safeValue (order, 'amount', []); - const remaining = this.safeFloat (remainingAmount, 0); + const remaining = this.safeNumber (remainingAmount, 0); const tradedAmount = this.safeValue (order, 'traded_amount', []); - const filled = this.safeFloat (tradedAmount, 0); + const filled = this.safeNumber (tradedAmount, 0); const totalExchanged = this.safeValue (order, 'totalExchanged', []); - const cost = this.safeFloat (totalExchanged, 0); + const cost = this.safeNumber (totalExchanged, 0); const limitPrice = this.safeValue (order, 'limit', []); - let price = this.safeFloat (limitPrice, 0); + let price = this.safeNumber (limitPrice, 0); if (price === undefined) { if (limitPrice !== undefined) { price = limitPrice; @@ -41663,7 +41513,7 @@ module.exports = class buda extends Exchange { average = this.priceToPrecision (symbol, cost / filled); } const paidFee = this.safeValue (order, 'paid_fee', []); - const feeCost = this.safeFloat (paidFee, 0); + const feeCost = this.safeNumber (paidFee, 0); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (paidFee, 1); @@ -41902,13 +41752,14 @@ module.exports = class buda extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],55:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],55:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { RateLimitExceeded, BadSymbol, OrderNotFound, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -42090,7 +41941,7 @@ module.exports = class bw extends Exchange { const symbol = base + '/' + quote; const state = this.safeInteger (market, 'state'); const active = (state === 1); - const fee = this.safeFloat (market, 'defaultFee'); + const fee = this.safeNumber (market, 'defaultFee'); result.push ({ 'id': id, 'active': active, @@ -42111,7 +41962,7 @@ module.exports = class bw extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -42197,11 +42048,11 @@ module.exports = class bw extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'drawFee'), + 'fee': this.safeNumber (currency, 'drawFee'), 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'limitAmount', 0), + 'min': this.safeNumber (currency, 'limitAmount', 0), 'max': undefined, }, 'price': { @@ -42214,7 +42065,7 @@ module.exports = class bw extends Exchange { }, 'withdraw': { 'min': undefined, - 'max': this.safeFloat (currency, 'onceDrawLimit'), + 'max': this.safeNumber (currency, 'onceDrawLimit'), }, }, }; @@ -42251,9 +42102,9 @@ module.exports = class bw extends Exchange { 'high': parseFloat (this.safeValue (ticker, 2)), 'low': parseFloat (this.safeValue (ticker, 3)), 'bid': parseFloat (this.safeValue (ticker, 7)), - 'bidVolume': this.safeFloat (bid, 'quantity'), + 'bidVolume': this.safeNumber (bid, 'quantity'), 'ask': parseFloat (this.safeValue (ticker, 8)), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, 'open': undefined, 'close': close, @@ -42382,8 +42233,11 @@ module.exports = class bw extends Exchange { // ... // const timestamp = this.safeTimestamp (trade, 2); - const price = this.safeFloat (trade, 5); - const amount = this.safeFloat (trade, 6); + const priceString = this.safeString (trade, 5); + const amountString = this.safeString (trade, 6); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 1); let symbol = undefined; if (marketId !== undefined) { @@ -42400,12 +42254,6 @@ module.exports = class bw extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const sideString = this.safeString (trade, 4); const side = (sideString === 'ask') ? 'sell' : 'buy'; return { @@ -42419,7 +42267,7 @@ module.exports = class bw extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': parseFloat (cost), + 'cost': cost, 'fee': undefined, 'info': trade, }; @@ -42476,11 +42324,11 @@ module.exports = class bw extends Exchange { // return [ this.safeTimestamp (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - this.safeFloat (ohlcv, 6), - this.safeFloat (ohlcv, 7), - this.safeFloat (ohlcv, 8), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + this.safeNumber (ohlcv, 6), + this.safeNumber (ohlcv, 7), + this.safeNumber (ohlcv, 8), ]; } @@ -42538,11 +42386,11 @@ module.exports = class bw extends Exchange { const currencyId = this.safeString (balance, 'currencyTypeId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'amount'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'amount'); + account['used'] = this.safeString (balance, 'freeze'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -42638,25 +42486,13 @@ module.exports = class bw extends Exchange { } else if (side === '1') { side = 'buy'; } - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'completeAmount'); - let remaining = this.safeFloat2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available - let cost = this.safeFloat (order, 'totalMoney'); - if (filled !== undefined) { - if (amount !== undefined) { - if (remaining === undefined) { - remaining = amount - filled; - } - } - if (cost === undefined) { - if (price !== undefined) { - cost = filled * cost; - } - } - } + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'completeAmount'); + const remaining = this.safeNumber2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available + const cost = this.safeNumber (order, 'totalMoney'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'entrustId'), 'clientOrderId': undefined, @@ -42678,7 +42514,7 @@ module.exports = class bw extends Exchange { 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -42974,12 +42810,12 @@ module.exports = class bw extends Exchange { code = currency['code']; } const type = ('depositId' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat2 (transaction, 'actuallyAmount', 'amount'); + const amount = this.safeNumber2 (transaction, 'actuallyAmount', 'amount'); const status = this.parseTransactionStatus (this.safeString2 (transaction, 'verifyStatus', 'state')); const timestamp = this.safeInteger (transaction, 'createTime'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -43110,7 +42946,7 @@ module.exports = class bw extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],56:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],56:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -43155,6 +42991,7 @@ module.exports = class bybit extends Exchange { 'fetchTrades': true, 'fetchTransactions': false, 'fetchWithdrawals': true, + 'fetchPositions': true, }, 'timeframes': { '1m': '1', @@ -43186,6 +43023,34 @@ module.exports = class bybit extends Exchange { 'referral': 'https://www.bybit.com/app/register?ref=X7Prm', }, 'api': { + 'futures': { + 'private': { + 'get': [ + 'position/list', + 'order/list', + 'order', + 'stop-order/list', + 'stop-order', + 'execution/list', + 'trade/closed-pnl/list', + ], + 'post': [ + 'order/create', + 'order/cancel', + 'order/cancelAll', + 'order/replace', + 'stop-order/create', + 'stop-order/cancel', + 'stop-order/cancelAll', + 'stop-order/replace', + 'position/change-position-margin', + 'position/trading-stop', + 'position/leverage/save', + 'position/switch-mode', + 'position/switch-isolated', + ], + }, + }, 'v2': { 'public': { 'get': [ @@ -43399,7 +43264,11 @@ module.exports = class bybit extends Exchange { 'LTC/USDT': 'linear', 'XTZ/USDT': 'linear', 'LINK/USDT': 'linear', + 'ADA/USDT': 'linear', + 'DOT/USDT': 'linear', + 'UNI/USDT': 'linear', }, + 'defaultType': 'linear', // may also be inverse or inverseFuture 'code': 'BTC', 'cancelAllOrders': { // 'method': 'v2PrivatePostOrderCancelAll', // v2PrivatePostStopOrderCancelAll @@ -43514,8 +43383,8 @@ module.exports = class bybit extends Exchange { const lotSizeFilter = this.safeValue (market, 'lot_size_filter', {}); const priceFilter = this.safeValue (market, 'price_filter', {}); const precision = { - 'amount': this.safeFloat (lotSizeFilter, 'qty_step'), - 'price': this.safeFloat (priceFilter, 'tick_size'), + 'amount': this.safeNumber (lotSizeFilter, 'qty_step'), + 'price': this.safeNumber (priceFilter, 'tick_size'), }; const status = this.safeString (market, 'status'); let active = undefined; @@ -43529,8 +43398,8 @@ module.exports = class bybit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'type': 'future', 'spot': false, 'future': true, @@ -43539,12 +43408,12 @@ module.exports = class bybit extends Exchange { 'inverse': inverse, 'limits': { 'amount': { - 'min': this.safeFloat (lotSizeFilter, 'min_trading_qty'), - 'max': this.safeFloat (lotSizeFilter, 'max_trading_qty'), + 'min': this.safeNumber (lotSizeFilter, 'min_trading_qty'), + 'max': this.safeNumber (lotSizeFilter, 'max_trading_qty'), }, 'price': { - 'min': this.safeFloat (priceFilter, 'min_price'), - 'max': this.safeFloat (priceFilter, 'max_price'), + 'min': this.safeNumber (priceFilter, 'min_price'), + 'max': this.safeNumber (priceFilter, 'max_price'), }, 'cost': { 'min': undefined, @@ -43590,9 +43459,9 @@ module.exports = class bybit extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const open = this.safeFloat (ticker, 'prev_price_24h'); - let percentage = this.safeFloat (ticker, 'price_24h_pcnt'); + const last = this.safeNumber (ticker, 'last_price'); + const open = this.safeNumber (ticker, 'prev_price_24h'); + let percentage = this.safeNumber (ticker, 'price_24h_pcnt'); if (percentage !== undefined) { percentage *= 100; } @@ -43602,18 +43471,18 @@ module.exports = class bybit extends Exchange { change = last - open; average = this.sum (open, last) / 2; } - const baseVolume = this.safeFloat (ticker, 'turnover_24h'); - const quoteVolume = this.safeFloat (ticker, 'volume_24h'); + const baseVolume = this.safeNumber (ticker, 'turnover_24h'); + const quoteVolume = this.safeNumber (ticker, 'volume_24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price_24h'), - 'low': this.safeFloat (ticker, 'low_price_24h'), - 'bid': this.safeFloat (ticker, 'bid_price'), + 'high': this.safeNumber (ticker, 'high_price_24h'), + 'low': this.safeNumber (ticker, 'low_price_24h'), + 'bid': this.safeNumber (ticker, 'bid_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask_price'), + 'ask': this.safeNumber (ticker, 'ask_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -43762,11 +43631,11 @@ module.exports = class bybit extends Exchange { // return [ this.safeTimestamp2 (ohlcv, 'open_time', 'start_at'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat2 (ohlcv, 'turnover', 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber2 (ohlcv, 'turnover', 'volume'), ]; } @@ -43892,9 +43761,9 @@ module.exports = class bybit extends Exchange { const marketId = this.safeString (trade, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat2 (trade, 'qty', 'exec_qty'); - let cost = this.safeFloat (trade, 'exec_value'); - const price = this.safeFloat2 (trade, 'exec_price', 'price'); + const amount = this.safeNumber2 (trade, 'qty', 'exec_qty'); + let cost = this.safeNumber (trade, 'exec_value'); + const price = this.safeNumber2 (trade, 'exec_price', 'price'); if (cost === undefined) { if (amount !== undefined) { if (price !== undefined) { @@ -43909,14 +43778,14 @@ module.exports = class bybit extends Exchange { const side = this.safeStringLower (trade, 'side'); const lastLiquidityInd = this.safeString (trade, 'last_liquidity_ind'); const takerOrMaker = (lastLiquidityInd === 'AddedLiquidity') ? 'maker' : 'taker'; - const feeCost = this.safeFloat (trade, 'exec_fee'); + const feeCost = this.safeNumber (trade, 'exec_fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyCode = market['inverse'] ? market['base'] : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'fee_rate'), + 'rate': this.safeNumber (trade, 'fee_rate'), }; } return { @@ -44076,12 +43945,12 @@ module.exports = class bybit extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['used'] = this.safeFloat (balance, 'used_margin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'used_margin'); + account['total'] = this.safeString (balance, 'equity'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -44208,56 +44077,42 @@ module.exports = class bybit extends Exchange { // const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); - let symbol = undefined; - let base = undefined; + const symbol = market['symbol']; + let feeCurrency = undefined; const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const id = this.safeString2 (order, 'order_id', 'stop_order_id'); const type = this.safeStringLower (order, 'order_type'); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - let average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'qty'); - let cost = this.safeFloat (order, 'cum_exec_value'); - let filled = this.safeFloat (order, 'cum_exec_qty'); - let remaining = this.safeFloat (order, 'leaves_qty'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'qty'); + const cost = this.safeNumber (order, 'cum_exec_value'); + const filled = this.safeNumber (order, 'cum_exec_qty'); + const remaining = this.safeNumber (order, 'leaves_qty'); + const marketTypes = this.safeValue (this.options, 'marketTypes', {}); + const marketType = this.safeString (marketTypes, symbol); if (market !== undefined) { - symbol = market['symbol']; - base = market['base']; + if (marketType === 'linear') { + feeCurrency = market['quote']; + } else { + feeCurrency = market['base']; + } } let lastTradeTimestamp = this.safeTimestamp (order, 'last_exec_time'); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = amount - remaining; - } - if (filled !== undefined) { - if ((remaining === undefined) && (amount !== undefined)) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if ((type === 'market') && (cost !== undefined) && (cost > 0)) { - price = undefined; - if (average === undefined) { - average = filled / cost; - } - } - } const status = this.parseOrderStatus (this.safeString2 (order, 'order_status', 'stop_order_status')); const side = this.safeStringLower (order, 'side'); - let feeCost = this.safeFloat (order, 'cum_exec_fee'); + let feeCost = this.safeNumber (order, 'cum_exec_fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); fee = { 'cost': feeCost, - 'currency': base, + 'currency': feeCurrency, }; } let clientOrderId = this.safeString (order, 'order_link_id'); @@ -44265,9 +44120,9 @@ module.exports = class bybit extends Exchange { clientOrderId = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'stop_px'); + const stopPrice = this.safeNumber (order, 'stop_px'); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -44289,7 +44144,7 @@ module.exports = class bybit extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -45140,7 +44995,8 @@ module.exports = class bybit extends Exchange { const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); + const type = this.safeStringLower (transaction, 'type'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -45160,8 +45016,8 @@ module.exports = class bybit extends Exchange { 'tag': undefined, 'tagTo': undefined, 'tagFrom': undefined, - 'type': 'withdrawal', - 'amount': this.safeFloat (transaction, 'amount'), + 'type': type, + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -45244,8 +45100,8 @@ module.exports = class bybit extends Exchange { // const currencyId = this.safeString (item, 'coin'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'wallet_balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'wallet_balance'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -45311,7 +45167,8 @@ module.exports = class bybit extends Exchange { 'recv_window': this.options['recvWindow'], 'timestamp': timestamp, }); - const auth = this.rawencode (this.keysort (query)); + const sortedQuery = this.keysort (query); + const auth = this.rawencode (sortedQuery); const signature = this.hmac (this.encode (auth), this.encode (this.secret)); if (method === 'POST') { body = this.json (this.extend (query, { @@ -45321,7 +45178,7 @@ module.exports = class bybit extends Exchange { 'Content-Type': 'application/json', }; } else { - request += '?' + auth + '&sign=' + signature; + request += '?' + this.urlencode (sortedQuery) + '&sign=' + signature; } } url += request; @@ -45344,17 +45201,48 @@ module.exports = class bybit extends Exchange { // time_now: '1583934106.590436' // } // - const errorCode = this.safeValue (response, 'ret_code'); - if (errorCode !== 0) { + const errorCode = this.safeString (response, 'ret_code'); + if (errorCode !== '0') { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, feedback); this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback); throw new ExchangeError (feedback); // unknown message } } + + async fetchPositions (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (Array.isArray (symbols)) { + const length = symbols.length; + if (length !== 1) { + throw new ArgumentsRequired (this.id + ' fetchPositions takes exactly one symbol'); + } + request['symbol'] = this.marketId (symbols[0]); + } + const defaultType = this.safeString (this.options, 'defaultType', 'linear'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + let response = undefined; + if (type === 'linear') { + response = await this.privateLinearGetPositionList (this.extend (request, params)); + } else if (type === 'inverse') { + response = await this.v2PrivateGetPositionList (this.extend (request, params)); + } else if (type === 'inverseFuture') { + response = await this.futuresPrivateGetPositionList (this.extend (request, params)); + } + // { + // ret_code: 0, + // ret_msg: 'OK', + // ext_code: '', + // ext_info: '', + // result: [] or {} depending on the request + // } + return this.safeValue (response, 'result'); + } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],57:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],57:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -45543,12 +45431,12 @@ module.exports = class bytetrade extends Exchange { const limits = this.safeValue (currency, 'limits'); const deposit = this.safeValue (limits, 'deposit'); const amountPrecision = this.safeInteger (currency, 'basePrecision'); - let maxDeposit = this.safeFloat (deposit, 'max'); + let maxDeposit = this.safeNumber (deposit, 'max'); if (maxDeposit === -1.0) { maxDeposit = undefined; } const withdraw = this.safeValue (limits, 'withdraw'); - let maxWithdraw = this.safeFloat (withdraw, 'max'); + let maxWithdraw = this.safeNumber (withdraw, 'max'); if (maxWithdraw === -1.0) { maxWithdraw = undefined; } @@ -45564,11 +45452,11 @@ module.exports = class bytetrade extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (deposit, 'min'), + 'min': this.safeNumber (deposit, 'min'), 'max': maxDeposit, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'min'), + 'min': this.safeNumber (withdraw, 'min'), 'max': maxWithdraw, }, }, @@ -45622,12 +45510,12 @@ module.exports = class bytetrade extends Exchange { 'normalSymbol': normalSymbol, 'limits': { 'amount': { - 'min': this.safeFloat (amount, 'min'), - 'max': this.safeFloat (amount, 'max'), + 'min': this.safeNumber (amount, 'min'), + 'max': this.safeNumber (amount, 'max'), }, 'price': { - 'min': this.safeFloat (price, 'min'), - 'max': this.safeFloat (price, 'max'), + 'min': this.safeNumber (price, 'min'), + 'max': this.safeNumber (price, 'max'), }, 'cost': { 'min': undefined, @@ -45655,11 +45543,11 @@ module.exports = class bytetrade extends Exchange { const currencyId = this.safeString (balance, 'code'); const code = this.safeCurrencyCode (currencyId, undefined); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'used'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'used'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -45720,22 +45608,22 @@ module.exports = class bytetrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'open'), - 'close': this.safeFloat (ticker, 'close'), - 'last': this.safeFloat (ticker, 'last'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'open'), + 'close': this.safeNumber (ticker, 'close'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, // previous day close - 'change': this.safeFloat (ticker, 'change'), - 'percentage': this.safeFloat (ticker, 'percentage'), + 'change': this.safeNumber (ticker, 'change'), + 'percentage': this.safeNumber (ticker, 'percentage'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -45778,24 +45666,16 @@ module.exports = class bytetrade extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetDepth (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetDepth (params); + return this.parseTickers (response, symbols); } async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetTickers (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetTickers (params); + return this.parseTickers (response, symbols); } parseOHLCV (ohlcv, market = undefined) { @@ -45811,11 +45691,11 @@ module.exports = class bytetrade extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -45845,9 +45725,9 @@ module.exports = class bytetrade extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeInteger (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - const cost = this.safeFloat (trade, 'cost'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + const cost = this.safeNumber (trade, 'cost'); const id = this.safeString (trade, 'id'); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'takerOrMaker'); @@ -45917,12 +45797,12 @@ module.exports = class bytetrade extends Exchange { const timestamp = this.safeInteger (order, 'timestamp'); const datetime = this.safeString (order, 'datetime'); const lastTradeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled'); - const remaining = this.safeFloat (order, 'remaining'); - const cost = this.safeFloat (order, 'cost'); - const average = this.safeFloat (order, 'average'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled'); + const remaining = this.safeNumber (order, 'remaining'); + const cost = this.safeNumber (order, 'cost'); + const average = this.safeNumber (order, 'average'); const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); @@ -46315,7 +46195,7 @@ module.exports = class bytetrade extends Exchange { }; } - async transfer (code, amount, address, message = '', params = {}) { + async transfer (code, amount, fromAccount, toAccount, params = {}) { this.checkRequiredDependencies (); if (this.apiKey === undefined) { throw new ArgumentsRequired ('transfer() requires this.apiKey'); @@ -46333,6 +46213,7 @@ module.exports = class bytetrade extends Exchange { expirationDatetime = expirationDatetime.split ('.')[0]; const feeAmount = '300000000000000'; const defaultDappId = 'Sagittarius'; + const message = this.safeString (params, 'message', ''); const dappId = this.safeString (params, 'dappId', defaultDappId); const eightBytes = this.integerPow ('2', '64'); const byteStringArray = [ @@ -46346,8 +46227,8 @@ module.exports = class bytetrade extends Exchange { this.numberToLE (feeAmount, 8), // string for 32 bit php this.numberToLE (this.apiKey.length, 1), this.stringToBinary (this.encode (this.apiKey)), - this.numberToLE (address.length, 1), - this.stringToBinary (this.encode (address)), + this.numberToLE (toAccount.length, 1), + this.stringToBinary (this.encode (toAccount)), this.numberToLE (assetType, 4), this.numberToLE (this.integerDivide (amountChain, eightBytes), 8), this.numberToLE (this.integerModulo (amountChain, eightBytes), 8), @@ -46368,7 +46249,7 @@ module.exports = class bytetrade extends Exchange { const operation = { 'fee': '300000000000000', 'from': this.apiKey, - 'to': address, + 'to': toAccount, 'asset_type': parseInt (currency['id']), 'amount': amountChain.toString (), 'message': message, @@ -46522,9 +46403,9 @@ module.exports = class bytetrade extends Exchange { const datetime = this.safeString (transaction, 'datetime'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const feeInfo = this.safeValue (transaction, 'fee'); - const feeCost = this.safeFloat (feeInfo, 'cost'); + const feeCost = this.safeNumber (feeInfo, 'cost'); const feeCurrencyId = this.safeString (feeInfo, 'code'); const feeCode = this.safeCurrencyCode (feeCurrencyId, currency); const fee = { @@ -46787,7 +46668,7 @@ module.exports = class bytetrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],58:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],58:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -46822,7 +46703,7 @@ module.exports = class cdax extends huobipro { } }; -},{"./huobipro.js":96}],59:[function(require,module,exports){ +},{"./huobipro.js":94}],59:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -47081,7 +46962,7 @@ module.exports = class cex extends Exchange { 'fee': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimumCurrencyAmount'), + 'min': this.safeNumber (currency, 'minimumCurrencyAmount'), 'max': undefined, }, 'price': { @@ -47093,7 +46974,7 @@ module.exports = class cex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimalWithdrawalAmount'), + 'min': this.safeNumber (currency, 'minimalWithdrawalAmount'), 'max': undefined, }, }, @@ -47176,15 +47057,15 @@ module.exports = class cex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minLotSize'), - 'max': this.safeFloat (market, 'maxLotSize'), + 'min': this.safeNumber (market, 'minLotSize'), + 'max': this.safeNumber (market, 'maxLotSize'), }, 'price': { - 'min': this.safeFloat (market, 'minPrice'), - 'max': this.safeFloat (market, 'maxPrice'), + 'min': this.safeNumber (market, 'minPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { - 'min': this.safeFloat (market, 'minLotSizeS2'), + 'min': this.safeNumber (market, 'minLotSizeS2'), 'max': undefined, }, }, @@ -47205,13 +47086,13 @@ module.exports = class cex extends Exchange { const currencyId = currencyIds[i]; const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); + account['free'] = this.safeString (balance, 'available'); // https://github.com/ccxt/ccxt/issues/5484 - account['used'] = this.safeFloat (balance, 'orders', 0.0); + account['used'] = this.safeString (balance, 'orders', '0'); const code = this.safeCurrencyCode (currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -47240,11 +47121,11 @@ module.exports = class cex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -47286,12 +47167,12 @@ module.exports = class cex extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const volume = this.safeFloat (ticker, 'volume'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'last'); + const volume = this.safeNumber (ticker, 'volume'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'last'); let symbol = undefined; if (market) { symbol = market['symbol']; @@ -47353,8 +47234,8 @@ module.exports = class cex extends Exchange { const id = this.safeString (trade, 'tid'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -47426,8 +47307,8 @@ module.exports = class cex extends Exchange { // "complete": false // } // - const placedAmount = this.safeFloat (response, 'amount'); - const remaining = this.safeFloat (response, 'pending'); + const placedAmount = this.safeNumber (response, 'amount'); + const remaining = this.safeNumber (response, 'pending'); const timestamp = this.safeValue (response, 'time'); const complete = this.safeValue (response, 'complete'); const status = complete ? 'closed' : 'open'; @@ -47446,7 +47327,7 @@ module.exports = class cex extends Exchange { 'side': this.safeString (response, 'type'), 'symbol': symbol, 'status': status, - 'price': this.safeFloat (response, 'price'), + 'price': this.safeNumber (response, 'price'), 'amount': placedAmount, 'cost': undefined, 'average': undefined, @@ -47488,42 +47369,42 @@ module.exports = class cex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - let amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + let amount = this.safeNumber (order, 'amount'); // sell orders can have a negative amount // https://github.com/ccxt/ccxt/issues/5338 if (amount !== undefined) { amount = Math.abs (amount); } - const remaining = this.safeFloat2 (order, 'pending', 'remains'); + const remaining = this.safeNumber2 (order, 'pending', 'remains'); const filled = amount - remaining; let fee = undefined; let cost = undefined; if (market !== undefined) { symbol = market['symbol']; - const taCost = this.safeFloat (order, 'ta:' + market['quote']); - const ttaCost = this.safeFloat (order, 'tta:' + market['quote']); + const taCost = this.safeNumber (order, 'ta:' + market['quote']); + const ttaCost = this.safeNumber (order, 'tta:' + market['quote']); cost = this.sum (taCost, ttaCost); const baseFee = 'fa:' + market['base']; const baseTakerFee = 'tfa:' + market['base']; const quoteFee = 'fa:' + market['quote']; const quoteTakerFee = 'tfa:' + market['quote']; - let feeRate = this.safeFloat (order, 'tradingFeeMaker'); + let feeRate = this.safeNumber (order, 'tradingFeeMaker'); if (!feeRate) { - feeRate = this.safeFloat (order, 'tradingFeeTaker', feeRate); + feeRate = this.safeNumber (order, 'tradingFeeTaker', feeRate); } if (feeRate) { feeRate /= 100.0; // convert to mathematically-correct percentage coefficients: 1.0 = 100% } if ((baseFee in order) || (baseTakerFee in order)) { - const baseFeeCost = this.safeFloat2 (order, baseFee, baseTakerFee); + const baseFeeCost = this.safeNumber2 (order, baseFee, baseTakerFee); fee = { 'currency': market['base'], 'rate': feeRate, 'cost': baseFeeCost, }; } else if ((quoteFee in order) || (quoteTakerFee in order)) { - const quoteFeeCost = this.safeFloat2 (order, quoteFee, quoteTakerFee); + const quoteFeeCost = this.safeNumber2 (order, quoteFee, quoteTakerFee); fee = { 'currency': market['quote'], 'rate': feeRate, @@ -47563,7 +47444,7 @@ module.exports = class cex extends Exchange { // ds: 0 } continue; } - const tradePrice = this.safeFloat (item, 'price'); + const tradePrice = this.safeNumber (item, 'price'); if (tradePrice === undefined) { // this represents the order // { @@ -47667,8 +47548,8 @@ module.exports = class cex extends Exchange { // "fee_amount": "0.03" // } const tradeTimestamp = this.parse8601 (this.safeString (item, 'time')); - const tradeAmount = this.safeFloat (item, 'amount'); - const feeCost = this.safeFloat (item, 'fee_amount'); + const tradeAmount = this.safeNumber (item, 'amount'); + const feeCost = this.safeNumber (item, 'fee_amount'); let absTradeAmount = (tradeAmount < 0) ? -tradeAmount : tradeAmount; let tradeCost = undefined; if (tradeSide === 'sell') { @@ -48013,12 +47894,12 @@ module.exports = class cex extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const side = this.safeString (order, 'type'); - const baseAmount = this.safeFloat (order, 'a:' + baseId + ':cds'); - const quoteAmount = this.safeFloat (order, 'a:' + quoteId + ':cds'); - const fee = this.safeFloat (order, 'f:' + quoteId + ':cds'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const remaining = this.safeFloat (order, 'remains'); + const baseAmount = this.safeNumber (order, 'a:' + baseId + ':cds'); + const quoteAmount = this.safeNumber (order, 'a:' + quoteId + ':cds'); + const fee = this.safeNumber (order, 'f:' + quoteId + ':cds'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const remaining = this.safeNumber (order, 'remains'); const filled = amount - remaining; let orderAmount = undefined; let cost = undefined; @@ -48030,10 +47911,10 @@ module.exports = class cex extends Exchange { cost = quoteAmount; average = orderAmount / cost; } else { - const ta = this.safeFloat (order, 'ta:' + quoteId, 0); - const tta = this.safeFloat (order, 'tta:' + quoteId, 0); - const fa = this.safeFloat (order, 'fa:' + quoteId, 0); - const tfa = this.safeFloat (order, 'tfa:' + quoteId, 0); + const ta = this.safeNumber (order, 'ta:' + quoteId, 0); + const tta = this.safeNumber (order, 'tta:' + quoteId, 0); + const fa = this.safeNumber (order, 'fa:' + quoteId, 0); + const tfa = this.safeNumber (order, 'tfa:' + quoteId, 0); if (side === 'sell') { cost = this.sum (this.sum (ta, tta), this.sum (fa, tfa)); } else { @@ -48172,47 +48053,14 @@ module.exports = class cex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],60:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const foxbit = require ('./foxbit.js'); - -// --------------------------------------------------------------------------- - -module.exports = class chilebit extends foxbit { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'chilebit', - 'name': 'ChileBit', - 'countries': [ 'CL' ], - 'has': { - 'CORS': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg', - 'api': { - 'public': 'https://api.blinktrade.com/api', - 'private': 'https://api.blinktrade.com/tapi', - }, - 'www': 'https://chilebit.net', - 'doc': 'https://blinktrade.com/docs', - }, - 'options': { - 'brokerId': '9', // https://blinktrade.com/docs/#brokers - }, - }); - } -}; - -},{"./foxbit.js":87}],61:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],60:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, RateLimitExceeded, InvalidNonce } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -48620,10 +48468,10 @@ module.exports = class coinbase extends Exchange { const timestamp = this.parse8601 (this.safeValue (transaction, 'created_at')); const updated = this.parse8601 (this.safeValue (transaction, 'updated_at')); const type = this.safeString (transaction, 'resource'); - const amount = this.safeFloat (subtotalObject, 'amount'); + const amount = this.safeNumber (subtotalObject, 'amount'); const currencyId = this.safeString (subtotalObject, 'currency'); const currency = this.safeCurrencyCode (currencyId); - const feeCost = this.safeFloat (feeObject, 'amount'); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -48699,15 +48547,12 @@ module.exports = class coinbase extends Exchange { const orderId = undefined; const side = this.safeString (trade, 'resource'); const type = undefined; - const cost = this.safeFloat (subtotalObject, 'amount'); - const amount = this.safeFloat (amountObject, 'amount'); - let price = undefined; - if (cost !== undefined) { - if ((amount !== undefined) && (amount > 0)) { - price = cost / amount; - } - } - const feeCost = this.safeFloat (feeObject, 'amount'); + const costString = this.safeString (subtotalObject, 'amount'); + const amountString = this.safeString (amountObject, 'amount'); + const cost = this.parseNumber (costString); + const amount = this.parseNumber (amountString); + const price = this.parseNumber (Precise.stringDiv (costString, amountString)); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -48775,7 +48620,7 @@ module.exports = class coinbase extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (quoteCurrency, 'min_size'), + 'min': this.safeNumber (quoteCurrency, 'min_size'), 'max': undefined, }, }, @@ -48857,7 +48702,7 @@ module.exports = class coinbase extends Exchange { 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min_size'), + 'min': this.safeNumber (currency, 'min_size'), 'max': undefined, }, 'price': { @@ -48888,9 +48733,9 @@ module.exports = class coinbase extends Exchange { const buy = await this.publicGetPricesSymbolBuy (request); const sell = await this.publicGetPricesSymbolSell (request); const spot = await this.publicGetPricesSymbolSpot (request); - const ask = this.safeFloat (buy['data'], 'amount'); - const bid = this.safeFloat (sell['data'], 'amount'); - const last = this.safeFloat (spot['data'], 'amount'); + const ask = this.safeNumber (buy['data'], 'amount'); + const bid = this.safeNumber (sell['data'], 'amount'); + const last = this.safeNumber (spot['data'], 'amount'); return { 'symbol': symbol, 'timestamp': timestamp, @@ -48933,7 +48778,7 @@ module.exports = class coinbase extends Exchange { if (this.inArray (balance['type'], accounts)) { const currencyId = this.safeString (balance['balance'], 'currency'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance['balance'], 'amount'); + const total = this.safeNumber (balance['balance'], 'amount'); const free = total; const used = undefined; if (code in result) { @@ -49234,7 +49079,7 @@ module.exports = class coinbase extends Exchange { // } // const amountInfo = this.safeValue (item, 'amount', {}); - let amount = this.safeFloat (amountInfo, 'amount'); + let amount = this.safeNumber (amountInfo, 'amount'); let direction = undefined; if (amount < 0) { direction = 'out'; @@ -49260,7 +49105,7 @@ module.exports = class coinbase extends Exchange { if (feeInfo !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId, currency); - const feeAmount = this.safeFloat (feeInfo, 'amount'); + const feeAmount = this.safeNumber (feeInfo, 'amount'); fee = { 'cost': feeAmount, 'currency': feeCurrencyCode, @@ -49424,7 +49269,7 @@ module.exports = class coinbase extends Exchange { }; -},{"./base/Exchange":6,"./base/errors":8}],62:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],61:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -49457,7 +49302,7 @@ module.exports = class coinbaseprime extends coinbasepro { } }; -},{"./coinbasepro.js":63}],63:[function(require,module,exports){ +},{"./coinbasepro.js":62}],62:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -49465,6 +49310,7 @@ module.exports = class coinbaseprime extends coinbasepro { const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ArgumentsRequired, ExchangeError, InvalidOrder, InvalidAddress, AuthenticationError, NotSupported, OrderNotFound, OnMaintenance, PermissionDenied, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -49699,7 +49545,7 @@ module.exports = class coinbasepro extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const details = this.safeValue (currency, 'details', {}); - const precision = this.safeFloat (currency, 'max_precision'); + const precision = this.safeNumber (currency, 'max_precision'); const status = this.safeString (currency, 'status'); const active = (status === 'online'); result[code] = { @@ -49713,7 +49559,7 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (details, 'min_size'), + 'min': this.safeNumber (details, 'min_size'), 'max': undefined, }, 'price': { @@ -49725,7 +49571,7 @@ module.exports = class coinbasepro extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (details, 'min_withdrawal_amount'), + 'min': this.safeNumber (details, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -49769,12 +49615,12 @@ module.exports = class coinbasepro extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const priceLimits = { - 'min': this.safeFloat (market, 'quote_increment'), + 'min': this.safeNumber (market, 'quote_increment'), 'max': undefined, }; const precision = { - 'amount': this.safeFloat (market, 'base_increment'), - 'price': this.safeFloat (market, 'quote_increment'), + 'amount': this.safeNumber (market, 'base_increment'), + 'price': this.safeNumber (market, 'quote_increment'), }; const status = this.safeString (market, 'status'); const active = (status === 'online'); @@ -49788,13 +49634,13 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': priceLimits, 'cost': { - 'min': this.safeFloat (market, 'min_market_funds'), - 'max': this.safeFloat (market, 'max_market_funds'), + 'min': this.safeNumber (market, 'min_market_funds'), + 'max': this.safeNumber (market, 'max_market_funds'), }, }, 'active': active, @@ -49851,14 +49697,13 @@ module.exports = class coinbasepro extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'hold'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'hold'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -49915,29 +49760,29 @@ module.exports = class coinbasepro extends Exchange { // } // const timestamp = this.parse8601 (this.safeValue (ticker, 'time')); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'price'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'price'); const symbol = (market === undefined) ? undefined : market['symbol']; return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': undefined, 'ask': ask, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -50010,7 +49855,7 @@ module.exports = class coinbasepro extends Exchange { if (market !== undefined) { const feeCurrencyId = this.safeStringLower (market, 'quoteId'); const costField = feeCurrencyId + '_value'; - cost = this.safeFloat (trade, costField); + cost = this.safeNumber (trade, costField); feeCurrency = market['quote']; const liquidity = this.safeString (trade, 'liquidity'); if (liquidity !== undefined) { @@ -50018,7 +49863,7 @@ module.exports = class coinbasepro extends Exchange { feeRate = market[takerOrMaker]; } } - const feeCost = this.safeFloat2 (trade, 'fill_fees', 'fee'); + const feeCost = this.safeNumber2 (trade, 'fill_fees', 'fee'); const fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -50032,10 +49877,12 @@ module.exports = class coinbasepro extends Exchange { if (orderId !== undefined) { side = (trade['side'] === 'buy') ? 'buy' : 'sell'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - cost = amount * price; + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -50097,11 +49944,11 @@ module.exports = class coinbasepro extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -50181,17 +50028,11 @@ module.exports = class coinbasepro extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'filled_size'); - const amount = this.safeFloat (order, 'size', filled); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'executed_value'); - const feeCost = this.safeFloat (order, 'fill_fees'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'filled_size'); + const amount = this.safeNumber (order, 'size', filled); + const cost = this.safeNumber (order, 'executed_value'); + const feeCost = this.safeNumber (order, 'fill_fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -50209,9 +50050,9 @@ module.exports = class coinbasepro extends Exchange { const side = this.safeString (order, 'side'); const timeInForce = this.safeString (order, 'time_in_force'); const postOnly = this.safeValue (order, 'post_only'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -50229,11 +50070,11 @@ module.exports = class coinbasepro extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -50323,7 +50164,7 @@ module.exports = class coinbasepro extends Exchange { request['client_oid'] = clientOrderId; params = this.omit (params, [ 'clientOrderId', 'client_oid' ]); } - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop_price'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stop_price'); if (stopPrice !== undefined) { request['stop_price'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, [ 'stopPrice', 'stop_price' ]); @@ -50337,7 +50178,7 @@ module.exports = class coinbasepro extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['size'] = this.amountToPrecision (symbol, amount); } else if (type === 'market') { - let cost = this.safeFloat2 (params, 'cost', 'funds'); + let cost = this.safeNumber2 (params, 'cost', 'funds'); if (cost === undefined) { if (price !== undefined) { cost = amount * price; @@ -50408,19 +50249,6 @@ module.exports = class coinbasepro extends Exchange { return await this.privateDeleteOrders (this.extend (request, params)); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - const cost = amount * price; - const currency = market['quote']; - return { - 'type': takerOrMaker, - 'currency': currency, - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (currency, rate * cost)), - }; - } - async fetchPaymentMethods (params = {}) { return await this.privateGetPaymentMethods (params); } @@ -50559,7 +50387,7 @@ module.exports = class coinbasepro extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (transaction); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let type = this.safeString (transaction, 'type'); let address = this.safeString (details, 'crypto_address'); const tag = this.safeString (details, 'destination_tag'); @@ -50568,7 +50396,7 @@ module.exports = class coinbasepro extends Exchange { if (type === 'withdraw') { type = 'withdrawal'; address = this.safeString (details, 'sent_to_address', address); - const feeCost = this.safeFloat (details, 'fee'); + const feeCost = this.safeNumber (details, 'fee'); if (feeCost !== undefined) { if (amount !== undefined) { amount -= feeCost; @@ -50682,13 +50510,14 @@ module.exports = class coinbasepro extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],64:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],63:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -50812,12 +50641,12 @@ module.exports = class coincheck extends Exchange { if (currencyId in balances) { const account = this.account (); const reserved = currencyId + '_reserved'; - account['free'] = this.safeFloat (balances, currencyId); - account['used'] = this.safeFloat (balances, reserved); + account['free'] = this.safeString (balances, currencyId); + account['used'] = this.safeString (balances, reserved); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -50855,23 +50684,13 @@ module.exports = class coincheck extends Exchange { const id = this.safeString (order, 'id'); const side = this.safeString (order, 'order_type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const amount = this.safeFloat (order, 'pending_amount'); - const remaining = this.safeFloat (order, 'pending_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = Math.max (amount - remaining, 0); - if (price !== undefined) { - cost = filled * price; - } - } - } + const amount = this.safeNumber (order, 'pending_amount'); + const remaining = this.safeNumber (order, 'pending_amount'); + const price = this.safeNumber (order, 'rate'); const status = undefined; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -50879,7 +50698,7 @@ module.exports = class coincheck extends Exchange { 'lastTradeTimestamp': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'side': side, 'type': undefined, 'timeInForce': undefined, @@ -50888,12 +50707,12 @@ module.exports = class coincheck extends Exchange { 'symbol': symbol, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'info': order, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -50917,16 +50736,16 @@ module.exports = class coincheck extends Exchange { }; const ticker = await this.publicGetTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -50936,7 +50755,7 @@ module.exports = class coincheck extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -50945,7 +50764,7 @@ module.exports = class coincheck extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'rate'); + const priceString = this.safeString (trade, 'rate'); const marketId = this.safeString (trade, 'pair'); market = this.safeValue (this.markets_by_id, marketId, market); let symbol = undefined; @@ -50972,7 +50791,7 @@ module.exports = class coincheck extends Exchange { } } let takerOrMaker = undefined; - let amount = undefined; + let amountString = undefined; let cost = undefined; let side = undefined; let fee = undefined; @@ -50984,24 +50803,22 @@ module.exports = class coincheck extends Exchange { takerOrMaker = 'maker'; } const funds = this.safeValue (trade, 'funds', {}); - amount = this.safeFloat (funds, baseId); - cost = this.safeFloat (funds, quoteId); + amountString = this.safeString (funds, baseId); + cost = this.safeNumber (funds, quoteId); fee = { 'currency': this.safeString (trade, 'fee_currency'), - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), }; side = this.safeString (trade, 'side'); orderId = this.safeString (trade, 'order_id'); } else { - amount = this.safeFloat (trade, 'amount'); + amountString = this.safeString (trade, 'amount'); side = this.safeString (trade, 'order_type'); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -51072,6 +50889,10 @@ module.exports = class coincheck extends Exchange { return await this.privateDeleteExchangeOrdersId (this.extend (request, params)); } + nonce () { + return this.milliseconds (); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { let url = this.urls['api'] + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); @@ -51118,13 +50939,14 @@ module.exports = class coincheck extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],65:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],64:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -51335,8 +51157,8 @@ module.exports = class coinegg extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; let change = undefined; let average = undefined; @@ -51350,11 +51172,11 @@ module.exports = class coinegg extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -51364,8 +51186,8 @@ module.exports = class coinegg extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVol'), 'info': ticker, }; } @@ -51394,15 +51216,12 @@ module.exports = class coinegg extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const type = 'limit'; const side = this.safeString (trade, 'type'); const id = this.safeString (trade, 'tid'); @@ -51449,9 +51268,9 @@ module.exports = class coinegg extends Exchange { result[code] = this.account (); } const type = (accountType === 'lock') ? 'used' : 'free'; - result[code][type] = this.safeFloat (balances, key); + result[code][type] = this.safeString (balances, key); } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -51460,15 +51279,9 @@ module.exports = class coinegg extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let status = this.safeString (order, 'status'); if (status === 'cancelled') { status = 'canceled'; @@ -51479,7 +51292,7 @@ module.exports = class coinegg extends Exchange { const type = 'limit'; const side = this.safeString (order, 'type'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -51495,13 +51308,13 @@ module.exports = class coinegg extends Exchange { 'stopPrice': undefined, 'cost': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'trades': undefined, 'fee': undefined, 'info': info, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -51637,13 +51450,14 @@ module.exports = class coinegg extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],66:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],65:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, OrderNotFound, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -51836,13 +51650,13 @@ module.exports = class coinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': this.safeFloat (market, 'taker_fee_rate'), - 'maker': this.safeFloat (market, 'maker_fee_rate'), + 'taker': this.safeNumber (market, 'taker_fee_rate'), + 'maker': this.safeNumber (market, 'maker_fee_rate'), 'info': market, 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -51862,16 +51676,16 @@ module.exports = class coinex extends Exchange { symbol = market['symbol']; } ticker = this.safeValue (ticker, 'ticker', {}); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -51881,7 +51695,7 @@ module.exports = class coinex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat2 (ticker, 'vol', 'volume'), + 'baseVolume': this.safeNumber2 (ticker, 'vol', 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -51941,16 +51755,18 @@ module.exports = class coinex extends Exchange { } const tradeId = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market); - let cost = this.safeFloat (trade, 'deal_money'); - if (!cost) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); + let cost = this.safeNumber (trade, 'deal_money'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_asset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -52003,11 +51819,11 @@ module.exports = class coinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -52068,11 +51884,11 @@ module.exports = class coinex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -52111,11 +51927,11 @@ module.exports = class coinex extends Exchange { // } // const timestamp = this.safeTimestamp (order, 'create_time'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'deal_money'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'deal_amount'); - const average = this.safeFloat (order, 'avg_price'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'deal_money'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'deal_amount'); + const average = this.safeNumber (order, 'avg_price'); let symbol = undefined; const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); @@ -52127,11 +51943,11 @@ module.exports = class coinex extends Exchange { feeCurrency = market['quote']; } } - const remaining = this.safeFloat (order, 'left'); + const remaining = this.safeNumber (order, 'left'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -52153,10 +51969,10 @@ module.exports = class coinex extends Exchange { 'trades': undefined, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'deal_fee'), + 'cost': this.safeNumber (order, 'deal_fee'), }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -52402,8 +52218,8 @@ module.exports = class coinex extends Exchange { const timestamp = this.safeTimestamp (transaction, 'create_time'); const type = ('coin_withdraw_id' in transaction) ? 'withdraw' : 'deposit'; const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'tx_fee'); + let amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'tx_fee'); if (type === 'deposit') { feeCost = 0; } @@ -52594,13 +52410,14 @@ module.exports = class coinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],67:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],66:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, RateLimitExceeded, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -52733,11 +52550,11 @@ module.exports = class coinfalcon extends Exchange { 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'change_in_24h'), + 'change': this.safeNumber (ticker, 'change_in_24h'), 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -52774,20 +52591,17 @@ module.exports = class coinfalcon extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } const tradeId = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'order_id'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = this.safeString (trade, 'fee_currency_code'); fee = { @@ -52855,14 +52669,13 @@ module.exports = class coinfalcon extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available_balance'), - 'used': this.safeFloat (balance, 'hold_balance'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'hold_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -52897,19 +52710,9 @@ module.exports = class coinfalcon extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'size_filled'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (price !== undefined) { - cost = filled * price; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'size_filled'); const status = this.parseOrderStatus (this.safeString (order, 'status')); let type = this.safeString (order, 'operation_type'); if (type !== undefined) { @@ -52918,7 +52721,7 @@ module.exports = class coinfalcon extends Exchange { } const side = this.safeString (order, 'order_type'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -52931,16 +52734,16 @@ module.exports = class coinfalcon extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'lastTradeTimestamp': undefined, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -53050,13 +52853,14 @@ module.exports = class coinfalcon extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],68:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],67:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ExchangeError, InvalidNonce, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -53158,14 +52962,14 @@ module.exports = class coinfloor extends Exchange { const baseIdLower = this.safeStringLower (market, 'baseId'); const quoteIdLower = this.safeStringLower (market, 'quoteId'); result[base] = { - 'free': this.safeFloat (response, baseIdLower + '_available'), - 'used': this.safeFloat (response, baseIdLower + '_reserved'), - 'total': this.safeFloat (response, baseIdLower + '_balance'), + 'free': this.safeNumber (response, baseIdLower + '_available'), + 'used': this.safeNumber (response, baseIdLower + '_reserved'), + 'total': this.safeNumber (response, baseIdLower + '_balance'), }; result[quote] = { - 'free': this.safeFloat (response, quoteIdLower + '_available'), - 'used': this.safeFloat (response, quoteIdLower + '_reserved'), - 'total': this.safeFloat (response, quoteIdLower + '_balance'), + 'free': this.safeNumber (response, quoteIdLower + '_available'), + 'used': this.safeNumber (response, quoteIdLower + '_reserved'), + 'total': this.safeNumber (response, quoteIdLower + '_balance'), }; return this.parseBalance (result); } @@ -53186,22 +52990,22 @@ module.exports = class coinfloor extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -53230,14 +53034,11 @@ module.exports = class coinfloor extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -53355,8 +53156,8 @@ module.exports = class coinfloor extends Exchange { const parts = key.split ('_'); const numParts = parts.length; if (numParts === 2) { - const tmpBaseAmount = this.safeFloat (item, parts[0]); - const tmpQuoteAmount = this.safeFloat (item, parts[1]); + const tmpBaseAmount = this.safeNumber (item, parts[0]); + const tmpQuoteAmount = this.safeNumber (item, parts[1]); if (tmpBaseAmount !== undefined && tmpQuoteAmount !== undefined) { baseId = parts[0]; quoteId = parts[1]; @@ -53372,7 +53173,7 @@ module.exports = class coinfloor extends Exchange { const referenceId = this.safeString (item, 'id'); const timestamp = this.parse8601 (this.safeString (item, 'datetime')); let fee = undefined; - const feeCost = this.safeFloat (item, 'fee'); + const feeCost = this.safeNumber (item, 'fee'); const result = { 'id': undefined, 'timestamp': timestamp, @@ -53476,8 +53277,8 @@ module.exports = class coinfloor extends Exchange { 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, 'type': type, - 'price': this.safeFloat (response, 'price'), - 'remaining': this.safeFloat (response, 'amount'), + 'price': this.safeNumber (response, 'price'), + 'remaining': this.safeNumber (response, 'amount'), 'info': response, }; } @@ -53502,19 +53303,14 @@ module.exports = class coinfloor extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let side = undefined; const status = this.safeString (order, 'status'); - if (order['type'] === 0) { + const rawType = this.safeString (order, 'type'); + if (rawType === '0') { side = 'buy'; - } else if (order['type'] === 1) { + } else if (rawType === '1') { side = 'sell'; } let symbol = undefined; @@ -53522,7 +53318,7 @@ module.exports = class coinfloor extends Exchange { symbol = market['symbol']; } const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -53540,11 +53336,11 @@ module.exports = class coinfloor extends Exchange { 'amount': undefined, 'filled': undefined, 'remaining': amount, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -53603,13 +53399,14 @@ module.exports = class coinfloor extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],69:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],68:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -53771,14 +53568,14 @@ module.exports = class coingi extends Exchange { const currencyId = this.safeString (balance['currency'], 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - const blocked = this.safeFloat (balance, 'blocked'); - const inOrders = this.safeFloat (balance, 'inOrders'); - const withdrawing = this.safeFloat (balance, 'withdrawing'); - account['used'] = this.sum (blocked, inOrders, withdrawing); + account['free'] = this.safeString (balance, 'available'); + const blocked = this.safeString (balance, 'blocked'); + const inOrders = this.safeString (balance, 'inOrders'); + const withdrawing = this.safeString (balance, 'withdrawing'); + account['used'] = Precise.stringAdd (Precise.stringAdd (blocked, inOrders), withdrawing); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = 512, params = {}) { @@ -53804,11 +53601,11 @@ module.exports = class coingi extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -53818,8 +53615,8 @@ module.exports = class coingi extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'counterVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'counterVolume'), 'info': ticker, }; } @@ -53852,14 +53649,11 @@ module.exports = class coingi extends Exchange { } parseTrade (trade, market = undefined) { - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const id = this.safeString (trade, 'id'); const marketId = this.safeString (trade, 'currencyPair'); @@ -53953,7 +53747,7 @@ module.exports = class coingi extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],70:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],69:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -54164,16 +53958,16 @@ module.exports = class coinmarketcap extends Exchange { if (timestamp === undefined) { timestamp = this.milliseconds (); } - const change = this.safeFloat (ticker, 'percent_change_24h'); + const change = this.safeNumber (ticker, 'percent_change_24h'); let last = undefined; let symbol = undefined; let volume = undefined; if (market !== undefined) { symbol = market['symbol']; const priceKey = 'price_' + market['quoteId']; - last = this.safeFloat (ticker, priceKey); + last = this.safeNumber (ticker, priceKey); const volumeKey = '24h_volume_' + market['quoteId']; - volume = this.safeFloat (ticker, volumeKey); + volume = this.safeNumber (ticker, volumeKey); } return { 'symbol': symbol, @@ -54302,13 +54096,14 @@ module.exports = class coinmarketcap extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],71:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],70:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder, OrderNotFound, RateLimitExceeded, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -54535,7 +54330,7 @@ module.exports = class coinmate extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -54563,12 +54358,12 @@ module.exports = class coinmate extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -54591,16 +54386,16 @@ module.exports = class coinmate extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'data'); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'vwap': undefined, 'askVolume': undefined, 'open': undefined, @@ -54610,7 +54405,7 @@ module.exports = class coinmate extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'amount'), + 'baseVolume': this.safeNumber (ticker, 'amount'), 'quoteVolume': undefined, 'info': ticker, }; @@ -54679,8 +54474,8 @@ module.exports = class coinmate extends Exchange { // } // const timestamp = this.safeInteger (item, 'timestamp'); - const amount = this.safeFloat (item, 'amount'); - const fee = this.safeFloat (item, 'fee'); + const amount = this.safeNumber (item, 'amount'); + const fee = this.safeNumber (item, 'fee'); const txid = this.safeString (item, 'txid'); const address = this.safeString (item, 'destination'); const tag = this.safeString (item, 'destinationTag'); @@ -54758,21 +54553,18 @@ module.exports = class coinmate extends Exchange { // const marketId = this.safeString (trade, 'currencyPair'); market = this.safeMarket (marketId, market, '_'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeStringLower2 (trade, 'type', 'tradeType'); const type = this.safeStringLower (trade, 'orderType'); const orderId = this.safeString (trade, 'orderId'); const id = this.safeString (trade, 'transactionId'); const timestamp = this.safeInteger2 (trade, 'timestamp', 'createdTimestamp'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -54913,11 +54705,11 @@ module.exports = class coinmate extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.safeInteger (order, 'timestamp'); const side = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'originalAmount'); - let remaining = this.safeFloat (order, 'remainingAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'originalAmount'); + let remaining = this.safeNumber (order, 'remainingAmount'); if (remaining === undefined) { - remaining = this.safeFloat (order, 'amount'); + remaining = this.safeNumber (order, 'amount'); } let status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.parseOrderType (this.safeString (order, 'orderTradeType')); @@ -54932,11 +54724,11 @@ module.exports = class coinmate extends Exchange { cost = filled * price; } } - const average = this.safeFloat (order, 'avgPrice'); + const average = this.safeNumber (order, 'avgPrice'); const marketId = this.safeString (order, 'currencyPair'); const symbol = this.safeSymbol (marketId, market, '_'); const clientOrderId = this.safeString (order, 'clientOrderId'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); return { 'id': id, 'clientOrderId': clientOrderId, @@ -55064,13 +54856,14 @@ module.exports = class coinmate extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],72:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],71:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, BadRequest, ExchangeError, ArgumentsRequired, OrderNotFound, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -55209,11 +55002,11 @@ module.exports = class coinone extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'avail'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -55266,13 +55059,13 @@ module.exports = class coinone extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const first = this.safeFloat (ticker, 'first'); - const last = this.safeFloat (ticker, 'last'); + const first = this.safeNumber (ticker, 'first'); + const last = this.safeNumber (ticker, 'last'); let average = undefined; if (first !== undefined && last !== undefined) { average = this.sum (first, last) / 2; } - const previousClose = this.safeFloat (ticker, 'yesterday_last'); + const previousClose = this.safeNumber (ticker, 'yesterday_last'); let change = undefined; let percentage = undefined; if (last !== undefined && previousClose !== undefined) { @@ -55286,8 +55079,8 @@ module.exports = class coinone extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -55300,7 +55093,7 @@ module.exports = class coinone extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -55346,20 +55139,17 @@ module.exports = class coinone extends Exchange { side = 'buy'; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'fee'); + let feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); - let feeRate = this.safeFloat (trade, 'feeRate'); + let feeRate = this.safeNumber (trade, 'feeRate'); feeRate = Math.abs (feeRate); let feeCurrencyCode = undefined; if (market !== undefined) { @@ -55519,7 +55309,7 @@ module.exports = class coinone extends Exchange { // } // const id = this.safeString (order, 'orderId'); - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); const timestamp = this.safeTimestamp (order, 'timestamp'); let side = this.safeString (order, 'type'); if (side === 'ask') { @@ -55527,9 +55317,8 @@ module.exports = class coinone extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const remaining = this.safeFloat (order, 'remainQty'); - let filled = undefined; - const amount = this.safeFloat (order, 'qty'); + const remaining = this.safeNumber (order, 'remainQty'); + const amount = this.safeNumber (order, 'qty'); let status = this.safeString (order, 'status'); // https://github.com/ccxt/ccxt/pull/7067 if (status === 'live') { @@ -55539,14 +55328,7 @@ module.exports = class coinone extends Exchange { } } } - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (amount - remaining); - } status = this.parseOrderStatus (status); - let cost = undefined; - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } let symbol = undefined; let base = undefined; let quote = undefined; @@ -55566,16 +55348,16 @@ module.exports = class coinone extends Exchange { quote = market['quote']; } let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = (side === 'sell') ? quote : base; fee = { 'cost': feeCost, - 'rate': this.safeFloat (order, 'feeRate'), + 'rate': this.safeNumber (order, 'feeRate'), 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -55589,15 +55371,15 @@ module.exports = class coinone extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': amount, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -55672,8 +55454,8 @@ module.exports = class coinone extends Exchange { // eslint-disable-next-line quotes throw new ArgumentsRequired (this.id + " cancelOrder() requires a symbol argument. To cancel the order, pass a symbol argument and {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument of cancelOrder."); } - const price = this.safeFloat (params, 'price'); - const qty = this.safeFloat (params, 'qty'); + const price = this.safeNumber (params, 'price'); + const qty = this.safeNumber (params, 'qty'); const isAsk = this.safeInteger (params, 'is_ask'); if ((price === undefined) || (qty === undefined) || (isAsk === undefined)) { // eslint-disable-next-line quotes @@ -55748,13 +55530,14 @@ module.exports = class coinone extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],73:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],72:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -55874,7 +55657,7 @@ module.exports = class coinspot extends Exchange { const balance = currencies[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } } @@ -55884,11 +55667,11 @@ module.exports = class coinspot extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -55908,16 +55691,16 @@ module.exports = class coinspot extends Exchange { id = id.toLowerCase (); const ticker = response['prices'][id]; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -55965,11 +55748,13 @@ module.exports = class coinspot extends Exchange { // "market":"BTC/AUD" // } // - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'total'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger (trade, 'solddate'); const marketId = this.safeString (trade, 'market'); @@ -56037,13 +55822,15 @@ module.exports = class coinspot extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],74:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],73:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, InvalidNonce, RequestTimeout, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, AuthenticationError, BadSymbol } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -56150,6 +55937,7 @@ module.exports = class crex24 extends Exchange { ], }, }, + 'precisionMode': TICK_SIZE, 'fees': { 'trading': { 'tierBased': true, @@ -56170,6 +55958,7 @@ module.exports = class crex24 extends Exchange { 'BIT': 'BitMoney', 'BULL': 'BuySell', 'CREDIT': 'TerraCredit', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'GHOST': 'GHOSTPRISM', 'IQ': 'IQ.Cash', 'PUT': 'PutinCoin', @@ -56203,6 +55992,7 @@ module.exports = class crex24 extends Exchange { 'API Key': AuthenticationError, // "API Key '9edc48de-d5b0-4248-8e7e-f59ffcd1c7f1' doesn't exist." 'Insufficient funds': InsufficientFunds, // "Insufficient funds: new order requires 10 ETH which is more than the available balance." 'has been delisted.': BadSymbol, // {"errorDescription":"Instrument '$PAC-BTC' has been delisted."} + 'is currently suspended.': BadSymbol, // {"errorDescription":"Trading in BITG-BTC is currently suspended."} 'Mandatory parameter': BadRequest, // {"errorDescription":"Mandatory parameter 'feeCurrency' is missing."} }, }, @@ -56244,12 +56034,12 @@ module.exports = class crex24 extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const tickSize = this.safeValue (market, 'tickSize'); - const minPrice = this.safeValue (market, 'minPrice'); - const minAmount = this.safeFloat (market, 'minVolume'); + const tickSize = this.safeNumber (market, 'tickSize'); + const minPrice = this.safeNumber (market, 'minPrice'); + const minAmount = this.safeNumber (market, 'minVolume'); const precision = { - 'amount': this.precisionFromString (this.numberToString (minAmount)), - 'price': this.precisionFromString (this.numberToString (tickSize)), + 'amount': minAmount, + 'price': tickSize, }; const active = (market['state'] === 'active'); result.push ({ @@ -56314,7 +56104,8 @@ module.exports = class crex24 extends Exchange { const currency = response[i]; const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); - const precision = this.safeInteger (currency, 'withdrawalPrecision'); + const withdrawalPrecision = this.safeInteger (currency, 'withdrawalPrecision'); + const precision = Math.pow (10, -withdrawalPrecision); const address = this.safeValue (currency, 'BaseAddress'); const active = (currency['depositsAllowed'] && currency['withdrawalsAllowed'] && !currency['isDelisted']); const type = currency['isFiat'] ? 'fiat' : 'crypto'; @@ -56326,7 +56117,7 @@ module.exports = class crex24 extends Exchange { 'type': type, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'flatWithdrawalFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'flatWithdrawalFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -56342,12 +56133,12 @@ module.exports = class crex24 extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -56377,11 +56168,11 @@ module.exports = class crex24 extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -56433,16 +56224,16 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); const marketId = this.safeString (ticker, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -56450,10 +56241,10 @@ module.exports = class crex24 extends Exchange { 'last': last, 'previousClose': undefined, // previous day close 'change': undefined, - 'percentage': this.safeFloat (ticker, 'percentChange'), + 'percentage': this.safeNumber (ticker, 'percentChange'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -56523,14 +56314,6 @@ module.exports = class crex24 extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - parseTrade (trade, market = undefined) { // // public fetchTrades @@ -56555,14 +56338,11 @@ module.exports = class crex24 extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'orderId'); @@ -56571,7 +56351,7 @@ module.exports = class crex24 extends Exchange { let fee = undefined; const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCode = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -56632,11 +56412,11 @@ module.exports = class crex24 extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -56705,50 +56485,19 @@ module.exports = class crex24 extends Exchange { const marketId = this.safeString (order, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remainingVolume'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remainingVolume'); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'lastUpdate')); - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = amount - remaining; - if (this.options['parseOrderToPrecision']) { - filled = parseFloat (this.amountToPrecision (symbol, filled)); - } - filled = Math.max (filled, 0.0); - if (price !== undefined) { - cost = price * filled; - } - } - } const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeString (order, 'side'); const fee = undefined; const trades = undefined; - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const average = undefined; const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -56762,14 +56511,14 @@ module.exports = class crex24 extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -56804,7 +56553,7 @@ module.exports = class crex24 extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -57223,8 +56972,8 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'createdAt')); const updated = this.parse8601 (this.safeString (transaction, 'processedAt')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); const fee = { 'cost': feeCost, 'currency': code, @@ -57349,14 +57098,15 @@ module.exports = class crex24 extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],75:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],74:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -57444,6 +57194,7 @@ module.exports = class currencycom extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.002, @@ -57602,7 +57353,7 @@ module.exports = class currencycom extends Exchange { const filtersByType = this.indexBy (filters, 'filterType'); const precision = { 'amount': 1 / Math.pow (1, this.safeInteger (market, 'baseAssetPrecision')), - 'price': this.safeFloat (market, 'tickSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'TRADING'); @@ -57635,14 +57386,14 @@ module.exports = class currencycom extends Exchange { 'max': undefined, }, 'cost': { - 'min': -1 * Math.log10 (precision['amount']), + 'min': -Math.log10 (precision['amount']), 'max': undefined, }, }, }; - const exchangeFee = this.safeFloat2 (market, 'exchangeFee', 'tradingFee'); - const makerFee = this.safeFloat (market, 'makerFee', exchangeFee); - const takerFee = this.safeFloat (market, 'takerFee', exchangeFee); + const exchangeFee = this.safeNumber2 (market, 'exchangeFee', 'tradingFee'); + const makerFee = this.safeNumber (market, 'makerFee', exchangeFee); + const takerFee = this.safeNumber (market, 'takerFee', exchangeFee); if (makerFee !== undefined) { entry['maker'] = makerFee / 100; } @@ -57651,65 +57402,44 @@ module.exports = class currencycom extends Exchange { } if ('PRICE_FILTER' in filtersByType) { const filter = this.safeValue (filtersByType, 'PRICE_FILTER', {}); - entry['precision']['price'] = this.safeFloat (filter, 'tickSize'); + entry['precision']['price'] = this.safeNumber (filter, 'tickSize'); // PRICE_FILTER reports zero values for maxPrice // since they updated filter types in November 2018 // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } } if ('LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'LOT_SIZE', {}); - entry['precision']['amount'] = this.safeFloat (filter, 'stepSize'); + entry['precision']['amount'] = this.safeNumber (filter, 'stepSize'); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat (filter, 'minNotional'); + entry['limits']['cost']['min'] = this.safeNumber (filter, 'minNotional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { const response = await this.privateGetAccount (params); // @@ -57756,8 +57486,8 @@ module.exports = class currencycom extends Exchange { const response = await this.privateGetAccount (params); return { 'info': response, - 'maker': this.safeFloat (response, 'makerCommission'), - 'taker': this.safeFloat (response, 'takerCommission'), + 'maker': this.safeNumber (response, 'makerCommission'), + 'taker': this.safeNumber (response, 'takerCommission'), }; } @@ -57791,11 +57521,11 @@ module.exports = class currencycom extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -57894,8 +57624,8 @@ module.exports = class currencycom extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); - const open = this.safeFloat (ticker, 'openPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); let average = undefined; if ((open !== undefined) && (last !== undefined)) { average = this.sum (open, last) / 2; @@ -57904,22 +57634,22 @@ module.exports = class currencycom extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), 'open': open, 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -57954,14 +57684,6 @@ module.exports = class currencycom extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24hr (params); @@ -57994,11 +57716,11 @@ module.exports = class currencycom extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -58064,8 +57786,11 @@ module.exports = class currencycom extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -58081,7 +57806,7 @@ module.exports = class currencycom extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -58103,7 +57828,7 @@ module.exports = class currencycom extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': fee, }; } @@ -58179,66 +57904,21 @@ module.exports = class currencycom extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); + const remaining = undefined; + const cost = this.safeNumber (order, 'cummulativeQuoteQty'); const id = this.safeString (order, 'orderId'); const type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeStringLower (order, 'side'); - let fee = undefined; let trades = undefined; const fills = this.safeValue (order, 'fills'); if (fills !== undefined) { trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'timestamp': timestamp, @@ -58252,13 +57932,13 @@ module.exports = class currencycom extends Exchange { 'stopPrice': undefined, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -58470,7 +58150,7 @@ module.exports = class currencycom extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],76:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],75:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -58478,6 +58158,7 @@ module.exports = class currencycom extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, BadRequest, BadSymbol, InvalidOrder, AuthenticationError, ArgumentsRequired, OrderNotFound, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -58731,14 +58412,14 @@ module.exports = class delta extends Exchange { 'name': this.safeString (currency, 'name'), 'info': currency, // the original payload 'active': active, - 'fee': this.safeFloat (currency, 'base_withdrawal_fee'), + 'fee': this.safeNumber (currency, 'base_withdrawal_fee'), 'precision': 1 / Math.pow (10, precision), 'limits': { 'amount': { 'min': undefined, 'max': undefined }, 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal_amount'), + 'min': this.safeNumber (currency, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -58872,26 +58553,26 @@ module.exports = class delta extends Exchange { } const precision = { 'amount': 1.0, // number of contracts - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; const limits = { 'amount': { 'min': 1.0, - 'max': this.safeFloat (market, 'position_size_limit'), + 'max': this.safeNumber (market, 'position_size_limit'), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; const state = this.safeString (market, 'state'); const active = (state === 'live'); - const maker = this.safeFloat (market, 'maker_commission_rate'); - const taker = this.safeFloat (market, 'taker_commission_rate'); + const maker = this.safeNumber (market, 'maker_commission_rate'); + const taker = this.safeNumber (market, 'taker_commission_rate'); result.push ({ 'id': id, 'numericId': numericId, @@ -58939,8 +58620,8 @@ module.exports = class delta extends Exchange { const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.001); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; let percentage = undefined; @@ -58951,15 +58632,15 @@ module.exports = class delta extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'turnover'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'turnover'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -59129,12 +58810,11 @@ module.exports = class delta extends Exchange { const orderId = this.safeString (trade, 'order_id'); let timestamp = this.parse8601 (this.safeString (trade, 'created_at')); timestamp = this.safeIntegerProduct (trade, 'timestamp', 0.001, timestamp); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const product = this.safeValue (trade, 'product', {}); const marketId = this.safeString (product, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -59153,7 +58833,7 @@ module.exports = class delta extends Exchange { if (type !== undefined) { type = type.replace ('_order', ''); } - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { const settlingAsset = this.safeValue (product, 'settling_asset', {}); @@ -59220,11 +58900,11 @@ module.exports = class delta extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -59294,11 +58974,11 @@ module.exports = class delta extends Exchange { const currency = this.safeValue (currenciesByNumericId, currencyId); const code = (currency === undefined) ? currencyId : currency['code']; const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchPosition (symbol, params = undefined) { @@ -59322,7 +59002,7 @@ module.exports = class delta extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPositionsMargined (params); // @@ -59403,20 +59083,12 @@ module.exports = class delta extends Exchange { const side = this.safeString (order, 'side'); let type = this.safeString (order, 'order_type'); type = type.replace ('_order', ''); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'unfilled_size'); - let filled = undefined; - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let cost = undefined; - const average = this.safeFloat (order, 'average_fill_price'); - if ((average !== undefined) && filled) { - cost = average * filled; - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'unfilled_size'); + const average = this.safeNumber (order, 'average_fill_price'); let fee = undefined; - const feeCost = this.safeFloat (order, 'paid_commission'); + const feeCost = this.safeNumber (order, 'paid_commission'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -59429,7 +59101,7 @@ module.exports = class delta extends Exchange { 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -59441,14 +59113,14 @@ module.exports = class delta extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -59847,9 +59519,9 @@ module.exports = class delta extends Exchange { const currenciesByNumericId = this.safeValue (this.options, 'currenciesByNumericId'); currency = this.safeValue (currenciesByNumericId, currencyId, currency); const code = (currency === undefined) ? undefined : currency['code']; - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'created_at')); - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const before = Math.max (0, after - amount); const status = 'ok'; return { @@ -59955,7 +59627,7 @@ module.exports = class delta extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],77:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],76:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -59963,6 +59635,7 @@ module.exports = class delta extends Exchange { const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -60393,8 +60066,8 @@ module.exports = class deribit extends Exchange { const future = (type === 'future'); const option = (type === 'option'); const active = this.safeValue (market, 'is_active'); - const minTradeAmount = this.safeFloat (market, 'min_trade_amount'); - const tickSize = this.safeFloat (market, 'tick_size'); + const minTradeAmount = this.safeNumber (market, 'min_trade_amount'); + const tickSize = this.safeNumber (market, 'tick_size'); const precision = { 'amount': minTradeAmount, 'price': tickSize, @@ -60406,8 +60079,8 @@ module.exports = class deribit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_commission'), - 'maker': this.safeFloat (market, 'maker_commission'), + 'taker': this.safeNumber (market, 'taker_commission'), + 'maker': this.safeNumber (market, 'maker_commission'), 'limits': { 'amount': { 'min': minTradeAmount, @@ -60490,11 +60163,11 @@ module.exports = class deribit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const currencyCode = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableFunds'); - account['used'] = this.safeFloat (balance, 'maintenanceMargin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'maintenanceMargin'); + account['total'] = this.safeString (balance, 'equity'); result[currencyCode] = account; - return this.parseBalance (result); + return this.parseBalance (result, false); } async createDepositAddress (code, params = {}) { @@ -60612,18 +60285,18 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger2 (ticker, 'timestamp', 'creation_timestamp'); const marketId = this.safeString (ticker, 'instrument_name'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat2 (ticker, 'last_price', 'last'); + const last = this.safeNumber2 (ticker, 'last_price', 'last'); const stats = this.safeValue (ticker, 'stats', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (stats, 'high', 'max_price'), - 'low': this.safeFloat2 (stats, 'low', 'min_price'), - 'bid': this.safeFloat2 (ticker, 'best_bid_price', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_amount'), - 'ask': this.safeFloat2 (ticker, 'best_ask_price', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_amount'), + 'high': this.safeNumber2 (stats, 'high', 'max_price'), + 'low': this.safeNumber2 (stats, 'low', 'min_price'), + 'bid': this.safeNumber2 (ticker, 'best_bid_price', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_amount'), + 'ask': this.safeNumber2 (ticker, 'best_ask_price', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_amount'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -60633,7 +60306,7 @@ module.exports = class deribit extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (stats, 'volume'), + 'quoteVolume': this.safeNumber (stats, 'volume'), 'info': ticker, }; } @@ -60820,21 +60493,18 @@ module.exports = class deribit extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const liquidity = this.safeString (trade, 'liquidity'); let takerOrMaker = undefined; if (liquidity !== undefined) { // M = maker, T = taker, MT = both takerOrMaker = (liquidity === 'M') ? 'maker' : 'taker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -61014,31 +60684,21 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger (order, 'creation_timestamp'); const lastUpdate = this.safeInteger (order, 'last_update_timestamp'); const id = this.safeString (order, 'order_id'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); let lastTradeTimestamp = undefined; if (filled !== undefined) { if (filled > 0) { lastTradeTimestamp = lastUpdate; } } - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = price * filled; - } - } const status = this.parseOrderStatus (this.safeString (order, 'order_state')); const marketId = this.safeString (order, 'instrument_name'); market = this.safeMarket (marketId, market); const side = this.safeStringLower (order, 'direction'); - let feeCost = this.safeFloat (order, 'commission'); + let feeCost = this.safeNumber (order, 'commission'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); @@ -61056,7 +60716,7 @@ module.exports = class deribit extends Exchange { const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); const stopPrice = this.safeValue (order, 'stop_price'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -61071,14 +60731,14 @@ module.exports = class deribit extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -61155,7 +60815,7 @@ module.exports = class deribit extends Exchange { } } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price or stopPrice param for a ' + type + ' order'); } else { @@ -61554,7 +61214,7 @@ module.exports = class deribit extends Exchange { const updated = this.safeInteger (transaction, 'updated_timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let type = 'deposit'; let fee = undefined; if (feeCost !== undefined) { @@ -61577,7 +61237,7 @@ module.exports = class deribit extends Exchange { 'tagTo': undefined, 'tagFrom': undefined, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -61623,7 +61283,7 @@ module.exports = class deribit extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.codeFromOptions ('fetchPositions'); const currency = this.currency (code); @@ -61744,13 +61404,14 @@ module.exports = class deribit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],78:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],77:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); -const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -61808,11 +61469,6 @@ module.exports = class digifinex extends Exchange { 'referral': 'https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp', }, 'api': { - 'v2': { - 'get': [ - 'ticker', - ], - }, 'public': { 'get': [ '{market}/symbols', @@ -61938,6 +61594,7 @@ module.exports = class digifinex extends Exchange { }, 'commonCurrencies': { 'BHT': 'Black House Test', + 'EPS': 'Epanus', 'MBN': 'Mobilian Coin', 'TEL': 'TEL666', }, @@ -61992,7 +61649,7 @@ module.exports = class digifinex extends Exchange { const depositStatus = this.safeValue (currency, 'deposit_status', 1); const withdrawStatus = this.safeValue (currency, 'withdraw_status', 1); const active = depositStatus && withdrawStatus; - const fee = this.safeFloat (currency, 'withdraw_fee_rate'); + const fee = this.safeNumber (currency, 'withdraw_fee_rate'); if (code in result) { if (Array.isArray (result[code]['info'])) { result[code]['info'].push (currency); @@ -62023,7 +61680,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw_amount'), + 'min': this.safeNumber (currency, 'min_withdraw_amount'), 'max': undefined, }, }, @@ -62077,7 +61734,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), 'max': undefined, }, 'price': { @@ -62085,7 +61742,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), + 'min': this.safeNumber (market, 'minimum_value'), 'max': undefined, }, }; @@ -62099,7 +61756,7 @@ module.exports = class digifinex extends Exchange { // const status = this.safeString (market, 'status'); // const active = (status === 'TRADING'); // - const isAllowed = this.safeValue (market, 'is_allow', 1); + const isAllowed = this.safeInteger (market, 'is_allow', 1); const active = isAllowed ? true : false; const type = 'spot'; const spot = (type === 'spot'); @@ -62155,7 +61812,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), + 'min': this.safeNumber (market, 'min_volume'), 'max': undefined, }, 'price': { @@ -62163,7 +61820,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, }; @@ -62208,12 +61865,12 @@ module.exports = class digifinex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -62247,87 +61904,67 @@ module.exports = class digifinex extends Exchange { } async fetchTickers (symbols = undefined, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTickers() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); - const request = { - 'apiKey': apiKey, - }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (params); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const result = {}; - const tickers = this.safeValue (response, 'ticker', {}); + const tickers = this.safeValue (response, 'ticker', []); const date = this.safeInteger (response, 'date'); - const reversedMarketIds = Object.keys (tickers); - for (let i = 0; i < reversedMarketIds.length; i++) { - const reversedMarketId = reversedMarketIds[i]; - const ticker = this.extend ({ + for (let i = 0; i < tickers.length; i++) { + const rawTicker = this.extend ({ 'date': date, - }, tickers[reversedMarketId]); - const [ quoteId, baseId ] = reversedMarketId.split ('_'); - const marketId = baseId.toUpperCase () + '_' + quoteId.toUpperCase (); - const market = this.safeMarket (marketId, undefined, '_'); - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); + }, tickers[i]); + const ticker = this.parseTicker (rawTicker); + const symbol = ticker['symbol']; + result[symbol] = ticker; } return this.filterByArray (result, 'symbol', symbols); } async fetchTicker (symbol, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTicker() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); const market = this.market (symbol); - // reversed base/quote in v2 - const marketId = market['quoteId'].toLowerCase () + '_' + market['baseId'].toLowerCase (); const request = { - 'symbol': marketId, - 'apiKey': apiKey, + 'symbol': market['id'], }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (this.extend (request, params)); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const date = this.safeInteger (response, 'date'); - const ticker = this.safeValue (response, 'ticker', {}); - let result = this.safeValue (ticker, marketId, {}); - result = this.extend ({ 'date': date }, result); + const tickers = this.safeValue (response, 'ticker', []); + const firstTicker = this.safeValue (tickers, 0, {}); + const result = this.extend ({ 'date': date }, firstTicker); return this.parseTicker (result, market); } @@ -62337,6 +61974,7 @@ module.exports = class digifinex extends Exchange { // // { // "last":0.021957, + // "symbol": "btc_usdt", // "base_vol":2249.3521732227, // "change":-0.6, // "vol":102443.5111, @@ -62347,22 +61985,20 @@ module.exports = class digifinex extends Exchange { // "date"1564518452, // injected from fetchTicker/fetchTickers // } // - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeStringUpper (ticker, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -62372,8 +62008,8 @@ module.exports = class digifinex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'base_vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'base_vol'), 'info': ticker, }; } @@ -62409,18 +62045,15 @@ module.exports = class digifinex extends Exchange { const orderId = this.safeString (trade, 'order_id'); const timestamp = this.safeTimestamp2 (trade, 'date', 'timestamp'); const side = this.safeString2 (trade, 'type', 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); const takerOrMaker = this.safeValue (trade, 'is_maker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -62522,11 +62155,11 @@ module.exports = class digifinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 5), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 1), // volume + this.safeNumber (ohlcv, 5), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 1), // volume ]; } @@ -62717,21 +62350,11 @@ module.exports = class digifinex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_price'); - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - return { + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -62747,13 +62370,13 @@ module.exports = class digifinex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'average': average, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -62947,7 +62570,7 @@ module.exports = class digifinex extends Exchange { const code = this.safeCurrencyCode (this.safeString (item, 'currency_mark'), currency); const timestamp = this.safeTimestamp (item, 'time'); const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -63010,16 +62633,6 @@ module.exports = class digifinex extends Exchange { return this.parseLedger (items, currency, since, limit); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -63172,8 +62785,8 @@ module.exports = class digifinex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_date')); const updated = this.parse8601 (this.safeString (transaction, 'finished_date')); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -63223,7 +62836,7 @@ module.exports = class digifinex extends Exchange { } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const version = (api === 'v2') ? api : this.version; + const version = this.version; let url = this.urls['api'] + '/' + version + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); const urlencoded = this.urlencode (this.keysort (query)); @@ -63275,1283 +62888,7 @@ module.exports = class digifinex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],79:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, BadRequest, InsufficientFunds, PermissionDenied, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class dsx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'dsx', - 'name': 'DSX', - 'countries': [ 'UK' ], - 'rateLimit': 1500, - 'version': 'v3', - 'has': { - 'cancelOrder': true, - 'CORS': false, - 'createDepositAddress': true, - 'createMarketOrder': false, - 'createOrder': true, - 'fetchBalance': true, - 'fetchClosedOrders': false, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOHLCV': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchOrderBooks': true, - 'fetchOrders': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTransactions': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg', - 'api': { - 'public': 'https://dsxglobal.com/mapi', // market data - 'private': 'https://dsxglobal.com/tapi', // trading - 'dwapi': 'https://dsxglobal.com/dwapi', // deposit/withdraw - }, - 'www': 'https://dsxglobal.com', - 'doc': [ - 'https://dsxglobal.com/developers/publicApi', - ], - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'maker': 0.15 / 100, - 'taker': 0.25 / 100, - }, - }, - 'timeframes': { - '1m': 'm', - '1h': 'h', - '1d': 'd', - }, - 'api': { - // market data (public) - 'public': { - 'get': [ - 'barsFromMoment/{pair}/{period}/{start}', - 'depth/{pair}', - 'info', - 'lastBars/{pair}/{period}/{amount}', // period is 'm', 'h' or 'd' - 'periodBars/{pair}/{period}/{start}/{end}', - 'ticker/{pair}', - 'trades/{pair}', - ], - }, - // trading (private) - 'private': { - 'post': [ - 'info/account', - 'history/transactions', - 'history/trades', - 'history/orders', - 'orders', - 'order/cancel', - // 'order/cancel/all', - 'order/status', - 'order/new', - 'volume', - 'fees', // trading fee schedule - ], - }, - // deposit / withdraw (private) - 'dwapi': { - 'post': [ - 'deposit/cryptoaddress', - 'withdraw/crypto', - 'withdraw/fiat', - 'withdraw/submit', - // 'withdraw/cancel', - 'transaction/status', // see 'history/transactions' in private tapi above - ], - }, - }, - 'exceptions': { - 'exact': { - 'Sign is invalid': AuthenticationError, // {"success":0,"error":"Sign is invalid"} - 'Order was rejected. Incorrect price.': InvalidOrder, // {"success":0,"error":"Order was rejected. Incorrect price."} - "Order was rejected. You don't have enough money.": InsufficientFunds, // {"success":0,"error":"Order was rejected. You don't have enough money."} - 'This method is blocked for your pair of keys': PermissionDenied, // {"success":0,"error":"This method is blocked for your pair of keys"} - }, - 'broad': { - 'INVALID_PARAMETER': BadRequest, - 'Invalid pair name': ExchangeError, // {"success":0,"error":"Invalid pair name: btc_eth"} - 'invalid api key': AuthenticationError, - 'invalid sign': AuthenticationError, - 'api key dont have trade permission': AuthenticationError, - 'invalid parameter': InvalidOrder, - 'invalid order': InvalidOrder, - 'Requests too often': DDoSProtection, - 'not available': ExchangeNotAvailable, - 'data unavailable': ExchangeNotAvailable, - 'external service unavailable': ExchangeNotAvailable, - 'nonce is invalid': InvalidNonce, // {"success":0,"error":"Parameter: nonce is invalid"} - 'Incorrect volume': InvalidOrder, // {"success": 0,"error":"Order was rejected. Incorrect volume."} - }, - }, - 'options': { - 'fetchTickersMaxLength': 250, - }, - 'commonCurrencies': { - 'DSH': 'DASH', - }, - }); - } - - async fetchMarkets (params = {}) { - const response = await this.publicGetInfo (params); - // - // { - // "server_time": 1522057909, - // "pairs": { - // "ethusd": { - // "decimal_places": 5, - // "min_price": 100, - // "max_price": 1500, - // "min_amount": 0.01, - // "hidden": 0, - // "fee": 0, - // "amount_decimal_places": 4, - // "quoted_currency": "USD", - // "base_currency": "ETH" - // } - // } - // } - // - const markets = this.safeValue (response, 'pairs'); - const keys = Object.keys (markets); - const result = []; - for (let i = 0; i < keys.length; i++) { - const id = keys[i]; - const market = markets[id]; - const baseId = this.safeString (market, 'base_currency'); - const quoteId = this.safeString (market, 'quoted_currency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const precision = { - 'amount': this.safeInteger (market, 'decimal_places'), - 'price': this.safeInteger (market, 'decimal_places'), - }; - const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), - }; - const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), - }; - const costLimits = { - 'min': this.safeFloat (market, 'min_total'), - }; - const limits = { - 'amount': amountLimits, - 'price': priceLimits, - 'cost': costLimits, - }; - const hidden = this.safeInteger (market, 'hidden'); - const active = (hidden === 0); - // see parseMarket below - // https://github.com/ccxt/ccxt/pull/5786 - const otherId = base.toLowerCase () + quote.toLowerCase (); - result.push ({ - 'id': id, - 'otherId': otherId, // https://github.com/ccxt/ccxt/pull/5786 - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': active, - 'precision': precision, - 'limits': limits, - 'info': market, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostInfoAccount (); - // - // { - // "success" : 1, - // "return" : { - // "funds" : { - // "BTC" : { - // "total" : 0, - // "available" : 0 - // }, - // "USD" : { - // "total" : 0, - // "available" : 0 - // }, - // "USDT" : { - // "total" : 0, - // "available" : 0 - // } - // }, - // "rights" : { - // "info" : 1, - // "trade" : 1 - // }, - // "transactionCount" : 0, - // "openOrders" : 0, - // "serverTime" : 1537451465 - // } - // } - // - const balances = this.safeValue (response, 'return'); - const result = { 'info': response }; - const funds = this.safeValue (balances, 'funds'); - const currencyIds = Object.keys (funds); - for (let i = 0; i < currencyIds.length; i++) { - const currencyId = currencyIds[i]; - const code = this.safeCurrencyCode (currencyId); - const balance = this.safeValue (funds, currencyId, {}); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseTicker (ticker, market = undefined) { - // - // { high: 0.03492, - // low: 0.03245, - // avg: 29.46133, - // vol: 500.8661, - // vol_cur: 17.000797104, - // last: 0.03364, - // buy: 0.03362, - // sell: 0.03381, - // updated: 1537521993, - // pair: "ethbtc" } - // - const timestamp = this.safeTimestamp (ticker, 'updated'); - let symbol = undefined; - const marketId = this.safeString (ticker, 'pair'); - market = this.parseMarket (marketId); - if (market !== undefined) { - symbol = market['symbol']; - } - // dsx average is inverted, liqui average is not - let average = this.safeFloat (ticker, 'avg'); - if (average !== undefined) { - if (average > 0) { - average = 1 / average; - } - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_cur'), - 'info': ticker, - }; - } - - parseTrade (trade, market = undefined) { - // - // fetchTrades (public) - // - // { - // "amount" : 0.0128, - // "price" : 6483.99000, - // "timestamp" : 1540334614, - // "tid" : 35684364, - // "type" : "ask" - // } - // - // fetchMyTrades (private) - // - // { - // "number": "36635882", // <-- this is present if the trade has come from the '/order/status' call - // "id": "36635882", // <-- this may have been artifically added by the parseTrades method - // "pair": "btcusd", - // "type": "buy", - // "volume": 0.0595, - // "rate": 9750, - // "orderId": 77149299, - // "timestamp": 1519612317, - // "commission": 0.00020825, - // "commissionCurrency": "btc" - // } - // - const timestamp = this.safeTimestamp (trade, 'timestamp'); - let side = this.safeString (trade, 'type'); - if (side === 'ask') { - side = 'sell'; - } else if (side === 'bid') { - side = 'buy'; - } - const price = this.safeFloat2 (trade, 'rate', 'price'); - const id = this.safeString2 (trade, 'number', 'id'); - const orderId = this.safeString (trade, 'orderId'); - const marketId = this.safeString (trade, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const amount = this.safeFloat2 (trade, 'amount', 'volume'); - const type = 'limit'; // all trades are still limit trades - let takerOrMaker = undefined; - let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const isYourOrder = this.safeValue (trade, 'is_your_order'); - if (isYourOrder !== undefined) { - takerOrMaker = 'taker'; - if (isYourOrder) { - takerOrMaker = 'maker'; - } - if (fee === undefined) { - fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); - } - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - return { - 'id': id, - 'order': orderId, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': type, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - 'info': trade, - }; - } - - parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - let result = []; - if (Array.isArray (trades)) { - for (let i = 0; i < trades.length; i++) { - result.push (this.parseTrade (trades[i], market)); - } - } else { - const ids = Object.keys (trades); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const trade = this.parseTrade (trades[id], market); - result.push (this.extend (trade, { 'id': id }, params)); - } - } - result = this.sortBy (result, 'timestamp'); - const symbol = (market !== undefined) ? market['symbol'] : undefined; - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const market_id_in_reponse = (market['id'] in response); - if (!market_id_in_reponse) { - throw new ExchangeError (this.id + ' ' + market['symbol'] + ' order book is empty or not available'); - } - const orderbook = response[market['id']]; - return this.parseOrderBook (orderbook); - } - - async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let ids = undefined; - if (symbols === undefined) { - ids = this.ids.join ('-'); - // max URL length is 2083 symbols, including http schema, hostname, tld, etc... - if (ids.length > 2048) { - const numIds = this.ids.length; - throw new ExchangeError (this.id + ' has ' + numIds.toString () + ' symbols exceeding max URL length, you are required to specify a list of symbols in the first argument to fetchOrderBooks'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const result = {}; - ids = Object.keys (response); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let symbol = id; - if (id in this.markets_by_id) { - const market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseOrderBook (response[id]); - } - return result; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - let ids = this.ids; - if (symbols === undefined) { - const numIds = ids.length; - ids = ids.join ('-'); - const maxLength = this.safeInteger (this.options, 'fetchTickersMaxLength', 2048); - // max URL length is 2048 symbols, including http schema, hostname, tld, etc... - if (ids.length > this.options['fetchTickersMaxLength']) { - throw new ArgumentsRequired (this.id + ' has ' + numIds.toString () + ' markets exceeding max URL length for this endpoint (' + maxLength.toString () + ' characters), please, specify a list of symbols of interest in the first argument to fetchTickers'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - const tickers = await this.publicGetTickerPair (this.extend (request, params)); - // - // { - // "bchbtc" : { - // "high" : 0.02989, - // "low" : 0.02736, - // "avg" : 33.90585, - // "vol" : 0.65982205, - // "vol_cur" : 0.0194604180960, - // "last" : 0.03000, - // "buy" : 0.02980, - // "sell" : 0.03001, - // "updated" : 1568104614, - // "pair" : "bchbtc" - // }, - // "ethbtc" : { - // "high" : 0.01772, - // "low" : 0.01742, - // "avg" : 56.89082, - // "vol" : 229.247115044, - // "vol_cur" : 4.02959737298943, - // "last" : 0.01769, - // "buy" : 0.01768, - // "sell" : 0.01776, - // "updated" : 1568104614, - // "pair" : "ethbtc" - // } - // } - // - const result = {}; - const keys = Object.keys (tickers); - for (let k = 0; k < keys.length; k++) { - const id = keys[k]; - const ticker = tickers[id]; - let symbol = id; - let market = undefined; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseTicker (ticker, market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - const tickers = await this.fetchTickers ([ symbol ], params); - return tickers[symbol]; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; - } - const response = await this.publicGetTradesPair (this.extend (request, params)); - if (Array.isArray (response)) { - const numElements = response.length; - if (numElements === 0) { - return []; - } - } - return this.parseTrades (response[market['id']], market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // } - // - return [ - this.safeInteger (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - 'period': this.timeframes[timeframe], - }; - let method = 'publicGetLastBarsPairPeriodAmount'; - if (since === undefined) { - if (limit === undefined) { - limit = 100; // required, max 2000 - } - request['amount'] = limit; - } else { - method = 'publicGetPeriodBarsPairPeriodStartEnd'; - // in their docs they expect milliseconds - // but it returns empty arrays with milliseconds - // however, it does work properly with seconds - request['start'] = parseInt (since / 1000); - if (limit === undefined) { - request['end'] = this.seconds (); - } else { - const duration = this.parseTimeframe (timeframe) * 1000; - const end = this.sum (since, duration * limit); - request['end'] = parseInt (end / 1000); - } - } - const response = await this[method] (this.extend (request, params)); - // - // { - // "ethbtc": [ - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // }, - // { - // "high" : 0.01967, - // "open" : 0.01967, - // "low" : 0.01967, - // "close" : 0.01967, - // "amount" : 0, - // "timestamp" : 1565155680000 - // } - // ] - // } - // - const candles = this.safeValue (response, market['id'], []); - return this.parseOHLCVs (candles, market, timeframe, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (type === 'market' && price === undefined) { - throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument even for market orders, that is the worst price that you agree to fill your order for'); - } - const request = { - 'pair': market['id'], - 'type': side, - 'volume': this.amountToPrecision (symbol, amount), - 'rate': this.priceToPrecision (symbol, price), - 'orderType': type, - }; - price = parseFloat (price); - amount = parseFloat (amount); - const response = await this.privatePostOrderNew (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "received": 0, - // "remains": 10, - // "funds": { - // "BTC": { - // "total": 100, - // "available": 95 - // }, - // "USD": { - // "total": 10000, - // "available": 9995 - // }, - // "EUR": { - // "total": 1000, - // "available": 995 - // }, - // "LTC": { - // "total": 1000, - // "available": 995 - // } - // }, - // "orderId": 0, // https://github.com/ccxt/ccxt/issues/3677 - // } - // } - // - let status = 'open'; - let filled = 0.0; - let remaining = amount; - const responseReturn = this.safeValue (response, 'return'); - let id = this.safeString2 (responseReturn, 'orderId', 'order_id'); - if (id === '0') { - id = this.safeString (responseReturn, 'initOrderId', 'init_order_id'); - status = 'closed'; - } - filled = this.safeFloat (responseReturn, 'received', 0.0); - remaining = this.safeFloat (responseReturn, 'remains', amount); - const timestamp = this.milliseconds (); - return { - 'info': response, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'side': side, - 'price': price, - 'cost': price * filled, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'fee': undefined, - // 'trades': this.parseTrades (order['trades'], market), - }; - } - - parseOrderStatus (status) { - const statuses = { - '0': 'open', // Active - '1': 'closed', // Filled - '2': 'canceled', // Killed - '3': 'canceling', // Killing - '7': 'canceled', // Rejected - }; - return this.safeString (statuses, status, status); - } - - parseMarket (id) { - if (id in this.markets_by_id) { - return this.markets_by_id[id]; - } else { - // the following is a fix for - // https://github.com/ccxt/ccxt/pull/5786 - // https://github.com/ccxt/ccxt/issues/5770 - let markets_by_other_id = this.safeValue (this.options, 'markets_by_other_id'); - if (markets_by_other_id === undefined) { - this.options['markets_by_other_id'] = this.indexBy (this.markets, 'otherId'); - markets_by_other_id = this.options['markets_by_other_id']; - } - if (id in markets_by_other_id) { - return markets_by_other_id[id]; - } - } - return undefined; - } - - parseOrder (order, market = undefined) { - // - // fetchOrder - // - // { - // "number": 36635882, - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // - const id = this.safeString (order, 'id'); - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const timestamp = this.safeTimestamp (order, 'timestampCreated'); - const marketId = this.safeString (order, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const remaining = this.safeFloat (order, 'remainingVolume'); - const amount = this.safeFloat (order, 'volume'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } - } - const orderType = this.safeString (order, 'orderType'); - const side = this.safeString (order, 'type'); - let fee = undefined; - const deals = this.safeValue (order, 'deals', []); - const numDeals = deals.length; - let trades = undefined; - let lastTradeTimestamp = undefined; - if (numDeals > 0) { - trades = this.parseTrades (deals); - let feeCost = undefined; - let feeCurrency = undefined; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - if (feeCost === undefined) { - feeCost = 0; - } - feeCost = this.sum (feeCost, trade['fee']['cost']); - feeCurrency = trade['fee']['currency']; - lastTradeTimestamp = trade['timestamp']; - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'type': orderType, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': undefined, - 'cost': cost, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'status': status, - 'fee': fee, - 'trades': trades, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': parseInt (id), - }; - const response = await this.privatePostOrderStatus (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // } - // - return this.parseOrder (this.extend ({ - 'id': id, - }, response['return'])); - } - - parseOrdersById (orders, symbol = undefined, since = undefined, limit = undefined) { - const ids = Object.keys (orders); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.parseOrder (this.extend ({ - 'id': id.toString (), - }, orders[id])); - result.push (order); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - const response = await this.privatePostOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': id, - }; - const response = await this.privatePostOrderCancel (this.extend (request, params)); - return response; - } - - parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { - const result = []; - const ids = Object.keys (orders); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.extend ({ 'id': id }, orders[id]); - result.push (this.extend (this.parseOrder (order, market), params)); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - const orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterBy (orders, 'status', 'closed'); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let market = undefined; - // some derived classes use camelcase notation for request fields - const request = { - // 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field) - // 'count': 1000, // the number of trades for display numerical, default = 1000 - // 'from_id': trade ID, from which the display starts numerical 0 - // 'end_id': trade ID on which the display ends numerical ∞ - // 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last) - // 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field) - // 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field) - // 'pair': 'eth_btc', // default = all markets - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['pair'] = market['id']; - } - if (limit !== undefined) { - request['count'] = parseInt (limit); - } - if (since !== undefined) { - request['since'] = parseInt (since / 1000); - } - const response = await this.privatePostHistoryTrades (this.extend (request, params)); - let trades = []; - if ('return' in response) { - trades = response['return']; - } - return this.parseTrades (trades, market, since, limit); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let currency = undefined; - const request = {}; - if (code !== undefined) { - currency = this.currency (code); - request['currency'] = currency['id']; - } - if (since !== undefined) { - request['since'] = since; - } - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryTransactions (this.extend (request, params)); - // - // { - // "success": 1, - // "return": [ - // { - // "id": 1, - // "timestamp": 11, - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // ] - // } - // - const transactions = this.safeValue (response, 'return', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - '1': 'failed', - '2': 'ok', - '3': 'pending', - '4': 'failed', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // "id": 1, - // "timestamp": 11, // 11 in their docs ( - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // - const timestamp = this.safeTimestamp (transaction, 'timestamp'); - let type = this.safeString (transaction, 'type'); - if (type !== undefined) { - if (type === 'Incoming') { - type = 'deposit'; - } else if (type === 'Withdraw') { - type = 'withdrawal'; - } - } - const currencyId = this.safeString (transaction, 'currency'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - return { - 'id': this.safeString (transaction, 'id'), - 'txid': this.safeString (transaction, 'txid'), - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'address': this.safeString (transaction, 'address'), - 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), - 'currency': code, - 'status': status, - 'fee': { - 'currency': code, - 'cost': this.safeFloat (transaction, 'commission'), - 'rate': undefined, - }, - 'info': transaction, - }; - } - - async createDepositAddress (code, params = {}) { - const request = { - 'new': 1, - }; - const response = await this.fetchDepositAddress (code, this.extend (request, params)); - return response; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency': currency['id'], - }; - const response = await this.dwapiPostDepositCryptoaddress (this.extend (request, params)); - const result = this.safeValue (response, 'return', {}); - const address = this.safeString (result, 'address'); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, // not documented in DSX API - 'info': response, - }; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - const commission = this.safeValue (params, 'commission'); - if (commission === undefined) { - throw new ArgumentsRequired (this.id + ' withdraw() requires a `commission` (withdrawal fee) parameter (string)'); - } - params = this.omit (params, commission); - const request = { - 'currency': currency['id'], - 'amount': parseFloat (amount), - 'address': address, - 'commission': commission, - }; - if (tag !== undefined) { - request['address'] += ':' + tag; - } - const response = await this.dwapiPostWithdrawCrypto (this.extend (request, params)); - // - // [ - // { - // "success": 1, - // "return": { - // "transactionId": 2863073 - // } - // } - // ] - // - const data = this.safeValue (response, 'return', {}); - const id = this.safeString (data, 'transactionId'); - return { - 'info': response, - 'id': id, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'][api]; - const query = this.omit (params, this.extractParams (path)); - if (api === 'private' || api === 'dwapi') { - url += '/' + this.version + '/' + this.implodeParams (path, params); - this.checkRequiredCredentials (); - const nonce = this.nonce (); - body = this.urlencode (this.extend ({ - 'nonce': nonce, - }, query)); - const signature = this.hmac (this.encode (body), this.encode (this.secret), 'sha512', 'base64'); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': signature, - }; - } else if (api === 'public') { - url += '/' + this.implodeParams (path, params); - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - url += '/' + this.implodeParams (path, params); - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - if (Object.keys (query).length) { - body = this.json (query); - headers = { - 'Content-Type': 'application/json', - }; - } - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - if ('success' in response) { - // - // 1 - Liqui only returns the integer 'success' key from their private API - // - // { "success": 1, ... } httpCode === 200 - // { "success": 0, ... } httpCode === 200 - // - // 2 - However, exchanges derived from Liqui, can return non-integers - // - // It can be a numeric string - // { "sucesss": "1", ... } - // { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc) - // - // Or just a string - // { "success": "true", ... } - // { "success": "false", ... }, httpCode >= 200 - // - // Or a boolean - // { "success": true, ... } - // { "success": false, ... }, httpCode >= 200 - // - // 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types - // - // 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui - // - // To cover points 1, 2, 3 and 4 combined this handler should work like this: - // - let success = this.safeValue (response, 'success', false); - if (typeof success === 'string') { - if ((success === 'true') || (success === '1')) { - success = true; - } else { - success = false; - } - } - if (!success) { - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'error'); - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],80:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],78:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -64775,7 +63112,7 @@ module.exports = class equos extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeVol'), + 'min': this.safeNumber (market, 'minTradeVol'), 'max': undefined, }, 'price': { @@ -64841,7 +63178,7 @@ module.exports = class equos extends Exchange { const name = this.safeString (currency, 6); const status = this.safeInteger (currency, 4); const active = (status === 1); - const fee = this.safeFloat (currency, 5); // withdraw_fee + const fee = this.safeNumber (currency, 5); // withdraw_fee return { 'id': id, 'info': currency, @@ -64933,8 +63270,8 @@ module.exports = class equos extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); return [ this.convertFromScale (price, market['precision']['price']), this.convertFromScale (amount, market['precision']['amount']), @@ -65080,9 +63417,9 @@ module.exports = class equos extends Exchange { orderId = this.safeString (trade, 'orderId'); side = this.safeStringLower (trade, 'side'); type = this.parseOrderType (this.safeString (trade, 'ordType')); - price = this.safeFloat (trade, 'lastPx'); - amount = this.safeFloat (trade, 'quoteQty'); - let feeCost = this.safeFloat (trade, 'commission'); + price = this.safeNumber (trade, 'lastPx'); + amount = this.safeNumber (trade, 'quoteQty'); + let feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { feeCost = -feeCost; const feeCurrencyId = this.safeString (trade, 'commCurrency'); @@ -65153,8 +63490,8 @@ module.exports = class equos extends Exchange { if (assetType === 'ASSET') { const currencyId = this.safeString (position, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const quantity = this.safeFloat (position, 'quantity'); - const availableQuantity = this.safeFloat (position, 'availableQuantity'); + const quantity = this.safeNumber (position, 'quantity'); + const availableQuantity = this.safeNumber (position, 'availableQuantity'); const scale = this.safeInteger (position, 'quantity_scale'); const account = this.account (); account['free'] = this.convertFromScale (availableQuantity, scale); @@ -65200,7 +63537,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -65297,7 +63634,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -65670,7 +64007,7 @@ module.exports = class equos extends Exchange { address = undefined; } const type = this.safeString (transaction, 'type'); - let amount = this.safeFloat (transaction, 'balance_change'); + let amount = this.safeNumber (transaction, 'balance_change'); if (amount === undefined) { amount = this.safeInteger (transaction, 'quantity'); const amountScale = this.safeInteger (transaction, 'quantity_scale'); @@ -65753,8 +64090,8 @@ module.exports = class equos extends Exchange { for (let i = 0; i < tradingFees.length; i++) { const tradingFee = tradingFees[i]; if (this.safeString (tradingFee, 'tier') !== undefined) { - taker[tradingFee['tier']] = this.safeFloat (tradingFee, 'taker'); - maker[tradingFee['tier']] = this.safeFloat (tradingFee, 'maker'); + taker[tradingFee['tier']] = this.safeNumber (tradingFee, 'taker'); + maker[tradingFee['tier']] = this.safeNumber (tradingFee, 'maker'); } } return { @@ -65885,28 +64222,6 @@ module.exports = class equos extends Exchange { let remaining = this.safeInteger (order, 'leavesQty'); const remainingScale = this.safeInteger (order, 'leavesQty_scale'); remaining = this.convertFromScale (remaining, remainingScale); - if (remaining <= 0) { - if ((filled !== undefined) && (amount !== undefined) && (filled < amount)) { - remaining = undefined; - } - } - if ((remaining === undefined) && (amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0); - } - let average = this.safeInteger (order, 'price', 0); - if (average === 0) { - average = undefined; - } - const averageScale = this.safeInteger (order, 'price_scale'); - average = this.convertFromScale (average, averageScale); - let cost = undefined; - if (filled !== 0) { - if (average > 0) { - cost = average * filled; - } else if (price > 0) { - cost = price * filled; - } - } let fee = undefined; const currencyId = this.safeInteger (order, 'feeInstrumentId'); const feeCurrencyCode = this.safeCurrencyCode (currencyId); @@ -65929,7 +64244,7 @@ module.exports = class equos extends Exchange { } const stopPriceScale = this.safeInteger (order, 'stopPx_scale', 0); const stopPrice = this.convertFromScale (this.safeInteger (order, 'stopPx'), stopPriceScale); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -65944,14 +64259,14 @@ module.exports = class equos extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -66101,7 +64416,7 @@ module.exports = class equos extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],81:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],79:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -66109,6 +64424,7 @@ module.exports = class equos extends Exchange { const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, InvalidOrder, ExchangeError, BadRequest, BadSymbol } = require ('./base/errors'); const { TRUNCATE, SIGNIFICANT_DIGITS } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -66321,7 +64637,7 @@ module.exports = class eterbase extends Exchange { const rule = rules[i]; const attribute = this.safeString (rule, 'attribute'); const condition = this.safeString (rule, 'condition'); - const value = this.safeFloat (rule, 'value'); + const value = this.safeNumber (rule, 'value'); if ((attribute === 'Qty') && (condition === 'Min')) { minAmount = value; } else if ((attribute === 'Qty') && (condition === 'Max')) { @@ -66411,7 +64727,7 @@ module.exports = class eterbase extends Exchange { 'type': type, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -66427,8 +64743,8 @@ module.exports = class eterbase extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMin'), - 'max': this.safeFloat (currency, 'withdrawalMax'), + 'min': this.safeNumber (currency, 'withdrawalMin'), + 'max': this.safeNumber (currency, 'withdrawalMax'), }, }, }; @@ -66455,17 +64771,17 @@ module.exports = class eterbase extends Exchange { const marketId = this.safeString (ticker, 'marketId'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const last = this.safeFloat (ticker, 'price'); - const baseVolume = this.safeFloat (ticker, 'volumeBase'); - const quoteVolume = this.safeFloat (ticker, 'volume'); + const last = this.safeNumber (ticker, 'price'); + const baseVolume = this.safeNumber (ticker, 'volumeBase'); + const quoteVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const percentage = this.safeFloat (ticker, 'change'); + const percentage = this.safeNumber (ticker, 'change'); const result = { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -66507,14 +64823,6 @@ module.exports = class eterbase extends Exchange { return this.parseTicker (response, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { @@ -66569,10 +64877,12 @@ module.exports = class eterbase extends Exchange { // "filledAt": 1556355722341 // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -66581,9 +64891,9 @@ module.exports = class eterbase extends Exchange { 'currency': feeCurrencyCode, }; } - let cost = this.safeFloat (trade, 'qty'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + let cost = this.safeNumber (trade, 'qty'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger2 (trade, 'executedAt', 'filledAt'); const tradeSide = this.safeString (trade, 'side'); @@ -66681,11 +64991,11 @@ module.exports = class eterbase extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -66748,14 +65058,13 @@ module.exports = class eterbase extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetId'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'reserved'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -66882,18 +65191,18 @@ module.exports = class eterbase extends Exchange { } else { type = 'stoplimit'; } - let price = this.safeFloat (order, 'limitPrice'); - const amount = this.safeFloat (order, 'qty'); - let remaining = this.safeFloat (order, 'remainingQty'); + let price = this.safeNumber (order, 'limitPrice'); + const amount = this.safeNumber (order, 'qty'); + let remaining = this.safeNumber (order, 'remainingQty'); let filled = undefined; - const remainingCost = this.safeFloat (order, 'remainingCost'); + const remainingCost = this.safeNumber (order, 'remainingCost'); if ((remainingCost !== undefined) && (remainingCost === 0.0)) { remaining = 0; } if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); } - const cost = this.safeFloat (order, 'cost'); + const cost = this.safeNumber (order, 'cost'); if (type === 'market') { if (price === 0.0) { if ((cost !== undefined) && (filled !== undefined)) { @@ -66910,7 +65219,7 @@ module.exports = class eterbase extends Exchange { } } const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -67083,7 +65392,7 @@ module.exports = class eterbase extends Exchange { } if ((uppercaseType === 'MARKET') && (uppercaseSide === 'BUY')) { // for market buy it requires the amount of quote currency to spend - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); if (this.options['createMarketBuyOrderRequiresPrice']) { if (cost === undefined) { if (price !== undefined) { @@ -67246,7 +65555,7 @@ module.exports = class eterbase extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],82:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],80:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -67361,6 +65670,7 @@ module.exports = class exmo extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.2 / 100, @@ -67830,18 +66140,18 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = marketId.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const maxAmount = this.safeFloat (limit, 'max_q'); - const maxPrice = this.safeFloat (limit, 'max_p'); - const maxCost = this.safeFloat (limit, 'max_a'); - const minAmount = this.safeFloat (limit, 'min_q'); - const minPrice = this.safeFloat (limit, 'min_p'); - const minCost = this.safeFloat (limit, 'min_a'); - minAmounts[base] = Math.min (this.safeFloat (minAmounts, base, minAmount), minAmount); - maxAmounts[base] = Math.max (this.safeFloat (maxAmounts, base, maxAmount), maxAmount); - minPrices[quote] = Math.min (this.safeFloat (minPrices, quote, minPrice), minPrice); - minCosts[quote] = Math.min (this.safeFloat (minCosts, quote, minCost), minCost); - maxPrices[quote] = Math.max (this.safeFloat (maxPrices, quote, maxPrice), maxPrice); - maxCosts[quote] = Math.max (this.safeFloat (maxCosts, quote, maxCost), maxCost); + const maxAmount = this.safeNumber (limit, 'max_q'); + const maxPrice = this.safeNumber (limit, 'max_p'); + const maxCost = this.safeNumber (limit, 'max_a'); + const minAmount = this.safeNumber (limit, 'min_q'); + const minPrice = this.safeNumber (limit, 'min_p'); + const minCost = this.safeNumber (limit, 'min_a'); + minAmounts[base] = Math.min (this.safeNumber (minAmounts, base, minAmount), minAmount); + maxAmounts[base] = Math.max (this.safeNumber (maxAmounts, base, maxAmount), maxAmount); + minPrices[quote] = Math.min (this.safeNumber (minPrices, quote, minPrice), minPrice); + minCosts[quote] = Math.min (this.safeNumber (minCosts, quote, minCost), minCost); + maxPrices[quote] = Math.max (this.safeNumber (maxPrices, quote, maxPrice), maxPrice); + maxCosts[quote] = Math.max (this.safeNumber (maxCosts, quote, maxCost), maxCost); } const result = {}; for (let i = 0; i < ids.length; i++) { @@ -67858,16 +66168,16 @@ module.exports = class exmo extends Exchange { 'precision': 8, 'limits': { 'amount': { - 'min': this.safeFloat (minAmounts, code), - 'max': this.safeFloat (maxAmounts, code), + 'min': this.safeNumber (minAmounts, code), + 'max': this.safeNumber (maxAmounts, code), }, 'price': { - 'min': this.safeFloat (minPrices, code), - 'max': this.safeFloat (maxPrices, code), + 'min': this.safeNumber (minPrices, code), + 'max': this.safeNumber (maxPrices, code), }, 'cost': { - 'min': this.safeFloat (minCosts, code), - 'max': this.safeFloat (maxCosts, code), + 'min': this.safeNumber (minCosts, code), + 'max': this.safeNumber (maxCosts, code), }, }, 'info': id, @@ -67902,8 +66212,8 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = symbol.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const taker = this.safeFloat (market, 'commission_taker_percent'); - const maker = this.safeFloat (market, 'commission_maker_percent'); + const taker = this.safeNumber (market, 'commission_taker_percent'); + const maker = this.safeNumber (market, 'commission_maker_percent'); result.push ({ 'id': id, 'symbol': symbol, @@ -67916,16 +66226,16 @@ module.exports = class exmo extends Exchange { 'maker': maker / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, }, 'precision': { @@ -67998,11 +66308,11 @@ module.exports = class exmo extends Exchange { // return [ this.safeInteger (ohlcv, 't'), - this.safeFloat (ohlcv, 'o'), - this.safeFloat (ohlcv, 'h'), - this.safeFloat (ohlcv, 'l'), - this.safeFloat (ohlcv, 'c'), - this.safeFloat (ohlcv, 'v'), + this.safeNumber (ohlcv, 'o'), + this.safeNumber (ohlcv, 'h'), + this.safeNumber (ohlcv, 'l'), + this.safeNumber (ohlcv, 'c'), + this.safeNumber (ohlcv, 'v'), ]; } @@ -68018,14 +66328,14 @@ module.exports = class exmo extends Exchange { const currencyId = this.currencyId (code); const account = this.account (); if (currencyId in free) { - account['free'] = this.safeFloat (free, currencyId); + account['free'] = this.safeString (free, currencyId); } if (currencyId in used) { - account['used'] = this.safeFloat (used, currencyId); + account['used'] = this.safeString (used, currencyId); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -68083,16 +66393,16 @@ module.exports = class exmo extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -68101,9 +66411,9 @@ module.exports = class exmo extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_curr'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'vol_curr'), 'info': ticker, }; } @@ -68164,9 +66474,9 @@ module.exports = class exmo extends Exchange { let symbol = undefined; const id = this.safeString (trade, 'trade_id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'quantity'); + const cost = this.safeNumber (trade, 'amount'); const side = this.safeString (trade, 'type'); const type = undefined; const marketId = this.safeString (trade, 'pair'); @@ -68185,11 +66495,11 @@ module.exports = class exmo extends Exchange { } const takerOrMaker = this.safeString (trade, 'exec_type'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission_amount'); + const feeCost = this.safeNumber (trade, 'commission_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commission_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (trade, 'commission_percent'); + let feeRate = this.safeNumber (trade, 'commission_percent'); if (feeRate !== undefined) { feeRate /= 1000; } @@ -68488,13 +66798,13 @@ module.exports = class exmo extends Exchange { market = this.markets_by_id[marketId]; } } - let amount = this.safeFloat (order, 'quantity'); + let amount = this.safeNumber (order, 'quantity'); if (amount === undefined) { const amountField = (side === 'buy') ? 'in_amount' : 'out_amount'; - amount = this.safeFloat (order, amountField); + amount = this.safeNumber (order, amountField); } - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'amount'); + let price = this.safeNumber (order, 'price'); + let cost = this.safeNumber (order, 'amount'); let filled = 0.0; const trades = []; const transactions = this.safeValue (order, 'trades', []); @@ -68615,24 +66925,6 @@ module.exports = class exmo extends Exchange { return undefined; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -68677,7 +66969,7 @@ module.exports = class exmo extends Exchange { // } // const timestamp = this.safeTimestamp (transaction, 'dt'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -68707,7 +66999,7 @@ module.exports = class exmo extends Exchange { // fixed funding fees only (for now) if (!this.fees['funding']['percentage']) { const key = (type === 'withdrawal') ? 'withdraw' : 'deposit'; - let feeCost = this.safeFloat (this.options['fundingFees'][key], code); + let feeCost = this.safeNumber (this.options['fundingFees'][key], code); // users don't pay for cashbacks, no fees for that const provider = this.safeString (transaction, 'provider'); if (provider === 'cashback') { @@ -68854,13 +67146,14 @@ module.exports = class exmo extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],83:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],81:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ExchangeNotAvailable, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -69005,26 +67298,26 @@ module.exports = class exx extends Exchange { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); ticker = ticker['ticker']; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'riseRate'), + 'change': this.safeNumber (ticker, 'riseRate'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -69074,14 +67367,11 @@ module.exports = class exx extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -69126,14 +67416,13 @@ module.exports = class exx extends Exchange { const currencyId = currencies[i]; const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'balance'), - 'used': this.safeFloat (balance, 'freeze'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -69153,11 +67442,10 @@ module.exports = class exx extends Exchange { // const symbol = market['symbol']; const timestamp = parseInt (order['trade_date']); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'trade_money'); - const amount = this.safeFloat (order, 'total_amount'); - const filled = this.safeFloat (order, 'trade_amount', 0.0); - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'trade_money'); + const amount = this.safeNumber (order, 'total_amount'); + const filled = this.safeNumber (order, 'trade_amount', 0.0); let status = this.safeInteger (order, 'status'); if (status === 1) { status = 'canceled'; @@ -69169,11 +67457,11 @@ module.exports = class exx extends Exchange { let fee = undefined; if ('fees' in order) { fee = { - 'cost': this.safeFloat (order, 'fees'), + 'cost': this.safeNumber (order, 'fees'), 'currency': market['quote'], }; } - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -69190,12 +67478,12 @@ module.exports = class exx extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -69320,13 +67608,14 @@ module.exports = class exx extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],84:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],82:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, ArgumentsRequired, InsufficientFunds, InvalidOrder, RateLimitExceeded, InvalidNonce, AuthenticationError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -69546,8 +67835,8 @@ module.exports = class fcoin extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'limit_amount_min'), - 'max': this.safeFloat (market, 'limit_amount_max'), + 'min': this.safeNumber (market, 'limit_amount_min'), + 'max': this.safeNumber (market, 'limit_amount_max'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -69642,12 +67931,12 @@ module.exports = class fcoin extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidsAsks (orders, priceKey = 0, amountKey = 1) { @@ -69660,8 +67949,8 @@ module.exports = class fcoin extends Exchange { const priceField = this.sum (index, priceKey); const amountField = this.sum (index, amountKey); result.push ([ - this.safeFloat (orders, priceField), - this.safeFloat (orders, amountField), + this.safeNumber (orders, priceField), + this.safeNumber (orders, amountField), ]); } return result; @@ -69709,17 +67998,17 @@ module.exports = class fcoin extends Exchange { } } const values = ticker['ticker']; - const last = this.safeFloat (values, 0); + const last = this.safeNumber (values, 0); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (values, 7), - 'low': this.safeFloat (values, 8), - 'bid': this.safeFloat (values, 2), - 'bidVolume': this.safeFloat (values, 3), - 'ask': this.safeFloat (values, 4), - 'askVolume': this.safeFloat (values, 5), + 'high': this.safeNumber (values, 7), + 'low': this.safeNumber (values, 8), + 'bid': this.safeNumber (values, 2), + 'bidVolume': this.safeNumber (values, 3), + 'ask': this.safeNumber (values, 4), + 'askVolume': this.safeNumber (values, 5), 'vwap': undefined, 'open': undefined, 'close': last, @@ -69728,8 +68017,8 @@ module.exports = class fcoin extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (values, 9), - 'quoteVolume': this.safeFloat (values, 10), + 'baseVolume': this.safeNumber (values, 9), + 'quoteVolume': this.safeNumber (values, 10), 'info': ticker, }; } @@ -69742,14 +68031,11 @@ module.exports = class fcoin extends Exchange { const timestamp = this.safeInteger (trade, 'ts'); const side = this.safeStringLower (trade, 'side'); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = undefined; return { 'id': id, @@ -69874,38 +68160,25 @@ module.exports = class fcoin extends Exchange { const symbol = market['symbol']; const orderType = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'created_at'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'executed_value'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'executed_value'); let feeCurrency = undefined; let feeCost = undefined; - const feeRebate = this.safeFloat (order, 'fees_income'); + const feeRebate = this.safeNumber (order, 'fees_income'); if ((feeRebate !== undefined) && (feeRebate > 0)) { if (market !== undefined) { feeCurrency = (side === 'buy') ? market['quote'] : market['base']; } feeCost = -feeRebate; } else { - feeCost = this.safeFloat (order, 'fill_fees'); + feeCost = this.safeNumber (order, 'fill_fees'); if (market !== undefined) { feeCurrency = (side === 'buy') ? market['base'] : market['quote']; } } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -69921,7 +68194,7 @@ module.exports = class fcoin extends Exchange { 'stopPrice': undefined, 'cost': cost, 'amount': amount, - 'remaining': remaining, + 'remaining': undefined, 'filled': filled, 'average': undefined, 'status': status, @@ -69930,7 +68203,7 @@ module.exports = class fcoin extends Exchange { 'currency': feeCurrency, }, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -69972,11 +68245,11 @@ module.exports = class fcoin extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_vol'), ]; } @@ -70065,7 +68338,7 @@ module.exports = class fcoin extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],85:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],83:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -70091,13 +68364,14 @@ module.exports = class fcoinjp extends fcoin { } }; -},{"./fcoin.js":84}],86:[function(require,module,exports){ +},{"./fcoin.js":82}],84:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70225,11 +68499,11 @@ module.exports = class flowbtc extends Exchange { const currencyId = balance['name']; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['total'] = this.safeFloat (balance, 'hold'); + account['free'] = this.safeString (balance, 'balance'); + account['total'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -70250,16 +68524,16 @@ module.exports = class flowbtc extends Exchange { }; const ticker = await this.publicPostGetTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -70269,8 +68543,8 @@ module.exports = class flowbtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume24hr'), - 'quoteVolume': this.safeFloat (ticker, 'volume24hrProduct2'), + 'baseVolume': this.safeNumber (ticker, 'volume24hr'), + 'quoteVolume': this.safeNumber (ticker, 'volume24hrProduct2'), 'info': ticker, }; } @@ -70279,14 +68553,11 @@ module.exports = class flowbtc extends Exchange { const timestamp = this.safeTimestamp (trade, 'unixtime'); const side = (trade['incomingOrderSide'] === 0) ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'px'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'px'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'timestamp': timestamp, @@ -70377,13 +68648,14 @@ module.exports = class flowbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],87:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],85:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70469,11 +68741,11 @@ module.exports = class foxbit extends Exchange { // otherwise we will lose the info if the currency balance has been funded or traded or not if (currencyId in balances) { const account = this.account (); - let used = this.safeFloat (balances, currencyId + '_locked'); + let used = this.safeNumber (balances, currencyId + '_locked'); if (used !== undefined) { used *= 1e-8; } - let total = this.safeFloat (balances, currencyId); + let total = this.safeNumber (balances, currencyId); if (total !== undefined) { total *= 1e-8; } @@ -70508,16 +68780,16 @@ module.exports = class foxbit extends Exchange { const timestamp = this.milliseconds (); const lowercaseQuote = market['quote'].toLowerCase (); const quoteVolume = 'vol_' + lowercaseQuote; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -70527,8 +68799,8 @@ module.exports = class foxbit extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -70541,14 +68813,11 @@ module.exports = class foxbit extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -70642,14 +68911,15 @@ module.exports = class foxbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],88:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],86:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending } = require ('./base/errors'); +const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending, ArgumentsRequired, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -70888,6 +69158,7 @@ module.exports = class ftx extends Exchange { 'An unexpected error occurred': ExchangeNotAvailable, // {"error":"An unexpected error occurred, please try again later (58BC21C795).","success":false} 'Please retry request': ExchangeNotAvailable, // {"error":"Please retry request","success":false} 'Please try again': ExchangeNotAvailable, // {"error":"Please try again","success":false} + 'Only have permissions for subaccount': PermissionDenied, // {"success":false,"error":"Only have permissions for subaccount *sub_name*"} }, }, 'precisionMode': TICK_SIZE, @@ -71011,8 +69282,8 @@ module.exports = class ftx extends Exchange { // check if a market is a spot or future market const symbol = (type === 'future') ? this.safeString (market, 'name') : (base + '/' + quote); const active = this.safeValue (market, 'enabled'); - const sizeIncrement = this.safeFloat (market, 'sizeIncrement'); - const priceIncrement = this.safeFloat (market, 'priceIncrement'); + const sizeIncrement = this.safeNumber (market, 'sizeIncrement'); + const priceIncrement = this.safeNumber (market, 'priceIncrement'); const precision = { 'amount': sizeIncrement, 'price': priceIncrement, @@ -71090,28 +69361,28 @@ module.exports = class ftx extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); const timestamp = this.safeTimestamp (ticker, 'time', this.milliseconds ()); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'change24h'), + 'percentage': this.safeNumber (ticker, 'change24h'), 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24h'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24h'), 'info': ticker, }; } @@ -71151,14 +69422,6 @@ module.exports = class ftx extends Exchange { return this.parseTicker (result, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetMarkets (params); @@ -71237,11 +69500,11 @@ module.exports = class ftx extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -71362,6 +69625,45 @@ module.exports = class ftx extends Exchange { // "type": "otc" // } // + // with -ve fee + // { + // "id": 1171258927, + // "fee": -0.0000713875, + // "side": "sell", + // "size": 1, + // "time": "2021-03-11T13:34:35.523627+00:00", + // "type": "order", + // "price": 14.2775, + // "future": null, + // "market": "SOL/USD", + // "feeRate": -0.000005, + // "orderId": 33182929044, + // "tradeId": 582936801, + // "liquidity": "maker", + // "feeCurrency": "USD", + // "baseCurrency": "SOL", + // "quoteCurrency": "USD" + // } + // + // // from OTC order + // { + // "id": 1172129651, + // "fee": 0, + // "side": "sell", + // "size": 1.47568846, + // "time": "2021-03-11T15:04:46.893383+00:00", + // "type": "otc", + // "price": 14.60932598, + // "future": null, + // "market": null, + // "feeRate": 0, + // "orderId": null, + // "tradeId": null, + // "liquidity": "taker", + // "feeCurrency": "USD", + // "baseCurrency": "BCHA", + // "quoteCurrency": "USD" + // } const id = this.safeString (trade, 'id'); const takerOrMaker = this.safeString (trade, 'liquidity'); const marketId = this.safeString (trade, 'market'); @@ -71379,25 +69681,24 @@ module.exports = class ftx extends Exchange { } } const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } const orderId = this.safeString (trade, 'orderId'); @@ -71503,8 +69804,8 @@ module.exports = class ftx extends Exchange { const result = this.safeValue (response, 'result', {}); return { 'info': response, - 'maker': this.safeFloat (result, 'makerFee'), - 'taker': this.safeFloat (result, 'takerFee'), + 'maker': this.safeNumber (result, 'makerFee'), + 'taker': this.safeNumber (result, 'takerFee'), }; } @@ -71531,11 +69832,11 @@ module.exports = class ftx extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'coin')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -71658,9 +69959,9 @@ module.exports = class ftx extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); let status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filledSize'); - let remaining = this.safeFloat (order, 'remainingSize'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filledSize'); + let remaining = this.safeNumber (order, 'remainingSize'); if ((remaining === 0.0) && (amount !== undefined) && (filled !== undefined)) { remaining = Math.max (amount - filled, 0); if (remaining > 0) { @@ -71684,15 +69985,15 @@ module.exports = class ftx extends Exchange { } const side = this.safeString (order, 'side'); const type = this.safeString (order, 'type'); - const average = this.safeFloat (order, 'avgFillPrice'); - const price = this.safeFloat2 (order, 'price', 'triggerPrice', average); + const average = this.safeNumber (order, 'avgFillPrice'); + const price = this.safeNumber2 (order, 'price', 'triggerPrice', average); let cost = undefined; if (filled !== undefined && price !== undefined) { cost = filled * price; } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'triggeredAt')); const clientOrderId = this.safeString (order, 'clientId'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -71738,22 +70039,28 @@ module.exports = class ftx extends Exchange { request['clientId'] = clientOrderId; params = this.omit (params, [ 'clientId', 'clientOrderId' ]); } - let priceToPrecision = undefined; - if (price !== undefined) { - priceToPrecision = parseFloat (this.priceToPrecision (symbol, price)); - } - let method = 'privatePostConditionalOrders'; + let method = undefined; if (type === 'limit') { method = 'privatePostOrders'; - request['price'] = priceToPrecision; + request['price'] = parseFloat (this.priceToPrecision (symbol, price)); } else if (type === 'market') { method = 'privatePostOrders'; request['price'] = null; } else if ((type === 'stop') || (type === 'takeProfit')) { - request['triggerPrice'] = priceToPrecision; - // request['orderPrice'] = number; // optional, order type is limit if this is specified, otherwise market + method = 'privatePostConditionalOrders'; + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerPrice'); + if (stopPrice === undefined) { + throw new ArgumentsRequired (this.id + ' createOrder () requires a stopPrice parameter or a triggerPrice parameter for ' + type + ' orders'); + } else { + params = this.omit (params, [ 'stopPrice', 'triggerPrice' ]); + request['triggerPrice'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + } + if (price !== undefined) { + request['orderPrice'] = parseFloat (this.priceToPrecision (symbol, price)); // optional, order type is limit if this is specified, otherwise market + } } else if (type === 'trailingStop') { - request['trailValue'] = priceToPrecision; // negative for "sell", positive for "buy" + method = 'privatePostConditionalOrders'; + request['trailValue'] = parseFloat (this.priceToPrecision (symbol, price)); // negative for "sell", positive for "buy" } else { throw new InvalidOrder (this.id + ' createOrder () does not support order type ' + type + ', only limit, market, stop, trailingStop, or takeProfit orders are supported'); } @@ -71819,9 +70126,9 @@ module.exports = class ftx extends Exchange { const request = {}; let method = undefined; const clientOrderId = this.safeString2 (params, 'client_order_id', 'clientOrderId'); - const triggerPrice = this.safeFloat (params, 'triggerPrice'); - const orderPrice = this.safeFloat (params, 'orderPrice'); - const trailValue = this.safeFloat (params, 'trailValue'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); + const orderPrice = this.safeNumber (params, 'orderPrice'); + const trailValue = this.safeNumber (params, 'trailValue'); params = this.omit (params, [ 'client_order_id', 'clientOrderId', 'triggerPrice', 'orderPrice', 'trailValue' ]); const triggerPriceIsDefined = (triggerPrice !== undefined); const orderPriceIsDefined = (orderPrice !== undefined); @@ -72184,7 +70491,7 @@ module.exports = class ftx extends Exchange { return this.parseTransaction (result, currency); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetAccount (params); // @@ -72317,7 +70624,7 @@ module.exports = class ftx extends Exchange { // const code = this.safeCurrencyCode (this.safeString (transaction, 'coin')); const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'size'); + const amount = this.safeNumber (transaction, 'size'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const txid = this.safeString (transaction, 'txid'); @@ -72334,7 +70641,7 @@ module.exports = class ftx extends Exchange { address = notes.slice (12); } } - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -72469,13 +70776,14 @@ module.exports = class ftx extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],89:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],87:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, ArgumentsRequired, InvalidAddress, OrderNotFound, NotSupported, DDoSProtection, InsufficientFunds, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -72636,9 +70944,12 @@ module.exports = class gateio extends Exchange { }, }, 'commonCurrencies': { + '88MPH': 'MPH', + 'BIFI': 'Bitcoin File', 'BOX': 'DefiBox', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', + 'MPH': 'Morpher', // conflict with 88MPH 'SBTC': 'Super Bitcoin', 'TNC': 'Trinity Network Credit', }, @@ -72685,9 +70996,9 @@ module.exports = class gateio extends Exchange { const currency = coin[id]; const code = this.safeCurrencyCode (id); const delisted = this.safeValue (currency, 'delisted', 0); - const withdrawDisabled = this.safeValue (currency, 'withdraw_disabled', 0); - const depositDisabled = this.safeValue (currency, 'deposit_disabled', 0); - const tradeDisabled = this.safeValue (currency, 'trade_disabled', 0); + const withdrawDisabled = this.safeInteger2 (currency, 'withdraw_disabled', 0); + const depositDisabled = this.safeInteger2 (currency, 'deposit_disabled', 0); + const tradeDisabled = this.safeInteger2 (currency, 'trade_disabled', 0); const listed = (delisted === 0); const withdrawEnabled = (withdrawDisabled === 0); const depositEnabled = (depositDisabled === 0); @@ -72776,7 +71087,7 @@ module.exports = class gateio extends Exchange { 'price': this.safeInteger (details, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (details, 'min_amount'), + 'min': this.safeNumber (details, 'min_amount'), 'max': undefined, }; const priceLimits = { @@ -72784,7 +71095,7 @@ module.exports = class gateio extends Exchange { 'max': undefined, }; const defaultCost = amountLimits['min'] * priceLimits['min']; - const minCost = this.safeFloat (this.options['limits']['cost']['min'], quote, defaultCost); + const minCost = this.safeNumber (this.options['limits']['cost']['min'], quote, defaultCost); const costLimits = { 'min': minCost, 'max': undefined, @@ -72794,10 +71105,10 @@ module.exports = class gateio extends Exchange { 'price': priceLimits, 'cost': costLimits, }; - const disabled = this.safeValue (details, 'trade_disabled'); + const disabled = this.safeInteger (details, 'trade_disabled'); const active = !disabled; const uppercaseId = id.toUpperCase (); - const fee = this.safeFloat (details, 'fee'); + const fee = this.safeNumber (details, 'fee'); result.push ({ 'id': id, 'uppercaseId': uppercaseId, @@ -72831,11 +71142,11 @@ module.exports = class gateio extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (available, currencyId); - account['used'] = this.safeFloat (locked, currencyId); + account['free'] = this.safeString (available, currencyId); + account['used'] = this.safeString (locked, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -72851,11 +71162,11 @@ module.exports = class gateio extends Exchange { // they return [ Timestamp, Volume, Close, High, Low, Open ] return [ this.safeInteger (ohlcv, 0), // t - this.safeFloat (ohlcv, 5), // o - this.safeFloat (ohlcv, 3), // h - this.safeFloat (ohlcv, 4), // l - this.safeFloat (ohlcv, 2), // c - this.safeFloat (ohlcv, 1), // v + this.safeNumber (ohlcv, 5), // o + this.safeNumber (ohlcv, 3), // h + this.safeNumber (ohlcv, 4), // l + this.safeNumber (ohlcv, 2), // c + this.safeNumber (ohlcv, 1), // v ]; } @@ -72867,11 +71178,11 @@ module.exports = class gateio extends Exchange { 'group_sec': this.timeframes[timeframe], }; // max limit = 1001 - if (limit !== undefined) { - const periodDurationInSeconds = this.parseTimeframe (timeframe); - const hours = parseInt ((periodDurationInSeconds * limit) / 3600); - request['range_hour'] = Math.max (0, hours - 1); - } + // if (limit !== undefined) { + // const periodDurationInSeconds = this.parseTimeframe (timeframe); + // const hours = parseInt ((periodDurationInSeconds * limit) / 3600); + // request['range_hour'] = Math.max (1, hours - 1); + // } const response = await this.publicGetCandlestick2Id (this.extend (request, params)); // // { @@ -72895,8 +71206,8 @@ module.exports = class gateio extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'percentChange'); let open = undefined; let change = undefined; let average = undefined; @@ -72906,17 +71217,17 @@ module.exports = class gateio extends Exchange { change = last - open; average = this.sum (last, open) / 2; } - open = this.safeFloat (ticker, 'open', open); - change = this.safeFloat (ticker, 'change', change); + open = this.safeNumber (ticker, 'open', open); + change = this.safeNumber (ticker, 'change', change); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high24hr', 'high'), - 'low': this.safeFloat2 (ticker, 'low24hr', 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber2 (ticker, 'high24hr', 'high'), + 'low': this.safeNumber2 (ticker, 'low24hr', 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -72926,8 +71237,8 @@ module.exports = class gateio extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), // gateio has them reversed - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), // gateio has them reversed + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -72973,27 +71284,24 @@ module.exports = class gateio extends Exchange { const id = this.safeString2 (trade, 'tradeID', 'id'); // take either of orderid or orderId const orderId = this.safeString2 (trade, 'orderid', 'orderNumber'); - const price = this.safeFloat2 (trade, 'rate', 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString2 (trade, 'rate', 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'role'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } let fee = undefined; let feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee_coin')); - let feeCost = this.safeFloat (trade, 'point_fee'); + let feeCost = this.safeNumber (trade, 'point_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'gt_fee'); + feeCost = this.safeNumber (trade, 'gt_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'fee'); + feeCost = this.safeNumber (trade, 'fee'); } else { feeCurrency = this.safeCurrencyCode ('GT'); } @@ -73137,23 +71445,20 @@ module.exports = class gateio extends Exchange { } else if (side === '2') { side = 'buy'; } - const price = this.safeFloat2 (order, 'initialRate', 'rate'); - const average = this.safeFloat (order, 'filledRate'); - const amount = this.safeFloat2 (order, 'initialAmount', 'amount'); - const filled = this.safeFloat (order, 'filledAmount'); + const price = this.safeNumber2 (order, 'initialRate', 'rate'); + const average = this.safeNumber (order, 'filledRate'); + const amount = this.safeNumber2 (order, 'initialAmount', 'amount'); + const filled = this.safeNumber (order, 'filledAmount'); // In the order status response, this field has a different name. - let remaining = this.safeFloat2 (order, 'leftAmount', 'left'); - if (remaining === undefined) { - remaining = amount - filled; - } - const feeCost = this.safeFloat (order, 'feeValue'); + const remaining = this.safeNumber2 (order, 'leftAmount', 'left'); + const feeCost = this.safeNumber (order, 'feeValue'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (order, 'feePercentage'); + let feeRate = this.safeNumber (order, 'feePercentage'); if (feeRate !== undefined) { feeRate = feeRate / 100; } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -73179,7 +71484,7 @@ module.exports = class gateio extends Exchange { 'rate': feeRate, }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -73370,7 +71675,7 @@ module.exports = class gateio extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'txid'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); if (address === 'false') { address = undefined; @@ -73378,7 +71683,7 @@ module.exports = class gateio extends Exchange { const timestamp = this.safeTimestamp (transaction, 'timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.parseTransactionType (id[0]); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -73467,7 +71772,7 @@ module.exports = class gateio extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],90:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],88:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -73475,6 +71780,7 @@ module.exports = class gateio extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidOrder, InvalidNonce, InsufficientFunds, AuthenticationError, PermissionDenied, NotSupported, OnMaintenance, RateLimitExceeded, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -73691,16 +71997,16 @@ module.exports = class gemini extends Exchange { // const base = this.safeCurrencyCode (baseId); const minAmountString = cells[1].replace ('', ''); const minAmountParts = minAmountString.split (' '); - const minAmount = this.safeFloat (minAmountParts, 0); + const minAmount = this.safeNumber (minAmountParts, 0); const amountPrecisionString = cells[2].replace ('', ''); const amountPrecisionParts = amountPrecisionString.split (' '); - const amountPrecision = this.safeFloat (amountPrecisionParts, 0); + const amountPrecision = this.safeNumber (amountPrecisionParts, 0); const idLength = marketId.length - 0; const quoteId = marketId.slice (idLength - 3, idLength); const quote = this.safeCurrencyCode (quoteId); const pricePrecisionString = cells[3].replace ('', ''); const pricePrecisionParts = pricePrecisionString.split (' '); - const pricePrecision = this.safeFloat (pricePrecisionParts, 0); + const pricePrecision = this.safeNumber (pricePrecisionParts, 0); const baseId = marketId.replace (quoteId, ''); const base = this.safeCurrencyCode (baseId); const symbol = base + '/' + quote; @@ -73928,11 +72234,11 @@ module.exports = class gemini extends Exchange { base = market['base']; quote = market['quote']; } - const price = this.safeFloat (ticker, 'price'); - const last = this.safeFloat2 (ticker, 'last', 'close', price); - let percentage = this.safeFloat (ticker, 'percentChange24h'); + const price = this.safeNumber (ticker, 'price'); + const last = this.safeNumber2 (ticker, 'last', 'close', price); + let percentage = this.safeNumber (ticker, 'percentChange24h'); let change = undefined; - let open = this.safeFloat (ticker, 'open'); + let open = this.safeNumber (ticker, 'open'); let average = undefined; if (last !== undefined) { if (open !== undefined) { @@ -73949,18 +72255,18 @@ module.exports = class gemini extends Exchange { average = this.sum (last, open) / 2; } } - const baseVolume = this.safeFloat (volume, baseId); - const quoteVolume = this.safeFloat (volume, quoteId); + const baseVolume = this.safeNumber (volume, baseId); + const quoteVolume = this.safeNumber (volume, quoteId); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -73976,14 +72282,6 @@ module.exports = class gemini extends Exchange { }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetV1Pricefeed (params); @@ -74024,17 +72322,14 @@ module.exports = class gemini extends Exchange { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); const fee = { - 'cost': this.safeFloat (trade, 'fee_amount'), + 'cost': this.safeNumber (trade, 'fee_amount'), 'currency': feeCurrencyCode, }; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeStringLower (trade, 'type'); const symbol = this.safeSymbol (undefined, market); @@ -74087,18 +72382,18 @@ module.exports = class gemini extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'timestampms'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const filled = this.safeFloat (order, 'executed_amount'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const filled = this.safeNumber (order, 'executed_amount'); let status = 'closed'; if (order['is_live']) { status = 'open'; @@ -74106,14 +72401,8 @@ module.exports = class gemini extends Exchange { if (order['is_cancelled']) { status = 'canceled'; } - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_execution_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_execution_price'); let type = this.safeString (order, 'type'); if (type === 'exchange limit') { type = 'limit'; @@ -74128,7 +72417,7 @@ module.exports = class gemini extends Exchange { const id = this.safeString (order, 'order_id'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'client_order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -74144,13 +72433,13 @@ module.exports = class gemini extends Exchange { 'price': price, 'stopPrice': undefined, 'average': average, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -74265,7 +72554,7 @@ module.exports = class gemini extends Exchange { status = 'ok'; } let fee = undefined; - const feeAmount = this.safeFloat (transaction, 'feeAmount'); + const feeAmount = this.safeNumber (transaction, 'feeAmount'); if (feeAmount !== undefined) { fee = { 'cost': feeAmount, @@ -74281,7 +72570,7 @@ module.exports = class gemini extends Exchange { 'address': address, 'tag': undefined, // or is it defined? 'type': type, // direction of the transaction, ('deposit' | 'withdraw') - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': undefined, @@ -74380,7 +72669,7 @@ module.exports = class gemini extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],91:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],89:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -74388,6 +72677,7 @@ module.exports = class gemini extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound, InvalidAddress, BadRequest } = require ('./base/errors'); const { TRUNCATE, ROUND, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -74601,8 +72891,8 @@ module.exports = class gopax extends Exchange { const minimums = this.safeValue (market, 'restApiOrderAmountMin', {}); const marketAsk = this.safeValue (minimums, 'marketAsk', {}); const marketBid = this.safeValue (minimums, 'marketBid', {}); - const takerFeePercent = this.safeFloat (market, 'takerFeePercent'); - const makerFeePercent = this.safeFloat (market, 'makerFeePercent'); + const takerFeePercent = this.safeNumber (market, 'takerFeePercent'); + const makerFeePercent = this.safeNumber (market, 'makerFeePercent'); const taker = parseFloat (this.decimalToPrecision (takerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); const maker = parseFloat (this.decimalToPrecision (makerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); result.push ({ @@ -74620,15 +72910,15 @@ module.exports = class gopax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (marketAsk, 'amount'), + 'min': this.safeNumber (marketAsk, 'amount'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'priceMin'), + 'min': this.safeNumber (market, 'priceMin'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (marketBid, 'amount'), + 'min': this.safeNumber (marketBid, 'amount'), 'max': undefined, }, }, @@ -74663,8 +72953,8 @@ module.exports = class gopax extends Exchange { const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'name'); - const fee = this.safeFloat (currency, 'withdrawalFee'); - const precision = this.safeFloat (currency, 'scale'); + const fee = this.safeNumber (currency, 'withdrawalFee'); + const precision = this.safeNumber (currency, 'scale'); result[code] = { 'id': id, 'info': currency, @@ -74687,7 +72977,7 @@ module.exports = class gopax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalAmountMin'), + 'min': this.safeNumber (currency, 'withdrawalAmountMin'), 'max': undefined, }, }, @@ -74755,8 +73045,8 @@ module.exports = class gopax extends Exchange { const marketId = this.safeString (ticker, 'name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (ticker, 'time')); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat2 (ticker, 'price', 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'price', 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -74767,20 +73057,20 @@ module.exports = class gopax extends Exchange { percentage = change / open * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidVolume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askVolume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidVolume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askVolume'), 'vwap': vwap, 'open': open, 'close': last, @@ -74816,14 +73106,6 @@ module.exports = class gopax extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTradingPairsStats (params); @@ -74845,8 +73127,8 @@ module.exports = class gopax extends Exchange { parsePublicTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let symbol = undefined; if ('symbol' in market) { symbol = this.safeString (market, 'symbol'); @@ -74872,14 +73154,14 @@ module.exports = class gopax extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const symbol = this.safeString (trade, 'tradingPairName').replace ('-', '/'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'baseAmount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'baseAmount'); let feeCurrency = symbol.slice (0, 3); if (side === 'sell') { feeCurrency = symbol.slice (4); } const fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': feeCurrency, 'rate': undefined, }; @@ -74961,15 +73243,15 @@ module.exports = class gopax extends Exchange { } else if (type === '2') { type = 'market'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'baseAmount'); - let cost = this.safeFloat (trade, 'quoteAmount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'baseAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteAmount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -75036,11 +73318,11 @@ module.exports = class gopax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -75080,14 +73362,14 @@ module.exports = class gopax extends Exchange { const balance = response[i]; const currencyId = this.safeString2 (balance, 'asset', 'isoAlpha3'); const code = this.safeCurrencyCode (currencyId); - const hold = this.safeFloat (balance, 'hold'); - const pendingWithdrawal = this.safeFloat (balance, 'pendingWithdrawal'); + const hold = this.safeString (balance, 'hold'); + const pendingWithdrawal = this.safeString (balance, 'pendingWithdrawal'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.sum (hold, pendingWithdrawal); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = Precise.stringAdd (hold, pendingWithdrawal); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -75164,42 +73446,36 @@ module.exports = class gopax extends Exchange { const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); const timeInForce = this.safeStringUpper (order, 'timeInForce'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - const remaining = this.safeFloat (order, 'remaining'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const stopPrice = this.safeNumber (order, 'stopPrice'); + const remaining = this.safeNumber (order, 'remaining'); const marketId = this.safeString (order, 'tradingPairName'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const balanceChange = this.safeValue (order, 'balanceChange', {}); - let filled = this.safeFloat (balanceChange, 'baseNet'); - let cost = this.safeFloat (balanceChange, 'quoteNet'); + const filled = this.safeNumber (balanceChange, 'baseNet'); + let cost = this.safeNumber (balanceChange, 'quoteNet'); if (cost !== undefined) { cost = Math.abs (cost); } let updated = undefined; - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } if ((filled !== undefined) && (filled > 0)) { updated = this.parse8601 (this.safeString (order, 'updatedAt')); } - if ((cost === undefined) && (price !== undefined) && (filled !== undefined)) { - cost = filled * price; - } let fee = undefined; if (side === 'buy') { const baseFee = this.safeValue (balanceChange, 'baseFee', {}); - const taking = this.safeFloat (baseFee, 'taking'); - const making = this.safeFloat (baseFee, 'making'); + const taking = this.safeNumber (baseFee, 'taking'); + const making = this.safeNumber (baseFee, 'making'); fee = { 'currency': market['base'], 'cost': this.sum (taking, making), }; } else { const quoteFee = this.safeValue (balanceChange, 'quoteFee', {}); - const taking = this.safeFloat (quoteFee, 'taking'); - const making = this.safeFloat (quoteFee, 'making'); + const taking = this.safeNumber (quoteFee, 'taking'); + const making = this.safeNumber (quoteFee, 'making'); fee = { 'currency': market['quote'], 'cost': this.sum (taking, making), @@ -75209,7 +73485,7 @@ module.exports = class gopax extends Exchange { if (timeInForce !== undefined) { postOnly = (timeInForce === 'PO'); } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'datetime': this.iso8601 (timestamp), @@ -75231,7 +73507,7 @@ module.exports = class gopax extends Exchange { 'trades': undefined, 'fee': fee, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -75379,7 +73655,7 @@ module.exports = class gopax extends Exchange { request['clientOrderId'] = clientOrderId; params = this.omit (params, 'clientOrderId'); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -75508,18 +73784,6 @@ module.exports = class gopax extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetCryptoDepositAddresses (params); @@ -75584,8 +73848,8 @@ module.exports = class gopax extends Exchange { } else if ((type === 'crypto_deposit' || type === 'fiat_deposit')) { type = 'deposit'; } - const amount = this.safeFloat (transaction, 'netAmount'); - const feeCost = this.safeFloat (transaction, 'feeAmount'); + const amount = this.safeNumber (transaction, 'netAmount'); + const feeCost = this.safeNumber (transaction, 'feeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -75729,7 +73993,7 @@ module.exports = class gopax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],92:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],90:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -75737,6 +74001,7 @@ module.exports = class gopax extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, OrderNotFound, ArgumentsRequired, BadSymbol, BadRequest, NullResponse, InvalidOrder, BadResponse, NotSupported, ExchangeNotAvailable, RequestTimeout, RateLimitExceeded, PermissionDenied, InsufficientFunds, InvalidAddress } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -76036,23 +74301,23 @@ module.exports = class hbtc extends Exchange { const filter = filters[j]; const filterType = this.safeString (filter, 'filterType'); if (filterType === 'LOT_SIZE') { - amountMin = this.safeFloat (filter, 'minQty'); - amountMax = this.safeFloat (filter, 'maxQty'); + amountMin = this.safeNumber (filter, 'minQty'); + amountMax = this.safeNumber (filter, 'maxQty'); } if (filterType === 'PRICE_FILTER') { - priceMin = this.safeFloat (filter, 'minPrice'); - priceMax = this.safeFloat (filter, 'maxPrice'); + priceMin = this.safeNumber (filter, 'minPrice'); + priceMax = this.safeNumber (filter, 'maxPrice'); } if (filterType === 'MIN_NOTIONAL') { - costMin = this.safeFloat (filter, 'minNotional'); + costMin = this.safeNumber (filter, 'minNotional'); } } if ((costMin === undefined) && (amountMin !== undefined) && (priceMin !== undefined)) { costMin = amountMin * priceMin; } const precision = { - 'price': this.safeFloat2 (market, 'quotePrecision', 'quoteAssetPrecision'), - 'amount': this.safeFloat (market, 'baseAssetPrecision'), + 'price': this.safeNumber2 (market, 'quotePrecision', 'quoteAssetPrecision'), + 'amount': this.safeNumber (market, 'baseAssetPrecision'), }; const limits = { 'amount': { @@ -76290,14 +74555,6 @@ module.exports = class hbtc extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidAsk (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -76449,8 +74706,8 @@ module.exports = class hbtc extends Exchange { const currencyId = this.safeString2 (balance, 'asset', 'tokenName'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -76460,12 +74717,12 @@ module.exports = class hbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = response[currencyId]; const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableMargin'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'availableMargin'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTrades (symbol, since = undefined, limit = 50, params = {}) { @@ -76506,11 +74763,11 @@ module.exports = class hbtc extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -77196,8 +75453,8 @@ module.exports = class hbtc extends Exchange { // const currencyId = this.safeString (item, 'tokenId'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'change'); - const after = this.safeFloat (item, 'total'); + const amount = this.safeNumber (item, 'change'); + const after = this.safeNumber (item, 'total'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -77337,8 +75594,8 @@ module.exports = class hbtc extends Exchange { } else { type = 'withdrawal'; } - const amount = this.safeFloat (transaction, 'quantity'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'quantity'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'feeTokenId'); @@ -77399,8 +75656,8 @@ module.exports = class hbtc extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'openPrice'); - const close = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; let average = undefined; @@ -77411,19 +75668,19 @@ module.exports = class hbtc extends Exchange { percentage = (change / open) * 100; } } - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat2 (ticker, 'bestBidPrice', 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat2 (ticker, 'bestAskPrice', 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber2 (ticker, 'bestBidPrice', 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber2 (ticker, 'bestAskPrice', 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': vwap, 'open': open, 'close': close, @@ -77473,17 +75730,14 @@ module.exports = class hbtc extends Exchange { // } // const id = this.safeString (trade, 'id'); - const timestamp = this.safeFloat (trade, 'time'); + const timestamp = this.safeNumber (trade, 'time'); const type = undefined; const orderId = this.safeString (trade, 'orderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let side = undefined; let takerOrMaker = undefined; if ('isBuyerMaker' in trade) { @@ -77497,7 +75751,7 @@ module.exports = class hbtc extends Exchange { side = isBuyer ? 'buy' : 'sell'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -77603,30 +75857,30 @@ module.exports = class hbtc extends Exchange { const symbol = this.safeSymbol (marketId, market); let type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'avgPrice'); + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'avgPrice'); let amount = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); + let cost = this.safeNumber (order, 'cummulativeQuoteQty'); let filled = undefined; let remaining = undefined; if (type === undefined) { type = this.safeStringLower (order, 'orderType'); if ((market !== undefined) && market['inverse']) { - cost = this.safeFloat (order, 'executedQty'); + cost = this.safeNumber (order, 'executedQty'); amount = undefined; } if (cost === 0.0) { filled = 0; } } else { - amount = this.safeFloat (order, 'origQty'); + amount = this.safeNumber (order, 'origQty'); if (type === 'market') { price = undefined; if (side === 'buy') { amount = undefined; } } - filled = this.safeFloat (order, 'executedQty'); + filled = this.safeNumber (order, 'executedQty'); if (filled !== undefined) { if (amount !== undefined) { remaining = amount - filled; @@ -77638,7 +75892,7 @@ module.exports = class hbtc extends Exchange { } const status = this.parseOrderStatus (this.safeString (order, 'status')); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const result = { 'info': order, 'id': id, @@ -77667,7 +75921,7 @@ module.exports = class hbtc extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'fee'); + const feeCost = this.safeNumber (fees[i], 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'feeToken'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -77740,7 +75994,7 @@ module.exports = class hbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],93:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],91:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -77748,6 +76002,7 @@ module.exports = class hbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, PermissionDenied, ExchangeError, ExchangeNotAvailable, OrderNotFound, InsufficientFunds, InvalidOrder, RequestTimeout, AuthenticationError } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -77787,6 +76042,7 @@ module.exports = class hitbtc extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': 'M1', @@ -77824,10 +76080,10 @@ module.exports = class hitbtc extends Exchange { 'api': { 'public': { 'get': [ - 'symbol', // Available Currency Symbols - 'symbol/{symbol}', // Get symbol info 'currency', // Available Currencies 'currency/{currency}', // Get currency info + 'symbol', // Available Currency Symbols + 'symbol/{symbol}', // Get symbol info 'ticker', // Ticker list for all symbols 'ticker/{symbol}', // Ticker for symbol 'trades', @@ -77845,11 +76101,20 @@ module.exports = class hitbtc extends Exchange { 'order/{clientOrderId}', // Get a single order by clientOrderId 'trading/fee/all', // Get trading fee rate 'trading/fee/{symbol}', // Get trading fee rate + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', 'history/order', // Get historical orders 'history/trades', // Get historical trades 'history/order/{orderId}/trades', // Get historical trades by specified order 'account/balance', // Get main acccount balance - 'account/crypto/address/{currency}', // Get deposit crypro address + 'account/crypto/address/{currency}', // Get current address + 'account/crypto/addresses/{currency}', // Get last 10 deposit addresses for currency + 'account/crypto/used-addresses/{currency}', // Get last 10 unique addresses used for withdraw by currency + 'account/crypto/estimate-withdraw', 'account/crypto/is-mine/{address}', 'account/transactions', // Get account transactions 'account/transactions/{id}', // Get account transaction by id @@ -77860,23 +76125,33 @@ module.exports = class hitbtc extends Exchange { ], 'post': [ 'order', // Create new order - 'account/crypto/address/{currency}', // Create new deposit crypro address - 'account/crypto/withdraw', // Withdraw crypro + 'margin/order', + 'account/crypto/address/{currency}', // Create new crypto deposit address + 'account/crypto/withdraw', // Withdraw crypto 'account/crypto/transfer-convert', - 'account/transfer', // Transfer amount to trading + 'account/transfer', // Transfer amount to trading account or to main account + 'account/transfer/internal', 'sub-acc/freeze', 'sub-acc/activate', 'sub-acc/transfer', ], 'put': [ 'order/{clientOrderId}', // Create new order - 'account/crypto/withdraw/{id}', // Commit withdraw crypro + 'margin/account/{symbol}', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Commit crypto withdrawal 'sub-acc/acl/{subAccountUserId}', ], 'delete': [ 'order', // Cancel all open orders 'order/{clientOrderId}', // Cancel order - 'account/crypto/withdraw/{id}', // Rollback withdraw crypro + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Rollback crypto withdrawal ], // outdated? 'patch': [ @@ -77895,8 +76170,20 @@ module.exports = class hitbtc extends Exchange { }, 'options': { 'defaultTimeInForce': 'FOK', + 'accountsByType': { + 'bank': 'bank', + 'exchange': 'exchange', + 'main': 'bank', // alias of the above + 'trading': 'exchange', + }, + 'fetchBalanceMethod': { + 'account': 'account', + 'main': 'account', + 'trading': 'trading', + }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BCC': 'BCC', // initial symbol for Bitcoin Cash, now inactive 'BET': 'DAO.Casino', 'BOX': 'BOX Token', @@ -77923,7 +76210,6 @@ module.exports = class hitbtc extends Exchange { '20002': OrderNotFound, // canceling non-existent order '20001': InsufficientFunds, // {"error":{"code":20001,"message":"Insufficient funds","description":"Check that the funds are sufficient, given commissions"}} }, - 'orders': {}, // orders cache / emulation }); } @@ -77960,14 +76246,14 @@ module.exports = class hitbtc extends Exchange { if (id.indexOf ('_') >= 0) { symbol = id; } - const lot = this.safeFloat (market, 'quantityIncrement'); - const step = this.safeFloat (market, 'tickSize'); + const lot = this.safeNumber (market, 'quantityIncrement'); + const step = this.safeNumber (market, 'tickSize'); const precision = { 'price': step, 'amount': lot, }; - const taker = this.safeFloat (market, 'takeLiquidityRate'); - const maker = this.safeFloat (market, 'provideLiquidityRate'); + const taker = this.safeNumber (market, 'takeLiquidityRate'); + const maker = this.safeNumber (market, 'provideLiquidityRate'); const feeCurrencyId = this.safeString (market, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); result.push (this.extend (this.fees['trading'], { @@ -78002,6 +76288,49 @@ module.exports = class hitbtc extends Exchange { return result; } + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // account can be "exchange" or "bank", with aliases "main" or "trading" respectively + await this.loadMarkets (); + const currency = this.currency (code); + const requestAmount = this.currencyToPrecision (code, amount); + const request = { + 'currency': currency['id'], + 'amount': requestAmount, + }; + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + const keys = Object.keys (accountsByType); + if (fromId === undefined) { + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ') + ' instead of ' + fromId); + } + if (toId === undefined) { + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ') + ' instead of ' + toId); + } + if (fromId === toId) { + throw new ExchangeError (this.id + ' from and to cannot be the same account'); + } + type = fromId + 'To' + this.capitalize (toId); + } + request['type'] = type; + const response = await this.privatePostAccountTransfer (this.extend (request, params)); + // { id: '2db6ebab-fb26-4537-9ef8-1a689472d236' } + const id = this.safeString (response, 'id'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'amount': requestAmount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': undefined, + }; + } + async fetchCurrencies (params = {}) { const response = await this.publicGetCurrency (params); // @@ -78057,7 +76386,7 @@ module.exports = class hitbtc extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'payoutFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'payoutFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -78097,15 +76426,20 @@ module.exports = class hitbtc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } async fetchBalance (params = {}) { await this.loadMarkets (); const type = this.safeString (params, 'type', 'trading'); - const method = 'privateGet' + this.capitalize (type) + 'Balance'; + const fetchBalanceAccounts = this.safeValue (this.options, 'fetchBalanceMethod', {}); + const typeId = this.safeString (fetchBalanceAccounts, type); + if (typeId === undefined) { + throw new ExchangeError (this.id + ' fetchBalance account type must be either main or trading'); + } + const method = 'privateGet' + this.capitalize (typeId) + 'Balance'; const query = this.omit (params, 'type'); const response = await this[method] (query); const result = { 'info': response }; @@ -78114,11 +76448,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -78135,11 +76469,11 @@ module.exports = class hitbtc extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'max'), - this.safeFloat (ohlcv, 'min'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'max'), + this.safeNumber (ohlcv, 'min'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -78185,10 +76519,10 @@ module.exports = class hitbtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); let change = undefined; let percentage = undefined; let average = undefined; @@ -78204,11 +76538,11 @@ module.exports = class hitbtc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -78284,7 +76618,7 @@ module.exports = class hitbtc extends Exchange { market = this.safeMarket (marketId, market); const symbol = market['symbol']; let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = market ? market['feeCurrency'] : undefined; fee = { @@ -78296,9 +76630,11 @@ module.exports = class hitbtc extends Exchange { // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const orderId = this.safeString (trade, 'clientOrderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); const id = this.safeString (trade, 'id'); return { @@ -78397,11 +76733,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'hash'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -78589,66 +76925,25 @@ module.exports = class hitbtc extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'cumQuantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'cumQuantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); // we use clientOrderId as the order id with this exchange intentionally // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const id = this.safeString (order, 'clientOrderId'); const clientOrderId = id; - let price = this.safeFloat (order, 'price'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - if (price !== undefined) { - cost = filled * price; - } - } - } + const price = this.safeNumber (order, 'price'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); let trades = this.safeValue (order, 'tradesReport'); - let fee = undefined; - let average = this.safeValue (order, 'avgPrice'); + const fee = undefined; + const average = this.safeNumber (order, 'avgPrice'); if (trades !== undefined) { trades = this.parseTrades (trades, market); - let feeCost = undefined; - const numTrades = trades.length; - let tradesCost = 0; - for (let i = 0; i < numTrades; i++) { - if (feeCost === undefined) { - feeCost = 0; - } - tradesCost = this.sum (tradesCost, trades[i]['cost']); - const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); - if (tradeFeeCost !== undefined) { - feeCost = this.sum (feeCost, tradeFeeCost); - } - } - cost = tradesCost; - if ((filled !== undefined) && (filled > 0)) { - if (average === undefined) { - average = cost / filled; - } - if (type === 'market') { - if (price === undefined) { - price = average; - } - } - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, // https://github.com/ccxt/ccxt/issues/5674 'timestamp': created, @@ -78663,13 +76958,13 @@ module.exports = class hitbtc extends Exchange { 'stopPrice': undefined, 'average': average, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -78930,7 +77225,7 @@ module.exports = class hitbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],94:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],92:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -78938,6 +77233,7 @@ module.exports = class hitbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { BadRequest, AuthenticationError, NetworkError, ArgumentsRequired, OrderNotFound, InsufficientFunds } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -78948,7 +77244,7 @@ module.exports = class hollaex extends Exchange { 'name': 'HollaEx', 'countries': [ 'KR' ], 'rateLimit': 333, - 'version': 'v1', + 'version': 'v2', 'has': { 'CORS': false, 'fetchMarkets': true, @@ -78968,13 +77264,13 @@ module.exports = class hollaex extends Exchange { 'cancelOrder': true, 'cancelAllOrders': true, 'fetchOpenOrders': true, - 'fetchClosedOrders': false, + 'fetchClosedOrders': true, 'fetchOpenOrder': true, 'fetchOrder': false, 'fetchDeposits': true, 'fetchWithdrawals': true, 'fetchTransactions': false, - 'fetchOrders': false, + 'fetchOrders': true, 'fetchMyTrades': true, 'withdraw': true, 'fetchDepositAddress': true, @@ -78999,13 +77295,17 @@ module.exports = class hollaex extends Exchange { 'public': { 'get': [ 'health', - 'constant', + 'constants', + 'kit', + 'tiers', 'ticker', - 'ticker/all', + 'tickers', + 'orderbook', 'orderbooks', 'trades', 'chart', - // TradingView data + 'charts', + // TradingView 'udf/config', 'udf/history', 'udf/symbols', @@ -79015,20 +77315,20 @@ module.exports = class hollaex extends Exchange { 'get': [ 'user', 'user/balance', - 'user/trades', - 'user/orders', - 'user/orders/{order_id}', 'user/deposits', 'user/withdrawals', - 'user/withdraw/{currency}/fee', + 'user/withdrawal/fee', + 'user/trades', + 'orders', + 'orders/{order_id}', ], 'post': [ 'user/request-withdrawal', 'order', ], 'delete': [ - 'user/orders', - 'user/orders/{order_id}', + 'order/all', + 'order', ], }, }, @@ -79063,7 +77363,7 @@ module.exports = class hollaex extends Exchange { } async fetchMarkets (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); // // { // coins: { @@ -79130,17 +77430,17 @@ module.exports = class hollaex extends Exchange { 'quoteId': quoteId, 'active': active, 'precision': { - 'price': this.safeFloat (market, 'increment_price'), - 'amount': this.safeFloat (market, 'increment_size'), + 'price': this.safeNumber (market, 'increment_price'), + 'amount': this.safeNumber (market, 'increment_size'), }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, 'max': undefined }, }, @@ -79151,7 +77451,7 @@ module.exports = class hollaex extends Exchange { } async fetchCurrencies (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); const coins = this.safeValue (response, 'coins', {}); const keys = Object.keys (coins); const result = {}; @@ -79163,8 +77463,8 @@ module.exports = class hollaex extends Exchange { const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'fullname'); const active = this.safeValue (currency, 'active'); - const fee = this.safeFloat (currency, 'withdrawal_fee'); - const precision = this.safeFloat (currency, 'increment_unit'); + const fee = this.safeNumber (currency, 'withdrawal_fee'); + const precision = this.safeNumber (currency, 'increment_unit'); const withdrawalLimits = this.safeValue (currency, 'withdrawal_limits', []); result[code] = { 'id': id, @@ -79177,8 +77477,8 @@ module.exports = class hollaex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min'), - 'max': this.safeFloat (currency, 'max'), + 'min': this.safeNumber (currency, 'min'), + 'max': this.safeNumber (currency, 'max'), }, 'price': { 'min': undefined, @@ -79267,7 +77567,7 @@ module.exports = class hollaex extends Exchange { async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.publicGetTickerAll (this.extend (params)); + const response = await this.publicGetTickers (this.extend (params)); // // { // "bch-usdt": { @@ -79330,27 +77630,27 @@ module.exports = class hollaex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString2 (ticker, 'time', 'timestamp')); - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const result = { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, - 'last': this.safeFloat (ticker, 'last', close), + 'last': this.safeNumber (ticker, 'last', close), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, }; return result; @@ -79408,15 +77708,12 @@ module.exports = class hollaex extends Exchange { const datetime = this.safeString (trade, 'timestamp'); const timestamp = this.parse8601 (datetime); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const quote = market['quote']; @@ -79501,11 +77798,11 @@ module.exports = class hollaex extends Exchange { // return [ this.parse8601 (this.safeString (response, 'time')), - this.safeFloat (response, 'open'), - this.safeFloat (response, 'high'), - this.safeFloat (response, 'low'), - this.safeFloat (response, 'close'), - this.safeFloat (response, 'volume'), + this.safeNumber (response, 'open'), + this.safeNumber (response, 'high'), + this.safeNumber (response, 'low'), + this.safeNumber (response, 'close'), + this.safeNumber (response, 'volume'), ]; } @@ -79530,11 +77827,11 @@ module.exports = class hollaex extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (response, currencyId + '_available'); - account['total'] = this.safeFloat (response, currencyId + '_balance'); + account['free'] = this.safeString (response, currencyId + '_available'); + account['total'] = this.safeString (response, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrder (id, symbol = undefined, params = {}) { @@ -79542,67 +77839,146 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateGetUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateGetOrdersOrderId (this.extend (request, params)); // // { - // "created_at": "2018-03-23T04:14:08.663Z", - // "title": "string", - // "side": "sell", - // "type": "limit", - // "price": 0, - // "size": 0, - // "symbol": "xht-usdt", // "id": "string", - // "created_by": 1, - // "filled": 0 + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } // } // return this.parseOrder (response); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'open': true, + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'status': 'filled', + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); let market = undefined; - const request = {}; + const request = { + // 'symbol': market['id'], + // 'side': 'buy', // 'sell' + // 'status': 'new', // 'filled', 'pfilled', 'canceled' + // 'open': true, + // 'limit': limit, // default 50, max 100 + // 'page': 1, + // 'order_by': 'created_at', // id, ... + // 'order': 'asc', // 'desc' + // 'start_date': this.iso8601 (since), + // 'end_date': this.iso8601 (this.milliseconds ()), + }; if (symbol !== undefined) { market = this.market (symbol); request['symbol'] = market['id']; } - const response = await this.privateGetUserOrders (this.extend (request, params)); + if (since !== undefined) { + request['start_date'] = this.iso8601 (since); + } + if (limit !== undefined) { + request['limit'] = limit; // default 50, max 100 + } + const response = await this.privateGetOrders (this.extend (request, params)); // - // [ - // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 - // } - // ] + // { + // "count": 1, + // "data": [ + // { + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } + // } + // ] + // } // - return this.parseOrders (response, market); + const data = this.safeValue (response, 'data', []); + return this.parseOrders (data, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'new': 'open', + 'pfilled': 'open', + 'filled': 'closed', + 'canceled': 'canceled', + }; + return this.safeString (statuses, status, status); } parseOrder (order, market = undefined) { // - // fetchOpenOrder, fetchOpenOrders + // createOrder, fetchOpenOrder, fetchOpenOrders // // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // }, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, // } // const marketId = this.safeString (order, 'symbol'); @@ -79611,21 +77987,11 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filled'); - let cost = undefined; - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = filled * price; - } - } - const status = (type === 'market') ? 'closed' : 'open'; - const result = { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filled'); + const status = this.parseOrderStatus (this.safeString (order, 'status')); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -79641,40 +78007,56 @@ module.exports = class hollaex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; - return result; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); - const order = { + const request = { 'symbol': market['id'], 'side': side, 'size': amount, 'type': type, + // 'stop': parseFloat (this.priceToPrecision (symbol, stopPrice)), + // 'meta': {}, // other options such as post_only }; if (type !== 'market') { - order['price'] = price; + request['price'] = price; } - const response = await this.privatePostOrder (this.extend (order, params)); + const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop'); + if (stopPrice !== undefined) { + request['stop'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + params = this.omit (params, [ 'stopPrice', 'stop' ]); + } + const response = await this.privatePostOrder (this.extend (request, params)); // // { + // "fee": 0, + // "meta": {}, // "symbol": "xht-usdt", // "side": "sell", - // "size": 1, + // "size": 0.1, // "type": "limit", - // "price": 0.1, + // "price": 1, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, + // "fee_coin": "usdt", // "id": "string", - // "created_by": 34, + // "created_by": 116, // "filled": 0, - // "status": "pending" + // "status": "new", + // "updated_at": "2021-02-17T03:03:19.231Z", + // "created_at": "2021-02-17T03:03:19.231Z", + // "stop": null // } // return this.parseOrder (response, market); @@ -79685,7 +78067,7 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateDeleteUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateDeleteOrder (this.extend (request, params)); // // { // "title": "string", @@ -79710,7 +78092,7 @@ module.exports = class hollaex extends Exchange { market = this.markets (symbol); request['symbol'] = market['id']; } - const response = await this.privateDeleteUserOrders (this.extend (request, params)); + const response = await this.privateDeleteOrderAll (this.extend (request, params)); // // [ // { @@ -79976,7 +78358,7 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_at')); const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const type = this.safeString (transaction, 'type'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); let addressTo = undefined; const addressFrom = undefined; @@ -80006,7 +78388,7 @@ module.exports = class hollaex extends Exchange { } const fee = { 'currency': code, - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), }; return { 'info': transaction, @@ -80105,7 +78487,7 @@ module.exports = class hollaex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],95:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],93:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -80146,7 +78528,7 @@ module.exports = class huobijp extends huobipro { } }; -},{"./base/errors":8,"./huobipro.js":96}],96:[function(require,module,exports){ +},{"./base/errors":9,"./huobipro.js":94}],94:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -80154,6 +78536,7 @@ module.exports = class huobijp extends huobipro { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, ArgumentsRequired, BadSymbol, BadRequest, RequestTimeout, NetworkError } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -80171,7 +78554,9 @@ module.exports = class huobipro extends Exchange { 'hostname': 'api.huobi.pro', // api.testnet.huobi.pro 'pro': true, 'has': { + 'cancelAllOrders': true, 'cancelOrder': true, + 'cancelOrders': true, 'CORS': false, 'createOrder': true, 'fetchBalance': true, @@ -80338,6 +78723,7 @@ module.exports = class huobipro extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.002, @@ -80401,6 +78787,7 @@ module.exports = class huobipro extends Exchange { // https://en.cryptonomist.ch/blog/eidoo/the-edo-to-pnt-upgrade-what-you-need-to-know-updated/ 'PNT': 'Penta', 'SBTC': 'Super Bitcoin', + 'BIFI': 'Bitcoin File', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706 }, }); } @@ -80465,8 +78852,8 @@ module.exports = class huobipro extends Exchange { 'info': limits, 'limits': { 'amount': { - 'min': this.safeFloat (limits, 'limit-order-must-greater-than'), - 'max': this.safeFloat (limits, 'limit-order-must-less-than'), + 'min': this.safeNumber (limits, 'limit-order-must-greater-than'), + 'max': this.safeNumber (limits, 'limit-order-must-less-than'), }, }, }; @@ -80500,9 +78887,9 @@ module.exports = class huobipro extends Exchange { }; const maker = (base === 'OMG') ? 0 : 0.2 / 100; const taker = (base === 'OMG') ? 0 : 0.2 / 100; - const minAmount = this.safeFloat (market, 'min-order-amt', Math.pow (10, -precision['amount'])); - const maxAmount = this.safeFloat (market, 'max-order-amt'); - const minCost = this.safeFloat (market, 'min-order-value', 0); + const minAmount = this.safeNumber (market, 'min-order-amt', Math.pow (10, -precision['amount'])); + const maxAmount = this.safeNumber (market, 'max-order-amt'); + const minCost = this.safeNumber (market, 'min-order-value', 0); const state = this.safeString (market, 'state'); const active = (state === 'online'); result.push ({ @@ -80581,24 +78968,24 @@ module.exports = class huobipro extends Exchange { let askVolume = undefined; if ('bid' in ticker) { if (Array.isArray (ticker['bid'])) { - bid = this.safeFloat (ticker['bid'], 0); - bidVolume = this.safeFloat (ticker['bid'], 1); + bid = this.safeNumber (ticker['bid'], 0); + bidVolume = this.safeNumber (ticker['bid'], 1); } else { - bid = this.safeFloat (ticker, 'bid'); + bid = this.safeNumber (ticker, 'bid'); bidVolume = this.safeValue (ticker, 'bidSize'); } } if ('ask' in ticker) { if (Array.isArray (ticker['ask'])) { - ask = this.safeFloat (ticker['ask'], 0); - askVolume = this.safeFloat (ticker['ask'], 1); + ask = this.safeNumber (ticker['ask'], 0); + askVolume = this.safeNumber (ticker['ask'], 1); } else { - ask = this.safeFloat (ticker, 'ask'); + ask = this.safeNumber (ticker, 'ask'); askVolume = this.safeValue (ticker, 'askSize'); } } - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -80609,15 +78996,15 @@ module.exports = class huobipro extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -80706,7 +79093,7 @@ module.exports = class huobipro extends Exchange { // } // const ticker = this.parseTicker (response['tick'], market); - const timestamp = this.safeValue (response, 'ts'); + const timestamp = this.safeInteger (response, 'ts'); ticker['timestamp'] = timestamp; ticker['datetime'] = this.iso8601 (timestamp); return ticker; @@ -80775,21 +79162,18 @@ module.exports = class huobipro extends Exchange { type = typeParts[1]; } const takerOrMaker = this.safeString (trade, 'role'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'filled-amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'filled-amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - let feeCost = this.safeFloat (trade, 'filled-fees'); + let feeCost = this.safeNumber (trade, 'filled-fees'); let feeCurrency = undefined; if (market !== undefined) { feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee-currency')); } - const filledPoints = this.safeFloat (trade, 'filled-points'); + const filledPoints = this.safeNumber (trade, 'filled-points'); if (filledPoints !== undefined) { if ((feeCost === undefined) || (feeCost === 0.0)) { feeCost = filledPoints; @@ -80903,11 +79287,11 @@ module.exports = class huobipro extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -81004,11 +79388,11 @@ module.exports = class huobipro extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'deposit-min-amount'), + 'min': this.safeNumber (currency, 'deposit-min-amount'), 'max': Math.pow (10, precision), }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw-min-amount'), + 'min': this.safeNumber (currency, 'withdraw-min-amount'), 'max': Math.pow (10, precision), }, }, @@ -81039,14 +79423,14 @@ module.exports = class huobipro extends Exchange { account = this.account (); } if (balance['type'] === 'trade') { - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); } if (balance['type'] === 'frozen') { - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrdersByStates (states, symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -81221,28 +79605,14 @@ module.exports = class huobipro extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (order, 'created-at'); - let amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount - if ((type === 'market') && (side === 'buy')) { - amount = (status === 'closed') ? filled : undefined; - } - let price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - const cost = this.safeFloat2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - // if cost is defined and filled is not zero - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - const feeCost = this.safeFloat2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees + const cost = this.safeNumber2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo + const feeCost = this.safeNumber2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -81254,7 +79624,7 @@ module.exports = class huobipro extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -81268,15 +79638,15 @@ module.exports = class huobipro extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -81350,26 +79720,82 @@ module.exports = class huobipro extends Exchange { }); } - currencyToPrecision (currency, fee) { - return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); + async cancelOrders (ids, symbol = undefined, params = {}) { + await this.loadMarkets (); + const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); + params = this.omit (params, [ 'clientOrderIds', 'client-order-ids' ]); + const request = {}; + if (clientOrderIds === undefined) { + request['order-ids'] = ids; + } else { + request['client-order-ids'] = clientOrderIds; + } + const response = await this.privatePostOrderOrdersBatchcancel (this.extend (request, params)); + // + // { + // "status": "ok", + // "data": { + // "success": [ + // "5983466" + // ], + // "failed": [ + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "first" + // }, + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "second" + // }, + // { + // "err-msg": "The record is not found.", + // "order-id": "", + // "err-code": "base-not-found", + // "client-order-id": "third" + // } + // ] + // } + // } + // + return response; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (market[key], cost)), + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'account-id' string false NA The account id used for this cancel Refer to GET /v1/account/accounts + // 'symbol': market['id'], // a list of comma-separated symbols, all symbols by default + // 'types' 'string', buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-stop-limit, sell-stop-limit, buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok + // 'side': 'buy', // or 'sell' + // 'size': 100, // the number of orders to cancel 1-100 }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.privatePostOrderOrdersBatchCancelOpenOrders (this.extend (request, params)); + // + // { + // code: 200, + // data: { + // "success-count": 2, + // "failed-count": 0, + // "next-id": 5454600 + // } + // } + // + return response; + } + + currencyToPrecision (currency, fee) { + return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); } parseDepositAddress (depositAddress, currency = undefined) { @@ -81511,7 +79937,7 @@ module.exports = class huobipro extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const tag = this.safeString (transaction, 'address-tag'); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -81524,7 +79950,7 @@ module.exports = class huobipro extends Exchange { 'address': this.safeString (transaction, 'address'), 'tag': tag, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -81654,504 +80080,7 @@ module.exports = class huobipro extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],97:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class ice3x extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'ice3x', - 'name': 'ICE3X', - 'countries': [ 'ZA' ], // South Africa - 'rateLimit': 1000, - 'version': 'v1', - 'has': { - 'cancelOrder': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchCurrencies': true, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTrades': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg', - 'api': 'https://ice3x.com/api', - 'www': 'https://ice3x.com', // 'https://ice3x.co.za', - 'doc': 'https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017', - 'fees': [ - 'https://help.ice3.com/support/solutions/articles/11000033293-trading-fees', - 'https://help.ice3.com/support/solutions/articles/11000033288-fees-explained', - 'https://help.ice3.com/support/solutions/articles/11000008131-what-are-your-fiat-deposit-and-withdrawal-fees-', - 'https://help.ice3.com/support/solutions/articles/11000033289-deposit-fees', - ], - 'referral': 'https://ice3x.com?ref=14341802', - }, - 'api': { - 'public': { - 'get': [ - 'currency/list', - 'currency/info', - 'pair/list', - 'pair/info', - 'stats/marketdepthfull', - 'stats/marketdepthbtcav', - 'stats/marketdepth', - 'orderbook/info', - 'trade/list', - 'trade/info', - ], - }, - 'private': { - 'post': [ - 'balance/list', - 'balance/info', - 'order/new', - 'order/cancel', - 'order/list', - 'order/info', - 'trade/list', - 'trade/info', - 'transaction/list', - 'transaction/info', - 'invoice/list', - 'invoice/info', - 'invoice/pdf', - ], - }, - }, - 'fees': { - 'trading': { - 'maker': 0.005, - 'taker': 0.005, - }, - }, - 'precision': { - 'amount': 8, - 'price': 8, - }, - }); - } - - async fetchCurrencies (params = {}) { - const response = await this.publicGetCurrencyList (params); - const currencies = response['response']['entities']; - const precision = this.precision['amount']; - const result = {}; - for (let i = 0; i < currencies.length; i++) { - const currency = currencies[i]; - const id = this.safeString (currency, 'currency_id'); - const currencyId = this.safeString (currency, 'iso'); - const code = this.safeCurrencyCode (currencyId); - result[code] = { - 'id': id, - 'code': code, - 'name': currency['name'], - 'active': true, - 'precision': precision, - 'limits': { - 'amount': { - 'min': undefined, - 'max': Math.pow (10, precision), - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': Math.pow (10, precision), - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - }, - 'info': currency, - 'fee': undefined, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - if (this.currencies_by_id === undefined) { - this.currencies = await this.fetchCurrencies (); - this.currencies_by_id = this.indexBy (this.currencies, 'id'); - } - const response = await this.publicGetPairList (params); - const markets = this.safeValue (response['response'], 'entities'); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = this.safeString (market, 'pair_id'); - const baseId = this.safeString (market, 'currency_id_from'); - const quoteId = this.safeString (market, 'currency_id_to'); - const baseCurrency = this.currencies_by_id[baseId]; - const quoteCurrency = this.currencies_by_id[quoteId]; - const base = baseCurrency['code']; - const quote = quoteCurrency['code']; - const symbol = base + '/' + quote; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': undefined, - 'info': market, - 'precision': this.precision, - 'limits': this.limits, - }); - } - return result; - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.milliseconds (); - const symbol = market['symbol']; - const last = this.safeFloat (ticker, 'last_price'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'max_bid'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'min_ask'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'vol'), - 'info': ticker, - }; - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetStatsMarketdepthfull (this.extend (request, params)); - const ticker = this.safeValue (response['response'], 'entity'); - return this.parseTicker (ticker, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetStatsMarketdepthfull (params); - const tickers = this.safeValue (response['response'], 'entities'); - const result = {}; - for (let i = 0; i < tickers.length; i++) { - const ticker = tickers[i]; - const marketId = this.safeString (ticker, 'pair_id'); - const market = this.safeValue (this.marketsById, marketId); - if (market !== undefined) { - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); - } - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'pair_id': this.marketId (symbol), - }; - if (limit !== undefined) { - const type = this.safeString (params, 'type'); - if ((type !== 'ask') && (type !== 'bid')) { - // eslint-disable-next-line quotes - throw new ArgumentsRequired (this.id + " fetchOrderBook() requires an exchange-specific extra 'type' param ('bid' or 'ask') when used with a limit"); - } else { - request['items_per_page'] = limit; - } - } - const response = await this.publicGetOrderbookInfo (this.extend (request, params)); - const orderbook = this.safeValue (response['response'], 'entities'); - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'price', 'amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.safeTimestamp (trade, 'created'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } - const type = 'limit'; - const side = this.safeString (trade, 'type'); - const id = this.safeString (trade, 'trade_id'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'id': id, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': type, - 'side': side, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetTradeList (this.extend (request, params)); - const trades = this.safeValue (response['response'], 'entities'); - return this.parseTrades (trades, market, since, limit); - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostBalanceList (params); - const result = { 'info': response }; - const balances = this.safeValue (response['response'], 'entities', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - // currency ids are numeric strings - const currencyId = this.safeString (balance, 'currency_id'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseOrder (order, market = undefined) { - const pairId = this.safeInteger (order, 'pair_id'); - let symbol = undefined; - if (pairId && !market && (pairId in this.marketsById)) { - market = this.marketsById[pairId]; - symbol = market['symbol']; - } - const timestamp = this.safeTimestamp (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - let status = this.safeInteger (order, 'active'); - let remaining = this.safeFloat (order, 'remaining'); - let filled = undefined; - if (status === 1) { - status = 'open'; - } else { - status = 'closed'; - remaining = 0; - filled = amount; - } - let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - }; - if (market !== undefined) { - fee['currency'] = market['quote']; - } - } - return { - 'id': this.safeString (order, 'order_id'), - 'clientOrderId': undefined, - 'datetime': this.iso8601 (timestamp), - 'timestamp': timestamp, - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': 'limit', - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': this.safeString (order, 'type'), - 'price': price, - 'stopPrice': undefined, - 'cost': undefined, - 'amount': amount, - 'filled': filled, - 'remaining': remaining, - 'trades': undefined, - 'fee': fee, - 'info': order, - 'average': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - 'type': side, - 'amount': amount, - 'price': price, - }; - const response = await this.privatePostOrderNew (this.extend (request, params)); - const order = this.parseOrder ({ - 'order_id': response['response']['entity']['order_id'], - 'created': this.seconds (), - 'active': 1, - 'type': side, - 'price': price, - 'volume': amount, - 'remaining': amount, - 'info': response, - }, market); - return order; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - const request = { - 'order_id': id, - }; - return await this.privatePostOrderCancel (this.extend (request, params)); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'order _id': id, - }; - const response = await this.privatePostOrderInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const order = this.safeValue (data, 'entity'); - return this.parseOrder (order); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.privatePostOrderList (params); - const data = this.safeValue (response, 'response', {}); - const orders = this.safeValue (data, 'entities', []); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - return this.parseOrders (orders, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - if (limit !== undefined) { - request['items_per_page'] = limit; - } - if (since !== undefined) { - request['date_from'] = parseInt (since / 1000); - } - const response = await this.privatePostTradeList (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const trades = this.safeValue (data, 'entities', []); - return this.parseTrades (trades, market, since, limit); - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency_id': currency['id'], - }; - const response = await this.privatePostBalanceInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const balance = this.safeValue (data, 'entity', {}); - const address = this.safeString (balance, 'address'); - const status = address ? 'ok' : 'none'; - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'status': status, - 'info': response, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/' + this.version + '/' + path; - if (api === 'public') { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } - } else { - this.checkRequiredCredentials (); - body = this.urlencode (this.extend ({ - 'nonce': this.nonce (), - }, params)); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const response = await this.fetch2 (path, api, method, params, headers, body); - const errors = this.safeValue (response, 'errors'); - const data = this.safeValue (response, 'response'); - if (errors || !data) { - const authErrorKeys = [ 'Key', 'user_id', 'Sign' ]; - for (let i = 0; i < authErrorKeys.length; i++) { - const errorKey = authErrorKeys[i]; - const errorMessage = this.safeString (errors, errorKey); - if (!errorMessage) { - continue; - } - if (errorKey === 'user_id' && errorMessage.indexOf ('authorization') < 0) { - continue; - } - throw new AuthenticationError (errorMessage); - } - throw new ExchangeError (this.json (errors)); - } - return response; - } -}; - -},{"./base/Exchange":6,"./base/errors":8}],98:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],95:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -82159,6 +80088,7 @@ module.exports = class ice3x extends Exchange { const Exchange = require ('./base/Exchange'); const { PAD_WITH_ZERO } = require ('./base/functions/number'); const { InvalidOrder, InsufficientFunds, ExchangeError, ExchangeNotAvailable, DDoSProtection, BadRequest, NotSupported, InvalidAddress, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -82395,14 +80325,6 @@ module.exports = class idex extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // { // market: 'DIL-ETH', @@ -82422,16 +80344,16 @@ module.exports = class idex extends Exchange { // } const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'baseVolume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'baseVolume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'open'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const close = this.safeFloat (ticker, 'close'); - const ask = this.safeFloat (ticker, 'ask'); - const bid = this.safeFloat (ticker, 'bid'); - let percentage = this.safeFloat (ticker, 'percentChange'); + const open = this.safeNumber (ticker, 'open'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const close = this.safeNumber (ticker, 'close'); + const ask = this.safeNumber (ticker, 'ask'); + const bid = this.safeNumber (ticker, 'bid'); + let percentage = this.safeNumber (ticker, 'percentChange'); if (percentage !== undefined) { percentage = 1 + percentage / 100; } @@ -82507,11 +80429,11 @@ module.exports = class idex extends Exchange { // sequence: 3853 // } const timestamp = this.safeInteger (ohlcv, 'start'); - const open = this.safeFloat (ohlcv, 'open'); - const high = this.safeFloat (ohlcv, 'high'); - const low = this.safeFloat (ohlcv, 'low'); - const close = this.safeFloat (ohlcv, 'close'); - const volume = this.safeFloat (ohlcv, 'volume'); + const open = this.safeNumber (ohlcv, 'open'); + const high = this.safeNumber (ohlcv, 'high'); + const low = this.safeNumber (ohlcv, 'low'); + const close = this.safeNumber (ohlcv, 'close'); + const volume = this.safeNumber (ohlcv, 'volume'); return [ timestamp, open, high, low, close, volume ]; } @@ -82573,9 +80495,14 @@ module.exports = class idex extends Exchange { // txStatus: 'mined' // } const id = this.safeString (trade, 'fillId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'quoteQuantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteQuantity'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const timestamp = this.safeInteger (trade, 'time'); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); @@ -82584,7 +80511,7 @@ module.exports = class idex extends Exchange { const oppositeSide = (makerSide === 'buy') ? 'sell' : 'buy'; const side = this.safeString (trade, 'side', oppositeSide); const takerOrMaker = this.safeString (trade, 'liquidity', 'taker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); @@ -82657,8 +80584,8 @@ module.exports = class idex extends Exchange { const result = []; for (let i = 0; i < bookSide.length; i++) { const order = bookSide[i]; - const price = this.safeFloat (order, 0); - const amount = this.safeFloat (order, 1); + const price = this.safeNumber (order, 0); + const amount = this.safeNumber (order, 1); const orderCount = this.safeInteger (order, 2); result.push ([ price, amount, orderCount ]); } @@ -82745,16 +80672,13 @@ module.exports = class idex extends Exchange { const entry = response[i]; const currencyId = this.safeString (entry, 'asset'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (entry, 'quantity'); - const free = this.safeFloat (entry, 'availableForTrade'); - const used = this.safeFloat (entry, 'locked'); - result[code] = { - 'free': free, - 'used': used, - 'total': total, - }; + const account = this.account (); + account['total'] = this.safeString (entry, 'quantity'); + account['free'] = this.safeString (entry, 'availableForTrade'); + account['used'] = this.safeString (entry, 'locked'); + result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -82975,10 +80899,10 @@ module.exports = class idex extends Exchange { const symbol = this.safeSymbol (marketId, market, '-'); const trades = this.parseTrades (fills, market); const type = this.safeString (order, 'type'); - const amount = this.safeFloat (order, 'originalQuantity'); - const filled = this.safeFloat (order, 'executedQuantity'); - const average = this.safeFloat (order, 'avgExecutionPrice'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'originalQuantity'); + const filled = this.safeNumber (order, 'executedQuantity'); + const average = this.safeNumber (order, 'avgExecutionPrice'); + const price = this.safeNumber (order, 'price'); const rawStatus = this.safeString (order, 'status'); const status = this.parseOrderStatus (rawStatus); const fee = { @@ -83087,7 +81011,7 @@ module.exports = class idex extends Exchange { throw new NotSupported (this.id + ' quoteOrderQuantity is not supported for ' + type + ' orders, only supported for market orders'); } amountEnum = 1; - amount = this.safeFloat (params, 'quoteOrderQuantity'); + amount = this.safeNumber (params, 'quoteOrderQuantity'); } const sideEnum = (side === 'buy') ? 0 : 1; const walletBytes = this.remove0xPrefix (this.walletAddress); @@ -83390,13 +81314,13 @@ module.exports = class idex extends Exchange { } const id = this.safeString2 (transaction, 'depositId', 'withdrawId'); const code = this.safeCurrencyCode (this.safeString (transaction, 'asset'), currency); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const txid = this.safeString (transaction, 'txId'); const timestamp = this.safeInteger (transaction, 'txTime'); let fee = undefined; if ('fee' in transaction) { fee = { - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), 'currency': 'ETH', }; } @@ -83454,12 +81378,13 @@ module.exports = class idex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],99:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],96:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -83583,11 +81508,11 @@ module.exports = class independentreserve extends Exchange { const currencyId = this.safeString (balance, 'CurrencyCode'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'AvailableBalance'); - account['total'] = this.safeFloat (balance, 'TotalBalance'); + account['free'] = this.safeString (balance, 'AvailableBalance'); + account['total'] = this.safeString (balance, 'TotalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -83608,16 +81533,16 @@ module.exports = class independentreserve extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'LastPrice'); + const last = this.safeNumber (ticker, 'LastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'DayHighestPrice'), - 'low': this.safeFloat (ticker, 'DayLowestPrice'), - 'bid': this.safeFloat (ticker, 'CurrentHighestBidPrice'), + 'high': this.safeNumber (ticker, 'DayHighestPrice'), + 'low': this.safeNumber (ticker, 'DayLowestPrice'), + 'bid': this.safeNumber (ticker, 'CurrentHighestBidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'CurrentLowestOfferPrice'), + 'ask': this.safeNumber (ticker, 'CurrentLowestOfferPrice'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -83626,8 +81551,8 @@ module.exports = class independentreserve extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'DayAvgPrice'), - 'baseVolume': this.safeFloat (ticker, 'DayVolumeXbtInSecondaryCurrrency'), + 'average': this.safeNumber (ticker, 'DayAvgPrice'), + 'baseVolume': this.safeNumber (ticker, 'DayVolumeXbtInSecondaryCurrrency'), 'quoteVolume': undefined, 'info': ticker, }; @@ -83706,20 +81631,10 @@ module.exports = class independentreserve extends Exchange { orderType = 'limit'; } const timestamp = this.parse8601 (this.safeString (order, 'CreatedTimestampUtc')); - const amount = this.safeFloat2 (order, 'VolumeOrdered', 'Volume'); - let filled = this.safeFloat (order, 'VolumeFilled'); - let remaining = this.safeFloat (order, 'Outstanding'); - if (filled === undefined) { - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (0, amount - remaining); - } - } - if (remaining === undefined) { - if ((filled !== undefined) && (amount !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const feeRate = this.safeFloat (order, 'FeePercent'); + const amount = this.safeNumber2 (order, 'VolumeOrdered', 'Volume'); + const filled = this.safeNumber (order, 'VolumeFilled'); + const remaining = this.safeNumber (order, 'Outstanding'); + const feeRate = this.safeNumber (order, 'FeePercent'); let feeCost = undefined; if (feeRate !== undefined) { feeCost = feeRate * filled; @@ -83731,10 +81646,10 @@ module.exports = class independentreserve extends Exchange { }; const id = this.safeString (order, 'OrderGuid'); const status = this.parseOrderStatus (this.safeString (order, 'Status')); - const cost = this.safeFloat (order, 'Value'); - const average = this.safeFloat (order, 'AvgPrice'); - const price = this.safeFloat (order, 'Price', average); - return { + const cost = this.safeNumber (order, 'Value'); + const average = this.safeNumber (order, 'AvgPrice'); + const price = this.safeNumber (order, 'Price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -83756,7 +81671,7 @@ module.exports = class independentreserve extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -83844,14 +81759,11 @@ module.exports = class independentreserve extends Exchange { const timestamp = this.parse8601 (trade['TradeTimestampUtc']); const id = this.safeString (trade, 'TradeGuid'); const orderId = this.safeString (trade, 'OrderGuid'); - const price = this.safeFloat2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); - const amount = this.safeFloat2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); + const amountString = this.safeString2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const baseId = this.safeString (trade, 'PrimaryCurrencyCode'); const quoteId = this.safeString (trade, 'SecondaryCurrencyCode'); let marketId = undefined; @@ -83964,13 +81876,14 @@ module.exports = class independentreserve extends Exchange { } }; -},{"./base/Exchange":6}],100:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],97:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -84131,7 +82044,7 @@ module.exports = class indodax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const taker = this.safeFloat (market, 'trade_fee_percent'); + const taker = this.safeNumber (market, 'trade_fee_percent'); const isMaintenance = this.safeInteger (market, 'is_maintenance'); const active = (isMaintenance) ? false : true; const pricePrecision = this.safeInteger (market, 'price_round'); @@ -84141,11 +82054,11 @@ module.exports = class indodax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'trade_min_traded_currency'), + 'min': this.safeNumber (market, 'trade_min_traded_currency'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'trade_min_base_currency'), + 'min': this.safeNumber (market, 'trade_min_base_currency'), 'max': undefined, }, 'cost': { @@ -84183,11 +82096,11 @@ module.exports = class indodax extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (used, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (used, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -84224,16 +82137,16 @@ module.exports = class indodax extends Exchange { const timestamp = this.safeTimestamp (ticker, 'server_time'); const baseVolume = 'vol_' + market['baseId'].toLowerCase (); const quoteVolume = 'vol_' + market['quoteId'].toLowerCase (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -84243,8 +82156,8 @@ module.exports = class indodax extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, baseVolume), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, baseVolume), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -84258,14 +82171,11 @@ module.exports = class indodax extends Exchange { } const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -84320,7 +82230,7 @@ module.exports = class indodax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status', 'open')); let symbol = undefined; let cost = undefined; - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let amount = undefined; let remaining = undefined; let filled = undefined; @@ -84334,18 +82244,18 @@ module.exports = class indodax extends Exchange { if ((market['baseId'] === 'idr') && ('remain_rp' in order)) { baseId = 'rp'; } - cost = this.safeFloat (order, 'order_' + quoteId); + cost = this.safeNumber (order, 'order_' + quoteId); if (cost) { amount = cost / price; - const remainingCost = this.safeFloat (order, 'remain_' + quoteId); + const remainingCost = this.safeNumber (order, 'remain_' + quoteId); if (remainingCost !== undefined) { remaining = remainingCost / price; filled = amount - remaining; } } else { - amount = this.safeFloat (order, 'order_' + baseId); + amount = this.safeNumber (order, 'order_' + baseId); cost = price * amount; - remaining = this.safeFloat (order, 'remain_' + baseId); + remaining = this.safeNumber (order, 'remain_' + baseId); filled = amount - remaining; } } @@ -84585,13 +82495,14 @@ module.exports = class indodax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],101:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],98:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -84702,25 +82613,25 @@ module.exports = class itbit extends Exchange { throw new ExchangeError (this.id + ' fetchTicker returned a bad response: ' + this.json (ticker)); } const timestamp = this.parse8601 (serverTimeUTC); - const vwap = this.safeFloat (ticker, 'vwap24h'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); + const vwap = this.safeNumber (ticker, 'vwap24h'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'openToday'), + 'open': this.safeNumber (ticker, 'openToday'), 'close': last, 'last': last, 'previousClose': undefined, @@ -84767,23 +82678,20 @@ module.exports = class itbit extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const side = this.safeString (trade, 'direction'); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'commissionPaid'); + let feeCost = this.safeNumber (trade, 'commissionPaid'); const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - let rebatesApplied = this.safeFloat (trade, 'rebatesApplied'); + let rebatesApplied = this.safeNumber (trade, 'rebatesApplied'); if (rebatesApplied !== undefined) { rebatesApplied = -rebatesApplied; } const rebateCurrencyId = this.safeString (trade, 'rebateCurrency'); const rebateCurrency = this.safeCurrencyCode (rebateCurrencyId); - const price = this.safeFloat2 (trade, 'price', 'rate'); - const amount = this.safeFloat2 (trade, 'currency1Amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'price', 'rate'); + const amountString = this.safeString2 (trade, 'currency1Amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; const marketId = this.safeString (trade, 'instrument'); if (marketId !== undefined) { @@ -84905,7 +82813,7 @@ module.exports = class itbit extends Exchange { 'txid': txnHash, 'type': transactionType, 'status': status, - 'amount': this.safeFloat (item, 'amount'), + 'amount': this.safeNumber (item, 'amount'), 'fee': undefined, 'info': item, }); @@ -85005,11 +82913,11 @@ module.exports = class itbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchWallets (params = {}) { @@ -85100,26 +83008,16 @@ module.exports = class itbit extends Exchange { const type = this.safeString (order, 'type'); const symbol = this.markets_by_id[order['instrument']]['symbol']; const timestamp = this.parse8601 (order['createdTime']); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'amountFilled'); - let remaining = undefined; - let cost = undefined; + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'amountFilled'); const fee = undefined; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'volumeWeightedAveragePrice'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'volumeWeightedAveragePrice'); const clientOrderId = this.safeString (order, 'clientOrderIdentifier'); const id = this.safeString (order, 'id'); const postOnlyString = this.safeString (order, 'postOnly'); const postOnly = (postOnlyString === 'True'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -85134,15 +83032,15 @@ module.exports = class itbit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, // 'trades': this.parseTrades (order['trades'], market), 'trades': undefined, - }; + }); } nonce () { @@ -85240,7 +83138,7 @@ module.exports = class itbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],102:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],99:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -85248,6 +83146,7 @@ module.exports = class itbit extends Exchange { const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeNotAvailable, ArgumentsRequired, PermissionDenied, AuthenticationError, ExchangeError, OrderNotFound, DDoSProtection, InvalidNonce, InsufficientFunds, CancelPending, InvalidOrder, InvalidAddress, RateLimitExceeded } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -85540,26 +83439,38 @@ module.exports = class kraken extends Exchange { // } // } // - const keys = Object.keys (response['result']); + const markets = this.safeValue (response, 'result', {}); + const keys = Object.keys (markets); let result = []; for (let i = 0; i < keys.length; i++) { const id = keys[i]; - const market = response['result'][id]; - const baseId = market['base']; - const quoteId = market['quote']; + const market = markets[id]; + const baseId = this.safeString (market, 'base'); + const quoteId = this.safeString (market, 'quote'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const darkpool = id.indexOf ('.d') >= 0; - const symbol = darkpool ? market['altname'] : (base + '/' + quote); + const altname = this.safeString (market, 'altname'); + const symbol = darkpool ? altname : (base + '/' + quote); + const makerFees = this.safeValue (market, 'fees_maker', []); + const firstMakerFee = this.safeValue (makerFees, 0, []); + const firstMakerFeeRate = this.safeNumber (firstMakerFee, 1); let maker = undefined; - if ('fees_maker' in market) { - maker = parseFloat (market['fees_maker'][0][1]) / 100; + if (firstMakerFeeRate !== undefined) { + maker = parseFloat (firstMakerFeeRate) / 100; + } + const takerFees = this.safeValue (market, 'fees', []); + const firstTakerFee = this.safeValue (takerFees, 0, []); + const firstTakerFeeRate = this.safeNumber (firstTakerFee, 1); + let taker = undefined; + if (firstTakerFeeRate !== undefined) { + taker = parseFloat (firstTakerFeeRate) / 100; } const precision = { - 'amount': market['lot_decimals'], - 'price': market['pair_decimals'], + 'amount': this.safeInteger (market, 'lot_decimals'), + 'price': this.safeInteger (market, 'pair_decimals'), }; - const minAmount = this.safeFloat (market, 'ordermin'); + const minAmount = this.safeNumber (market, 'ordermin'); result.push ({ 'id': id, 'symbol': symbol, @@ -85571,7 +83482,7 @@ module.exports = class kraken extends Exchange { 'info': market, 'altname': market['altname'], 'maker': maker, - 'taker': parseFloat (market['fees'][0][1]) / 100, + 'taker': taker, 'active': true, 'precision': precision, 'limits': { @@ -85694,7 +83605,7 @@ module.exports = class kraken extends Exchange { await this.loadMarkets (); this.checkRequiredCredentials (); const response = await this.privatePostTradeVolume (params); - const tradedVolume = this.safeFloat (response['result'], 'volume'); + const tradedVolume = this.safeNumber (response['result'], 'volume'); const tiers = this.fees['trading']['tiers']; let taker = tiers['taker'][1]; let maker = tiers['maker'][1]; @@ -85716,8 +83627,8 @@ module.exports = class kraken extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); const timestamp = this.safeInteger (bidask, 2); return [ price, amount, timestamp ]; } @@ -85755,7 +83666,14 @@ module.exports = class kraken extends Exchange { // } // const result = this.safeValue (response, 'result', {}); - const orderbook = this.safeValue (result, market['id']); + let orderbook = this.safeValue (result, market['id']); + // sometimes kraken returns wsname instead of market id + // https://github.com/ccxt/ccxt/issues/8662 + const marketInfo = this.safeValue (market, 'info', {}); + const wsName = this.safeValue (marketInfo, 'wsname'); + if (wsName !== undefined) { + orderbook = this.safeValue (result, wsName, orderbook); + } return this.parseOrderBook (orderbook); } @@ -85783,7 +83701,7 @@ module.exports = class kraken extends Exchange { 'ask': parseFloat (ticker['a'][0]), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'o'), + 'open': this.safeNumber (ticker, 'o'), 'close': last, 'last': last, 'previousClose': undefined, @@ -85854,11 +83772,11 @@ module.exports = class kraken extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 6), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 6), ]; } @@ -85925,24 +83843,24 @@ module.exports = class kraken extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'asset'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); } else { direction = 'in'; } - const time = this.safeFloat (item, 'time'); + const time = this.safeNumber (item, 'time'); let timestamp = undefined; if (time !== undefined) { timestamp = parseInt (time * 1000); } const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -86066,9 +83984,8 @@ module.exports = class kraken extends Exchange { let timestamp = undefined; let side = undefined; let type = undefined; - let price = undefined; - let amount = undefined; - let cost = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; let orderId = undefined; let fee = undefined; @@ -86077,8 +83994,8 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 2); side = (trade[3] === 's') ? 'sell' : 'buy'; type = (trade[4] === 'l') ? 'limit' : 'market'; - price = this.safeFloat (trade, 0); - amount = this.safeFloat (trade, 1); + priceString = this.safeString (trade, 0); + amountString = this.safeString (trade, 1); const tradeLength = trade.length; if (tradeLength > 6) { id = this.safeString (trade, 6); // artificially added as per #1794 @@ -86099,15 +84016,15 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 'time'); side = this.safeString (trade, 'type'); type = this.safeString (trade, 'ordertype'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'vol'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'vol'); if ('fee' in trade) { let currency = undefined; if (market !== undefined) { currency = market['quote']; } fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': currency, }; } @@ -86115,11 +84032,9 @@ module.exports = class kraken extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': orderId, @@ -86194,10 +84109,10 @@ module.exports = class kraken extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -86226,15 +84141,15 @@ module.exports = class kraken extends Exchange { if (type === 'limit') { request['price'] = this.priceToPrecision (symbol, price); } else if ((type === 'stop-loss') || (type === 'take-profit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice', price); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice', price); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument or a price/stopPrice parameter for a ' + type + ' order'); } else { request['price'] = this.priceToPrecision (symbol, stopPrice); } } else if ((type === 'stop-loss-limit') || (type === 'take-profit-limit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice'); - const limitPrice = this.safeFloat (params, 'price2'); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice'); + const limitPrice = this.safeNumber (params, 'price2'); const stopPriceDefined = (stopPrice !== undefined); const limitPriceDefined = (limitPrice !== undefined); if (stopPriceDefined && limitPriceDefined) { @@ -86343,10 +84258,10 @@ module.exports = class kraken extends Exchange { if (orderDescription !== undefined) { const parts = orderDescription.split (' '); side = this.safeString (parts, 0); - amount = this.safeFloat (parts, 1); + amount = this.safeNumber (parts, 1); marketId = this.safeString (parts, 2); type = this.safeString (parts, 4); - price = this.safeFloat (parts, 5); + price = this.safeNumber (parts, 5); } side = this.safeString (description, 'type', side); type = this.safeString (description, 'ordertype', type); @@ -86360,27 +84275,23 @@ module.exports = class kraken extends Exchange { market = this.getDelistedMarketById (marketId); } const timestamp = this.safeTimestamp (order, 'opentm'); - amount = this.safeFloat (order, 'vol', amount); - const filled = this.safeFloat (order, 'vol_exec'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = amount - filled; - } + amount = this.safeNumber (order, 'vol', amount); + const filled = this.safeNumber (order, 'vol_exec'); let fee = undefined; - const cost = this.safeFloat (order, 'cost'); - price = this.safeFloat (description, 'price', price); + const cost = this.safeNumber (order, 'cost'); + price = this.safeNumber (description, 'price', price); if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (description, 'price2'); + price = this.safeNumber (description, 'price2'); } if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (order, 'price', price); + price = this.safeNumber (order, 'price', price); } - const average = this.safeFloat (order, 'price'); + const average = this.safeNumber (order, 'price'); if (market !== undefined) { symbol = market['symbol']; if ('fee' in order) { const flags = order['oflags']; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); fee = { 'cost': feeCost, 'rate': undefined, @@ -86404,8 +84315,8 @@ module.exports = class kraken extends Exchange { if (rawTrades !== undefined) { trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id }); } - const stopPrice = this.safeFloat (order, 'stopprice'); - return { + const stopPrice = this.safeNumber (order, 'stopprice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -86424,10 +84335,10 @@ module.exports = class kraken extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -86777,10 +84688,10 @@ module.exports = class kraken extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const address = this.safeString (transaction, 'info'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.safeString (transaction, 'type'); // injected from the outside - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost === undefined) { if (type === 'deposit') { feeCost = 0; @@ -86957,7 +84868,7 @@ module.exports = class kraken extends Exchange { throw new ExchangeError (this.id + " withdraw() requires a 'key' parameter (withdrawal key name, as set up on your account)"); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { // 'txid': 'comma delimited list of transaction ids to restrict output to', @@ -87091,13 +85002,14 @@ module.exports = class kraken extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],103:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],100:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, InvalidNonce, NotSupported, BadRequest, AuthenticationError, BadSymbol, RateLimitExceeded, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -87139,6 +85051,7 @@ module.exports = class kucoin extends Exchange { 'fetchTrades': true, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, }, 'urls': { 'logo': 'https://user-images.githubusercontent.com/51840849/87295558-132aaf80-c50e-11ea-9801-a2fb0c57c799.jpg', @@ -87146,6 +85059,7 @@ module.exports = class kucoin extends Exchange { 'api': { 'public': 'https://openapi-v2.kucoin.com', 'private': 'https://openapi-v2.kucoin.com', + 'futuresPrivate': 'https://api-futures.kucoin.com', }, 'test': { 'public': 'https://openapi-sandbox.kucoin.com', @@ -87254,6 +85168,15 @@ module.exports = class kucoin extends Exchange { 'stop-order/cancel', ], }, + 'futuresPrivate': { + 'get': [ + 'account-overview', + 'positions', + ], + 'post': [ + 'transfer-out', + ], + }, }, 'timeframes': { '1m': '1min', @@ -87278,6 +85201,7 @@ module.exports = class kucoin extends Exchange { 'order_not_exist_or_not_allow_to_cancel': InvalidOrder, // {"code":"400100","msg":"order_not_exist_or_not_allow_to_cancel"} 'Order size below the minimum requirement.': InvalidOrder, // {"code":"400100","msg":"Order size below the minimum requirement."} 'The withdrawal amount is below the minimum requirement.': ExchangeError, // {"code":"400100","msg":"The withdrawal amount is below the minimum requirement."} + 'Unsuccessful! Exceeded the max. funds out-transfer limit': InsufficientFunds, // {"code":"200000","msg":"Unsuccessful! Exceeded the max. funds out-transfer limit"} '400': BadRequest, '401': AuthenticationError, '403': NotSupported, @@ -87334,9 +85258,7 @@ module.exports = class kucoin extends Exchange { 'version': 'v1', 'symbolSeparator': '-', 'fetchMyTradesMethod': 'private_get_fills', - 'fetchBalance': { - 'type': 'trade', // or 'main' - }, + 'fetchBalance': 'trade', // endpoint versions 'versions': { 'public': { @@ -87356,6 +85278,25 @@ module.exports = class kucoin extends Exchange { 'accounts/sub-transfer': 'v2', }, }, + 'futuresPrivate': { + 'GET': { + 'account-overview': 'v1', + 'positions': 'v1', + }, + 'POST': { + 'transfer-out': 'v2', + }, + }, + }, + 'accountsByType': { + 'trade': 'trade', + 'trading': 'trade', + 'margin': 'margin', + 'main': 'main', + 'futures': 'contract', + 'contract': 'contract', + 'pool': 'pool', + 'pool-x': 'pool', }, }, }); @@ -87436,11 +85377,11 @@ module.exports = class kucoin extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const active = this.safeValue (market, 'enableTrading'); - const baseMaxSize = this.safeFloat (market, 'baseMaxSize'); - const baseMinSize = this.safeFloat (market, 'baseMinSize'); - const quoteMaxSize = this.safeFloat (market, 'quoteMaxSize'); - const quoteMinSize = this.safeFloat (market, 'quoteMinSize'); - // const quoteIncrement = this.safeFloat (market, 'quoteIncrement'); + const baseMaxSize = this.safeNumber (market, 'baseMaxSize'); + const baseMinSize = this.safeNumber (market, 'baseMinSize'); + const quoteMaxSize = this.safeNumber (market, 'quoteMaxSize'); + const quoteMinSize = this.safeNumber (market, 'quoteMinSize'); + // const quoteIncrement = this.safeNumber (market, 'quoteIncrement'); const precision = { 'amount': this.precisionFromString (this.safeString (market, 'baseIncrement')), 'price': this.precisionFromString (this.safeString (market, 'priceIncrement')), @@ -87451,7 +85392,7 @@ module.exports = class kucoin extends Exchange { 'max': baseMaxSize, }, 'price': { - 'min': this.safeFloat (market, 'priceIncrement'), + 'min': this.safeNumber (market, 'priceIncrement'), 'max': quoteMaxSize / baseMinSize, }, 'cost': { @@ -87502,7 +85443,7 @@ module.exports = class kucoin extends Exchange { const precision = this.safeInteger (entry, 'precision'); const isWithdrawEnabled = this.safeValue (entry, 'isWithdrawEnabled', false); const isDepositEnabled = this.safeValue (entry, 'isDepositEnabled', false); - const fee = this.safeFloat (entry, 'withdrawalMinFee'); + const fee = this.safeNumber (entry, 'withdrawalMinFee'); const active = (isWithdrawEnabled && isDepositEnabled); result[code] = { 'id': id, @@ -87569,7 +85510,7 @@ module.exports = class kucoin extends Exchange { const response = await this.privateGetWithdrawalsQuotas (this.extend (request, params)); const data = response['data']; const withdrawFees = {}; - withdrawFees[code] = this.safeFloat (data, 'withdrawMinFee'); + withdrawFees[code] = this.safeNumber (data, 'withdrawMinFee'); return { 'info': response, 'withdraw': withdrawFees, @@ -87616,35 +85557,35 @@ module.exports = class kucoin extends Exchange { // "mark": 0 // } // - let percentage = this.safeFloat (ticker, 'changeRate'); + let percentage = this.safeNumber (ticker, 'changeRate'); if (percentage !== undefined) { percentage = percentage * 100; } - const last = this.safeFloat2 (ticker, 'last', 'lastTradedPrice'); + const last = this.safeNumber2 (ticker, 'last', 'lastTradedPrice'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'vol'); - const quoteVolume = this.safeFloat (ticker, 'volValue'); + const baseVolume = this.safeNumber (ticker, 'vol'); + const quoteVolume = this.safeNumber (ticker, 'volValue'); const vwap = this.vwap (baseVolume, quoteVolume); const timestamp = this.safeInteger2 (ticker, 'time', 'datetime'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'changePrice'), + 'change': this.safeNumber (ticker, 'changePrice'), 'percentage': percentage, - 'average': this.safeFloat (ticker, 'averagePrice'), + 'average': this.safeNumber (ticker, 'averagePrice'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -87728,11 +85669,11 @@ module.exports = class kucoin extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -87930,16 +85871,18 @@ module.exports = class kucoin extends Exchange { // 'marginMode': 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned // 'autoBorrow': false, // The system will first borrow you funds at the optimal interest rate and then place an order for you }; - if (type !== 'market') { - request['price'] = this.priceToPrecision (symbol, price); - request['size'] = this.amountToPrecision (symbol, amount); - } else { - if (this.safeValue (params, 'quoteAmount')) { - // used to create market order by quote amount - https://github.com/ccxt/ccxt/issues/4876 - request['funds'] = this.amountToPrecision (symbol, amount); + const quoteAmount = this.safeNumber2 (params, 'cost', 'funds'); + if (type === 'market') { + if (quoteAmount !== undefined) { + params = this.omit (params, [ 'cost', 'funds' ]); + // kucoin uses base precision even for quote values + request['funds'] = this.amountToPrecision (symbol, quoteAmount); } else { request['size'] = this.amountToPrecision (symbol, amount); } + } else { + request['price'] = this.priceToPrecision (symbol, price); + request['size'] = this.amountToPrecision (symbol, amount); } const response = await this.privatePostOrders (this.extend (request, params)); // @@ -87973,8 +85916,10 @@ module.exports = class kucoin extends Exchange { 'fee': undefined, 'trades': undefined, }; - if (!this.safeValue (params, 'quoteAmount')) { + if (quoteAmount === undefined) { order['amount'] = amount; + } else { + order['cost'] = quoteAmount; } return order; } @@ -88150,15 +86095,18 @@ module.exports = class kucoin extends Exchange { const type = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'createdAt'); const datetime = this.iso8601 (timestamp); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); + if (price === 0.0) { + // market orders + price = undefined; + } const side = this.safeString (order, 'side'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (order, 'fee'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'dealSize'); - const cost = this.safeFloat (order, 'dealFunds'); - const remaining = amount - filled; + const feeCost = this.safeNumber (order, 'fee'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'dealSize'); + const cost = this.safeNumber (order, 'dealFunds'); // bool const isActive = this.safeValue (order, 'isActive', false); const cancelExist = this.safeValue (order, 'cancelExist', false); @@ -88168,20 +86116,11 @@ module.exports = class kucoin extends Exchange { 'currency': feeCurrency, 'cost': feeCost, }; - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const clientOrderId = this.safeString (order, 'clientOid'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': orderId, 'clientOrderId': clientOrderId, 'symbol': symbol, @@ -88194,7 +86133,7 @@ module.exports = class kucoin extends Exchange { 'stopPrice': stopPrice, 'cost': cost, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'timestamp': timestamp, 'datetime': datetime, 'fee': fee, @@ -88203,7 +86142,7 @@ module.exports = class kucoin extends Exchange { 'lastTradeTimestamp': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -88404,7 +86343,6 @@ module.exports = class kucoin extends Exchange { const id = this.safeString2 (trade, 'tradeId', 'id'); const orderId = this.safeString (trade, 'orderId'); const takerOrMaker = this.safeString (trade, 'liquidity'); - const amount = this.safeFloat2 (trade, 'size', 'amount'); let timestamp = this.safeInteger (trade, 'time'); if (timestamp !== undefined) { timestamp = parseInt (timestamp / 1000000); @@ -88415,10 +86353,13 @@ module.exports = class kucoin extends Exchange { timestamp = timestamp * 1000; } } - const price = this.safeFloat2 (trade, 'price', 'dealPrice'); + const priceString = this.safeString2 (trade, 'price', 'dealPrice'); + const amountString = this.safeString2 (trade, 'size', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const side = this.safeString (trade, 'side'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); let feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -88430,20 +86371,16 @@ module.exports = class kucoin extends Exchange { fee = { 'cost': feeCost, 'currency': feeCurrency, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } let type = this.safeString (trade, 'type'); if (type === 'match') { type = undefined; } - let cost = this.safeFloat2 (trade, 'funds', 'dealValue'); + let cost = this.safeNumber2 (trade, 'funds', 'dealValue'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'info': trade, @@ -88539,7 +86476,7 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); let address = this.safeString (transaction, 'address'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let txid = this.safeString (transaction, 'walletTxId'); if (txid !== undefined) { const txidParts = txid.split ('@'); @@ -88557,7 +86494,7 @@ module.exports = class kucoin extends Exchange { const rawStatus = this.safeString (transaction, 'status'); const status = this.parseTransactionStatus (rawStatus); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { let rate = undefined; if (amount !== undefined) { @@ -88738,45 +86675,180 @@ module.exports = class kucoin extends Exchange { async fetchBalance (params = {}) { await this.loadMarkets (); - let type = undefined; - const request = {}; - if ('type' in params) { - type = params['type']; - if (type !== undefined) { - request['type'] = type; - } - params = this.omit (params, 'type'); + const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'trade'); + const requestedType = this.safeString (params, 'type', defaultType); + const accountsByType = this.safeValue (this.options, 'accountsByType'); + const type = this.safeString (accountsByType, requestedType); + if (type === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' type must be one of ' + keys.join (', ')); + } + params = this.omit (params, 'type'); + if (type === 'contract') { + // futures api requires a futures apiKey + // only fetches one balance at a time + // by default it will only fetch the BTC balance of the futures account + // you can send 'currency' in params to fetch other currencies + // fetchBalance ({ 'type': 'futures', 'currency': 'USDT' }) + const response = await this.futuresPrivateGetAccountOverview (params); + // + // { + // code: '200000', + // data: { + // accountEquity: 0.00005, + // unrealisedPNL: 0, + // marginBalance: 0.00005, + // positionMargin: 0, + // orderMargin: 0, + // frozenFunds: 0, + // availableBalance: 0.00005, + // currency: 'XBT' + // } + // } + // + const data = this.safeValue (response, 'data'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (data, 'availableBalance'); + account['total'] = this.safeString (data, 'accountEquity'); + const result = { 'info': response }; + result[code] = account; + return this.parseBalance (result, false); } else { - const options = this.safeValue (this.options, 'fetchBalance', {}); - type = this.safeString (options, 'type', 'trade'); - } - const response = await this.privateGetAccounts (this.extend (request, params)); - // - // { - // "code":"200000", - // "data":[ - // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, - // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, - // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - const result = { 'info': response }; - for (let i = 0; i < data.length; i++) { - const balance = data[i]; - const balanceType = this.safeString (balance, 'type'); - if (balanceType === type) { - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'holds'); - result[code] = account; + const request = { + 'type': type, + }; + const response = await this.privateGetAccounts (this.extend (request, params)); + // + // { + // "code":"200000", + // "data":[ + // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, + // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, + // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + const result = { 'info': response }; + for (let i = 0; i < data.length; i++) { + const balance = data[i]; + const balanceType = this.safeString (balance, 'type'); + if (balanceType === type) { + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'holds'); + result[code] = account; + } } + return this.parseBalance (result, false); + } + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const requestedAmount = this.currencyToPrecision (code, amount); + const accountsById = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsById, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsById, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + if (fromId === 'contract') { + if (toId !== 'main') { + throw new ExchangeError (this.id + ' only supports transferring from futures account to main account'); + } + const request = { + 'currency': currency['id'], + 'amount': requestedAmount, + }; + if (!('bizNo' in params)) { + // it doesn't like more than 24 characters + request['bizNo'] = this.uuid22 (); + } + const response = await this.futuresPrivatePostTransferOut (this.extend (request, params)); + // + // { + // code: '200000', + // data: { + // applyId: '605a87217dff1500063d485d', + // bizNo: 'bcd6e5e1291f4905af84dc', + // payAccountType: 'CONTRACT', + // payTag: 'DEFAULT', + // remark: '', + // recAccountType: 'MAIN', + // recTag: 'DEFAULT', + // recRemark: '', + // recSystem: 'KUCOIN', + // status: 'PROCESSING', + // currency: 'XBT', + // amount: '0.00001', + // fee: '0', + // sn: '573688685663948', + // reason: '', + // createdAt: 1616545569000, + // updatedAt: 1616545569000 + // } + // } + // + const data = this.safeValue (response, 'data'); + const timestamp = this.safeInteger (data, 'createdAt'); + const id = this.safeString (data, 'applyId'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const amount = this.safeNumber (data, 'amount'); + const rawStatus = this.safeString (data, 'status'); + let status = undefined; + if (rawStatus === 'PROCESSING') { + status = 'pending'; + } + return { + 'info': response, + 'currency': code, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'amount': amount, + 'fromAccount': fromId, + 'toAccount': toId, + 'id': id, + 'status': status, + }; + } else { + const request = { + 'currency': currency['id'], + 'from': fromId, + 'to': toId, + 'amount': requestedAmount, + }; + if (!('clientOid' in params)) { + request['clientOid'] = this.uuid (); + } + const response = await this.privatePostAccountsInnerTransfer (this.extend (request, params)); + // { code: '200000', data: { orderId: '605a6211e657f00006ad0ad6' } } + const data = this.safeValue (response, 'data'); + const id = this.safeString (data, 'orderId'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'currency': code, + 'amount': requestedAmount, + 'fromAccount': fromId, + 'toAccount': toId, + 'status': undefined, + }; } - return this.parseBalance (result); } async fetchLedger (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -88864,11 +86936,11 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'code': code, }; - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'balance'); const direction = this.safeString (item, 'direction'); let before = undefined; if (after !== undefined && amount !== undefined) { @@ -88918,6 +86990,94 @@ module.exports = class kucoin extends Exchange { return this.safeString (types, type, type); } + async fetchPositions (symbols = undefined, params = {}) { + const response = await this.futuresPrivateGetPositions (params); + // + // { + // code: '200000', + // data: [ + // { + // id: '605a9772a229ab0006408258', + // symbol: 'XBTUSDTM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746099, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54371.92, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'USDT', + // isInverse: false + // }, + // { + // id: '605a9772026ac900066550df', + // symbol: 'XBTUSDM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746110, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54354.76, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'XBT', + // isInverse: true + // } + // ] + // } + // + return this.safeValue (response, 'data', response); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { // // the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint @@ -88934,16 +87094,16 @@ module.exports = class kucoin extends Exchange { let endpart = ''; headers = (headers !== undefined) ? headers : {}; if (Object.keys (query).length) { - if (method !== 'GET') { + if ((method === 'GET') || (method === 'DELETE')) { + endpoint += '?' + this.urlencode (query); + } else { body = this.json (query); endpart = body; headers['Content-Type'] = 'application/json'; - } else { - endpoint += '?' + this.urlencode (query); } } const url = this.urls['api'][api] + endpoint; - if (api === 'private') { + if ((api === 'private') || (api === 'futuresPrivate')) { this.checkRequiredCredentials (); const timestamp = this.nonce ().toString (); headers = this.extend ({ @@ -88986,23 +87146,24 @@ module.exports = class kucoin extends Exchange { // { code: '200000', data: { ... }} // const errorCode = this.safeString (response, 'code'); - const message = this.safeString (response, 'msg'); - this.throwExactlyMatchedException (this.exceptions['exact'], message, message); - this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, message); + const message = this.safeString (response, 'msg', ''); + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, this.id + ' ' + message); } }; -},{"./base/Exchange":6,"./base/errors":8}],104:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],101:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- -const acx = require ('./acx.js'); -const { ArgumentsRequired } = require ('./base/errors'); +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, InsufficientFunds, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class kuna extends acx { +module.exports = class kuna extends Exchange { describe () { return this.deepExtend (super.describe (), { 'id': 'kuna', @@ -89012,14 +87173,24 @@ module.exports = class kuna extends acx { 'version': 'v2', 'has': { 'CORS': false, - 'fetchTickers': true, + 'cancelOrder': true, + 'createOrder': true, + 'fetchBalance': true, + 'fetchMarkets': true, + 'fetchMyTrades': true, 'fetchOHLCV': 'emulated', 'fetchOpenOrders': true, - 'fetchMyTrades': true, + 'fetchOrder': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchTime': true, + 'fetchTrades': true, 'withdraw': false, }, 'timeframes': undefined, 'urls': { + 'extension': '.json', 'referral': 'https://kuna.io?r=kunaid-gvfihe8az7o4', 'logo': 'https://user-images.githubusercontent.com/51840849/87153927-f0578b80-c2c0-11ea-84b6-74612568e9e1.jpg', 'api': 'https://kuna.io', @@ -89027,8 +87198,47 @@ module.exports = class kuna extends acx { 'doc': 'https://kuna.io/documents/api', 'fees': 'https://kuna.io/documents/api', }, + 'api': { + 'public': { + 'get': [ + 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. + 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator + 'k', // Get OHLC(k line) of specific market + 'markets', // Get all available markets + 'order_book', // Get the order book of specified market + 'order_book/{market}', + 'tickers', // Get ticker of all markets + 'tickers/{market}', // Get ticker of specific market + 'timestamp', // Get server current time, in seconds since Unix epoch + 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. + 'trades/{market}', + ], + }, + 'private': { + 'get': [ + 'members/me', // Get your profile and accounts info + 'deposits', // Get your deposits history + 'deposit', // Get details of specific deposit + 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. + 'orders', // Get your orders, results is paginated + 'order', // Get information of specified order + 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. + 'withdraws', // Get your cryptocurrency withdraws + 'withdraw', // Get your cryptocurrency withdraw + ], + 'post': [ + 'orders', // Create a Sell/Buy order + 'orders/multi', // Create multiple sell/buy orders + 'orders/clear', // Cancel all my orders + 'order/delete', // Cancel an order + 'withdraw', // Create a withdraw + ], + }, + }, 'fees': { 'trading': { + 'tierBased': false, + 'percentage': true, 'taker': 0.25 / 100, 'maker': 0.25 / 100, }, @@ -89051,9 +87261,24 @@ module.exports = class kuna extends acx { }, }, }, + 'commonCurrencies': { + 'PLA': 'Plair', + }, + 'exceptions': { + '2002': InsufficientFunds, + '2003': OrderNotFound, + }, }); } + async fetchTime (params = {}) { + const response = await this.publicGetTimestamp (params); + // + // 1594911427 + // + return response * 1000; + } + async fetchMarkets (params = {}) { const quotes = [ 'btc', 'eth', 'eurs', 'rub', 'uah', 'usd', 'usdt', 'gol' ]; const pricePrecisions = { @@ -89109,24 +87334,100 @@ module.exports = class kuna extends acx { return markets; } - async fetchL3OrderBook (symbol, limit = undefined, params = {}) { - return await this.fetchOrderBook (symbol, limit, params); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); - } + async fetchOrderBook (symbol, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); const request = { 'market': market['id'], }; - const response = await this.privateGetOrders (this.extend (request, params)); - // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder - // with order cache + fetchOpenOrders - // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX - return this.parseOrders (response, market, since, limit); + if (limit !== undefined) { + request['limit'] = limit; // default = 300 + } + const orderbook = await this.publicGetDepth (this.extend (request, params)); + const timestamp = this.safeTimestamp (orderbook, 'timestamp'); + return this.parseOrderBook (orderbook, timestamp); + } + + parseTicker (ticker, market = undefined) { + const timestamp = this.safeTimestamp (ticker, 'at'); + ticker = ticker['ticker']; + let symbol = undefined; + if (market) { + symbol = market['symbol']; + } + const last = this.safeNumber (ticker, 'last'); + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'bidVolume': undefined, + 'ask': this.safeNumber (ticker, 'sell'), + 'askVolume': undefined, + 'vwap': undefined, + 'open': this.safeNumber (ticker, 'open'), + 'close': last, + 'last': last, + 'previousClose': undefined, + 'change': undefined, + 'percentage': undefined, + 'average': undefined, + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const response = await this.publicGetTickers (params); + const ids = Object.keys (response); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + let market = undefined; + let symbol = id; + if (id in this.markets_by_id) { + market = this.markets_by_id[id]; + symbol = market['symbol']; + } else { + let base = id.slice (0, 3); + let quote = id.slice (3, 6); + base = base.toUpperCase (); + quote = quote.toUpperCase (); + base = this.safeCurrencyCode (base); + quote = this.safeCurrencyCode (quote); + symbol = base + '/' + quote; + } + result[symbol] = this.parseTicker (response[id], market); + } + return this.filterByArray (result, 'symbol', symbols); + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTickersMarket (this.extend (request, params)); + return this.parseTicker (response, market); + } + + async fetchL3OrderBook (symbol, limit = undefined, params = {}) { + return await this.fetchOrderBook (symbol, limit, params); + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTrades (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); } parseTrade (trade, market = undefined) { @@ -89143,9 +87444,14 @@ module.exports = class kuna extends acx { }; side = this.safeString (sideMap, side, side); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_id'); const id = this.safeString (trade, 'id'); return { @@ -89165,29 +87471,6 @@ module.exports = class kuna extends acx { }; } - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); - } - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.privateGetTradesMy (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const trades = await this.fetchTrades (symbol, since, limit, params); @@ -89206,15 +87489,210 @@ module.exports = class kuna extends acx { } return result; } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + const response = await this.privateGetMembersMe (params); + const balances = this.safeValue (response, 'accounts'); + const result = { 'info': balances }; + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'market': this.marketId (symbol), + 'side': side, + 'volume': amount.toString (), + 'ord_type': type, + }; + if (type === 'limit') { + request['price'] = price.toString (); + } + const response = await this.privatePostOrders (this.extend (request, params)); + const marketId = this.safeValue (response, 'market'); + const market = this.safeValue (this.markets_by_id, marketId); + return this.parseOrder (response, market); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': id, + }; + const response = await this.privatePostOrderDelete (this.extend (request, params)); + const order = this.parseOrder (response); + const status = order['status']; + if (status === 'closed' || status === 'canceled') { + throw new OrderNotFound (this.id + ' ' + this.json (order)); + } + return order; + } + + parseOrderStatus (status) { + const statuses = { + 'done': 'closed', + 'wait': 'open', + 'cancel': 'canceled', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + const marketId = this.safeString (order, 'market'); + const symbol = this.safeSymbol (marketId, market); + const timestamp = this.parse8601 (this.safeString (order, 'created_at')); + const status = this.parseOrderStatus (this.safeString (order, 'state')); + const type = this.safeString (order, 'type'); + const side = this.safeString (order, 'side'); + const id = this.safeString (order, 'id'); + return this.safeOrder ({ + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': undefined, + 'status': status, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': this.safeNumber (order, 'price'), + 'stopPrice': undefined, + 'amount': this.safeNumber (order, 'volume'), + 'filled': this.safeNumber (order, 'executed_volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'trades': undefined, + 'fee': undefined, + 'info': order, + 'cost': undefined, + 'average': undefined, + }); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': parseInt (id), + }; + const response = await this.privateGetOrder (this.extend (request, params)); + return this.parseOrder (response); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetOrders (this.extend (request, params)); + // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder + // with order cache + fetchOpenOrders + // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX + return this.parseOrders (response, market, since, limit); + } + + async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetTradesMy (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); + } + + nonce () { + return this.milliseconds (); + } + + encodeParams (params) { + if ('orders' in params) { + const orders = params['orders']; + let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); + for (let i = 0; i < orders.length; i++) { + const order = orders[i]; + const keys = Object.keys (order); + for (let k = 0; k < keys.length; k++) { + const key = keys[k]; + const value = order[key]; + query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); + } + } + return query; + } + return this.urlencode (this.keysort (params)); + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let request = '/api/' + this.version + '/' + this.implodeParams (path, params); + if ('extension' in this.urls) { + request += this.urls['extension']; + } + const query = this.omit (params, this.extractParams (path)); + let url = this.urls['api'] + request; + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const nonce = this.nonce ().toString (); + const query = this.encodeParams (this.extend ({ + 'access_key': this.apiKey, + 'tonce': nonce, + }, params)); + const auth = method + '|' + request + '|' + query; + const signed = this.hmac (this.encode (auth), this.encode (this.secret)); + const suffix = query + '&signature=' + signed; + if (method === 'GET') { + url += '?' + suffix; + } else { + body = suffix; + headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; + } + } + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; + } + if (code === 400) { + const error = this.safeValue (response, 'error'); + const errorCode = this.safeString (error, 'code'); + const feedback = this.id + ' ' + this.json (response); + this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); + // fallback to default error handler + } + } }; -},{"./acx.js":4,"./base/errors":8}],105:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],102:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, BadSymbol, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89323,10 +87801,10 @@ module.exports = class lakebtc extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -89344,16 +87822,16 @@ module.exports = class lakebtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -89363,7 +87841,7 @@ module.exports = class lakebtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -89394,14 +87872,11 @@ module.exports = class lakebtc extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -89538,14 +88013,14 @@ module.exports = class lakebtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],106:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],103:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, DDoSProtection, BadRequest, AuthenticationError } = require ('./base/errors'); -const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89626,6 +88101,7 @@ module.exports = class latoken extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.1 / 100, @@ -89710,7 +88186,7 @@ module.exports = class latoken extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minQty'), + 'min': this.safeNumber (market, 'minQty'), 'max': undefined, }, 'price': { @@ -89760,7 +88236,7 @@ module.exports = class latoken extends Exchange { const numericId = this.safeInteger (currency, 'currencyId'); const code = this.safeCurrencyCode (id); const precision = this.safeInteger (currency, 'precission'); - const fee = this.safeFloat (currency, 'fee'); + const fee = this.safeNumber (currency, 'fee'); const active = undefined; result[code] = { 'id': id, @@ -89794,27 +88270,6 @@ module.exports = class latoken extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const response = await this.privateGetAccountBalances (params); @@ -89838,17 +88293,15 @@ module.exports = class latoken extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const frozen = this.safeFloat (balance, 'frozen'); - const pending = this.safeFloat (balance, 'pending'); - const used = this.sum (frozen, pending); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': used, - 'total': this.safeFloat (balance, 'amount'), - }; + const frozen = this.safeString (balance, 'frozen'); + const pending = this.safeString (balance, 'pending'); + const account = this.account (); + account['used'] = Precise.stringAdd (frozen, pending); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -89893,20 +88346,20 @@ module.exports = class latoken extends Exchange { // const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; if (open !== undefined && close !== undefined) { change = close - open; } - const percentage = this.safeFloat (ticker, 'priceChange'); + const percentage = this.safeNumber (ticker, 'priceChange'); const timestamp = this.nonce (); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'low': this.safeFloat (ticker, 'low'), - 'high': this.safeFloat (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -89920,7 +88373,7 @@ module.exports = class latoken extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -90004,22 +88457,19 @@ module.exports = class latoken extends Exchange { timestamp *= 1000; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'orderId'); - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -90154,29 +88604,17 @@ module.exports = class latoken extends Exchange { const symbol = this.safeSymbol (marketId, market); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executedAmount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executedAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderStatus')); - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const timeFilled = this.safeTimestamp (order, 'timeFilled'); let lastTradeTimestamp = undefined; if ((timeFilled !== undefined) && (timeFilled > 0)) { lastTradeTimestamp = timeFilled; } const clientOrderId = this.safeString (order, 'cliOrdId'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -90191,14 +88629,14 @@ module.exports = class latoken extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'average': undefined, - 'remaining': remaining, + 'remaining': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -90428,13 +88866,14 @@ module.exports = class latoken extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],107:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],104:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, DDoSProtection, AuthenticationError, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -90632,8 +89071,8 @@ module.exports = class lbank extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const info = ticker; ticker = info['ticker']; - const last = this.safeFloat (ticker, 'latest'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'latest'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; if (percentage !== undefined) { const relativeChange = this.sum (1, percentage / 100); @@ -90654,8 +89093,8 @@ module.exports = class lbank extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -90668,8 +89107,8 @@ module.exports = class lbank extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'turnover'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'turnover'), 'info': info, }; } @@ -90719,17 +89158,15 @@ module.exports = class lbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (trade, 'date_ms'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'tid'); const type = undefined; - const side = this.safeString (trade, 'type'); + let side = this.safeString (trade, 'type'); + side = side.replace ('_market', ''); return { 'id': id, 'info': this.safeValue (trade, 'info', trade), @@ -90777,11 +89214,11 @@ module.exports = class lbank extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -90846,12 +89283,12 @@ module.exports = class lbank extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (freeze, currencyId); - account['total'] = this.safeFloat (asset, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (freeze, currencyId); + account['total'] = this.safeString (asset, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -90879,35 +89316,20 @@ module.exports = class lbank extends Exchange { // "status":2 // } // - let symbol = undefined; - const responseMarket = this.safeValue (this.marketsById, order['symbol']); - if (responseMarket !== undefined) { - symbol = responseMarket['symbol']; - } else if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeInteger (order, 'create_time'); // Limit Order Request Returns: Order Price // Market Order Returns: cny amount of market order - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount', 0.0); - const filled = this.safeFloat (order, 'deal_amount', 0.0); - const av_price = this.safeFloat (order, 'avg_price'); - let cost = undefined; - if (av_price !== undefined) { - cost = filled * av_price; - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount', 0.0); + const filled = this.safeNumber (order, 'deal_amount', 0.0); + const average = this.safeNumber (order, 'avg_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'order_id'); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -90921,15 +89343,15 @@ module.exports = class lbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': this.safeValue (order, 'info', order), - 'average': undefined, - }; + 'average': average, + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -91129,14 +89551,15 @@ module.exports = class lbank extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],108:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],105:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported } = require ('./base/errors'); +const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -91240,7 +89663,7 @@ module.exports = class liquid extends Exchange { 'trading': { 'tierBased': true, 'percentage': true, - 'taker': 0.0015, + 'taker': 0.0030, 'maker': 0.0000, 'tiers': { 'perpetual': { @@ -91259,48 +89682,52 @@ module.exports = class liquid extends Exchange { [ 300000000, -0.00025 ], ], 'taker': [ - [ 0, 0.000600 ], - [ 25000, 0.000575 ], - [ 50000, 0.000550 ], - [ 100000, 0.000525 ], - [ 1000000, 0.000500 ], - [ 10000000, 0.000475 ], - [ 25000000, 0.000450 ], - [ 50000000, 0.000425 ], - [ 75000000, 0.000400 ], - [ 100000000, 0.000375 ], - [ 200000000, 0.000350 ], - [ 300000000, 0.000325 ], + [ 0, 0.00120 ], + [ 25000, 0.00115 ], + [ 50000, 0.00110 ], + [ 100000, 0.00105 ], + [ 1000000, 0.00100 ], + [ 10000000, 0.00095 ], + [ 25000000, 0.00090 ], + [ 50000000, 0.00085 ], + [ 75000000, 0.00080 ], + [ 100000000, 0.00075 ], + [ 200000000, 0.00070 ], + [ 300000000, 0.00065 ], ], }, 'spot': { 'taker': [ - [ 0, 0.0015 ], - [ 10000, 0.0015 ], - [ 20000, 0.0014 ], - [ 50000, 0.0013 ], - [ 100000, 0.0010 ], - [ 1000000, 0.0008 ], - [ 5000000, 0.0006 ], - [ 10000000, 0.0005 ], - [ 25000000, 0.0005 ], - [ 50000000, 0.00045 ], - [ 100000000, 0.0004 ], - [ 200000000, 0.0003 ], + [ 0, 0.003 ], + [ 10000, 0.0029 ], + [ 20000, 0.0028 ], + [ 50000, 0.0026 ], + [ 100000, 0.0020 ], + [ 1000000, 0.0016 ], + [ 5000000, 0.0012 ], + [ 10000000, 0.0010 ], + [ 25000000, 0.0009 ], + [ 50000000, 0.0008 ], + [ 100000000, 0.0007 ], + [ 200000000, 0.0006 ], + [ 500000000, 0.0004 ], + [ 1000000000, 0.0003 ], ], 'maker': [ [ 0, 0.0000 ], - [ 10000, 0.0015 ], - [ 20000, 0.1400 ], - [ 50000, 0.1300 ], - [ 100000, 0.0800 ], - [ 1000000, 0.0004 ], - [ 5000000, 0.00035 ], - [ 10000000, 0.00025 ], + [ 10000, 0.0020 ], + [ 20000, 0.0019 ], + [ 50000, 0.0018 ], + [ 100000, 0.0016 ], + [ 1000000, 0.0008 ], + [ 5000000, 0.0007 ], + [ 10000000, 0.0005 ], [ 25000000, 0.0000 ], [ 50000000, 0.0000 ], [ 100000000, 0.0000 ], [ 200000000, 0.0000 ], + [ 500000000, 0.0000 ], + [ 1000000000, 0.0000 ], ], }, }, @@ -91319,6 +89746,7 @@ module.exports = class liquid extends Exchange { 'less_than_order_size': InvalidOrder, 'price_too_high': InvalidOrder, 'price_too_small': InvalidOrder, // {"errors":{"order":["price_too_small"]}} + 'product_disabled': BadSymbol, // {"errors":{"order":["product_disabled"]}} }, 'commonCurrencies': { 'WIN': 'WCOIN', @@ -91368,7 +89796,7 @@ module.exports = class liquid extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': decimalPrecision, 'limits': { 'amount': { @@ -91384,7 +89812,7 @@ module.exports = class liquid extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal'), + 'min': this.safeNumber (currency, 'minimum_withdrawal'), 'max': undefined, }, }, @@ -91509,19 +89937,19 @@ module.exports = class liquid extends Exchange { let maker = this.fees['trading']['maker']; let taker = this.fees['trading']['taker']; if (type === 'swap') { - maker = this.safeFloat (market, 'maker_fee', this.fees['trading']['maker']); - taker = this.safeFloat (market, 'taker_fee', this.fees['trading']['taker']); + maker = this.safeNumber (market, 'maker_fee', this.fees['trading']['maker']); + taker = this.safeNumber (market, 'taker_fee', this.fees['trading']['taker']); } const disabled = this.safeValue (market, 'disabled', false); const active = !disabled; const baseCurrency = this.safeValue (currenciesByCode, base); const precision = { 'amount': 0.00000001, - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; let minAmount = undefined; if (baseCurrency !== undefined) { - minAmount = this.safeFloat (baseCurrency['info'], 'minimum_order_quantity'); + minAmount = this.safeNumber (baseCurrency['info'], 'minimum_order_quantity'); } const limits = { 'amount': { @@ -91603,8 +90031,8 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } for (let i = 0; i < fiat.length; i++) { @@ -91612,11 +90040,11 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -91635,7 +90063,7 @@ module.exports = class liquid extends Exchange { if (ticker['last_traded_price']) { const length = ticker['last_traded_price'].length; if (length > 0) { - last = this.safeFloat (ticker, 'last_traded_price'); + last = this.safeNumber (ticker, 'last_traded_price'); } } } @@ -91660,7 +90088,7 @@ module.exports = class liquid extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'last_price_24h'); + const open = this.safeNumber (ticker, 'last_price_24h'); if (open !== undefined && last !== undefined) { change = last - open; average = this.sum (last, open) / 2; @@ -91672,11 +90100,11 @@ module.exports = class liquid extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_market_ask'), - 'low': this.safeFloat (ticker, 'low_market_bid'), - 'bid': this.safeFloat (ticker, 'market_bid'), + 'high': this.safeNumber (ticker, 'high_market_ask'), + 'low': this.safeNumber (ticker, 'low_market_bid'), + 'bid': this.safeNumber (ticker, 'market_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'market_ask'), + 'ask': this.safeNumber (ticker, 'market_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -91686,7 +90114,7 @@ module.exports = class liquid extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'volume_24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -91732,14 +90160,11 @@ module.exports = class liquid extends Exchange { if (mySide !== undefined) { takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; } - let cost = undefined; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -91942,9 +90367,9 @@ module.exports = class liquid extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeValue (this.markets_by_id, marketId); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'filled_quantity'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + let filled = this.safeNumber (order, 'filled_quantity'); + const price = this.safeNumber (order, 'price'); let symbol = undefined; let feeCurrency = undefined; if (market !== undefined) { @@ -91954,7 +90379,7 @@ module.exports = class liquid extends Exchange { const type = this.safeString (order, 'order_type'); let tradeCost = 0; let tradeFilled = 0; - let average = this.safeFloat (order, 'average_price'); + let average = this.safeNumber (order, 'average_price'); const trades = this.parseTrades (this.safeValue (order, 'executions', []), market, undefined, undefined, { 'order': orderId, 'type': type, @@ -92011,7 +90436,7 @@ module.exports = class liquid extends Exchange { 'trades': trades, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'order_fee'), + 'cost': this.safeNumber (order, 'order_fee'), }, 'info': order, }; @@ -92166,7 +90591,7 @@ module.exports = class liquid extends Exchange { const updated = this.safeTimestamp (transaction, 'updated_at'); const type = 'withdrawal'; const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); return { 'info': transaction, 'id': id, @@ -92267,13 +90692,14 @@ module.exports = class liquid extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],109:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],106:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -92349,6 +90775,10 @@ module.exports = class luno extends Exchange { 'quotes/{id}', 'withdrawals', 'withdrawals/{id}', + 'transfers', + // GET /api/exchange/2/listorders + // GET /api/exchange/2/orders/{id} + // GET /api/exchange/3/order ], 'post': [ 'accounts', @@ -92423,12 +90853,12 @@ module.exports = class luno extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), - 'max': this.safeFloat (market, 'max_volume'), + 'min': this.safeNumber (market, 'min_volume'), + 'max': this.safeNumber (market, 'max_volume'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -92479,20 +90909,22 @@ module.exports = class luno extends Exchange { const wallet = wallets[i]; const currencyId = this.safeString (wallet, 'asset'); const code = this.safeCurrencyCode (currencyId); - const reserved = this.safeFloat (wallet, 'reserved'); - const unconfirmed = this.safeFloat (wallet, 'unconfirmed'); - const balance = this.safeFloat (wallet, 'balance'); + const reserved = this.safeString (wallet, 'reserved'); + const unconfirmed = this.safeString (wallet, 'unconfirmed'); + const balance = this.safeString (wallet, 'balance'); + const reservedUnconfirmed = Precise.stringAdd (reserved, unconfirmed); + const balanceUnconfirmed = Precise.stringAdd (balance, unconfirmed); if (code in result) { - result[code]['used'] = this.sum (result[code]['used'], reserved, unconfirmed); - result[code]['total'] = this.sum (result[code]['total'], balance, unconfirmed); + result[code]['used'] = Precise.stringAdd (result[code]['used'], reservedUnconfirmed); + result[code]['total'] = Precise.stringAdd (result[code]['total'], balanceUnconfirmed); } else { const account = this.account (); - account['used'] = this.sum (reserved, unconfirmed); - account['total'] = this.sum (balance, unconfirmed); + account['used'] = reservedUnconfirmed; + account['total'] = balanceUnconfirmed; result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -92543,18 +90975,12 @@ module.exports = class luno extends Exchange { const side = (order['type'] === 'ASK') ? 'sell' : 'buy'; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'limit_volume'); - const quoteFee = this.safeFloat (order, 'fee_counter'); - const baseFee = this.safeFloat (order, 'fee_base'); - const filled = this.safeFloat (order, 'base'); - const cost = this.safeFloat (order, 'counter'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'limit_volume'); + const quoteFee = this.safeNumber (order, 'fee_counter'); + const baseFee = this.safeNumber (order, 'fee_base'); + const filled = this.safeNumber (order, 'base'); + const cost = this.safeNumber (order, 'counter'); const fee = { 'currency': undefined }; if (quoteFee) { fee['cost'] = quoteFee; @@ -92568,7 +90994,7 @@ module.exports = class luno extends Exchange { } } const id = this.safeString (order, 'order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -92585,12 +91011,12 @@ module.exports = class luno extends Exchange { 'amount': amount, 'filled': filled, 'cost': cost, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -92636,16 +91062,16 @@ module.exports = class luno extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -92655,7 +91081,7 @@ module.exports = class luno extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'rolling_24_hour_volume'), + 'baseVolume': this.safeNumber (ticker, 'rolling_24_hour_volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -92706,8 +91132,8 @@ module.exports = class luno extends Exchange { } else { side = trade['is_buy'] ? 'buy' : 'sell'; } - const feeBase = this.safeFloat (trade, 'fee_base'); - const feeCounter = this.safeFloat (trade, 'fee_counter'); + const feeBase = this.safeNumber (trade, 'fee_base'); + const feeCounter = this.safeNumber (trade, 'fee_counter'); let feeCurrency = undefined; let feeCost = undefined; if (feeBase !== undefined) { @@ -92732,10 +91158,10 @@ module.exports = class luno extends Exchange { 'type': undefined, 'side': side, 'takerOrMaker': takerOrMaker, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), // Does not include potential fee costs - 'cost': this.safeFloat (trade, 'counter'), + 'cost': this.safeNumber (trade, 'counter'), 'fee': { 'cost': feeCost, 'currency': feeCurrency, @@ -92782,8 +91208,8 @@ module.exports = class luno extends Exchange { const response = await this.privateGetFeeInfo (params); return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } @@ -92917,9 +91343,9 @@ module.exports = class luno extends Exchange { const timestamp = this.safeValue (entry, 'timestamp'); const currencyId = this.safeString (entry, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - const available_delta = this.safeFloat (entry, 'available_delta'); - const balance_delta = this.safeFloat (entry, 'balance_delta'); - const after = this.safeFloat (entry, 'balance'); + const available_delta = this.safeNumber (entry, 'available_delta'); + const balance_delta = this.safeNumber (entry, 'balance_delta'); + const after = this.safeNumber (entry, 'balance'); const comment = this.safeString (entry, 'description'); let before = after; let amount = 0.0; @@ -92988,12 +91414,13 @@ module.exports = class luno extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],110:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],107:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -93175,18 +91602,16 @@ module.exports = class lykke extends Exchange { const id = this.safeString2 (trade, 'id', 'Id'); const orderId = this.safeString (trade, 'OrderId'); const timestamp = this.parse8601 (this.safeString2 (trade, 'dateTime', 'DateTime')); - const price = this.safeFloat2 (trade, 'price', 'Price'); - let amount = this.safeFloat2 (trade, 'volume', 'Amount'); + const priceString = this.safeString2 (trade, 'price', 'Price'); + let amountString = this.safeString2 (trade, 'volume', 'Amount'); let side = this.safeStringLower (trade, 'action'); if (side === undefined) { - if (amount < 0) { - side = 'sell'; - } else { - side = 'buy'; - } + side = (amountString[0] === '-') ? 'sell' : 'buy'; } - amount = Math.abs (amount); - const cost = price * amount; + amountString = (amountString[0] === '-') ? amountString.slice (1) : amountString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = { 'cost': 0, // There are no fees for trading. https://www.lykke.com/wallet-fees-and-limits/ 'currency': market['quote'], @@ -93247,11 +91672,11 @@ module.exports = class lykke extends Exchange { const currencyId = this.safeString (balance, 'AssetId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Balance'); - account['used'] = this.safeFloat (balance, 'Reserved'); + account['total'] = this.safeString (balance, 'Balance'); + account['used'] = this.safeString (balance, 'Reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -93298,7 +91723,7 @@ module.exports = class lykke extends Exchange { // } // const id = this.safeString (result, 'Id'); - price = this.safeFloat (result, 'Price'); + price = this.safeNumber (result, 'Price'); return { 'id': id, 'info': result, @@ -93389,16 +91814,16 @@ module.exports = class lykke extends Exchange { if (market) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'lastPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -93409,7 +91834,7 @@ module.exports = class lykke extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume24H'), + 'quoteVolume': this.safeNumber (ticker, 'volume24H'), 'info': ticker, }; } @@ -93467,20 +91892,18 @@ module.exports = class lykke extends Exchange { } else if (('CreatedAt' in order) && (order['CreatedAt'])) { timestamp = this.parse8601 (order['CreatedAt']); } - const price = this.safeFloat (order, 'Price'); + const price = this.safeNumber (order, 'Price'); let side = undefined; - let amount = this.safeFloat (order, 'Volume'); + let amount = this.safeNumber (order, 'Volume'); if (amount < 0) { side = 'sell'; amount = Math.abs (amount); } else { side = 'buy'; } - const remaining = Math.abs (this.safeFloat (order, 'RemainingVolume')); - const filled = amount - remaining; - const cost = filled * price; + const remaining = Math.abs (this.safeNumber (order, 'RemainingVolume')); const id = this.safeString (order, 'Id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -93494,15 +91917,15 @@ module.exports = class lykke extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -93563,8 +91986,8 @@ module.exports = class lykke extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - let amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + let amount = this.safeNumber (bidask, amountKey); if (amount < 0) { amount = -amount; } @@ -93604,13 +92027,14 @@ module.exports = class lykke extends Exchange { } }; -},{"./base/Exchange":6}],111:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7}],108:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -93767,7 +92191,7 @@ module.exports = class mercado extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, baseId), + 'min': this.safeNumber (amountLimits, baseId), 'max': undefined, }, 'price': { @@ -93803,16 +92227,16 @@ module.exports = class mercado extends Exchange { const response = await this.publicGetCoinTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'ticker', {}); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -93822,7 +92246,7 @@ module.exports = class mercado extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -93837,15 +92261,12 @@ module.exports = class mercado extends Exchange { const id = this.safeString2 (trade, 'tid', 'operation_id'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee_rate'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee_rate'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -93902,12 +92323,12 @@ module.exports = class mercado extends Exchange { if (currencyId in balances) { const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -94014,32 +92435,31 @@ module.exports = class mercado extends Exchange { // } // const id = this.safeString (order, 'order_id'); + const order_type = this.safeString (order, 'order_type'); let side = undefined; if ('order_type' in order) { - side = (order['order_type'] === 1) ? 'buy' : 'sell'; + side = (order_type === '1') ? 'buy' : 'sell'; } const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'coin_pair'); market = this.safeMarket (marketId, market); const timestamp = this.safeTimestamp (order, 'created_timestamp'); const fee = { - 'cost': this.safeFloat (order, 'fee'), + 'cost': this.safeNumber (order, 'fee'), 'currency': market['quote'], }; - const price = this.safeFloat (order, 'limit_price'); - // price = this.safeFloat (order, 'executed_price_avg', price); - const average = this.safeFloat (order, 'executed_price_avg'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'executed_quantity'); - const remaining = amount - filled; - const cost = filled * average; + const price = this.safeNumber (order, 'limit_price'); + // price = this.safeNumber (order, 'executed_price_avg', price); + const average = this.safeNumber (order, 'executed_price_avg'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const lastTradeTimestamp = this.safeTimestamp (order, 'updated_timestamp'); const rawTrades = this.safeValue (order, 'operations', []); const trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'side': side, 'order': id, }); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -94053,15 +92473,15 @@ module.exports = class mercado extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -94119,11 +92539,11 @@ module.exports = class mercado extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -94244,13 +92664,14 @@ module.exports = class mercado extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],112:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],109:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -94319,11 +92740,11 @@ module.exports = class mixcoins extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.safeFloat (balance, 'lock'); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = this.safeString (balance, 'lock'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -94343,16 +92764,16 @@ module.exports = class mixcoins extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'result'); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -94362,7 +92783,7 @@ module.exports = class mixcoins extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -94375,14 +92796,11 @@ module.exports = class mixcoins extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -94475,7 +92893,7 @@ module.exports = class mixcoins extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],113:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],110:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -94483,6 +92901,7 @@ module.exports = class mixcoins extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -94722,7 +93141,7 @@ module.exports = class ndax extends Exchange { const name = this.safeString (currency, 'ProductFullName'); const type = this.safeString (currency, 'ProductType'); const code = this.safeCurrencyCode (this.safeString (currency, 'Product')); - const precision = this.safeFloat (currency, 'TickSize'); + const precision = this.safeNumber (currency, 'TickSize'); const isDisabled = this.safeValue (currency, 'IsDisabled'); const active = !isDisabled; result[code] = { @@ -94803,8 +93222,8 @@ module.exports = class ndax extends Exchange { const quote = this.safeCurrencyCode (this.safeString (market, 'Product2Symbol')); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'QuantityIncrement'), - 'price': this.safeFloat (market, 'PriceIncrement'), + 'amount': this.safeNumber (market, 'QuantityIncrement'), + 'price': this.safeNumber (market, 'PriceIncrement'), }; const sessionStatus = this.safeString (market, 'SessionStatus'); const isDisable = this.safeValue (market, 'IsDisable'); @@ -94822,11 +93241,11 @@ module.exports = class ndax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinimumQuantity'), + 'min': this.safeNumber (market, 'MinimumQuantity'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'MinimumPrice'), + 'min': this.safeNumber (market, 'MinimumPrice'), 'max': undefined, }, 'cost': { @@ -94947,27 +93366,27 @@ module.exports = class ndax extends Exchange { const timestamp = this.safeInteger (ticker, 'TimeStamp'); const marketId = this.safeString (ticker, 'InstrumentId'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'LastTradedPx'); - const percentage = this.safeFloat (ticker, 'Rolling24HrPxChangePercent'); - const change = this.safeFloat (ticker, 'Rolling24HrPxChange'); - const open = this.safeFloat (ticker, 'SessionOpen'); + const last = this.safeNumber (ticker, 'LastTradedPx'); + const percentage = this.safeNumber (ticker, 'Rolling24HrPxChangePercent'); + const change = this.safeNumber (ticker, 'Rolling24HrPxChange'); + const open = this.safeNumber (ticker, 'SessionOpen'); let average = undefined; if ((last !== undefined) && (change !== undefined)) { average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'Rolling24HrVolume'); - const quoteVolume = this.safeFloat (ticker, 'Rolling24HrNotional'); + const baseVolume = this.safeNumber (ticker, 'Rolling24HrVolume'); + const quoteVolume = this.safeNumber (ticker, 'Rolling24HrNotional'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'SessionHigh'), - 'low': this.safeFloat (ticker, 'SessionLow'), - 'bid': this.safeFloat (ticker, 'BestBid'), - 'bidVolume': undefined, // this.safeFloat (ticker, 'BidQty'), always shows 0 - 'ask': this.safeFloat (ticker, 'BestOffer'), - 'askVolume': undefined, // this.safeFloat (ticker, 'AskQty'), always shows 0 + 'high': this.safeNumber (ticker, 'SessionHigh'), + 'low': this.safeNumber (ticker, 'SessionLow'), + 'bid': this.safeNumber (ticker, 'BestBid'), + 'bidVolume': undefined, // this.safeNumber (ticker, 'BidQty'), always shows 0 + 'ask': this.safeNumber (ticker, 'BestOffer'), + 'askVolume': undefined, // this.safeNumber (ticker, 'AskQty'), always shows 0 'vwap': vwap, 'open': open, 'close': last, @@ -95040,11 +93459,11 @@ module.exports = class ndax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -95192,8 +93611,8 @@ module.exports = class ndax extends Exchange { // "OMSId":1 // } // - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let cost = undefined; let timestamp = undefined; let id = undefined; @@ -95204,11 +93623,8 @@ module.exports = class ndax extends Exchange { let fee = undefined; let type = undefined; if (Array.isArray (trade)) { - price = this.safeFloat (trade, 3); - amount = this.safeFloat (trade, 2); - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + priceString = this.safeString (trade, 3); + amountString = this.safeString (trade, 2); timestamp = this.safeInteger (trade, 6); id = this.safeString (trade, 0); marketId = this.safeInteger (trade, 1); @@ -95220,13 +93636,13 @@ module.exports = class ndax extends Exchange { id = this.safeString (trade, 'TradeId'); orderId = this.safeString2 (trade, 'OrderId', 'OrigOrderId'); marketId = this.safeString2 (trade, 'InstrumentId', 'Instrument'); - price = this.safeFloat (trade, 'Price'); - amount = this.safeFloat (trade, 'Quantity'); - cost = this.safeFloat2 (trade, 'Value', 'GrossValueExecuted'); + priceString = this.safeString (trade, 'Price'); + amountString = this.safeString (trade, 'Quantity'); + cost = this.safeNumber2 (trade, 'Value', 'GrossValueExecuted'); takerOrMaker = this.safeStringLower (trade, 'MakerTaker'); side = this.safeStringLower (trade, 'Side'); type = this.safeStringLower (trade, 'OrderType'); - const feeCost = this.safeFloat (trade, 'Fee'); + const feeCost = this.safeNumber (trade, 'Fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'FeeProductId'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -95236,6 +93652,11 @@ module.exports = class ndax extends Exchange { }; } } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const symbol = this.safeSymbol (marketId, market); return { 'info': trade, @@ -95350,11 +93771,11 @@ module.exports = class ndax extends Exchange { const currencyId = this.safeString (balance, 'ProductId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Amount'); - account['used'] = this.safeFloat (balance, 'Hold'); + account['total'] = this.safeString (balance, 'Amount'); + account['used'] = this.safeString (balance, 'Hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseLedgerEntryType (type) { @@ -95400,8 +93821,8 @@ module.exports = class ndax extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'ReferenceType')); const currencyId = this.safeString (item, 'ProductId'); const code = this.safeCurrencyCode (currencyId, currency); - const credit = this.safeFloat (item, 'CR'); - const debit = this.safeFloat (item, 'DR'); + const credit = this.safeNumber (item, 'CR'); + const debit = this.safeNumber (item, 'DR'); let amount = undefined; let direction = undefined; if (credit > 0) { @@ -95413,7 +93834,7 @@ module.exports = class ndax extends Exchange { } const timestamp = this.safeInteger (item, 'TimeStamp'); let before = undefined; - const after = this.safeFloat (item, 'Balance'); + const after = this.safeNumber (item, 'Balance'); if (direction === 'out') { before = this.sum (after, amount); } else if (direction === 'in') { @@ -95561,36 +93982,26 @@ module.exports = class ndax extends Exchange { // const id = this.safeString2 (order, 'ReplacementOrderId', 'OrderId'); const timestamp = this.safeInteger (order, 'ReceiveTime'); - let lastTradeTimestamp = undefined; + const lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); const marketId = this.safeString (order, 'Instrument'); const symbol = this.safeSymbol (marketId, market); const side = this.safeStringLower (order, 'Side'); const type = this.safeStringLower (order, 'OrderType'); const clientOrderId = this.safeString2 (order, 'ReplacementClOrdId', 'ClientOrderId'); - let price = this.safeFloat (order, 'Price', 0.0); + let price = this.safeNumber (order, 'Price', 0.0); price = (price > 0.0) ? price : undefined; - const amount = this.safeFloat (order, 'OrigQuantity'); - const filled = this.safeFloat (order, 'QuantityExecuted'); - const cost = this.safeFloat (order, 'GrossValueExecuted'); - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (filled > 0) { - lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); - average = this.safeFloat (order, 'AvgPrice', 0.0); - average = (average > 0) ? average : undefined; - } - } - let stopPrice = this.safeFloat (order, 'StopPrice', 0.0); + const amount = this.safeNumber (order, 'OrigQuantity'); + const filled = this.safeNumber (order, 'QuantityExecuted'); + const cost = this.safeNumber (order, 'GrossValueExecuted'); + let average = this.safeNumber (order, 'AvgPrice', 0.0); + average = (average > 0) ? average : undefined; + let stopPrice = this.safeNumber (order, 'StopPrice', 0.0); stopPrice = (stopPrice > 0.0) ? stopPrice : undefined; const timeInForce = undefined; const status = this.parseOrderStatus (this.safeString (order, 'OrderState')); const fee = undefined; const trades = undefined; - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -95609,10 +94020,10 @@ module.exports = class ndax extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -96410,8 +94821,8 @@ module.exports = class ndax extends Exchange { } const addressTo = address; const status = this.parseTransactionStatusByType (this.safeString (transaction, 'TicketStatus'), type); - const amount = this.safeFloat (transaction, 'Amount'); - const feeCost = this.safeFloat (transaction, 'FeeAmount'); + const amount = this.safeNumber (transaction, 'Amount'); + const feeCost = this.safeNumber (transaction, 'FeeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -96492,7 +94903,7 @@ module.exports = class ndax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],114:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],111:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -96500,6 +94911,7 @@ module.exports = class ndax extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, BadRequest, CancelPending, OrderNotFound, InsufficientFunds, RateLimitExceeded, InvalidOrder, AccountSuspended, BadSymbol, OnMaintenance } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -96692,7 +95104,7 @@ module.exports = class novadax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -96700,7 +95112,7 @@ module.exports = class novadax extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderValue'), + 'min': this.safeNumber (market, 'minOrderValue'), 'max': undefined, }, }; @@ -96742,8 +95154,8 @@ module.exports = class novadax extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const open = this.safeFloat (ticker, 'open24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'open24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let percentage = undefined; let change = undefined; let average = undefined; @@ -96752,18 +95164,18 @@ module.exports = class novadax extends Exchange { percentage = change / open * 100; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'baseVolume24h'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume24h'); + const baseVolume = this.safeNumber (ticker, 'baseVolume24h'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -96919,11 +95331,13 @@ module.exports = class novadax extends Exchange { const orderId = this.safeString (trade, 'orderId'); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeStringLower (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - cost = amount * price; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'volume'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); @@ -96935,7 +95349,7 @@ module.exports = class novadax extends Exchange { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { - 'cost': this.safeFloat (parts, 0), + 'cost': this.safeNumber (parts, 0), 'currency': feeCurrencyCode, }; } @@ -97043,11 +95457,11 @@ module.exports = class novadax extends Exchange { const volumeField = this.safeString (options, 'volume', 'amount'); // or vol return [ this.safeTimestamp (ohlcv, 'score'), - this.safeFloat (ohlcv, 'openPrice'), - this.safeFloat (ohlcv, 'highPrice'), - this.safeFloat (ohlcv, 'lowPrice'), - this.safeFloat (ohlcv, 'closePrice'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'openPrice'), + this.safeNumber (ohlcv, 'highPrice'), + this.safeNumber (ohlcv, 'lowPrice'), + this.safeNumber (ohlcv, 'closePrice'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -97075,12 +95489,12 @@ module.exports = class novadax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'available'); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); + account['total'] = this.safeString (balance, 'available'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -97103,7 +95517,7 @@ module.exports = class novadax extends Exchange { if (uppercaseSide === 'SELL') { request['amount'] = this.amountToPrecision (symbol, amount); } else if (uppercaseSide === 'BUY') { - let value = this.safeFloat (params, 'value'); + let value = this.safeNumber (params, 'value'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -97333,21 +95747,17 @@ module.exports = class novadax extends Exchange { // } // const id = this.safeString (order, 'id'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'filledValue'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'filledValue'); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeInteger (order, 'timestamp'); - const average = this.safeFloat (order, 'averagePrice'); - const filled = this.safeFloat (order, 'filledAmount'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } + const average = this.safeNumber (order, 'averagePrice'); + const filled = this.safeNumber (order, 'filledAmount'); let fee = undefined; - const feeCost = this.safeFloat (order, 'filledFee'); + const feeCost = this.safeNumber (order, 'filledFee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -97356,7 +95766,7 @@ module.exports = class novadax extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -97374,11 +95784,11 @@ module.exports = class novadax extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async withdraw (code, amount, address, tag = undefined, params = {}) { @@ -97541,7 +95951,7 @@ module.exports = class novadax extends Exchange { } else if (type === 'COIN_OUT') { type = 'withdraw'; } - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'addressTag'); const txid = this.safeString (transaction, 'txHash'); @@ -97683,7 +96093,7 @@ module.exports = class novadax extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],115:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],112:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -97833,10 +96243,10 @@ module.exports = class oceanex extends Exchange { 'active': true, 'info': market, 'precision': { - 'amount': this.safeValue (market, 'amount_precision'), - 'price': this.safeValue (market, 'price_precision'), - 'base': this.safeValue (market, 'ask_precision'), - 'quote': this.safeValue (market, 'bid_precision'), + 'amount': this.safeInteger (market, 'amount_precision'), + 'price': this.safeInteger (market, 'price_precision'), + 'base': this.safeInteger (market, 'ask_precision'), + 'quote': this.safeInteger (market, 'bid_precision'), }, 'limits': { 'amount': { @@ -97848,7 +96258,7 @@ module.exports = class oceanex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeValue (market, 'minimum_trading_amount'), + 'min': this.safeNumber (market, 'minimum_trading_amount'), 'max': undefined, }, }, @@ -97942,21 +96352,21 @@ module.exports = class oceanex extends Exchange { 'symbol': market['symbol'], 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (ticker, 'last'), - 'last': this.safeFloat (ticker, 'last'), + 'close': this.safeNumber (ticker, 'last'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -98081,8 +96491,8 @@ module.exports = class oceanex extends Exchange { 'type': 'limit', 'takerOrMaker': undefined, 'side': side, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), 'cost': undefined, 'fee': undefined, }; @@ -98109,8 +96519,8 @@ module.exports = class oceanex extends Exchange { result[symbol] = { 'info': group, 'symbol': symbol, - 'maker': this.safeFloat (maker, 'value'), - 'taker': this.safeFloat (taker, 'value'), + 'maker': this.safeNumber (maker, 'value'), + 'taker': this.safeNumber (taker, 'value'), }; } return result; @@ -98132,11 +96542,11 @@ module.exports = class oceanex extends Exchange { const currencyId = this.safeValue (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -98244,12 +96654,12 @@ module.exports = class oceanex extends Exchange { // const status = this.parseOrderStatus (this.safeValue (order, 'state')); const marketId = this.safeString2 (order, 'market', 'market_id'); - const symbol = this.safeSymbol (marketId); + const symbol = this.safeSymbol (marketId, market); let timestamp = this.safeTimestamp (order, 'created_on'); if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'created_at')); } - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, @@ -98261,17 +96671,17 @@ module.exports = class oceanex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeValue (order, 'side'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_price'), - 'amount': this.safeFloat (order, 'volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'filled': this.safeFloat (order, 'executed_volume'), + 'average': this.safeNumber (order, 'avg_price'), + 'amount': this.safeNumber (order, 'volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'filled': this.safeNumber (order, 'executed_volume'), 'status': status, 'cost': undefined, 'trades': undefined, 'fee': undefined, - }; + }); } parseOrderStatus (status) { @@ -98364,12 +96774,12 @@ module.exports = class oceanex extends Exchange { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['codes'], errorCode, feedback); this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - throw new ExchangeError (response); + throw new ExchangeError (feedback); } } }; -},{"./base/Exchange":6,"./base/errors":8}],116:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],113:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -98406,7 +96816,7 @@ module.exports = class okcoin extends okex { } }; -},{"./okex.js":117}],117:[function(require,module,exports){ +},{"./okex.js":114}],114:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -98414,6 +96824,7 @@ module.exports = class okcoin extends okex { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -99207,7 +97618,7 @@ module.exports = class okex extends Exchange { let option = false; let baseId = this.safeString (market, 'base_currency'); let quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { if ('option_type' in market) { marketType = 'option'; @@ -99233,12 +97644,12 @@ module.exports = class okex extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = spot ? (base + '/' + quote) : id; - const lotSize = this.safeFloat2 (market, 'lot_size', 'trade_increment'); + const lotSize = this.safeNumber2 (market, 'lot_size', 'trade_increment'); const precision = { - 'amount': this.safeFloat (market, 'size_increment', lotSize), - 'price': this.safeFloat (market, 'tick_size'), + 'amount': this.safeNumber (market, 'size_increment', lotSize), + 'price': this.safeNumber (market, 'tick_size'), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const active = true; const fees = this.safeValue2 (this.fees, marketType, 'trading', {}); return this.extend (fees, { @@ -99413,7 +97824,7 @@ module.exports = class okex extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal'), + 'min': this.safeNumber (currency, 'min_withdrawal'), 'max': undefined, }, }, @@ -99488,18 +97899,18 @@ module.exports = class okex extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open_24h'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open_24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_24h'), - 'low': this.safeFloat (ticker, 'low_24h'), - 'bid': this.safeFloat (ticker, 'best_bid'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (ticker, 'best_ask'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber (ticker, 'high_24h'), + 'low': this.safeNumber (ticker, 'low_24h'), + 'bid': this.safeNumber (ticker, 'best_bid'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (ticker, 'best_ask'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': undefined, 'open': open, 'close': last, @@ -99508,8 +97919,8 @@ module.exports = class okex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'base_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'quote_volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'base_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'quote_volume_24h'), 'info': ticker, }; } @@ -99646,9 +98057,12 @@ module.exports = class okex extends Exchange { quote = market['quote']; } const timestamp = this.parse8601 (this.safeString2 (trade, 'timestamp', 'created_at')); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'size', 'qty'); - amount = this.safeFloat (trade, 'order_qty', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'size', 'qty'); + amountString = this.safeString (trade, 'order_qty', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -99656,13 +98070,7 @@ module.exports = class okex extends Exchange { takerOrMaker = 'taker'; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -99771,22 +98179,22 @@ module.exports = class okex extends Exchange { } return [ timestamp, // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets ]; } else { return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, 'volume'), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, 'volume'), // Base Volume ]; } } @@ -99932,9 +98340,9 @@ module.exports = class okex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeNumber (balance, 'balance'); + account['used'] = this.safeNumber (balance, 'hold'); + account['free'] = this.safeNumber (balance, 'available'); result[code] = account; } return this.parseBalance (result); @@ -100004,9 +98412,9 @@ module.exports = class okex extends Exchange { const currencyId = parts[1]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (marketBalance, 'balance'); - account['used'] = this.safeFloat (marketBalance, 'hold'); - account['free'] = this.safeFloat (marketBalance, 'available'); + account['total'] = this.safeNumber (marketBalance, 'balance'); + account['used'] = this.safeNumber (marketBalance, 'hold'); + account['free'] = this.safeNumber (marketBalance, 'available'); accounts[code] = account; } else { throw new NotSupported (this.id + ' margin balance response format has changed!'); @@ -100059,29 +98467,29 @@ module.exports = class okex extends Exchange { const code = this.safeCurrencyCode (id); const balance = this.safeValue (info, id, {}); const account = this.account (); - const totalAvailBalance = this.safeFloat (balance, 'total_avail_balance'); + const totalAvailBalance = this.safeNumber (balance, 'total_avail_balance'); if (this.safeString (balance, 'margin_mode') === 'fixed') { const contracts = this.safeValue (balance, 'contracts', []); let free = totalAvailBalance; for (let i = 0; i < contracts.length; i++) { const contract = contracts[i]; - const fixedBalance = this.safeFloat (contract, 'fixed_balance'); - const realizedPnl = this.safeFloat (contract, 'realized_pnl'); - const marginFrozen = this.safeFloat (contract, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (contract, 'margin_for_unfilled'); + const fixedBalance = this.safeNumber (contract, 'fixed_balance'); + const realizedPnl = this.safeNumber (contract, 'realized_pnl'); + const marginFrozen = this.safeNumber (contract, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (contract, 'margin_for_unfilled'); const margin = this.sum (fixedBalance, realizedPnl) - marginFrozen - marginForUnfilled; free = this.sum (free, margin); } account['free'] = free; } else { - const realizedPnl = this.safeFloat (balance, 'realized_pnl'); - const unrealizedPnl = this.safeFloat (balance, 'unrealized_pnl'); - const marginFrozen = this.safeFloat (balance, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (balance, 'margin_for_unfilled'); + const realizedPnl = this.safeNumber (balance, 'realized_pnl'); + const unrealizedPnl = this.safeNumber (balance, 'unrealized_pnl'); + const marginFrozen = this.safeNumber (balance, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (balance, 'margin_for_unfilled'); account['free'] = this.sum (totalAvailBalance, realizedPnl, unrealizedPnl) - marginFrozen - marginForUnfilled; } // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); + account['total'] = this.safeNumber (balance, 'equity'); result[code] = account; } return this.parseBalance (result); @@ -100119,8 +98527,8 @@ module.exports = class okex extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeNumber (balance, 'equity'); + account['free'] = this.safeNumber (balance, 'total_avail_balance'); result[symbol] = account; } return this.parseBalance (result); @@ -100324,7 +98732,7 @@ module.exports = class okex extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -100534,8 +98942,8 @@ module.exports = class okex extends Exchange { symbol = market['symbol']; } } - let amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat2 (order, 'filled_size', 'filled_qty'); + let amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber2 (order, 'filled_size', 'filled_qty'); let remaining = undefined; if (amount !== undefined) { if (filled !== undefined) { @@ -100546,9 +98954,9 @@ module.exports = class okex extends Exchange { if (type === 'market') { remaining = 0; } - let cost = this.safeFloat2 (order, 'filled_notional', 'funds'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); + let cost = this.safeNumber2 (order, 'filled_notional', 'funds'); + const price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'price_avg'); if (cost === undefined) { if (filled !== undefined && average !== undefined) { cost = average * filled; @@ -100559,7 +98967,7 @@ module.exports = class okex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'state')); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -100572,7 +98980,7 @@ module.exports = class okex extends Exchange { if ((clientOrderId !== undefined) && (clientOrderId.length < 1)) { clientOrderId = undefined; // fix empty clientOrderId string } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); return { 'info': order, 'id': id, @@ -100816,16 +99224,6 @@ module.exports = class okex extends Exchange { return await this.fetchOrdersByState ('7', symbol, since, limit, params); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -100853,7 +99251,8 @@ module.exports = class okex extends Exchange { async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); - const currency = this.currency (code); + const parts = code.split ('-'); + const currency = this.currency (parts[0]); const request = { 'currency': currency['id'], }; @@ -100866,8 +99265,8 @@ module.exports = class okex extends Exchange { // } // ] // - const addresses = this.parseDepositAddresses (response); - const address = this.safeValue (addresses, code); + const addressesByCode = this.parseDepositAddresses (response); + const address = this.safeValue (addressesByCode, code); if (address === undefined) { throw new InvalidAddress (this.id + ' fetchDepositAddress cannot return nonexistent addresses, you should create withdrawal addresses with the exchange website first'); } @@ -101042,7 +99441,7 @@ module.exports = class okex extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const txid = this.safeString (transaction, 'txid'); const timestamp = this.parse8601 (this.safeString (transaction, 'timestamp')); @@ -101105,19 +99504,19 @@ module.exports = class okex extends Exchange { let feeCurrencyId = undefined; if (receivedCurrencyId === quoteId) { side = this.safeString (otherTrade, 'side'); - amount = this.safeFloat (otherTrade, 'size'); - cost = this.safeFloat (userTrade, 'size'); + amount = this.safeNumber (otherTrade, 'size'); + cost = this.safeNumber (userTrade, 'size'); feeCurrencyId = this.safeString (otherTrade, 'currency'); } else { side = this.safeString (userTrade, 'side'); - amount = this.safeFloat (userTrade, 'size'); - cost = this.safeFloat (otherTrade, 'size'); + amount = this.safeNumber (userTrade, 'size'); + cost = this.safeNumber (otherTrade, 'size'); feeCurrencyId = this.safeString (userTrade, 'currency'); } const id = this.safeString (userTrade, 'trade_id'); - const price = this.safeFloat (userTrade, 'price'); - const feeCostFirst = this.safeFloat (otherTrade, 'fee'); - const feeCostSecond = this.safeFloat (userTrade, 'fee'); + const price = this.safeNumber (userTrade, 'price'); + const feeCostFirst = this.safeNumber (otherTrade, 'fee'); + const feeCostSecond = this.safeNumber (userTrade, 'fee'); const feeCurrencyCodeFirst = this.safeCurrencyCode (this.safeString (otherTrade, 'currency')); const feeCurrencyCodeSecond = this.safeCurrencyCode (this.safeString (userTrade, 'currency')); let fee = undefined; @@ -101549,7 +99948,7 @@ module.exports = class okex extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); let method = undefined; const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType'); @@ -101931,14 +100330,14 @@ module.exports = class okex extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'timestamp')); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; const marketId = this.safeString (item, 'instrument_id'); let symbol = undefined; @@ -102048,13 +100447,14 @@ module.exports = class okex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],118:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],115:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -102147,12 +100547,12 @@ module.exports = class paymium extends Exchange { if (free in response) { const account = this.account (); const used = 'locked_' + currencyId; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -102171,30 +100571,30 @@ module.exports = class paymium extends Exchange { }; const ticker = await this.publicGetDataCurrencyTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'at'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'price'); + const last = this.safeNumber (ticker, 'price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'variation'), + 'percentage': this.safeNumber (ticker, 'variation'), 'average': undefined, 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, @@ -102210,15 +100610,12 @@ module.exports = class paymium extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); + const priceString = this.safeString (trade, 'price'); const amountField = 'traded_' + market['base'].toLowerCase (); - const amount = this.safeFloat (trade, amountField); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const amountString = this.safeString (trade, amountField); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -102313,7 +100710,7 @@ module.exports = class paymium extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],119:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],116:[function(require,module,exports){ 'use strict'; // ---------------------------------------------------------------------------- @@ -102621,13 +101018,13 @@ module.exports = class phemex extends Exchange { }); } - parseSafeFloat (value = undefined) { + parseSafeNumber (value = undefined) { if (value === undefined) { return value; } value = value.replace (',', ''); const parts = value.split (' '); - return this.safeFloat (parts, 0); + return this.safeNumber (parts, 0); } parseSwapMarket (market) { @@ -102651,7 +101048,9 @@ module.exports = class phemex extends Exchange { // "minPriceEp":5000, // "maxPriceEp":10000000000, // "maxOrderQty":1000000, - // "type":"Perpetual" + // "type":"Perpetual", + // "status":"Listed", + // "tipOrderQty":1000000, // "steps":"50", // "riskLimits":[ // {"limit":100,"initialMargin":"1.0%","initialMarginEr":1000000,"maintenanceMargin":"0.5%","maintenanceMarginEr":500000}, @@ -102676,7 +101075,7 @@ module.exports = class phemex extends Exchange { // } // const id = this.safeString (market, 'symbol'); - const baseId = this.safeString (market, 'baseCurrency', 'contractUnderlyingAssets'); + const baseId = this.safeString2 (market, 'baseCurrency', 'contractUnderlyingAssets'); const quoteId = this.safeString (market, 'quoteCurrency'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); @@ -102693,16 +101092,16 @@ module.exports = class phemex extends Exchange { } const linear = !inverse; const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const priceScale = this.safeInteger (market, 'priceScale'); const ratioScale = this.safeInteger (market, 'ratioScale'); const valueScale = this.safeInteger (market, 'valueScale'); - const minPriceEp = this.safeFloat (market, 'minPriceEp'); - const maxPriceEp = this.safeFloat (market, 'maxPriceEp'); - const makerFeeRateEr = this.safeFloat (market, 'makerFeeRateEr'); - const takerFeeRateEr = this.safeFloat (market, 'takerFeeRateEr'); + const minPriceEp = this.safeNumber (market, 'minPriceEp'); + const maxPriceEp = this.safeNumber (market, 'maxPriceEp'); + const makerFeeRateEr = this.safeNumber (market, 'makerFeeRateEr'); + const takerFeeRateEr = this.safeNumber (market, 'takerFeeRateEr'); if (makerFeeRateEr !== undefined) { maker = this.fromEn (makerFeeRateEr, ratioScale, 0.00000001); } @@ -102720,10 +101119,11 @@ module.exports = class phemex extends Exchange { }, 'cost': { 'min': undefined, - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderQty')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderQty')), }, }; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -102772,7 +101172,9 @@ module.exports = class phemex extends Exchange { // "defaultMakerFee":"0.001", // "defaultMakerFeeEr":100000, // "baseQtyPrecision":6, - // "quoteQtyPrecision":2 + // "quoteQtyPrecision":2, + // "status":"Listed", + // "tipOrderQty":20 // } // const type = this.safeStringLower (market, 'type'); @@ -102783,30 +101185,31 @@ module.exports = class phemex extends Exchange { const inverse = undefined; const spot = true; const swap = false; - const taker = this.safeFloat (market, 'defaultTakerFee'); - const maker = this.safeFloat (market, 'defaultMakerFee'); + const taker = this.safeNumber (market, 'defaultTakerFee'); + const maker = this.safeNumber (market, 'defaultMakerFee'); const precision = { - 'amount': this.parseSafeFloat (this.safeString (market, 'baseTickSize')), - 'price': this.parseSafeFloat (this.safeString (market, 'quoteTickSize')), + 'amount': this.parseSafeNumber (this.safeString (market, 'baseTickSize')), + 'price': this.parseSafeNumber (this.safeString (market, 'quoteTickSize')), }; const limits = { 'amount': { 'min': precision['amount'], - 'max': this.parseSafeFloat (this.safeString (market, 'maxBaseOrderSize')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxBaseOrderSize')), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.parseSafeFloat (this.safeString (market, 'minOrderValue')), - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderValue')), + 'min': this.parseSafeNumber (this.safeString (market, 'minOrderValue')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderValue')), }, }; const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -102996,8 +101399,8 @@ module.exports = class phemex extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const valueScale = this.safeInteger (currency, 'valueScale'); - const minValueEv = this.safeFloat (currency, 'minValueEv'); - const maxValueEv = this.safeFloat (currency, 'maxValueEv'); + const minValueEv = this.safeNumber (currency, 'minValueEv'); + const maxValueEv = this.safeNumber (currency, 'maxValueEv'); let minAmount = undefined; let maxAmount = undefined; let precision = undefined; @@ -103047,12 +101450,12 @@ module.exports = class phemex extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - let amount = this.safeFloat (bidask, amountKey); + let amount = this.safeNumber (bidask, amountKey); if (market['spot']) { amount = this.fromEv (amount, market); } return [ - this.fromEp (this.safeFloat (bidask, priceKey), market), + this.fromEp (this.safeNumber (bidask, priceKey), market), amount, ]; } @@ -103186,16 +101589,16 @@ module.exports = class phemex extends Exchange { // let baseVolume = undefined; if ((market !== undefined) && market['spot']) { - baseVolume = this.fromEv (this.safeFloat (ohlcv, 7), market); + baseVolume = this.fromEv (this.safeNumber (ohlcv, 7), market); } else { baseVolume = this.safeInteger (ohlcv, 7); } return [ this.safeTimestamp (ohlcv, 0), - this.fromEp (this.safeFloat (ohlcv, 3), market), - this.fromEp (this.safeFloat (ohlcv, 4), market), - this.fromEp (this.safeFloat (ohlcv, 5), market), - this.fromEp (this.safeFloat (ohlcv, 6), market), + this.fromEp (this.safeNumber (ohlcv, 3), market), + this.fromEp (this.safeNumber (ohlcv, 4), market), + this.fromEp (this.safeNumber (ohlcv, 5), market), + this.fromEp (this.safeNumber (ohlcv, 6), market), baseVolume, ]; } @@ -103288,11 +101691,11 @@ module.exports = class phemex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.000001); - const last = this.fromEp (this.safeFloat (ticker, 'lastEp'), market); - const quoteVolume = this.fromEp (this.safeFloat (ticker, 'turnoverEv'), market); - let baseVolume = this.safeFloat (ticker, 'volume'); + const last = this.fromEp (this.safeNumber (ticker, 'lastEp'), market); + const quoteVolume = this.fromEp (this.safeNumber (ticker, 'turnoverEv'), market); + let baseVolume = this.safeNumber (ticker, 'volume'); if (baseVolume === undefined) { - baseVolume = this.fromEv (this.safeFloat (ticker, 'volumeEv')); + baseVolume = this.fromEv (this.safeNumber (ticker, 'volumeEv')); } let vwap = undefined; if ((market !== undefined) && (market['spot'])) { @@ -103301,7 +101704,7 @@ module.exports = class phemex extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.fromEp (this.safeFloat (ticker, 'openEp'), market); + const open = this.fromEp (this.safeNumber (ticker, 'openEp'), market); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -103313,11 +101716,11 @@ module.exports = class phemex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.fromEp (this.safeFloat (ticker, 'highEp'), market), - 'low': this.fromEp (this.safeFloat (ticker, 'lowEp'), market), - 'bid': this.fromEp (this.safeFloat (ticker, 'bidEp'), market), + 'high': this.fromEp (this.safeNumber (ticker, 'highEp'), market), + 'low': this.fromEp (this.safeNumber (ticker, 'lowEp'), market), + 'bid': this.fromEp (this.safeNumber (ticker, 'bidEp'), market), 'bidVolume': undefined, - 'ask': this.fromEp (this.safeFloat (ticker, 'askEp'), market), + 'ask': this.fromEp (this.safeNumber (ticker, 'askEp'), market), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -103508,8 +101911,8 @@ module.exports = class phemex extends Exchange { id = this.safeString (trade, tradeLength - 4); } side = this.safeStringLower (trade, tradeLength - 3); - price = this.fromEp (this.safeFloat (trade, tradeLength - 2), market); - amount = this.fromEv (this.safeFloat (trade, tradeLength - 1), market); + price = this.fromEp (this.safeNumber (trade, tradeLength - 2), market); + amount = this.fromEv (this.safeNumber (trade, tradeLength - 1), market); if (market['spot']) { if ((price !== undefined) && (amount !== undefined)) { cost = price * amount; @@ -103525,14 +101928,14 @@ module.exports = class phemex extends Exchange { if (execStatus === 'MakerFill') { takerOrMaker = 'maker'; } - price = this.fromEp (this.safeFloat (trade, 'execPriceEp'), market); - amount = this.fromEv (this.safeFloat (trade, 'execBaseQtyEv'), market); - amount = this.safeFloat (trade, 'execQty', amount); - cost = this.fromEv (this.safeFloat2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); - const feeCost = this.fromEv (this.safeFloat (trade, 'execFeeEv'), market); + price = this.fromEp (this.safeNumber (trade, 'execPriceEp'), market); + amount = this.fromEv (this.safeNumber (trade, 'execBaseQtyEv'), market); + amount = this.safeNumber (trade, 'execQty', amount); + cost = this.fromEv (this.safeNumber2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); + const feeCost = this.fromEv (this.safeNumber (trade, 'execFeeEv'), market); if (feeCost !== undefined) { let feeRate = undefined; - let feeRateEr = this.safeFloat (trade, 'feeRateEr'); + let feeRateEr = this.safeNumber (trade, 'feeRateEr'); if (feeRateEr < 0) { feeRateEr = Math.abs (feeRateEr); feeRate = this.fromEr (feeRateEr, market); @@ -103608,9 +102011,9 @@ module.exports = class phemex extends Exchange { const currency = this.safeValue (this.currencies, code, {}); const scale = this.safeInteger (currency, 'valueScale', 8); const account = this.account (); - const balanceEv = this.safeFloat (balance, 'balanceEv'); - const lockedTradingBalanceEv = this.safeFloat (balance, 'lockedTradingBalanceEv'); - const lockedWithdrawEv = this.safeFloat (balance, 'lockedWithdrawEv'); + const balanceEv = this.safeNumber (balance, 'balanceEv'); + const lockedTradingBalanceEv = this.safeNumber (balance, 'lockedTradingBalanceEv'); + const lockedWithdrawEv = this.safeNumber (balance, 'lockedWithdrawEv'); const total = this.fromEn (balanceEv, scale, scale, DECIMAL_PLACES); const lockedTradingBalance = this.fromEn (lockedTradingBalanceEv, scale, scale, DECIMAL_PLACES); const lockedWithdraw = this.fromEn (lockedWithdrawEv, scale, scale, DECIMAL_PLACES); @@ -103704,8 +102107,8 @@ module.exports = class phemex extends Exchange { const code = this.safeCurrencyCode (currencyId); const currency = this.currency (code); const account = this.account (); - const accountBalanceEv = this.safeFloat (balance, 'accountBalanceEv'); - const totalUsedBalanceEv = this.safeFloat (balance, 'totalUsedBalanceEv'); + const accountBalanceEv = this.safeNumber (balance, 'accountBalanceEv'); + const totalUsedBalanceEv = this.safeNumber (balance, 'totalUsedBalanceEv'); const valueScale = this.safeInteger (currency, 'valueScale', 8); account['total'] = this.fromEn (accountBalanceEv, valueScale, valueScale, DECIMAL_PLACES); account['used'] = this.fromEn (totalUsedBalanceEv, valueScale, valueScale, DECIMAL_PLACES); @@ -103937,21 +102340,21 @@ module.exports = class phemex extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let price = this.fromEp (this.safeFloat (order, 'priceEp'), market); + let price = this.fromEp (this.safeNumber (order, 'priceEp'), market); if (price === 0) { price = undefined; } - const amount = this.fromEv (this.safeFloat (order, 'baseQtyEv'), market); - const remaining = this.fromEv (this.safeFloat (order, 'leavesBaseQtyEv'), market); - let filled = this.fromEv (this.safeFloat (order, 'cumBaseQtyEv'), market); - const cost = this.fromEv (this.safeFloat (order, 'quoteQtyEv'), market); - const average = this.fromEp (this.safeFloat (order, 'avgPriceEp'), market); + const amount = this.fromEv (this.safeNumber (order, 'baseQtyEv'), market); + const remaining = this.fromEv (this.safeNumber (order, 'leavesBaseQtyEv'), market); + let filled = this.fromEv (this.safeNumber (order, 'cumBaseQtyEv'), market); + const cost = this.fromEv (this.safeNumber (order, 'quoteQtyEv'), market); + const average = this.fromEp (this.safeNumber (order, 'avgPriceEp'), market); const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'ordType')); const timestamp = this.safeIntegerProduct2 (order, 'actionTimeNs', 'createTimeNs', 0.000001); let fee = undefined; - const feeCost = this.fromEv (this.safeFloat (order, 'cumFeeEv'), market); + const feeCost = this.fromEv (this.safeNumber (order, 'cumFeeEv'), market); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -103964,7 +102367,7 @@ module.exports = class phemex extends Exchange { } } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.fromEp (this.safeFloat (order, 'stopPxEp', market)); + const stopPrice = this.fromEp (this.safeNumber (order, 'stopPxEp', market)); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -104037,18 +102440,18 @@ module.exports = class phemex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'orderType')); - const price = this.fromEp (this.safeFloat (order, 'priceEp'), market); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); + const price = this.fromEp (this.safeNumber (order, 'priceEp'), market); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); const timestamp = this.safeIntegerProduct (order, 'actionTimeNs', 0.000001); - const cost = this.safeFloat (order, 'cumValue'); + const cost = this.safeNumber (order, 'cumValue'); let lastTradeTimestamp = this.safeIntegerProduct (order, 'transactTimeNs', 0.000001); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -104123,7 +102526,7 @@ module.exports = class phemex extends Exchange { } request['qtyType'] = qtyType; if (qtyType === 'ByQuote') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); params = this.omit (params, 'cost'); if (this.options['createOrderByQuoteRequiresPrice']) { if (price !== undefined) { @@ -104143,7 +102546,7 @@ module.exports = class phemex extends Exchange { if (type === 'Limit') { request['priceEp'] = this.toEp (price, market); } - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice !== undefined) { request['stopPxEp'] = this.toEp (stopPrice, market); } @@ -104651,7 +103054,7 @@ module.exports = class phemex extends Exchange { const code = currency['code']; const timestamp = this.safeInteger2 (transaction, 'createdAt', 'submitedAt'); let type = this.safeStringLower (transaction, 'type'); - const feeCost = this.fromEn (this.safeFloat (transaction, 'feeEv'), currency['valueScale'], currency['precision']); + const feeCost = this.fromEn (this.safeNumber (transaction, 'feeEv'), currency['valueScale'], currency['precision']); let fee = undefined; if (feeCost !== undefined) { type = 'withdrawal'; @@ -104661,7 +103064,7 @@ module.exports = class phemex extends Exchange { }; } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.fromEn (this.safeFloat (transaction, 'amountEv'), currency['valueScale'], currency['precision']); + const amount = this.fromEn (this.safeNumber (transaction, 'amountEv'), currency['valueScale'], currency['precision']); return { 'info': transaction, 'id': id, @@ -104683,7 +103086,7 @@ module.exports = class phemex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.safeString (params, 'code'); const request = {}; @@ -104836,13 +103239,14 @@ module.exports = class phemex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],120:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],117:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, PermissionDenied, DDoSProtection, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, CancelPending, InvalidNonce, OnMaintenance, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -104952,6 +103356,7 @@ module.exports = class poloniex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', // starting from Jan 8 2020 'maker': 0.0009, 'taker': 0.0009, @@ -105046,24 +103451,6 @@ module.exports = class poloniex extends Exchange { }); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - parseOHLCV (ohlcv, market = undefined) { // // { @@ -105079,11 +103466,11 @@ module.exports = class poloniex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'date'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'quoteVolume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'quoteVolume'), ]; } @@ -105176,11 +103563,11 @@ module.exports = class poloniex extends Exchange { const balance = this.safeValue (response, currencyId, {}); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onOrders'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFees (params = {}) { @@ -105198,8 +103585,8 @@ module.exports = class poloniex extends Exchange { // return { 'info': fees, - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), 'withdraw': {}, 'deposit': {}, }; @@ -105257,8 +103644,8 @@ module.exports = class poloniex extends Exchange { let open = undefined; let change = undefined; let average = undefined; - const last = this.safeFloat (ticker, 'last'); - const relativeChange = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const relativeChange = this.safeNumber (ticker, 'percentChange'); if (relativeChange !== -1) { open = last / this.sum (1, relativeChange); change = last - open; @@ -105268,11 +103655,11 @@ module.exports = class poloniex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24hr'), - 'low': this.safeFloat (ticker, 'low24hr'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high24hr'), + 'low': this.safeNumber (ticker, 'low24hr'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -105282,8 +103669,8 @@ module.exports = class poloniex extends Exchange { 'change': change, 'percentage': relativeChange * 100, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -105324,7 +103711,7 @@ module.exports = class poloniex extends Exchange { const code = this.safeCurrencyCode (id); const active = (currency['delisted'] === 0) && !currency['disabled']; const numericId = this.safeInteger (currency, 'id'); - const fee = this.safeFloat (currency, 'txFee'); + const fee = this.safeNumber (currency, 'txFee'); result[code] = { 'id': id, 'numericId': numericId, @@ -105415,13 +103802,18 @@ module.exports = class poloniex extends Exchange { } const side = this.safeString (trade, 'type'); let fee = undefined; - const price = this.safeFloat (trade, 'rate'); - const cost = this.safeFloat (trade, 'total'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const feeDisplay = this.safeString (trade, 'feeDisplay'); if (feeDisplay !== undefined) { const parts = feeDisplay.split (' '); - const feeCost = this.safeFloat (parts, 0); + const feeCost = this.safeNumber (parts, 0); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -105440,7 +103832,7 @@ module.exports = class poloniex extends Exchange { } } let takerOrMaker = undefined; - const takerAdjustment = this.safeFloat (trade, 'takerAdjustment'); + const takerAdjustment = this.safeNumber (trade, 'takerAdjustment'); if (takerAdjustment !== undefined) { takerOrMaker = 'taker'; } @@ -105686,9 +104078,9 @@ module.exports = class poloniex extends Exchange { if (resultingTrades !== undefined) { trades = this.parseTrades (resultingTrades, market); } - const price = this.safeFloat2 (order, 'price', 'rate'); - let remaining = this.safeFloat (order, 'amount'); - let amount = this.safeFloat (order, 'startingAmount'); + const price = this.safeNumber2 (order, 'price', 'rate'); + let remaining = this.safeNumber (order, 'amount'); + let amount = this.safeNumber (order, 'startingAmount'); let filled = undefined; let cost = 0; if (amount !== undefined) { @@ -105738,7 +104130,7 @@ module.exports = class poloniex extends Exchange { } const id = this.safeString (order, 'orderNumber'); let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -106235,11 +104627,11 @@ module.exports = class poloniex extends Exchange { const defaultType = ('withdrawalNumber' in transaction) ? 'withdrawal' : 'deposit'; const type = this.safeString (transaction, 'type', defaultType); const id = this.safeString2 (transaction, 'withdrawalNumber', 'depositNumber'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'paymentID'); // according to https://poloniex.com/fees/ - const feeCost = this.safeFloat (transaction, 'fee', 0); + const feeCost = this.safeNumber (transaction, 'fee', 0); if (type === 'withdrawal') { // poloniex withdrawal amount includes the fee amount = amount - feeCost; @@ -106323,7 +104715,7 @@ module.exports = class poloniex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],121:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],118:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -106331,6 +104723,7 @@ module.exports = class poloniex extends Exchange { const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, BadResponse, BadRequest, InvalidOrder, InsufficientFunds, AuthenticationError, ArgumentsRequired, InvalidAddress, RateLimitExceeded, DDoSProtection, BadSymbol } = require ('./base/errors'); const { TRUNCATE, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -106466,9 +104859,11 @@ module.exports = class probit extends Exchange { }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', 'CBC': 'CryptoBharatCoin', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'HBC': 'Hybrid Bank Cash', 'UNI': 'UNICORN Token', }, @@ -106517,11 +104912,11 @@ module.exports = class probit extends Exchange { const costPrecision = this.safeInteger (market, 'cost_precision'); const precision = { 'amount': 1 / Math.pow (10, amountPrecision), - 'price': this.safeFloat (market, 'price_increment'), + 'price': this.safeNumber (market, 'price_increment'), 'cost': 1 / Math.pow (10, costPrecision), }; - const takerFeeRate = this.safeFloat (market, 'taker_fee_rate'); - const makerFeeRate = this.safeFloat (market, 'maker_fee_rate'); + const takerFeeRate = this.safeNumber (market, 'taker_fee_rate'); + const makerFeeRate = this.safeNumber (market, 'maker_fee_rate'); result.push ({ 'id': id, 'info': market, @@ -106536,16 +104931,16 @@ module.exports = class probit extends Exchange { 'maker': makerFeeRate / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_cost'), - 'max': this.safeFloat (market, 'max_cost'), + 'min': this.safeNumber (market, 'min_cost'), + 'max': this.safeNumber (market, 'max_cost'), }, }, }); @@ -106632,7 +105027,7 @@ module.exports = class probit extends Exchange { // [ { 'amount': '0.015', 'priority': 1, 'currency_id': 'ETH' }, {} ] for (let j = 0; j < withdrawalFees.length; j++) { const withdrawalFee = withdrawalFees[j]; - const amount = this.safeFloat (withdrawalFee, 'amount'); + const amount = this.safeNumber (withdrawalFee, 'amount'); const priority = this.safeInteger (withdrawalFee, 'priority'); if ((amount !== undefined) && (priority !== undefined)) { fees.push (withdrawalFee); @@ -106640,7 +105035,7 @@ module.exports = class probit extends Exchange { } const withdrawalFeesByPriority = this.sortBy (fees, 'priority'); const withdrawalFee = this.safeValue (withdrawalFeesByPriority, 0, {}); - const fee = this.safeFloat (withdrawalFee, 'amount'); + const fee = this.safeNumber (withdrawalFee, 'amount'); result[code] = { 'id': id, 'code': code, @@ -106663,11 +105058,11 @@ module.exports = class probit extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (platform, 'min_deposit_amount'), + 'min': this.safeNumber (platform, 'min_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (platform, 'min_withdrawal_amount'), + 'min': this.safeNumber (platform, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -106697,11 +105092,11 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (balance, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'total'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -106753,14 +105148,6 @@ module.exports = class probit extends Exchange { return this.parseTickers (data, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -106808,8 +105195,8 @@ module.exports = class probit extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); - const close = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); + const close = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); let percentage = undefined; let open = undefined; if (change !== undefined) { @@ -106818,15 +105205,15 @@ module.exports = class probit extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -106968,16 +105355,13 @@ module.exports = class probit extends Exchange { marketId = this.safeString (trade, 'market_id', marketId); const symbol = this.safeSymbol (marketId, market, '-'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'order_id'); - const feeCost = this.safeFloat (trade, 'fee_amount'); + const feeCost = this.safeNumber (trade, 'fee_amount'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency_id'); @@ -107121,11 +105505,11 @@ module.exports = class probit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'start_time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_volume'), ]; } @@ -107224,37 +105608,24 @@ module.exports = class probit extends Exchange { const marketId = this.safeString (order, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'time')); - let price = this.safeFloat (order, 'limit_price'); - const filled = this.safeFloat (order, 'filled_quantity'); - let remaining = this.safeFloat (order, 'open_quantity'); - const canceledAmount = this.safeFloat (order, 'cancelled_quantity'); + let price = this.safeNumber (order, 'limit_price'); + const filled = this.safeNumber (order, 'filled_quantity'); + let remaining = this.safeNumber (order, 'open_quantity'); + const canceledAmount = this.safeNumber (order, 'cancelled_quantity'); if (canceledAmount !== undefined) { remaining = this.sum (remaining, canceledAmount); } - const amount = this.safeFloat (order, 'quantity', this.sum (filled, remaining)); - let cost = this.safeFloat2 (order, 'filled_cost', 'cost'); + const amount = this.safeNumber (order, 'quantity', this.sum (filled, remaining)); + const cost = this.safeNumber2 (order, 'filled_cost', 'cost'); if (type === 'market') { price = undefined; } - let average = undefined; - if (filled !== undefined) { - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if (cost !== undefined) { - if (filled > 0) { - average = cost / filled; - } - } - } let clientOrderId = this.safeString (order, 'client_order_id'); if (clientOrderId === '') { clientOrderId = undefined; } const timeInForce = this.safeStringUpper (order, 'time_in_force'); - return { + return this.safeOrder ({ 'id': id, 'info': order, 'clientOrderId': clientOrderId, @@ -107271,11 +105642,11 @@ module.exports = class probit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'average': average, + 'average': undefined, 'cost': cost, 'fee': undefined, 'trades': undefined, - }; + }); } costToPrecision (symbol, cost) { @@ -107305,7 +105676,7 @@ module.exports = class probit extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -107430,16 +105801,6 @@ module.exports = class probit extends Exchange { return this.parseDepositAddresses (data); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { // In order to use this method // you need to allow API withdrawal from the API Settings Page, and @@ -107470,7 +105831,7 @@ module.exports = class probit extends Exchange { parseTransaction (transaction, currency = undefined) { const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'destination_tag'); const txid = this.safeString (transaction, 'hash'); @@ -107479,7 +105840,7 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (transaction, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined && feeCost !== 0) { fee = { @@ -107609,13 +105970,14 @@ module.exports = class probit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],122:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],119:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -107791,11 +106153,11 @@ module.exports = class qtrade extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_buy_value'), + 'min': this.safeNumber (market, 'minimum_buy_value'), 'max': undefined, }, 'price': { @@ -107876,12 +106238,12 @@ module.exports = class qtrade extends Exchange { 'info': currency, 'type': type, 'name': name, - 'fee': this.safeFloat (config, 'withdraw_fee'), + 'fee': this.safeNumber (config, 'withdraw_fee'), 'precision': this.safeInteger (currency, 'precision'), 'active': active, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimum_order'), + 'min': this.safeNumber (currency, 'minimum_order'), 'max': undefined, }, 'price': { @@ -107916,11 +106278,11 @@ module.exports = class qtrade extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'market_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'market_volume'), ]; } @@ -107982,8 +106344,8 @@ module.exports = class qtrade extends Exchange { const result = []; for (let j = 0; j < prices.length; j++) { const priceAsString = prices[j]; - const price = this.safeFloat (prices, j); - const amount = this.safeFloat (bidasks, priceAsString); + const price = this.safeNumber (prices, j); + const amount = this.safeNumber (bidasks, priceAsString); result.push ([ price, amount ]); } orderbook[side] = result; @@ -108015,12 +106377,12 @@ module.exports = class qtrade extends Exchange { const marketId = this.safeString (ticker, 'id_hr'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeIntegerProduct (ticker, 'last_change', 0.001); - const previous = this.safeFloat (ticker, 'day_open'); - const last = this.safeFloat (ticker, 'last'); - const day_change = this.safeFloat (ticker, 'day_change'); + const previous = this.safeNumber (ticker, 'day_open'); + const last = this.safeNumber (ticker, 'last'); + const day_change = this.safeNumber (ticker, 'day_change'); let percentage = undefined; let change = undefined; - let average = this.safeFloat (ticker, 'day_avg_price'); + let average = this.safeNumber (ticker, 'day_avg_price'); if (day_change !== undefined) { percentage = day_change * 100; if (previous !== undefined) { @@ -108030,18 +106392,18 @@ module.exports = class qtrade extends Exchange { if ((average === undefined) && (last !== undefined) && (previous !== undefined)) { average = this.sum (last, previous) / 2; } - const baseVolume = this.safeFloat (ticker, 'day_volume_market'); - const quoteVolume = this.safeFloat (ticker, 'day_volume_base'); + const baseVolume = this.safeNumber (ticker, 'day_volume_market'); + const quoteVolume = this.safeNumber (ticker, 'day_volume_base'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'day_high'), - 'low': this.safeFloat (ticker, 'day_low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'day_high'), + 'low': this.safeNumber (ticker, 'day_low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': previous, @@ -108249,16 +106611,16 @@ module.exports = class qtrade extends Exchange { const side = this.safeString (trade, 'side'); const marketId = this.safeString (trade, 'market_string'); const symbol = this.safeSymbol (marketId, market, '_'); - let cost = this.safeFloat2 (trade, 'base_volume', 'base_amount'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'market_amount', 'amount'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - if (price !== undefined) { - cost = price * amount; - } + let cost = this.safeNumber2 (trade, 'base_volume', 'base_amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'market_amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'base_fee'); + const feeCost = this.safeNumber (trade, 'base_fee'); if (feeCost !== undefined) { const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; fee = { @@ -108315,7 +106677,7 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); account['used'] = 0; result[code] = account; } @@ -108325,10 +106687,10 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -108457,10 +106819,9 @@ module.exports = class qtrade extends Exchange { side = this.safeString (parts, 0); orderType = this.safeString (parts, 1); } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'market_amount'); - let remaining = this.safeFloat (order, 'market_amount_remaining'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'market_amount'); + const remaining = this.safeNumber (order, 'market_amount_remaining'); const open = this.safeValue (order, 'open', false); const closeReason = this.safeString (order, 'close_reason'); let status = undefined; @@ -108472,58 +106833,21 @@ module.exports = class qtrade extends Exchange { status = 'closed'; } const marketId = this.safeString (order, 'market_string'); - const symbol = this.safeSymbol (marketId, market, '_'); + market = this.safeMarket (marketId, market, '_'); + const symbol = market['symbol']; const rawTrades = this.safeValue (order, 'trades', []); const parsedTrades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id, 'side': side, 'type': orderType, }); - const numTrades = parsedTrades.length; - let lastTradeTimestamp = undefined; - let feeCost = undefined; - let cost = undefined; - if (numTrades > 0) { - feeCost = 0; - cost = 0; - filled = 0; - remaining = amount; - for (let i = 0; i < parsedTrades.length; i++) { - const trade = parsedTrades[i]; - feeCost = this.sum (trade['fee']['cost'], feeCost); - lastTradeTimestamp = this.safeInteger (trade, 'timestamp'); - cost = this.sum (trade['cost'], cost); - filled = this.sum (trade['amount'], filled); - remaining = Math.max (0, remaining - trade['amount']); - } - } - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; - fee = { - 'currency': feeCurrencyCode, - 'cost': feeCost, - }; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let average = undefined; - if (filled !== undefined) { - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': orderType, 'timeInForce': undefined, @@ -108531,15 +106855,16 @@ module.exports = class qtrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, - 'fee': fee, - 'cost': cost, + 'fee': undefined, + 'fees': undefined, + 'cost': undefined, 'trades': parsedTrades, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -109008,7 +107333,7 @@ module.exports = class qtrade extends Exchange { const tagTo = tag; const cancelRequested = this.safeValue (transaction, 'cancel_requested'); const type = (cancelRequested === undefined) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); let status = this.parseTransactionStatus (this.safeString (transaction, 'status')); @@ -109152,7 +107477,7 @@ module.exports = class qtrade extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],123:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],120:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); @@ -109340,8 +107665,8 @@ module.exports = class rightbtc extends Exchange { return result; } - divideSafeFloat (x, key, divisor) { - const value = this.safeFloat (x, key); + divideSafeNumber (x, key, divisor) { + const value = this.safeNumber (x, key); if (value !== undefined) { return value / divisor; } @@ -109351,12 +107676,12 @@ module.exports = class rightbtc extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); - const last = this.divideSafeFloat (ticker, 'last', 1e8); - const high = this.divideSafeFloat (ticker, 'high', 1e8); - const low = this.divideSafeFloat (ticker, 'low', 1e8); - const bid = this.divideSafeFloat (ticker, 'buy', 1e8); - const ask = this.divideSafeFloat (ticker, 'sell', 1e8); - const baseVolume = this.divideSafeFloat (ticker, 'vol24h', 1e8); + const last = this.divideSafeNumber (ticker, 'last', 1e8); + const high = this.divideSafeNumber (ticker, 'high', 1e8); + const low = this.divideSafeNumber (ticker, 'low', 1e8); + const bid = this.divideSafeNumber (ticker, 'buy', 1e8); + const ask = this.divideSafeNumber (ticker, 'sell', 1e8); + const baseVolume = this.divideSafeNumber (ticker, 'vol24h', 1e8); return { 'symbol': symbol, 'timestamp': timestamp, @@ -109460,9 +107785,9 @@ module.exports = class rightbtc extends Exchange { let id = this.safeString (trade, 'tid'); id = this.safeString (trade, 'trade_id', id); const orderId = this.safeString (trade, 'order_id'); - const price = this.divideSafeFloat (trade, 'price', 1e8); - let amount = this.safeFloat (trade, 'amount'); - amount = this.safeFloat (trade, 'quantity', amount); + const price = this.divideSafeNumber (trade, 'price', 1e8); + let amount = this.safeNumber (trade, 'amount'); + amount = this.safeNumber (trade, 'quantity', amount); if (amount !== undefined) { amount = amount / 1e8; } @@ -109559,8 +107884,8 @@ module.exports = class rightbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); // https://github.com/ccxt/ccxt/issues/3873 - account['free'] = this.divideSafeFloat (balance, 'balance', 1e8); - account['used'] = this.divideSafeFloat (balance, 'frozen', 1e8); + account['free'] = this.divideSafeNumber (balance, 'balance', 1e8); + account['used'] = this.divideSafeNumber (balance, 'frozen', 1e8); result[code] = account; } return this.parseBalance (result); @@ -109649,30 +107974,18 @@ module.exports = class rightbtc extends Exchange { } else if ('transactTime' in order) { timestamp = order['transactTime']; } - let price = this.safeFloat2 (order, 'limit', 'price'); + let price = this.safeNumber2 (order, 'limit', 'price'); if (price !== undefined) { price = price / 1e8; } - const amount = this.divideSafeFloat (order, 'quantity', 1e8); - let filled = this.divideSafeFloat (order, 'filled_quantity', 1e8); - let remaining = this.divideSafeFloat (order, 'rest', 1e8); - const cost = this.divideSafeFloat (order, 'cost', 1e8); + const amount = this.divideSafeNumber (order, 'quantity', 1e8); + const filled = this.divideSafeNumber (order, 'filled_quantity', 1e8); + const remaining = this.divideSafeNumber (order, 'rest', 1e8); + const cost = this.divideSafeNumber (order, 'cost', 1e8); // lines 483-494 should be generalized into a base class method - if (amount !== undefined) { - if (remaining === undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - if (filled === undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } - } const type = 'limit'; const side = this.safeStringLower (order, 'side'); - const feeCost = this.divideSafeFloat (order, 'min_fee', 1e8); + const feeCost = this.divideSafeNumber (order, 'min_fee', 1e8); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -109680,13 +107993,13 @@ module.exports = class rightbtc extends Exchange { feeCurrency = market['quote']; } fee = { - 'rate': this.safeFloat (order, 'fee'), + 'rate': this.safeNumber (order, 'fee'), 'cost': feeCost, 'currency': feeCurrency, }; } const trades = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -109708,7 +108021,7 @@ module.exports = class rightbtc extends Exchange { 'fee': fee, 'trades': trades, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -109912,7 +108225,7 @@ module.exports = class rightbtc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],124:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9,"./base/functions/number":15}],121:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -109920,6 +108233,7 @@ module.exports = class rightbtc extends Exchange { const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, BadSymbol, BadRequest, InvalidOrder, ArgumentsRequired, OrderNotFound, InsufficientFunds, DDoSProtection } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110064,12 +108378,12 @@ module.exports = class ripio extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'min_amount'), - 'price': this.safeFloat (market, 'price_tick'), + 'amount': this.safeNumber (market, 'min_amount'), + 'price': this.safeNumber (market, 'price_tick'), }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -110077,15 +108391,15 @@ module.exports = class ripio extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_value'), + 'min': this.safeNumber (market, 'min_value'), 'max': undefined, }, }; const active = this.safeValue (market, 'enabled', true); const fees = this.safeValue (market, 'fees', []); const firstFee = this.safeValue (fees, 0, {}); - const maker = this.safeFloat (firstFee, 'maker_fee', 0.0); - const taker = this.safeFloat (firstFee, 'taker_fee', 0.0); + const maker = this.safeNumber (firstFee, 'maker_fee', 0.0); + const taker = this.safeNumber (firstFee, 'taker_fee', 0.0); result.push ({ 'id': id, 'symbol': symbol, @@ -110192,18 +108506,18 @@ module.exports = class ripio extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); const marketId = this.safeString (ticker, 'pair'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const average = this.safeFloat (ticker, 'avg'); + const last = this.safeNumber (ticker, 'last_price'); + const average = this.safeNumber (ticker, 'avg'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bid_volume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'ask_volume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bid_volume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'ask_volume'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -110345,15 +108659,14 @@ module.exports = class ripio extends Exchange { if (side !== undefined) { side = side.toLowerCase (); } - const price = this.safeFloat2 (trade, 'price', 'match_price'); - const amount = this.safeFloat2 (trade, 'amount', 'exchanged'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString2 (trade, 'price', 'match_price'); + const amountString = this.safeString2 (trade, 'amount', 'exchanged'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'pair'); market = this.safeMarket (marketId, market); - const feeCost = this.safeFloat (trade, takerOrMaker + '_fee'); + const feeCost = this.safeNumber (trade, takerOrMaker + '_fee'); const orderId = this.safeString (trade, takerOrMaker); let fee = undefined; if (feeCost !== undefined) { @@ -110427,11 +108740,11 @@ module.exports = class ripio extends Exchange { const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -110690,16 +109003,16 @@ module.exports = class ripio extends Exchange { // } // const id = this.safeString (order, 'order_id'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat (order, 'notional'); + const amount = this.safeNumber (order, 'amount'); + let cost = this.safeNumber (order, 'notional'); const type = this.safeStringLower (order, 'order_type'); const priceField = (type === 'market') ? 'fill_price' : 'limit_price'; - const price = this.safeFloat (order, priceField); + const price = this.safeNumber (order, priceField); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeTimestamp (order, 'created_at'); let average = this.safeValue (order, 'fill_price'); - let filled = this.safeFloat (order, 'filled'); + let filled = this.safeNumber (order, 'filled'); let remaining = undefined; const fills = this.safeValue (order, 'fills'); let trades = undefined; @@ -110734,7 +109047,7 @@ module.exports = class ripio extends Exchange { } const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); return { 'id': id, 'clientOrderId': undefined, @@ -110860,13 +109173,14 @@ module.exports = class ripio extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],125:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],122:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110977,14 +109291,14 @@ module.exports = class southxchange extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const deposited = this.safeFloat (balance, 'Deposited'); - const unconfirmed = this.safeFloat (balance, 'Unconfirmed'); + const deposited = this.safeString (balance, 'Deposited'); + const unconfirmed = this.safeString (balance, 'Unconfirmed'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'Available'); - account['total'] = this.sum (deposited, unconfirmed); + account['free'] = this.safeString (balance, 'Available'); + account['total'] = Precise.stringAdd (deposited, unconfirmed); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -111002,16 +109316,16 @@ module.exports = class southxchange extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'Last'); + const last = this.safeNumber (ticker, 'Last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'Bid'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -111019,9 +109333,9 @@ module.exports = class southxchange extends Exchange { 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'Variation24Hr'), + 'percentage': this.safeNumber (ticker, 'Variation24Hr'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume24Hr'), + 'baseVolume': this.safeNumber (ticker, 'Volume24Hr'), 'quoteVolume': undefined, 'info': ticker, }; @@ -111055,14 +109369,11 @@ module.exports = class southxchange extends Exchange { parseTrade (trade, market) { const timestamp = this.safeTimestamp (trade, 'At'); - const price = this.safeFloat (trade, 'Price'); - const amount = this.safeFloat (trade, 'Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'Price'); + const amountString = this.safeString (trade, 'Amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'Type'); let symbol = undefined; if (market !== undefined) { @@ -111103,21 +109414,13 @@ module.exports = class southxchange extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const timestamp = undefined; - const price = this.safeFloat (order, 'LimitPrice'); - const amount = this.safeFloat (order, 'OriginalAmount'); - const remaining = this.safeFloat (order, 'Amount'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - cost = price * amount; - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'LimitPrice'); + const amount = this.safeNumber (order, 'OriginalAmount'); + const remaining = this.safeNumber (order, 'Amount'); const type = 'limit'; const side = this.safeStringLower (order, 'Type'); const id = this.safeString (order, 'Code'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -111132,15 +109435,14 @@ module.exports = class southxchange extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'filled': filled, + 'cost': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -111273,8 +109575,8 @@ module.exports = class southxchange extends Exchange { const type = this.safeString (item, 'Type'); const ledgerEntryType = this.parseLedgerEntryType (type); const code = this.safeCurrencyCode (this.safeString (item, 'CurrencyCode'), currency); - let amount = this.safeFloat (item, 'Amount'); - const after = this.safeFloat (item, 'TotalBalance'); + let amount = this.safeNumber (item, 'Amount'); + const after = this.safeNumber (item, 'TotalBalance'); let before = undefined; if (amount !== undefined) { if (after !== undefined) { @@ -111445,7 +109747,7 @@ module.exports = class southxchange extends Exchange { // } // const id = this.safeString (transaction, 'MovementId'); - const amount = this.safeFloat (transaction, 'Amount'); + const amount = this.safeNumber (transaction, 'Amount'); const address = this.safeString (transaction, 'Address'); const addressTo = address; const addressFrom = undefined; @@ -111560,7 +109862,7 @@ module.exports = class southxchange extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],126:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],123:[function(require,module,exports){ (function (module, exports) { 'use strict'; @@ -115088,7 +113390,7 @@ module.exports = class southxchange extends Exchange { }; })(typeof module === 'undefined' || module, this); -},{"buffer":188}],127:[function(require,module,exports){ +},{"buffer":184}],124:[function(require,module,exports){ ;(function (root, factory) { if (typeof exports === "object") { // CommonJS @@ -121077,7 +119379,7 @@ module.exports = class southxchange extends Exchange { return CryptoJS; })); -},{}],128:[function(require,module,exports){ +},{}],125:[function(require,module,exports){ 'use strict'; var elliptic = exports; @@ -121101,7 +119403,7 @@ elliptic.curves = require('./elliptic/curves'); elliptic.ec = require('./elliptic/ec'); elliptic.eddsa = require('./elliptic/eddsa'); -},{"./elliptic/curve":131,"./elliptic/curves":134,"./elliptic/ec":135,"./elliptic/eddsa":138,"./elliptic/utils":142}],129:[function(require,module,exports){ +},{"./elliptic/curve":128,"./elliptic/curves":131,"./elliptic/ec":132,"./elliptic/eddsa":135,"./elliptic/utils":139}],126:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -121478,7 +119780,7 @@ BasePoint.prototype.dblp = function dblp(k) { return r; }; -},{"../../../../BN/bn":126,"../../elliptic":128}],130:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],127:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -121913,7 +120215,7 @@ Point.prototype.eqXToP = function eqXToP(x) { Point.prototype.toP = Point.prototype.normalize; Point.prototype.mixedAdd = Point.prototype.add; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],131:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],128:[function(require,module,exports){ 'use strict'; var curve = exports; @@ -121923,7 +120225,7 @@ curve.short = require('./short'); curve.mont = require('./mont'); curve.edwards = require('./edwards'); -},{"./base":129,"./edwards":130,"./mont":132,"./short":133}],132:[function(require,module,exports){ +},{"./base":126,"./edwards":127,"./mont":129,"./short":130}],129:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -122105,7 +120407,7 @@ Point.prototype.getX = function getX() { return this.x.fromRed(); }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],133:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],130:[function(require,module,exports){ 'use strict'; var curve = require('../curve'); @@ -123045,7 +121347,7 @@ JPoint.prototype.isInfinity = function isInfinity() { return this.z.cmpn(0) === 0; }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../curve":131}],134:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../curve":128}],131:[function(require,module,exports){ 'use strict'; var curves = exports; @@ -123251,7 +121553,7 @@ defineCurve('secp256k1', { ] }); -},{"../elliptic":128,"./precomputed/secp256k1":141}],135:[function(require,module,exports){ +},{"../elliptic":125,"./precomputed/secp256k1":138}],132:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123493,7 +121795,7 @@ EC.prototype.getKeyRecoveryParam = function(e, signature, Q, enc) { throw new Error('Unable to find valid recovery factor'); }; -},{"../../../../BN/bn":126,"../../elliptic":128,"../../hmac-drbg/hmac-drbg":143,"./key":136,"./signature":137}],136:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125,"../../hmac-drbg/hmac-drbg":140,"./key":133,"./signature":134}],133:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123614,7 +121916,7 @@ KeyPair.prototype.inspect = function inspect() { ' pub: ' + (this.pub && this.pub.inspect()) + ' >'; }; -},{"../../../../BN/bn":126,"../../elliptic":128}],137:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],134:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123640,7 +121942,7 @@ function Signature(options, enc) { } module.exports = Signature; -},{"../../../../BN/bn":126,"../../elliptic":128}],138:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../../elliptic":125}],135:[function(require,module,exports){ 'use strict'; var curves = require('../curves'); @@ -123787,7 +122089,7 @@ EDDSA.prototype.isPoint = function isPoint(val) { return val instanceof this.pointClass; }; -},{"../../../../../base/functions/encode":11,"../../../../BN/bn.js":126,"../../../../crypto-js/crypto-js":127,"../curves":134,"../utils":142,"./key":139,"./signature":140}],139:[function(require,module,exports){ +},{"../../../../../base/functions/encode":12,"../../../../BN/bn.js":123,"../../../../crypto-js/crypto-js":124,"../curves":131,"../utils":139,"./key":136,"./signature":137}],136:[function(require,module,exports){ 'use strict'; var utils = require('../utils'); @@ -123889,7 +122191,7 @@ KeyPair.prototype.getPublic = function getPublic(enc) { module.exports = KeyPair; -},{"../utils":142}],140:[function(require,module,exports){ +},{"../utils":139}],137:[function(require,module,exports){ 'use strict'; var BN = require('../../../../BN/bn'); @@ -123956,7 +122258,7 @@ Signature.prototype.toHex = function toHex() { module.exports = Signature; -},{"../../../../BN/bn":126,"../utils":142}],141:[function(require,module,exports){ +},{"../../../../BN/bn":123,"../utils":139}],138:[function(require,module,exports){ module.exports = { doubles: { step: 4, @@ -124738,7 +123040,7 @@ module.exports = { } }; -},{}],142:[function(require,module,exports){ +},{}],139:[function(require,module,exports){ 'use strict'; var utils = exports; @@ -124954,7 +123256,7 @@ utils.encode = function encode(arr, enc) { return arr; }; -},{"../../../BN/bn":126}],143:[function(require,module,exports){ +},{"../../../BN/bn":123}],140:[function(require,module,exports){ 'use strict'; var CryptoJS = require('../../../crypto-js/crypto-js'); @@ -125070,7 +123372,7 @@ HmacDRBG.prototype.generate = function generate(len, enc, add, addEnc) { return utils.wordArrayToBuffer(res); }; -},{"../../../../base/functions/encode":11,"../../../crypto-js/crypto-js":127,"../elliptic/utils":142}],144:[function(require,module,exports){ +},{"../../../../base/functions/encode":12,"../../../crypto-js/crypto-js":124,"../elliptic/utils":139}],141:[function(require,module,exports){ 'use strict'; var fetch = require('../node-fetch/index'); @@ -125111,7 +123413,7 @@ module.exports = function (context) { }; }; -},{"../node-fetch/index":145}],145:[function(require,module,exports){ +},{"../node-fetch/index":142}],142:[function(require,module,exports){ (function (global,Buffer){ 'use strict'; @@ -126679,7 +124981,7 @@ exports.Response = Response; exports.FetchError = FetchError; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"buffer":188,"http":230,"https":193,"stream":229,"url":236,"zlib":187}],146:[function(require,module,exports){ +},{"buffer":184,"http":226,"https":189,"stream":225,"url":232,"zlib":183}],143:[function(require,module,exports){ (function (Buffer){ /*! * RSA library for Node.js @@ -126906,7 +125208,7 @@ module.exports = (function () { })(); }).call(this,require("buffer").Buffer) -},{"./formats/formats.js":153,"./libs/rsa.js":157,"./schemes/schemes.js":159,"./utils":160,"buffer":188}],147:[function(require,module,exports){ +},{"./formats/formats.js":150,"./libs/rsa.js":154,"./schemes/schemes.js":156,"./utils":157,"buffer":184}],144:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. @@ -126921,7 +125223,7 @@ module.exports = { }; -},{}],148:[function(require,module,exports){ +},{}],145:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. var errors = require('./errors'); @@ -126944,7 +125246,7 @@ for (var e in errors) { module.exports[e] = errors[e]; } -},{"./errors":147,"./reader":149,"./types":150}],149:[function(require,module,exports){ +},{"./errors":144,"./reader":146,"./types":147}],146:[function(require,module,exports){ (function (Buffer){ // Copyright 2011 Mark Cavage All rights reserved. @@ -127210,7 +125512,7 @@ Reader.prototype._readTag = function (tag) { module.exports = Reader; }).call(this,require("buffer").Buffer) -},{"./errors":147,"./types":150,"assert":183,"buffer":188}],150:[function(require,module,exports){ +},{"./errors":144,"./types":147,"assert":179,"buffer":184}],147:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. @@ -127248,7 +125550,7 @@ module.exports = { Context: 128 }; -},{}],151:[function(require,module,exports){ +},{}],148:[function(require,module,exports){ // Copyright 2011 Mark Cavage All rights reserved. // If you have no idea what ASN.1 or BER is, see this: @@ -127267,7 +125569,7 @@ module.exports = { BerReader: Ber.Reader, }; -},{"./ber/index":148}],152:[function(require,module,exports){ +},{"./ber/index":145}],149:[function(require,module,exports){ var _ = require('../utils')._; var utils = require('../utils'); @@ -127340,7 +125642,7 @@ module.exports = { } }; -},{"../utils":160}],153:[function(require,module,exports){ +},{"../utils":157}],150:[function(require,module,exports){ var _ = require('../utils')._; module.exports = { @@ -127373,7 +125675,7 @@ module.exports = { }, }; -},{"../utils":160,"./components":152,"./pkcs1":154,"./pkcs8":155}],154:[function(require,module,exports){ +},{"../utils":157,"./components":149,"./pkcs1":151,"./pkcs8":152}],151:[function(require,module,exports){ (function (Buffer){ var ber = require('../asn1/index').Ber; var _ = require('../utils')._; @@ -127525,7 +125827,7 @@ module.exports = { }; }).call(this,require("buffer").Buffer) -},{"../asn1/index":151,"../utils":160,"buffer":188}],155:[function(require,module,exports){ +},{"../asn1/index":148,"../utils":157,"buffer":184}],152:[function(require,module,exports){ (function (Buffer){ var ber = require('../asn1/index').Ber; var _ = require('../utils')._; @@ -127716,7 +126018,7 @@ module.exports = { }; }).call(this,require("buffer").Buffer) -},{"../asn1/index":151,"../utils":160,"buffer":188}],156:[function(require,module,exports){ +},{"../asn1/index":148,"../utils":157,"buffer":184}],153:[function(require,module,exports){ (function (Buffer){ /* * Basic JavaScript BN library - subset useful for RSA encryption. @@ -128972,7 +127274,7 @@ BigInteger.prototype.square = bnSquare; module.exports = BigInteger; }).call(this,require("buffer").Buffer) -},{"../utils":160,"buffer":188}],157:[function(require,module,exports){ +},{"../utils":157,"buffer":184}],154:[function(require,module,exports){ /* * RSA Encryption / Decryption with PKCS1 v2 Padding. * @@ -129121,7 +127423,7 @@ module.exports.Key = (function () { })(); -},{"../schemes/schemes.js":159,"../utils":160,"../utils.js":160,"./jsbn.js":156}],158:[function(require,module,exports){ +},{"../schemes/schemes.js":156,"../utils":157,"../utils.js":157,"./jsbn.js":153}],155:[function(require,module,exports){ (function (Buffer){ /** * PKCS1 padding and signature scheme @@ -129301,7 +127603,7 @@ function wordArrayToBuffer(wordArray) { } }).call(this,require("buffer").Buffer) -},{"../../crypto-js/crypto-js":127,"../libs/jsbn":156,"buffer":188,"constants":190}],159:[function(require,module,exports){ +},{"../../crypto-js/crypto-js":124,"../libs/jsbn":153,"buffer":184,"constants":186}],156:[function(require,module,exports){ module.exports = { pkcs1: require('./pkcs1'), @@ -129324,7 +127626,7 @@ module.exports = { } }; -},{"./pkcs1":158}],160:[function(require,module,exports){ +},{"./pkcs1":155}],157:[function(require,module,exports){ /* * Utils functions * @@ -129424,7 +127726,7 @@ module.exports.trimSurroundingText = function (data, opening, closing) { return data.substring(trimStartIndex, trimEndIndex); } -},{}],161:[function(require,module,exports){ +},{}],158:[function(require,module,exports){ 'use strict'; var replace = String.prototype.replace; @@ -129444,7 +127746,7 @@ module.exports = { RFC3986: 'RFC3986' }; -},{}],162:[function(require,module,exports){ +},{}],159:[function(require,module,exports){ 'use strict'; var stringify = require('./stringify'); @@ -129457,7 +127759,7 @@ module.exports = { stringify: stringify }; -},{"./formats":161,"./parse":163,"./stringify":164}],163:[function(require,module,exports){ +},{"./formats":158,"./parse":160,"./stringify":161}],160:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -129701,7 +128003,7 @@ module.exports = function (str, opts) { return utils.compact(obj); }; -},{"./utils":165}],164:[function(require,module,exports){ +},{"./utils":162}],161:[function(require,module,exports){ 'use strict'; var utils = require('./utils'); @@ -129972,7 +128274,7 @@ module.exports = function (object, opts) { return joined.length > 0 ? prefix + joined : ''; }; -},{"./formats":161,"./utils":165}],165:[function(require,module,exports){ +},{"./formats":158,"./utils":162}],162:[function(require,module,exports){ 'use strict'; var has = Object.prototype.hasOwnProperty; @@ -130204,13 +128506,14 @@ module.exports = { merge: merge }; -},{}],166:[function(require,module,exports){ +},{}],163:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, OrderNotFound, PermissionDenied, BadRequest, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -130393,6 +128696,7 @@ module.exports = class stex extends Exchange { 'BITSW': 'BITS', 'BHD': 'Bithold', 'BTH': 'Bithereum', + 'MPH': 'Chasyr Token', 'SBTC': 'SBTCT', // SiamBitcoin }, 'options': { @@ -130456,7 +128760,7 @@ module.exports = class stex extends Exchange { // differentiated fees for each particular method const code = this.safeCurrencyCode (this.safeString (currency, 'code')); const precision = this.safeInteger (currency, 'precision'); - const fee = this.safeFloat (currency, 'withdrawal_fee_const'); // todo: redesign + const fee = this.safeNumber (currency, 'withdrawal_fee_const'); // todo: redesign const active = this.safeValue (currency, 'active', true); result[code] = { 'id': id, @@ -130473,11 +128777,11 @@ module.exports = class stex extends Exchange { 'price': { 'min': Math.pow (10, -precision), 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (currency, 'minimum_deposit_amount'), + 'min': this.safeNumber (currency, 'minimum_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal_amount'), + 'min': this.safeNumber (currency, 'minimum_withdrawal_amount'), 'max': undefined, }, }, @@ -130538,11 +128842,11 @@ module.exports = class stex extends Exchange { 'price': this.safeInteger (market, 'market_precision'), }; const active = this.safeValue (market, 'active'); - const minBuyPrice = this.safeFloat (market, 'min_buy_price'); - const minSellPrice = this.safeFloat (market, 'min_sell_price'); + const minBuyPrice = this.safeNumber (market, 'min_buy_price'); + const minSellPrice = this.safeNumber (market, 'min_sell_price'); const minPrice = Math.max (minBuyPrice, minSellPrice); - const buyFee = this.safeFloat (market, 'buy_fee_percent') / 100; - const sellFee = this.safeFloat (market, 'sell_fee_percent') / 100; + const buyFee = this.safeNumber (market, 'buy_fee_percent') / 100; + const sellFee = this.safeNumber (market, 'sell_fee_percent') / 100; const fee = Math.max (buyFee, sellFee); result.push ({ 'id': id, @@ -130561,7 +128865,7 @@ module.exports = class stex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_order_amount'), + 'min': this.safeNumber (market, 'min_order_amount'), 'max': undefined, }, 'price': { 'min': minPrice, 'max': undefined }, @@ -130725,8 +129029,8 @@ module.exports = class stex extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString2 (ticker, 'id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -130739,11 +129043,11 @@ module.exports = class stex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -130753,20 +129057,12 @@ module.exports = class stex extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volumeQuote'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volumeQuote'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -130832,11 +129128,11 @@ module.exports = class stex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -130911,12 +129207,11 @@ module.exports = class stex extends Exchange { // const id = this.safeString (trade, 'id'); const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; @@ -131029,11 +129324,11 @@ module.exports = class stex extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'currency_id')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen_balance'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -131092,9 +129387,9 @@ module.exports = class stex extends Exchange { const marketId = this.safeString2 (order, 'currency_pair_id', 'currency_pair_name'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (order, 'timestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'initial_amount'); - const filled = this.safeFloat (order, 'processed_amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'initial_amount'); + const filled = this.safeNumber (order, 'processed_amount'); let remaining = undefined; let cost = undefined; if (filled !== undefined) { @@ -131124,7 +129419,7 @@ module.exports = class stex extends Exchange { 'order': id, }); } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); const result = { 'info': order, 'id': id, @@ -131155,7 +129450,7 @@ module.exports = class stex extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'amount'); + const feeCost = this.safeNumber (fees[i], 'amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -131739,13 +130034,13 @@ module.exports = class stex extends Exchange { code = currency['code']; } const type = ('deposit_status_id' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeStringLower (transaction, 'status')); const timestamp = this.safeTimestamp2 (transaction, 'timestamp', 'created_ts'); const updated = this.safeTimestamp (transaction, 'updated_ts'); const txid = this.safeString (transaction, 'txid'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'fee_currency_id', 'deposit_fee_currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -131981,8 +130276,8 @@ module.exports = class stex extends Exchange { for (let i = 0; i < data.length; i++) { const id = this.safeString (data[i], 'id'); const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (data[i], 'withdrawal_fee_const'); - depositFees[code] = this.safeFloat (data[i], 'deposit_fee_const'); + withdrawFees[code] = this.safeNumber (data[i], 'withdrawal_fee_const'); + depositFees[code] = this.safeNumber (data[i], 'deposit_fee_const'); } return { 'withdraw': withdrawFees, @@ -132011,7 +130306,7 @@ module.exports = class stex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],167:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],164:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -132045,13 +130340,14 @@ module.exports = class surbitcoin extends foxbit { } }; -},{"./foxbit.js":87}],168:[function(require,module,exports){ +},{"./foxbit.js":85}],165:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -132219,8 +130515,8 @@ module.exports = class therock extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const buy_fee = this.safeFloat (market, 'buy_fee'); - const sell_fee = this.safeFloat (market, 'sell_fee'); + const buy_fee = this.safeNumber (market, 'buy_fee'); + const sell_fee = this.safeNumber (market, 'sell_fee'); let taker = Math.max (buy_fee, sell_fee); taker = taker / 100; const maker = taker; @@ -132241,11 +130537,11 @@ module.exports = class therock extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_quantity_offer'), + 'min': this.safeNumber (market, 'minimum_quantity_offer'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'minimum_price_offer'), + 'min': this.safeNumber (market, 'minimum_price_offer'), 'max': undefined, }, 'cost': { @@ -132269,11 +130565,11 @@ module.exports = class therock extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'trading_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'trading_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -132292,27 +130588,27 @@ module.exports = class therock extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'close'), // previous day close, if any + 'previousClose': this.safeNumber (ticker, 'close'), // previous day close, if any 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_traded'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume_traded'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -132387,14 +130683,11 @@ module.exports = class therock extends Exchange { const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; let feeCost = undefined; const transactions = this.safeValue (trade, 'transactions', []); @@ -132404,7 +130697,7 @@ module.exports = class therock extends Exchange { if (feeCost === undefined) { feeCost = 0; } - feeCost = this.sum (feeCost, this.safeFloat (feeTransactions[i], 'price')); + feeCost = this.sum (feeCost, this.safeNumber (feeTransactions[i], 'price')); } if (feeCost !== undefined) { fee = { @@ -132559,7 +130852,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (item, 'price'); + const amount = this.safeNumber (item, 'price'); const timestamp = this.parse8601 (this.safeString (item, 'date')); const status = 'ok'; return { @@ -132791,7 +131084,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'price'); + const amount = this.safeNumber (transaction, 'price'); const timestamp = this.parse8601 (this.safeString (transaction, 'date')); const status = 'ok'; // todo parse tags @@ -132966,15 +131259,15 @@ module.exports = class therock extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'date')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'amount_unfilled'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amount_unfilled'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let trades = this.safeValue (order, 'trades'); let cost = undefined; let average = undefined; @@ -133001,7 +131294,7 @@ module.exports = class therock extends Exchange { cost = 0; } } - const stopPrice = this.safeFloat (order, 'conditional_price'); + const stopPrice = this.safeNumber (order, 'conditional_price'); return { 'id': id, 'clientOrderId': undefined, @@ -133279,13 +131572,14 @@ module.exports = class therock extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],169:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],166:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, OrderNotFound, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -133464,11 +131758,11 @@ module.exports = class tidebit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -133493,15 +131787,15 @@ module.exports = class tidebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'ask': this.safeFloat (ticker, 'sell'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'ask': this.safeNumber (ticker, 'sell'), 'bidVolume': undefined, 'askVolume': undefined, 'vwap': undefined, @@ -133512,7 +131806,7 @@ module.exports = class tidebit extends Exchange { 'percentage': undefined, 'previousClose': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -133546,9 +131840,14 @@ module.exports = class tidebit extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -133593,11 +131892,11 @@ module.exports = class tidebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -133683,18 +131982,12 @@ module.exports = class tidebit extends Exchange { const id = this.safeString (order, 'id'); const type = this.safeString (order, 'ord_type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const filled = this.safeFloat (order, 'executed_volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - let cost = undefined; - if (price !== undefined) { - if (filled !== undefined) { - cost = price * filled; - } - } - const average = this.safeFloat (order, 'avg_price'); - return { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const filled = this.safeNumber (order, 'executed_volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -133711,12 +132004,12 @@ module.exports = class tidebit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': average, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -133824,11 +132117,12 @@ module.exports = class tidebit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],170:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],167:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class tidex extends Exchange { describe () { @@ -133910,6 +132204,7 @@ module.exports = class tidex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.1 / 100, @@ -133954,19 +132249,48 @@ module.exports = class tidex extends Exchange { async fetchCurrencies (params = {}) { const response = await this.webGetCurrency (params); + // + // [ + // { + // "id":2, + // "symbol":"BTC", + // "type":2, + // "name":"Bitcoin", + // "amountPoint":8, + // "depositEnable":true, + // "depositMinAmount":0.0005, + // "withdrawEnable":true, + // "withdrawFee":0.0004, + // "withdrawMinAmount":0.0005, + // "settings":{ + // "Blockchain":"https://blockchair.com/bitcoin/", + // "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}", + // "AddrUrl":"https://blockchair.com/bitcoin/address/{0}", + // "ConfirmationCount":3, + // "NeedMemo":false + // }, + // "visible":true, + // "isDelisted":false + // } + // ] + // const result = {}; for (let i = 0; i < response.length; i++) { const currency = response[i]; const id = this.safeString (currency, 'symbol'); - const precision = currency['amountPoint']; + const precision = this.safeInteger (currency, 'amountPoint'); const code = this.safeCurrencyCode (id); - let active = currency['visible'] === true; - const canWithdraw = currency['withdrawEnable'] === true; - const canDeposit = currency['depositEnable'] === true; + const visible = this.safeValue (currency, 'visible'); + let active = visible === true; + const withdrawEnable = this.safeValue (currency, 'withdrawEnable'); + const depositEnable = this.safeValue (currency, 'depositEnable'); + const canWithdraw = withdrawEnable === true; + const canDeposit = depositEnable === true; if (!canWithdraw || !canDeposit) { active = false; } const name = this.safeString (currency, 'name'); + const fee = this.safeNumber (currency, 'withdrawFee'); result[code] = { 'id': id, 'code': code, @@ -133976,7 +132300,7 @@ module.exports = class tidex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': currency['withdrawFee'], + 'fee': fee, }, 'deposit': { 'active': canDeposit, @@ -133997,11 +132321,11 @@ module.exports = class tidex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawMinAmount'), + 'min': this.safeNumber (currency, 'withdrawMinAmount'), 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'depositMinAmount'), + 'min': this.safeNumber (currency, 'depositMinAmount'), 'max': undefined, }, }, @@ -134011,26 +132335,25 @@ module.exports = class tidex extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615861869, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":3.0, + // "min_amount":0.001, + // "max_amount":1000000.0, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.1, + // }, + // }, + // } + // const markets = response['pairs']; const keys = Object.keys (markets); const result = []; @@ -134047,19 +132370,20 @@ module.exports = class tidex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }, }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -134068,7 +132392,7 @@ module.exports = class tidex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -134089,11 +132413,11 @@ module.exports = class tidex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (funds, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'value'); - account['used'] = this.safeFloat (balance, 'inOrders'); + account['free'] = this.safeString (balance, 'value'); + account['used'] = this.safeString (balance, 'inOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -134165,16 +132489,16 @@ module.exports = class tidex extends Exchange { timestamp = undefined; } } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -134183,9 +132507,9 @@ module.exports = class tidex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -134233,16 +132557,19 @@ module.exports = class tidex extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const orderId = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = 'limit'; // all trades are still limit trades let takerOrMaker = undefined; let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -134261,12 +132588,6 @@ module.exports = class tidex extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': orderId, @@ -134322,17 +132643,18 @@ module.exports = class tidex extends Exchange { let status = 'open'; let filled = 0.0; let remaining = amount; - if ('return' in response) { - id = this.safeString (response['return'], 'order_id'); + const returnResult = this.safeValue (response, 'return'); + if (returnResult !== undefined) { + id = this.safeString (returnResult, 'order_id'); if (id === '0') { - id = this.safeString (response['return'], 'init_order_id'); + id = this.safeString (returnResult, 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (returnResult, 'received', filled); + remaining = this.safeNumber (returnResult, 'remains', amount); } const timestamp = this.milliseconds (); - return { + return this.safeOrder ({ 'id': id, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -134342,7 +132664,7 @@ module.exports = class tidex extends Exchange { 'type': type, 'side': side, 'price': price, - 'cost': price * filled, + 'cost': undefined, 'amount': amount, 'remaining': remaining, 'filled': filled, @@ -134352,7 +132674,7 @@ module.exports = class tidex extends Exchange { 'clientOrderId': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -134381,23 +132703,15 @@ module.exports = class tidex extends Exchange { const symbol = this.safeSymbol (marketId, market); let remaining = undefined; let amount = undefined; - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; + const price = this.safeNumber (order, 'rate'); if ('start_amount' in order) { - amount = this.safeFloat (order, 'start_amount'); - remaining = this.safeFloat (order, 'amount'); + amount = this.safeNumber (order, 'start_amount'); + remaining = this.safeNumber (order, 'amount'); } else { - remaining = this.safeFloat (order, 'amount'); - } - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } + remaining = this.safeNumber (order, 'amount'); } const fee = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -134411,15 +132725,15 @@ module.exports = class tidex extends Exchange { 'side': this.safeString (order, 'type'), 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -134609,11 +132923,12 @@ module.exports = class tidex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],171:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],168:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, PermissionDenied, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, RateLimitExceeded, NotSupported, BadRequest, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class timex extends Exchange { describe () { @@ -135062,11 +133377,11 @@ module.exports = class timex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'totalBalance'); - account['used'] = this.safeFloat (balance, 'lockedBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + account['used'] = this.safeString (balance, 'lockedBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -135427,7 +133742,7 @@ module.exports = class timex extends Exchange { const result = this.safeValue (response, 0, {}); return { 'info': response, - 'maker': this.safeFloat (result, 'fee'), + 'maker': this.safeNumber (result, 'fee'), 'taker': undefined, }; } @@ -135464,18 +133779,18 @@ module.exports = class timex extends Exchange { 'amount': this.precisionFromString (this.safeString (market, 'quantityIncrement')), 'price': this.precisionFromString (this.safeString (market, 'tickSize')), }; - const amountIncrement = this.safeFloat (market, 'quantityIncrement'); - const minBase = this.safeFloat (market, 'baseMinSize'); + const amountIncrement = this.safeNumber (market, 'quantityIncrement'); + const minBase = this.safeNumber (market, 'baseMinSize'); const minAmount = Math.max (amountIncrement, minBase); - const priceIncrement = this.safeFloat (market, 'tickSize'); - const minCost = this.safeFloat (market, 'quoteMinSize'); + const priceIncrement = this.safeNumber (market, 'tickSize'); + const minCost = this.safeNumber (market, 'quoteMinSize'); const limits = { 'amount': { 'min': minAmount, 'max': undefined }, 'price': { 'min': priceIncrement, 'max': undefined }, 'cost': { 'min': Math.max (minCost, minAmount * priceIncrement), 'max': undefined }, }; - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); return { 'id': id, 'symbol': symbol, @@ -135536,7 +133851,7 @@ module.exports = class timex extends Exchange { const name = this.safeString (currency, 'name'); const precision = this.safeInteger (currency, 'decimals'); const active = this.safeValue (currency, 'active'); - // const fee = this.safeFloat (currency, 'withdrawalFee'); + // const fee = this.safeNumber (currency, 'withdrawalFee'); const feeString = this.safeString (currency, 'withdrawalFee'); const tradeDecimals = this.safeInteger (currency, 'tradeDecimals'); let fee = undefined; @@ -135573,14 +133888,6 @@ module.exports = class timex extends Exchange { }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // // { @@ -135600,8 +133907,8 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '/'); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -135617,11 +133924,11 @@ module.exports = class timex extends Exchange { 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -135631,8 +133938,8 @@ module.exports = class timex extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'volumeQuote'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volumeQuote'), }; } @@ -135651,23 +133958,27 @@ module.exports = class timex extends Exchange { // fetchMyTrades, fetchOrder (private) // // { - // "fee": "0.3", - // "id": 100, - // "makerOrTaker": "MAKER", - // "makerOrderId": "string", - // "price": "0.017", - // "quantity": "0.3", + // "id": "7613414", + // "makerOrderId": "0x8420af060722f560098f786a2894d4358079b6ea5d14b395969ed77bc87a623a", + // "takerOrderId": "0x1235ef158a361815b54c9988b6241c85aedcbc1fe81caf8df8587d5ab0373d1a", + // "symbol": "LTCUSDT", // "side": "BUY", - // "symbol": "TIMEETH", - // "takerOrderId": "string", - // "timestamp": "2019-12-08T04:54:11.171Z" - // } + // "quantity": "0.2", + // "fee": "0.22685", + // "feeToken": "USDT", + // "price": "226.85", + // "makerOrTaker": "TAKER", + // "timestamp": "2021-04-09T15:39:45.608" + // } // const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeStringLower2 (trade, 'direction', 'side'); const takerOrMaker = this.safeStringLower (trade, 'makerOrTaker'); @@ -135676,18 +133987,14 @@ module.exports = class timex extends Exchange { orderId = this.safeString (trade, takerOrMaker + 'OrderId'); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); + const feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'feeToken')); if (feeCost !== undefined) { - const feeCurrency = (market === undefined) ? undefined : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrency, }; } - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = this.costToPrecision (symbol, amount * price); - } return { 'info': trade, 'id': id, @@ -135719,11 +134026,11 @@ module.exports = class timex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -135754,14 +134061,12 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'filledQuantity'); - const canceledQuantity = this.safeFloat (order, 'cancelledQuantity'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'filledQuantity'); + const canceledQuantity = this.safeNumber (order, 'cancelledQuantity'); let status = undefined; if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0.0); if (filled >= amount) { status = 'closed'; } else if ((canceledQuantity !== undefined) && (canceledQuantity > 0)) { @@ -135770,30 +134075,19 @@ module.exports = class timex extends Exchange { status = 'open'; } } - const cost = parseFloat (this.costToPrecision (symbol, price * filled)); - const fee = undefined; - let lastTradeTimestamp = undefined; - let trades = undefined; - const rawTrades = this.safeValue (order, 'trades'); - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'order': id, - }); - } - if (trades !== undefined) { - const numTrades = trades.length; - if (numTrades > 0) { - lastTradeTimestamp = trades[numTrades - 1]['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'order': id, + 'type': type, + }); const clientOrderId = this.safeString (order, 'clientOrderId'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': undefined, @@ -135802,14 +134096,14 @@ module.exports = class timex extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { @@ -135850,13 +134144,14 @@ module.exports = class timex extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],172:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],169:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, PermissionDenied, AddressPending } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -136082,9 +134377,9 @@ module.exports = class upbit extends Exchange { } else if ((locked !== undefined) && locked) { active = false; } - const maxOnetimeWithdrawal = this.safeFloat (withdrawLimits, 'onetime'); - const maxDailyWithdrawal = this.safeFloat (withdrawLimits, 'daily', maxOnetimeWithdrawal); - const remainingDailyWithdrawal = this.safeFloat (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); + const maxOnetimeWithdrawal = this.safeNumber (withdrawLimits, 'onetime'); + const maxDailyWithdrawal = this.safeNumber (withdrawLimits, 'daily', maxOnetimeWithdrawal); + const remainingDailyWithdrawal = this.safeNumber (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); let maxWithdrawLimit = undefined; if (remainingDailyWithdrawal > 0) { maxWithdrawLimit = remainingDailyWithdrawal; @@ -136100,11 +134395,11 @@ module.exports = class upbit extends Exchange { 'code': code, 'name': code, 'active': active, - 'fee': this.safeFloat (currencyInfo, 'withdraw_fee'), + 'fee': this.safeNumber (currencyInfo, 'withdraw_fee'), 'precision': precision, 'limits': { 'withdraw': { - 'min': this.safeFloat (withdrawLimits, 'minimum'), + 'min': this.safeNumber (withdrawLimits, 'minimum'), 'max': maxWithdrawLimit, }, }, @@ -136167,8 +134462,8 @@ module.exports = class upbit extends Exchange { }; const state = this.safeString (marketInfo, 'state'); const active = (state === 'active'); - const bidFee = this.safeFloat (response, 'bid_fee'); - const askFee = this.safeFloat (response, 'ask_fee'); + const bidFee = this.safeNumber (response, 'bid_fee'); + const askFee = this.safeNumber (response, 'ask_fee'); const fee = Math.max (bidFee, askFee); return { 'info': response, @@ -136184,7 +134479,7 @@ module.exports = class upbit extends Exchange { 'taker': fee, 'limits': { 'amount': { - 'min': this.safeFloat (ask, 'min_total'), + 'min': this.safeNumber (ask, 'min_total'), 'max': undefined, }, 'price': { @@ -136192,8 +134487,8 @@ module.exports = class upbit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (bid, 'min_total'), - 'max': this.safeFloat (marketInfo, 'max_total'), + 'min': this.safeNumber (bid, 'min_total'), + 'max': this.safeNumber (marketInfo, 'max_total'), }, }, }; @@ -136232,8 +134527,8 @@ module.exports = class upbit extends Exchange { 'price': 8, }; const active = true; - const makerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); - const takerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); + const makerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); + const takerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); result.push ({ 'id': id, 'symbol': symbol, @@ -136286,11 +134581,11 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { @@ -136393,30 +134688,30 @@ module.exports = class upbit extends Exchange { const timestamp = this.safeInteger (ticker, 'trade_timestamp'); const marketId = this.safeString2 (ticker, 'market', 'code'); const symbol = this.safeSymbol (marketId, market, '-'); - const previous = this.safeFloat (ticker, 'prev_closing_price'); - const last = this.safeFloat (ticker, 'trade_price'); - const change = this.safeFloat (ticker, 'signed_change_price'); - const percentage = this.safeFloat (ticker, 'signed_change_rate'); + const previous = this.safeNumber (ticker, 'prev_closing_price'); + const last = this.safeNumber (ticker, 'trade_price'); + const change = this.safeNumber (ticker, 'signed_change_price'); + const percentage = this.safeNumber (ticker, 'signed_change_rate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price'), - 'low': this.safeFloat (ticker, 'low_price'), + 'high': this.safeNumber (ticker, 'high_price'), + 'low': this.safeNumber (ticker, 'low_price'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'opening_price'), + 'open': this.safeNumber (ticker, 'opening_price'), 'close': last, 'last': last, 'previousClose': previous, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'acc_trade_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'acc_trade_price_24h'), + 'baseVolume': this.safeNumber (ticker, 'acc_trade_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'acc_trade_price_24h'), 'info': ticker, }; } @@ -136523,15 +134818,13 @@ module.exports = class upbit extends Exchange { } else if (askOrBid === 'bid') { side = 'buy'; } - let cost = this.safeFloat (trade, 'funds'); - const price = this.safeFloat2 (trade, 'trade_price', 'price'); - const amount = this.safeFloat2 (trade, 'trade_volume', 'volume'); + let cost = this.safeNumber (trade, 'funds'); + const priceString = this.safeString2 (trade, 'trade_price', 'price'); + const amountString = this.safeString2 (trade, 'trade_volume', 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString2 (trade, 'market', 'code'); market = this.safeMarket (marketId, market); @@ -136626,11 +134919,11 @@ module.exports = class upbit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'candle_date_time_utc')), - this.safeFloat (ohlcv, 'opening_price'), - this.safeFloat (ohlcv, 'high_price'), - this.safeFloat (ohlcv, 'low_price'), - this.safeFloat (ohlcv, 'trade_price'), - this.safeFloat (ohlcv, 'candle_acc_trade_volume'), // base volume + this.safeNumber (ohlcv, 'opening_price'), + this.safeNumber (ohlcv, 'high_price'), + this.safeNumber (ohlcv, 'low_price'), + this.safeNumber (ohlcv, 'trade_price'), + this.safeNumber (ohlcv, 'candle_acc_trade_volume'), // base volume ]; } @@ -136899,7 +135192,7 @@ module.exports = class upbit extends Exchange { // } // const id = this.safeString (transaction, 'uuid'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = undefined; // not present in the data structure received from the exchange const tag = undefined; // not present in the data structure received from the exchange const txid = this.safeString (transaction, 'txid'); @@ -136912,7 +135205,7 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -136997,10 +135290,10 @@ module.exports = class upbit extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const status = this.parseOrderStatus (this.safeString (order, 'state')); let lastTradeTimestamp = undefined; - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - const filled = this.safeFloat (order, 'executed_volume'); + let price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const filled = this.safeNumber (order, 'executed_volume'); let cost = undefined; if (type === 'price') { type = 'market'; @@ -137009,7 +135302,7 @@ module.exports = class upbit extends Exchange { } let average = undefined; let fee = undefined; - let feeCost = this.safeFloat (order, 'paid_fee'); + let feeCost = this.safeNumber (order, 'paid_fee'); const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); let trades = this.safeValue (order, 'trades', []); @@ -137032,7 +135325,7 @@ module.exports = class upbit extends Exchange { cost = this.sum (cost, trade['cost']); if (getFeesFromTrades) { const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); + const tradeFeeCost = this.safeNumber (tradeFee, 'cost'); if (tradeFeeCost !== undefined) { feeCost = this.sum (feeCost, tradeFeeCost); } @@ -137174,16 +135467,6 @@ module.exports = class upbit extends Exchange { return this.parseOrder (response); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetDepositsCoinAddresses (params); @@ -137381,212 +135664,7 @@ module.exports = class upbit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],173:[function(require,module,exports){ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); - -// --------------------------------------------------------------------------- - -module.exports = class vaultoro extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'vaultoro', - 'name': 'Vaultoro', - 'countries': [ 'CH' ], - 'rateLimit': 1000, - 'version': '1', - 'has': { - 'CORS': true, - 'fetchMarkets': true, - 'fetchOrderBook': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'fetchTrades': true, - 'fetchTicker': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg', - 'api': 'https://api.vaultoro.com', - 'www': 'https://www.vaultoro.com', - 'doc': 'https://api.vaultoro.com', - }, - 'commonCurrencies': { - 'GLD': 'Gold', - }, - 'api': { - 'public': { - 'get': [ - 'bidandask', - 'buyorders', - 'latest', - 'latesttrades', - 'markets', - 'orderbook', - 'sellorders', - 'transactions/day', - 'transactions/hour', - 'transactions/month', - ], - }, - 'private': { - 'get': [ - 'balance', - 'mytrades', - 'orders', - ], - 'post': [ - 'buy/{symbol}/{type}', - 'cancel/{id}', - 'sell/{symbol}/{type}', - 'withdraw', - ], - }, - }, - }); - } - - async fetchMarkets (params = {}) { - const result = []; - const response = await this.publicGetMarkets (params); - const market = this.safeValue (response, 'data'); - const baseId = this.safeString (market, 'MarketCurrency'); - const quoteId = this.safeString (market, 'BaseCurrency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const id = this.safeString (market, 'MarketName'); - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'active': undefined, - 'precision': this.precision, - 'limits': this.limits, - }); - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetBalance (params); - const balances = this.safeValue (response, 'data'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency_code'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'cash'); - account['used'] = this.safeFloat (balance, 'reserved'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetOrderbook (params); - const orderbook = { - 'bids': response['data'][0]['b'], - 'asks': response['data'][1]['s'], - }; - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'Gold_Price', 'Gold_Amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'Time')); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const price = this.safeFloat (trade, 'Gold_Price'); - const amount = this.safeFloat (trade, 'Gold_Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } - return { - 'id': undefined, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': undefined, - 'side': undefined, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const response = await this.publicGetTransactionsDay (params); - return this.parseTrades (response, market, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const method = 'privatePost' + this.capitalize (side) + 'SymbolType'; - const request = { - 'symbol': market['quoteId'].toLowerCase (), - 'type': type, - 'gld': amount, - 'price': price || 1, - }; - const response = await this[method] (this.extend (request, params)); - return { - 'info': response, - 'id': response['data']['Order_ID'], - }; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - return await this.privatePostCancelId (this.extend (request, params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/'; - if (api === 'public') { - url += path; - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce (); - url += this.version + '/' + this.implodeParams (path, params); - const query = this.extend ({ - 'nonce': nonce, - 'apikey': this.apiKey, - }, this.omit (params, this.extractParams (path))); - url += '?' + this.urlencode (query); - headers = { - 'Content-Type': 'application/json', - 'X-Signature': this.hmac (this.encode (url), this.encode (this.secret)), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } -}; - -},{"./base/Exchange":6}],174:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],170:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -137620,7 +135698,7 @@ module.exports = class vbtc extends foxbit { } }; -},{"./foxbit.js":87}],175:[function(require,module,exports){ +},{"./foxbit.js":85}],171:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -137628,6 +135706,7 @@ module.exports = class vbtc extends foxbit { const Exchange = require ('./base/Exchange'); const { ExchangeError, OrderNotFound, InvalidOrder, BadRequest, AuthenticationError, RateLimitExceeded, RequestTimeout, BadSymbol, AddressPending, PermissionDenied, InsufficientFunds } = require ('./base/errors'); const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -137819,15 +135898,15 @@ module.exports = class vcc extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, 'min'), + 'min': this.safeNumber (amountLimits, 'min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (priceLimits, 'min'), + 'min': this.safeNumber (priceLimits, 'min'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (costLimits, 'min'), + 'min': this.safeNumber (costLimits, 'min'), 'max': undefined, }, }, @@ -137874,12 +135953,12 @@ module.exports = class vcc extends Exchange { 'code': code, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': this.safeInteger (currency, 'decimal'), 'limits': { 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw'), - 'max': this.safeFloat (currency, 'max_withdraw'), + 'min': this.safeNumber (currency, 'min_withdraw'), + 'max': this.safeNumber (currency, 'max_withdraw'), }, }, }; @@ -137902,8 +135981,8 @@ module.exports = class vcc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } @@ -137929,11 +136008,11 @@ module.exports = class vcc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (data, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -137951,11 +136030,11 @@ module.exports = class vcc extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -138044,10 +136123,10 @@ module.exports = class vcc extends Exchange { // } // const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); - const open = this.safeFloat (ticker, 'open_price'); - const last = this.safeFloat (ticker, 'last_price'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); + const open = this.safeNumber (ticker, 'open_price'); + const last = this.safeNumber (ticker, 'last_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -138064,11 +136143,11 @@ module.exports = class vcc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -138182,17 +136261,17 @@ module.exports = class vcc extends Exchange { } market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'base_volume', 'quantity'); - let cost = this.safeFloat2 (trade, 'quote_volume', 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'base_volume', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber2 (trade, 'quote_volume', 'amount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const side = this.safeString2 (trade, 'type', 'trade_type'); const id = this.safeString2 (trade, 'trade_id', 'id'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -138377,7 +136456,7 @@ module.exports = class vcc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -138385,7 +136464,7 @@ module.exports = class vcc extends Exchange { const txid = this.safeString (transaction, 'transaction_id'); const tag = this.safeString (transaction, 'destination_tag'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -138630,46 +136709,27 @@ module.exports = class vcc extends Exchange { const marketId = baseId + '_' + quoteId; market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'executed_quantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - let cost = this.safeFloat (order, 'ceiling'); + const cost = this.safeNumber (order, 'ceiling'); const id = this.safeString (order, 'id'); - let average = undefined; - let price = this.safeFloat (order, 'price'); - // in case of market order - if (!price) { - price = this.safeFloat (order, 'executed_price'); - average = price; - } - let remaining = this.safeFloat (order, 'remaining'); - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if (filled !== undefined) { - if ((amount !== undefined) && (remaining === undefined)) { - remaining = Math.max (0, amount - filled); - } - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((average === undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'executed_price'); + const remaining = this.safeNumber (order, 'remaining'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'trade_type'); const fee = { 'currency': market['quote'], - 'cost': this.safeFloat (order, 'fee'), - 'rate': this.safeFloat (order, 'fee_rate'), + 'cost': this.safeNumber (order, 'fee'), + 'rate': this.safeNumber (order, 'fee_rate'), }; let lastTradeTimestamp = undefined; if (updated !== created) { lastTradeTimestamp = updated; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': id, 'timestamp': created, @@ -138691,7 +136751,7 @@ module.exports = class vcc extends Exchange { 'fee': fee, 'trades': undefined, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -138961,7 +137021,7 @@ module.exports = class vcc extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8,"./base/functions/number":14}],176:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9,"./base/functions/number":15}],172:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -139529,13 +137589,13 @@ module.exports = class wavesexchange extends Exchange { symbol = market['symbol']; } const data = this.safeValue (ticker, 'data', {}); - const last = this.safeFloat (data, 'lastPrice'); - const low = this.safeFloat (data, 'low'); - const high = this.safeFloat (data, 'high'); - const vwap = this.safeFloat (data, 'weightedAveragePrice'); - const baseVolume = this.safeFloat (data, 'volume'); - const quoteVolume = this.safeFloat (data, 'quoteVolume'); - const open = this.safeValue (data, 'firstPrice'); + const last = this.safeNumber (data, 'lastPrice'); + const low = this.safeNumber (data, 'low'); + const high = this.safeNumber (data, 'high'); + const vwap = this.safeNumber (data, 'weightedAveragePrice'); + const baseVolume = this.safeNumber (data, 'volume'); + const quoteVolume = this.safeNumber (data, 'quoteVolume'); + const open = this.safeNumber (data, 'firstPrice'); let change = undefined; let average = undefined; let percentage = undefined; @@ -139689,11 +137749,11 @@ module.exports = class wavesexchange extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.parse8601 (this.safeString (data, 'time')), - this.safeFloat (data, 'open'), - this.safeFloat (data, 'high'), - this.safeFloat (data, 'low'), - this.safeFloat (data, 'close'), - this.safeFloat (data, 'volume', 0), + this.safeNumber (data, 'open'), + this.safeNumber (data, 'high'), + this.safeNumber (data, 'low'), + this.safeNumber (data, 'close'), + this.safeNumber (data, 'volume', 0), ]; } @@ -139908,7 +137968,7 @@ module.exports = class wavesexchange extends Exchange { } if (matcherFee === undefined) { const wavesPrecision = this.safeInteger (this.options, 'wavesPrecision', 8); - const rate = this.safeFloat (rates, matcherFeeAssetId); + const rate = this.safeNumber (rates, matcherFeeAssetId); const code = this.safeCurrencyCode (matcherFeeAssetId); const currency = this.currency (code); const newPrecison = Math.pow (10, wavesPrecision - currency['precision']); @@ -140318,7 +138378,7 @@ module.exports = class wavesexchange extends Exchange { const issueTransaction = this.safeValue (entry, 'issueTransaction'); const decimals = this.safeInteger (issueTransaction, 'decimals'); const currencyId = this.safeString (entry, 'assetId'); - const balance = this.safeFloat (entry, 'balance'); + const balance = this.safeNumber (entry, 'balance'); let code = undefined; if (currencyId in this.currencies_by_id) { code = this.safeCurrencyCode (currencyId); @@ -140348,7 +138408,7 @@ module.exports = class wavesexchange extends Exchange { if (!(code in result)) { result[code] = this.account (); } - const amount = this.safeFloat (reservedBalance, currencyId); + const amount = this.safeNumber (reservedBalance, currencyId); result[code]['used'] = this.currencyFromPrecision (code, amount); } const wavesRequest = { @@ -140361,7 +138421,7 @@ module.exports = class wavesexchange extends Exchange { // "balance": 909085978 // } result['WAVES'] = this.safeValue (result, 'WAVES', {}); - result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeFloat (wavesTotal, 'balance')); + result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeNumber (wavesTotal, 'balance')); const codes = Object.keys (result); for (let i = 0; i < codes.length; i++) { const code = codes[i]; @@ -140453,8 +138513,8 @@ module.exports = class wavesexchange extends Exchange { const datetime = this.safeString (data, 'timestamp'); const timestamp = this.parse8601 (datetime); const id = this.safeString (data, 'id'); - const price = this.safeFloat (data, 'price'); - const amount = this.safeFloat (data, 'amount'); + const price = this.safeNumber (data, 'price'); + const amount = this.safeNumber (data, 'amount'); const order1 = this.safeValue (data, 'order1'); const order2 = this.safeValue (data, 'order2'); let order = undefined; @@ -140478,7 +138538,7 @@ module.exports = class wavesexchange extends Exchange { cost = price * amount; } const fee = { - 'cost': this.safeFloat (data, 'fee'), + 'cost': this.safeNumber (data, 'fee'), 'currency': this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES')), }; return { @@ -140560,7 +138620,7 @@ module.exports = class wavesexchange extends Exchange { const withdrawAddress = await this.privateGetWithdrawAddressesCurrencyAddress (withdrawAddressRequest); const currency = this.safeValue (withdrawAddress, 'currency'); const allowedAmount = this.safeValue (currency, 'allowed_amount'); - const minimum = this.safeFloat (allowedAmount, 'min'); + const minimum = this.safeNumber (allowedAmount, 'min'); if (amount <= minimum) { throw new BadRequest (this.id + ' ' + code + ' withdraw failed, amount ' + amount.toString () + ' must be greater than the minimum allowed amount of ' + minimum.toString ()); } @@ -140630,13 +138690,14 @@ module.exports = class wavesexchange extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],177:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],173:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeNotAvailable, ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -140797,7 +138858,7 @@ module.exports = class whitebit extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -140805,7 +138866,7 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minTotal'), + 'min': this.safeNumber (market, 'minTotal'), 'max': undefined, }, }, @@ -140870,8 +138931,8 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -140883,8 +138944,8 @@ module.exports = class whitebit extends Exchange { const response = await this.publicV2GetFee (params); const fees = this.safeValue (response, 'result'); return { - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), }; } @@ -140954,8 +139015,8 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let change = undefined; if (percentage !== undefined) { change = this.numberToString (percentage * 0.01); @@ -140964,22 +139025,22 @@ module.exports = class whitebit extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'deal'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'deal'), 'info': ticker, }; } @@ -141147,8 +139208,11 @@ module.exports = class whitebit extends Exchange { } else { timestamp = parseInt (timestamp * 1000); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'volume'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'volume'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const id = this.safeString2 (trade, 'id', 'tradeId'); let side = this.safeString (trade, 'type'); if (side === undefined) { @@ -141159,10 +139223,6 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined && price !== undefined) { - cost = amount * price; - } return { 'info': trade, 'timestamp': timestamp, @@ -141232,11 +139292,11 @@ module.exports = class whitebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -141285,7 +139345,7 @@ module.exports = class whitebit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],178:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],174:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- @@ -141440,14 +139500,13 @@ module.exports = class xbtce extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'FreeAmount'), - 'used': this.safeFloat (balance, 'LockedAmount'), - 'total': this.safeFloat (balance, 'Amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'FreeAmount'); + account['used'] = this.safeString (balance, 'LockedAmount'); + account['total'] = this.safeString (balance, 'Amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -141559,11 +139618,11 @@ module.exports = class xbtce extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeInteger (ohlcv, 'Timestamp'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -141657,11 +139716,12 @@ module.exports = class xbtce extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],179:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/errors":9}],175:[function(require,module,exports){ 'use strict'; const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, InsufficientFunds, InvalidAddress, BadSymbol, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class xena extends Exchange { describe () { @@ -141937,8 +139997,8 @@ module.exports = class xena extends Exchange { 'price': pricePrecision, 'amount': 0, }; - const maxCost = this.safeFloat (market, 'maxOrderQty'); - const minCost = this.safeFloat (market, 'minOrderQuantity'); + const maxCost = this.safeNumber (market, 'maxOrderQty'); + const minCost = this.safeNumber (market, 'minOrderQuantity'); const limits = { 'amount': { 'min': undefined, @@ -142023,7 +140083,7 @@ module.exports = class xena extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (withdraw, 'commission'), + 'fee': this.safeNumber (withdraw, 'commission'), 'precision': precision, 'limits': { 'amount': { @@ -142039,7 +140099,7 @@ module.exports = class xena extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'minAmount'), + 'min': this.safeNumber (withdraw, 'minAmount'), 'max': undefined, }, }, @@ -142067,8 +140127,8 @@ module.exports = class xena extends Exchange { const timestamp = this.milliseconds (); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPx'); - const open = this.safeFloat (ticker, 'firstPx'); + const last = this.safeNumber (ticker, 'lastPx'); + const open = this.safeNumber (ticker, 'firstPx'); let percentage = undefined; let change = undefined; let average = undefined; @@ -142079,18 +140139,18 @@ module.exports = class xena extends Exchange { percentage = change / open * 100; } } - const buyVolume = this.safeFloat (ticker, 'buyVolume'); - const sellVolume = this.safeFloat (ticker, 'sellVolume'); + const buyVolume = this.safeNumber (ticker, 'buyVolume'); + const sellVolume = this.safeNumber (ticker, 'sellVolume'); const baseVolume = this.sum (buyVolume, sellVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPx'), - 'low': this.safeFloat (ticker, 'lowPx'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'highPx'), + 'low': this.safeNumber (ticker, 'lowPx'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -142267,11 +140327,11 @@ module.exports = class xena extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onHold'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onHold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTrade (trade, market = undefined) { @@ -142325,20 +140385,17 @@ module.exports = class xena extends Exchange { const orderId = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat2 (trade, 'lastPx', 'mdEntryPx'); - const amount = this.safeFloat2 (trade, 'lastQty', 'mdEntrySize'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'lastPx', 'mdEntryPx'); + const amountString = this.safeString2 (trade, 'lastQty', 'mdEntrySize'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (trade, 'commRate'); + const feeRate = this.safeNumber (trade, 'commRate'); fee = { 'cost': feeCost, 'rate': feeRate, @@ -142453,15 +140510,15 @@ module.exports = class xena extends Exchange { // const transactTime = this.safeInteger (ohlcv, 'transactTime'); const timestamp = parseInt (transactTime / 1000000); - const buyVolume = this.safeFloat (ohlcv, 'buyVolume'); - const sellVolume = this.safeFloat (ohlcv, 'sellVolume'); + const buyVolume = this.safeNumber (ohlcv, 'buyVolume'); + const sellVolume = this.safeNumber (ohlcv, 'sellVolume'); const volume = this.sum (buyVolume, sellVolume); return [ timestamp, - this.safeFloat (ohlcv, 'firstPx'), - this.safeFloat (ohlcv, 'highPx'), - this.safeFloat (ohlcv, 'lowPx'), - this.safeFloat (ohlcv, 'lastPx'), + this.safeNumber (ohlcv, 'firstPx'), + this.safeNumber (ohlcv, 'highPx'), + this.safeNumber (ohlcv, 'lowPx'), + this.safeNumber (ohlcv, 'lastPx'), volume, ]; } @@ -142586,11 +140643,10 @@ module.exports = class xena extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); - let cost = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); let side = this.safeStringLower (order, 'side'); if (side === '1') { side = 'buy'; @@ -142607,12 +140663,7 @@ module.exports = class xena extends Exchange { } else if (type === '4') { type = 'stop-limit'; } - if (cost === undefined) { - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -142627,14 +140678,14 @@ module.exports = class xena extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -142687,7 +140738,7 @@ module.exports = class xena extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if ((type === 'stop') || (type === 'stop-limit')) { - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPx param for order type ' + type); } @@ -142766,12 +140817,12 @@ module.exports = class xena extends Exchange { if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); } - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx !== undefined) { request['stopPx'] = this.priceToPrecision (symbol, stopPx); params = this.omit (params, 'stopPx'); } - const capPrice = this.safeFloat (params, 'capPrice'); + const capPrice = this.safeNumber (params, 'capPrice'); if (capPrice !== undefined) { request['capPrice'] = this.priceToPrecision (symbol, capPrice); params = this.omit (params, 'capPrice'); @@ -143126,7 +141177,7 @@ module.exports = class xena extends Exchange { const address = this.safeString (transaction, 'address'); const addressFrom = undefined; const addressTo = address; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const fee = undefined; return { @@ -143223,7 +141274,7 @@ module.exports = class xena extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'kind')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); @@ -143235,11 +141286,11 @@ module.exports = class xena extends Exchange { timestamp = parseInt (timestamp / 1000000); } const fee = { - 'cost': this.safeFloat (item, 'commission'), + 'cost': this.safeNumber (item, 'commission'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -143379,13 +141430,14 @@ module.exports = class xena extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],180:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],176:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError, RateLimitExceeded } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -143520,6 +141572,7 @@ module.exports = class yobit extends Exchange { 'NAV': 'NavajoCoin', 'NBT': 'NiceBytes', 'OMG': 'OMGame', + 'ONX': 'Onix', 'PAC': '$PAC', 'PLAY': 'PlayCoin', 'PIVX': 'Darknet', @@ -143618,15 +141671,33 @@ module.exports = class yobit extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['total'] = this.safeFloat (total, currencyId); + account['free'] = this.safeString (free, currencyId); + account['total'] = this.safeString (total, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615856752, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":10000, + // "min_amount":0.0001, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.2, + // "fee_buyer":0.2, + // "fee_seller":0.2 + // }, + // }, + // } + // const markets = this.safeValue (response, 'pairs'); const keys = Object.keys (markets); const result = []; @@ -143644,15 +141715,15 @@ module.exports = class yobit extends Exchange { 'price': this.safeInteger (market, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }; const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }; const costLimits = { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }; const limits = { 'amount': amountLimits, @@ -143661,6 +141732,7 @@ module.exports = class yobit extends Exchange { }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -143669,7 +141741,7 @@ module.exports = class yobit extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -143745,16 +141817,16 @@ module.exports = class yobit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -143763,9 +141835,9 @@ module.exports = class yobit extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -143814,15 +141886,18 @@ module.exports = class yobit extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const order = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const type = 'limit'; // all trades are still limit trades let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -143837,12 +141912,6 @@ module.exports = class yobit extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, 'taker'); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': order, @@ -143904,8 +141973,8 @@ module.exports = class yobit extends Exchange { id = this.safeString (response['return'], 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (response['return'], 'received', 0.0); + remaining = this.safeNumber (response['return'], 'remains', amount); } const timestamp = this.milliseconds (); return { @@ -143955,21 +142024,13 @@ module.exports = class yobit extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp_created'); const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const remaining = this.safeFloat (order, 'amount'); - const amount = this.safeFloat (order, 'start_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - cost = price * filled; - } - } + const remaining = this.safeNumber (order, 'amount'); + const amount = this.safeNumber (order, 'start_amount'); + const price = this.safeNumber (order, 'rate'); const fee = undefined; const type = 'limit'; const side = this.safeString (order, 'type'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -143983,16 +142044,15 @@ module.exports = class yobit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -144203,13 +142263,14 @@ module.exports = class yobit extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],181:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],177:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -144333,6 +142394,27 @@ module.exports = class zaif extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetCurrencyPairsAll (params); + // + // [ + // { + // "aux_unit_point": 0, + // "item_japanese": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3", + // "aux_unit_step": 5.0, + // "description": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30fb\u65e5\u672c\u5186\u306e\u53d6\u5f15\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059", + // "item_unit_min": 0.001, + // "event_number": 0, + // "currency_pair": "btc_jpy", + // "is_token": false, + // "aux_unit_min": 5.0, + // "aux_japanese": "\u65e5\u672c\u5186", + // "id": 1, + // "item_unit_step": 0.0001, + // "name": "BTC/JPY", + // "seq": 0, + // "title": "BTC/JPY" + // } + // ] + // const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -144343,8 +142425,8 @@ module.exports = class zaif extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': -Math.log10 (market['item_unit_step']), - 'price': market['aux_unit_point'], + 'amount': -Math.log10 (this.safeNumber (market, 'item_unit_step')), + 'price': this.safeInteger (market, 'aux_unit_point'), }; const fees = this.safeValue (this.options['fees'], symbol, this.fees['trading']); const taker = fees['taker']; @@ -144362,11 +142444,11 @@ module.exports = class zaif extends Exchange { 'maker': maker, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'item_unit_min'), + 'min': this.safeNumber (market, 'item_unit_min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'aux_unit_min'), + 'min': this.safeNumber (market, 'aux_unit_min'), 'max': undefined, }, 'cost': { @@ -144398,7 +142480,7 @@ module.exports = class zaif extends Exchange { }; if ('deposit' in balances) { if (currencyId in balances['deposit']) { - account['total'] = this.safeFloat (balances['deposit'], currencyId); + account['total'] = this.safeNumber (balances['deposit'], currencyId); account['used'] = account['total'] - account['free']; } } @@ -144423,22 +142505,22 @@ module.exports = class zaif extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.milliseconds (); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -144459,14 +142541,11 @@ module.exports = class zaif extends Exchange { side = (side === 'bid') ? 'buy' : 'sell'; const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString2 (trade, 'id', 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); return { @@ -144544,16 +142623,10 @@ module.exports = class zaif extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp'); const marketId = this.safeString (order, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -144567,7 +142640,7 @@ module.exports = class zaif extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': undefined, 'remaining': undefined, @@ -144575,7 +142648,7 @@ module.exports = class zaif extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -144694,13 +142767,14 @@ module.exports = class zaif extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],182:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],178:[function(require,module,exports){ 'use strict'; // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); const { BadRequest, ExchangeError, ArgumentsRequired, AuthenticationError, InsufficientFunds, OrderNotFound, ExchangeNotAvailable, DDoSProtection, InvalidOrder, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -144786,8 +142860,8 @@ module.exports = class zb extends Exchange { 'urls': { 'logo': 'https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg', 'api': { - 'public': 'http://api.zb.cn/data', // no https for public API - 'private': 'https://trade.zb.cn/api', + 'public': 'https://api.zb.today/data', + 'private': 'https://trade.zb.today/api', }, 'www': 'https://www.zb.com', 'doc': 'https://www.zb.com/i/developer', @@ -144902,6 +142976,16 @@ module.exports = class zb extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetMarkets (params); + // + // { + // "zb_qc":{ + // "amountScale":2, + // "minAmount":0.01, + // "minSize":5, + // "priceScale":4, + // }, + // } + // const keys = Object.keys (markets); const result = []; for (let i = 0; i < keys.length; i++) { @@ -144965,11 +143049,11 @@ module.exports = class zb extends Exchange { const account = this.account (); const currencyId = this.safeString (balance, 'key'); const code = this.safeCurrencyCode (currencyId); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'freez'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'freez'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -145018,18 +143102,6 @@ module.exports = class zb extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetGetPayinAddress (params); @@ -145136,16 +143208,16 @@ module.exports = class zb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -145155,12 +143227,23 @@ module.exports = class zb extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; } + parseOHLCV (ohlcv, market = undefined) { + return [ + this.safeInteger (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + ]; + } + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -145185,14 +143268,12 @@ module.exports = class zb extends Exchange { let side = this.safeString (trade, 'trade_type'); side = (side === 'bid') ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const costString = Precise.stringMul (priceString, amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (costString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -145371,23 +143452,13 @@ module.exports = class zb extends Exchange { const timestamp = this.safeInteger (order, 'trade_date'); const marketId = this.safeString (order, 'currency'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'trade_amount'); - const amount = this.safeFloat (order, 'total_amount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'trade_money'); - let average = undefined; + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'trade_amount'); + const amount = this.safeNumber (order, 'total_amount'); + const cost = this.safeNumber (order, 'trade_money'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((cost !== undefined) && (filled !== undefined) && (filled > 0)) { - average = cost / filled; - } const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fees'); + const feeCost = this.safeNumber (order, 'fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -145402,7 +143473,7 @@ module.exports = class zb extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -145416,15 +143487,15 @@ module.exports = class zb extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -145487,7 +143558,7 @@ module.exports = class zb extends Exchange { // const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'hash'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let timestamp = this.parse8601 (this.safeString (transaction, 'submit_time')); timestamp = this.safeInteger (transaction, 'submitTime', timestamp); let address = this.safeString2 (transaction, 'toAddress', 'address'); @@ -145507,7 +143578,7 @@ module.exports = class zb extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -145540,7 +143611,7 @@ module.exports = class zb extends Exchange { if (password === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires exchange.password or a safePwd parameter'); } - const fees = this.safeFloat (params, 'fees'); + const fees = this.safeNumber (params, 'fees'); if (fees === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires a fees parameter'); } @@ -145731,7 +143802,7 @@ module.exports = class zb extends Exchange { } }; -},{"./base/Exchange":6,"./base/errors":8}],183:[function(require,module,exports){ +},{"./base/Exchange":6,"./base/Precise":7,"./base/errors":9}],179:[function(require,module,exports){ (function (global){ 'use strict'; @@ -146225,7 +144296,7 @@ var objectKeys = Object.keys || function (obj) { }; }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"util/":241}],184:[function(require,module,exports){ +},{"util/":237}],180:[function(require,module,exports){ 'use strict' exports.byteLength = byteLength @@ -146341,9 +144412,9 @@ function fromByteArray (uint8) { return parts.join('') } -},{}],185:[function(require,module,exports){ +},{}],181:[function(require,module,exports){ -},{}],186:[function(require,module,exports){ +},{}],182:[function(require,module,exports){ (function (process,Buffer){ 'use strict'; /* eslint camelcase: "off" */ @@ -146755,7 +144826,7 @@ Zlib.prototype._reset = function () { exports.Zlib = Zlib; }).call(this,require('_process'),require("buffer").Buffer) -},{"_process":210,"assert":183,"buffer":188,"pako/lib/zlib/constants":200,"pako/lib/zlib/deflate.js":202,"pako/lib/zlib/inflate.js":204,"pako/lib/zlib/zstream":208}],187:[function(require,module,exports){ +},{"_process":206,"assert":179,"buffer":184,"pako/lib/zlib/constants":196,"pako/lib/zlib/deflate.js":198,"pako/lib/zlib/inflate.js":200,"pako/lib/zlib/zstream":204}],183:[function(require,module,exports){ (function (process){ 'use strict'; @@ -147367,7 +145438,7 @@ util.inherits(DeflateRaw, Zlib); util.inherits(InflateRaw, Zlib); util.inherits(Unzip, Zlib); }).call(this,require('_process')) -},{"./binding":186,"_process":210,"assert":183,"buffer":188,"stream":229,"util":241}],188:[function(require,module,exports){ +},{"./binding":182,"_process":206,"assert":179,"buffer":184,"stream":225,"util":237}],184:[function(require,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -149083,7 +147154,7 @@ function numberIsNaN (obj) { return obj !== obj // eslint-disable-line no-self-compare } -},{"base64-js":184,"ieee754":194}],189:[function(require,module,exports){ +},{"base64-js":180,"ieee754":190}],185:[function(require,module,exports){ module.exports = { "100": "Continue", "101": "Switching Protocols", @@ -149149,7 +147220,7 @@ module.exports = { "511": "Network Authentication Required" } -},{}],190:[function(require,module,exports){ +},{}],186:[function(require,module,exports){ module.exports={ "O_RDONLY": 0, "O_WRONLY": 1, @@ -149360,7 +147431,7 @@ module.exports={ "UV_UDP_REUSEADDR": 4 } -},{}],191:[function(require,module,exports){ +},{}],187:[function(require,module,exports){ (function (Buffer){ // Copyright Joyent, Inc. and other Node contributors. // @@ -149471,7 +147542,7 @@ function objectToString(o) { } }).call(this,{"isBuffer":require("../../is-buffer/index.js")}) -},{"../../is-buffer/index.js":196}],192:[function(require,module,exports){ +},{"../../is-buffer/index.js":192}],188:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -149775,7 +147846,7 @@ function isUndefined(arg) { return arg === void 0; } -},{}],193:[function(require,module,exports){ +},{}],189:[function(require,module,exports){ var http = require('http') var url = require('url') @@ -149808,7 +147879,7 @@ function validateParams (params) { return params } -},{"http":230,"url":236}],194:[function(require,module,exports){ +},{"http":226,"url":232}],190:[function(require,module,exports){ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = nBytes * 8 - mLen - 1 @@ -149894,7 +147965,7 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { buffer[offset + i - d] |= s * 128 } -},{}],195:[function(require,module,exports){ +},{}],191:[function(require,module,exports){ if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { @@ -149919,7 +147990,7 @@ if (typeof Object.create === 'function') { } } -},{}],196:[function(require,module,exports){ +},{}],192:[function(require,module,exports){ /*! * Determine if an object is a Buffer * @@ -149942,14 +148013,14 @@ function isSlowBuffer (obj) { return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) } -},{}],197:[function(require,module,exports){ +},{}],193:[function(require,module,exports){ var toString = {}.toString; module.exports = Array.isArray || function (arr) { return toString.call(arr) == '[object Array]'; }; -},{}],198:[function(require,module,exports){ +},{}],194:[function(require,module,exports){ 'use strict'; @@ -150056,7 +148127,7 @@ exports.setTyped = function (on) { exports.setTyped(TYPED_OK); -},{}],199:[function(require,module,exports){ +},{}],195:[function(require,module,exports){ 'use strict'; // Note: adler32 takes 12% for level 0 and 2% for level 6. @@ -150109,7 +148180,7 @@ function adler32(adler, buf, len, pos) { module.exports = adler32; -},{}],200:[function(require,module,exports){ +},{}],196:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -150179,7 +148250,7 @@ module.exports = { //Z_NULL: null // Use -1 or null inline, depending on var type }; -},{}],201:[function(require,module,exports){ +},{}],197:[function(require,module,exports){ 'use strict'; // Note: we can't get significant speed boost here. @@ -150240,7 +148311,7 @@ function crc32(crc, buf, len, pos) { module.exports = crc32; -},{}],202:[function(require,module,exports){ +},{}],198:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -152116,7 +150187,7 @@ exports.deflatePrime = deflatePrime; exports.deflateTune = deflateTune; */ -},{"../utils/common":198,"./adler32":199,"./crc32":201,"./messages":206,"./trees":207}],203:[function(require,module,exports){ +},{"../utils/common":194,"./adler32":195,"./crc32":197,"./messages":202,"./trees":203}],199:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -152463,7 +150534,7 @@ module.exports = function inflate_fast(strm, start) { return; }; -},{}],204:[function(require,module,exports){ +},{}],200:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154021,7 +152092,7 @@ exports.inflateSyncPoint = inflateSyncPoint; exports.inflateUndermine = inflateUndermine; */ -},{"../utils/common":198,"./adler32":199,"./crc32":201,"./inffast":203,"./inftrees":205}],205:[function(require,module,exports){ +},{"../utils/common":194,"./adler32":195,"./crc32":197,"./inffast":199,"./inftrees":201}],201:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154366,7 +152437,7 @@ module.exports = function inflate_table(type, lens, lens_index, codes, table, ta return 0; }; -},{"../utils/common":198}],206:[function(require,module,exports){ +},{"../utils/common":194}],202:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -154400,7 +152471,7 @@ module.exports = { '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ }; -},{}],207:[function(require,module,exports){ +},{}],203:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -155622,7 +153693,7 @@ exports._tr_flush_block = _tr_flush_block; exports._tr_tally = _tr_tally; exports._tr_align = _tr_align; -},{"../utils/common":198}],208:[function(require,module,exports){ +},{"../utils/common":194}],204:[function(require,module,exports){ 'use strict'; // (C) 1995-2013 Jean-loup Gailly and Mark Adler @@ -155671,7 +153742,7 @@ function ZStream() { module.exports = ZStream; -},{}],209:[function(require,module,exports){ +},{}],205:[function(require,module,exports){ (function (process){ 'use strict'; @@ -155718,7 +153789,7 @@ function nextTick(fn, arg1, arg2, arg3) { } }).call(this,require('_process')) -},{"_process":210}],210:[function(require,module,exports){ +},{"_process":206}],206:[function(require,module,exports){ // shim for using process in browser var process = module.exports = {}; @@ -155904,7 +153975,7 @@ process.chdir = function (dir) { }; process.umask = function() { return 0; }; -},{}],211:[function(require,module,exports){ +},{}],207:[function(require,module,exports){ (function (global){ /*! https://mths.be/punycode v1.4.1 by @mathias */ ;(function(root) { @@ -156441,7 +154512,7 @@ process.umask = function() { return 0; }; }(this)); }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],212:[function(require,module,exports){ +},{}],208:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156527,7 +154598,7 @@ var isArray = Array.isArray || function (xs) { return Object.prototype.toString.call(xs) === '[object Array]'; }; -},{}],213:[function(require,module,exports){ +},{}],209:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156614,16 +154685,16 @@ var objectKeys = Object.keys || function (obj) { return res; }; -},{}],214:[function(require,module,exports){ +},{}],210:[function(require,module,exports){ 'use strict'; exports.decode = exports.parse = require('./decode'); exports.encode = exports.stringify = require('./encode'); -},{"./decode":212,"./encode":213}],215:[function(require,module,exports){ +},{"./decode":208,"./encode":209}],211:[function(require,module,exports){ module.exports = require('./lib/_stream_duplex.js'); -},{"./lib/_stream_duplex.js":216}],216:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":212}],212:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156748,7 +154819,7 @@ function forEach(xs, f) { f(xs[i], i); } } -},{"./_stream_readable":218,"./_stream_writable":220,"core-util-is":191,"inherits":195,"process-nextick-args":209}],217:[function(require,module,exports){ +},{"./_stream_readable":214,"./_stream_writable":216,"core-util-is":187,"inherits":191,"process-nextick-args":205}],213:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -156796,7 +154867,7 @@ function PassThrough(options) { PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; -},{"./_stream_transform":219,"core-util-is":191,"inherits":195}],218:[function(require,module,exports){ +},{"./_stream_transform":215,"core-util-is":187,"inherits":191}],214:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -157806,7 +155877,7 @@ function indexOf(xs, x) { return -1; } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":216,"./internal/streams/BufferList":221,"./internal/streams/destroy":222,"./internal/streams/stream":223,"_process":210,"core-util-is":191,"events":192,"inherits":195,"isarray":197,"process-nextick-args":209,"safe-buffer":228,"string_decoder/":234,"util":185}],219:[function(require,module,exports){ +},{"./_stream_duplex":212,"./internal/streams/BufferList":217,"./internal/streams/destroy":218,"./internal/streams/stream":219,"_process":206,"core-util-is":187,"events":188,"inherits":191,"isarray":193,"process-nextick-args":205,"safe-buffer":224,"string_decoder/":230,"util":181}],215:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -158021,7 +156092,7 @@ function done(stream, er, data) { return stream.push(null); } -},{"./_stream_duplex":216,"core-util-is":191,"inherits":195}],220:[function(require,module,exports){ +},{"./_stream_duplex":212,"core-util-is":187,"inherits":191}],216:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -158688,7 +156759,7 @@ Writable.prototype._destroy = function (err, cb) { cb(err); }; }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./_stream_duplex":216,"./internal/streams/destroy":222,"./internal/streams/stream":223,"_process":210,"core-util-is":191,"inherits":195,"process-nextick-args":209,"safe-buffer":228,"util-deprecate":238}],221:[function(require,module,exports){ +},{"./_stream_duplex":212,"./internal/streams/destroy":218,"./internal/streams/stream":219,"_process":206,"core-util-is":187,"inherits":191,"process-nextick-args":205,"safe-buffer":224,"util-deprecate":234}],217:[function(require,module,exports){ 'use strict'; /**/ @@ -158763,7 +156834,7 @@ module.exports = function () { return BufferList; }(); -},{"safe-buffer":228}],222:[function(require,module,exports){ +},{"safe-buffer":224}],218:[function(require,module,exports){ 'use strict'; /**/ @@ -158836,13 +156907,13 @@ module.exports = { destroy: destroy, undestroy: undestroy }; -},{"process-nextick-args":209}],223:[function(require,module,exports){ +},{"process-nextick-args":205}],219:[function(require,module,exports){ module.exports = require('events').EventEmitter; -},{"events":192}],224:[function(require,module,exports){ +},{"events":188}],220:[function(require,module,exports){ module.exports = require('./readable').PassThrough -},{"./readable":225}],225:[function(require,module,exports){ +},{"./readable":221}],221:[function(require,module,exports){ exports = module.exports = require('./lib/_stream_readable.js'); exports.Stream = exports; exports.Readable = exports; @@ -158851,13 +156922,13 @@ exports.Duplex = require('./lib/_stream_duplex.js'); exports.Transform = require('./lib/_stream_transform.js'); exports.PassThrough = require('./lib/_stream_passthrough.js'); -},{"./lib/_stream_duplex.js":216,"./lib/_stream_passthrough.js":217,"./lib/_stream_readable.js":218,"./lib/_stream_transform.js":219,"./lib/_stream_writable.js":220}],226:[function(require,module,exports){ +},{"./lib/_stream_duplex.js":212,"./lib/_stream_passthrough.js":213,"./lib/_stream_readable.js":214,"./lib/_stream_transform.js":215,"./lib/_stream_writable.js":216}],222:[function(require,module,exports){ module.exports = require('./readable').Transform -},{"./readable":225}],227:[function(require,module,exports){ +},{"./readable":221}],223:[function(require,module,exports){ module.exports = require('./lib/_stream_writable.js'); -},{"./lib/_stream_writable.js":220}],228:[function(require,module,exports){ +},{"./lib/_stream_writable.js":216}],224:[function(require,module,exports){ /* eslint-disable node/no-deprecated-api */ var buffer = require('buffer') var Buffer = buffer.Buffer @@ -158921,7 +156992,7 @@ SafeBuffer.allocUnsafeSlow = function (size) { return buffer.SlowBuffer(size) } -},{"buffer":188}],229:[function(require,module,exports){ +},{"buffer":184}],225:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -159050,7 +157121,7 @@ Stream.prototype.pipe = function(dest, options) { return dest; }; -},{"events":192,"inherits":195,"readable-stream/duplex.js":215,"readable-stream/passthrough.js":224,"readable-stream/readable.js":225,"readable-stream/transform.js":226,"readable-stream/writable.js":227}],230:[function(require,module,exports){ +},{"events":188,"inherits":191,"readable-stream/duplex.js":211,"readable-stream/passthrough.js":220,"readable-stream/readable.js":221,"readable-stream/transform.js":222,"readable-stream/writable.js":223}],226:[function(require,module,exports){ (function (global){ var ClientRequest = require('./lib/request') var extend = require('xtend') @@ -159132,7 +157203,7 @@ http.METHODS = [ 'UNSUBSCRIBE' ] }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./lib/request":232,"builtin-status-codes":189,"url":236,"xtend":242}],231:[function(require,module,exports){ +},{"./lib/request":228,"builtin-status-codes":185,"url":232,"xtend":238}],227:[function(require,module,exports){ (function (global){ exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream) @@ -159205,7 +157276,7 @@ function isFunction (value) { xhr = null // Help gc }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],232:[function(require,module,exports){ +},{}],228:[function(require,module,exports){ (function (process,global,Buffer){ var capability = require('./capability') var inherits = require('inherits') @@ -159515,7 +157586,7 @@ var unsafeHeaders = [ ] }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"./capability":231,"./response":233,"_process":210,"buffer":188,"inherits":195,"readable-stream":225,"to-arraybuffer":235}],233:[function(require,module,exports){ +},{"./capability":227,"./response":229,"_process":206,"buffer":184,"inherits":191,"readable-stream":221,"to-arraybuffer":231}],229:[function(require,module,exports){ (function (process,global,Buffer){ var capability = require('./capability') var inherits = require('inherits') @@ -159701,7 +157772,7 @@ IncomingMessage.prototype._onXHRProgress = function () { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer) -},{"./capability":231,"_process":210,"buffer":188,"inherits":195,"readable-stream":225}],234:[function(require,module,exports){ +},{"./capability":227,"_process":206,"buffer":184,"inherits":191,"readable-stream":221}],230:[function(require,module,exports){ 'use strict'; var Buffer = require('safe-buffer').Buffer; @@ -159974,7 +158045,7 @@ function simpleWrite(buf) { function simpleEnd(buf) { return buf && buf.length ? this.write(buf) : ''; } -},{"safe-buffer":228}],235:[function(require,module,exports){ +},{"safe-buffer":224}],231:[function(require,module,exports){ var Buffer = require('buffer').Buffer module.exports = function (buf) { @@ -160003,7 +158074,7 @@ module.exports = function (buf) { } } -},{"buffer":188}],236:[function(require,module,exports){ +},{"buffer":184}],232:[function(require,module,exports){ // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a @@ -160737,7 +158808,7 @@ Url.prototype.parseHost = function() { if (host) this.hostname = host; }; -},{"./util":237,"punycode":211,"querystring":214}],237:[function(require,module,exports){ +},{"./util":233,"punycode":207,"querystring":210}],233:[function(require,module,exports){ 'use strict'; module.exports = { @@ -160755,7 +158826,7 @@ module.exports = { } }; -},{}],238:[function(require,module,exports){ +},{}],234:[function(require,module,exports){ (function (global){ /** @@ -160826,16 +158897,16 @@ function config (name) { } }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],239:[function(require,module,exports){ -arguments[4][195][0].apply(exports,arguments) -},{"dup":195}],240:[function(require,module,exports){ +},{}],235:[function(require,module,exports){ +arguments[4][191][0].apply(exports,arguments) +},{"dup":191}],236:[function(require,module,exports){ module.exports = function isBuffer(arg) { return arg && typeof arg === 'object' && typeof arg.copy === 'function' && typeof arg.fill === 'function' && typeof arg.readUInt8 === 'function'; } -},{}],241:[function(require,module,exports){ +},{}],237:[function(require,module,exports){ (function (process,global){ // Copyright Joyent, Inc. and other Node contributors. // @@ -161425,7 +159496,7 @@ function hasOwnProperty(obj, prop) { } }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":240,"_process":210,"inherits":239}],242:[function(require,module,exports){ +},{"./support/isBuffer":236,"_process":206,"inherits":235}],238:[function(require,module,exports){ module.exports = extend var hasOwnProperty = Object.prototype.hasOwnProperty; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aax.js index 9c71e445f..3b8be7dc2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, ExchangeNotAvailable, OrderNotFound, InvalidOrder, CancelPending, RateLimitExceeded, InsufficientFunds, BadRequest, BadSymbol, PermissionDenied } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -35,6 +36,7 @@ module.exports = class aax extends Exchange { 'fetchOrder': true, 'fetchOrderBook': true, 'fetchOrders': true, + 'fetchStatus': true, 'fetchTicker': 'emulated', 'fetchTickers': true, 'fetchTrades': true, @@ -233,6 +235,37 @@ module.exports = class aax extends Exchange { }); } + async fetchStatus (params = {}) { + const response = await this.publicGetAnnouncementMaintenance (params); + // + // { + // "code": 1, + // "data": { + // "startTime":"2020-06-25T02:15:00.000Z", + // "endTime":"2020-06-25T02:45:00.000Z", + // "description":"Spot Trading :UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45),Futures Trading: UTC Jun 25, 2020 02:15 to 02:45 (HKT Jun 25 10:15 to 10:45).We apologize for any inconvenience caused. Thank you for your patience and understanding.Should you have any enquiries, please do not hesitate our live chat support or via email at cs@aax.com." + // }, + // "message":"success", + // "ts":1593043237000 + // } + // + const data = this.safeValue (response, 'data', {}); + const timestamp = this.milliseconds (); + const startTime = this.parse8601 (this.safeString (data, 'startTime')); + const endTime = this.parse8601 (this.safeString (data, 'endTime')); + const update = { + 'updated': this.safeInteger (response, 'ts', timestamp), + }; + if (endTime !== undefined) { + const startTimeIsOk = (startTime === undefined) ? true : (timestamp < startTime); + const isOk = (timestamp > endTime) || startTimeIsOk; + update['eta'] = endTime; + update['status'] = isOk ? 'ok' : 'maintenance'; + } + this.status = this.extend (this.status, update); + return this.status; + } + async fetchMarkets (params = {}) { const response = await this.publicGetInstruments (params); // @@ -318,8 +351,8 @@ module.exports = class aax extends Exchange { const quote = this.safeCurrencyCode (quoteId); const status = this.safeString (market, 'status'); const active = (status === 'enable'); - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); const type = this.safeString (market, 'type'); let inverse = undefined; let linear = undefined; @@ -337,8 +370,8 @@ module.exports = class aax extends Exchange { symbol = base + '/' + quote; } const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; result.push ({ 'id': id, @@ -396,8 +429,8 @@ module.exports = class aax extends Exchange { const timestamp = this.safeInteger (ticker, 't'); const marketId = this.safeString (ticker, 's'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'c'); - const open = this.safeFloat (ticker, 'o'); + const last = this.safeNumber (ticker, 'c'); + const open = this.safeNumber (ticker, 'o'); let change = undefined; let percentage = undefined; let average = undefined; @@ -408,13 +441,13 @@ module.exports = class aax extends Exchange { } average = this.sum (last, open) / 2; } - const quoteVolume = this.safeFloat (ticker, 'v'); + const quoteVolume = this.safeNumber (ticker, 'v'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'h'), - 'low': this.safeFloat (ticker, 'l'), + 'high': this.safeNumber (ticker, 'h'), + 'low': this.safeNumber (ticker, 'l'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -561,8 +594,8 @@ module.exports = class aax extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let price = this.safeFloat2 (trade, 'p', 'filledPrice'); - const amount = this.safeFloat2 (trade, 'q', 'filledQty'); + let priceString = this.safeString2 (trade, 'p', 'filledPrice'); + const amountString = this.safeString2 (trade, 'q', 'filledQty'); const orderId = this.safeString (trade, 'orderID'); const isTaker = this.safeValue (trade, 'taker'); let takerOrMaker = undefined; @@ -576,17 +609,15 @@ module.exports = class aax extends Exchange { side = 'sell'; } if (side === undefined) { - side = (price > 0) ? 'buy' : 'sell'; - } - side = (price > 0) ? 'buy' : 'sell'; - price = Math.abs (price); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; + side = (priceString[0] === '-') ? 'sell' : 'buy'; } + priceString = (priceString[0] === '-') ? priceString.slice (1) : priceString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderType = this.parseOrderType (this.safeString (trade, 'orderType')); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { @@ -654,11 +685,11 @@ module.exports = class aax extends Exchange { // return [ this.safeTimestamp (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -743,12 +774,12 @@ module.exports = class aax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'unavailable'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'unavailable'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -776,7 +807,7 @@ module.exports = class aax extends Exchange { request['clOrdID'] = clientOrderId; params = this.omit (params, [ 'clOrdID', 'clientOrderId' ]); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { if ((orderType === 'STOP-LIMIT') || (orderType === 'STOP')) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter for ' + orderType + ' orders'); @@ -894,7 +925,7 @@ module.exports = class aax extends Exchange { // 'price': this.priceToPrecision (symbol, price), // 'stopPrice': this.priceToPrecision (symbol, stopPrice), }; - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1531,15 +1562,18 @@ module.exports = class aax extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const price = this.safeFloat (order, 'price'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const price = this.safeNumber (order, 'price'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'Post-Only'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeString (order, 'leavesQty'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + let remaining = this.safeNumber (order, 'leavesQty'); + if ((filled === 0) && (remaining === 0)) { + remaining = undefined; + } let cost = undefined; let lastTradeTimestamp = undefined; if (filled !== undefined) { @@ -1554,7 +1588,7 @@ module.exports = class aax extends Exchange { } } let fee = undefined; - const feeCost = this.safeFloat (order, 'commission'); + const feeCost = this.safeNumber (order, 'commission'); if (feeCost !== undefined) { let feeCurrency = undefined; if (market !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/acx.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/acx.js deleted file mode 100644 index e10ec85ca..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/acx.js +++ /dev/null @@ -1,487 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { InsufficientFunds, OrderNotFound } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class acx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'acx', - 'name': 'ACX', - 'countries': [ 'AU' ], - 'rateLimit': 1000, - 'version': 'v2', - 'has': { - 'cancelOrder': true, - 'CORS': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchMarkets': true, - 'fetchOHLCV': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTime': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'timeframes': { - '1m': '1', - '5m': '5', - '15m': '15', - '30m': '30', - '1h': '60', - '2h': '120', - '4h': '240', - '12h': '720', - '1d': '1440', - '3d': '4320', - '1w': '10080', - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/30247614-1fe61c74-9621-11e7-9e8c-f1a627afa279.jpg', - 'extension': '.json', - 'api': 'https://acx.io/api', - 'www': 'https://acx.io', - 'doc': 'https://acx.io/documents/api_v2', - }, - 'api': { - 'public': { - 'get': [ - 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. - 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator - 'k', // Get OHLC(k line) of specific market - 'markets', // Get all available markets - 'order_book', // Get the order book of specified market - 'order_book/{market}', - 'tickers', // Get ticker of all markets - 'tickers/{market}', // Get ticker of specific market - 'timestamp', // Get server current time, in seconds since Unix epoch - 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. - 'trades/{market}', - ], - }, - 'private': { - 'get': [ - 'members/me', // Get your profile and accounts info - 'deposits', // Get your deposits history - 'deposit', // Get details of specific deposit - 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. - 'orders', // Get your orders, results is paginated - 'order', // Get information of specified order - 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. - 'withdraws', // Get your cryptocurrency withdraws - 'withdraw', // Get your cryptocurrency withdraw - ], - 'post': [ - 'orders', // Create a Sell/Buy order - 'orders/multi', // Create multiple sell/buy orders - 'orders/clear', // Cancel all my orders - 'order/delete', // Cancel an order - 'withdraw', // Create a withdraw - ], - }, - }, - 'fees': { - 'trading': { - 'tierBased': false, - 'percentage': true, - 'maker': 0.2 / 100, - 'taker': 0.2 / 100, - }, - 'funding': { - 'tierBased': false, - 'percentage': true, - 'withdraw': {}, // There is only 1% fee on withdrawals to your bank account. - }, - }, - 'commonCurrencies': { - 'PLA': 'Plair', - }, - 'exceptions': { - '2002': InsufficientFunds, - '2003': OrderNotFound, - }, - }); - } - - async fetchMarkets (params = {}) { - const markets = await this.publicGetMarkets (params); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = market['id']; - const symbol = market['name']; - let baseId = this.safeString (market, 'base_unit'); - let quoteId = this.safeString (market, 'quote_unit'); - if ((baseId === undefined) || (quoteId === undefined)) { - const ids = symbol.split ('/'); - baseId = ids[0].toLowerCase (); - quoteId = ids[1].toLowerCase (); - } - let base = baseId.toUpperCase (); - let quote = quoteId.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - // todo: find out their undocumented precision and limits - const precision = { - 'amount': 8, - 'price': 8, - }; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'precision': precision, - 'info': market, - 'active': undefined, - 'limits': this.limits, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetMembersMe (params); - const balances = this.safeValue (response, 'accounts'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 300 - } - const orderbook = await this.publicGetDepth (this.extend (request, params)); - const timestamp = this.safeTimestamp (orderbook, 'timestamp'); - return this.parseOrderBook (orderbook, timestamp); - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.safeTimestamp (ticker, 'at'); - ticker = ticker['ticker']; - let symbol = undefined; - if (market) { - symbol = market['symbol']; - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': undefined, - 'info': ticker, - }; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetTickers (params); - const ids = Object.keys (response); - const result = {}; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let market = undefined; - let symbol = id; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } else { - let base = id.slice (0, 3); - let quote = id.slice (3, 6); - base = base.toUpperCase (); - quote = quote.toUpperCase (); - base = this.safeCurrencyCode (base); - quote = this.safeCurrencyCode (quote); - symbol = base + '/' + quote; - } - result[symbol] = this.parseTicker (response[id], market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTickersMarket (this.extend (request, params)); - return this.parseTicker (response, market); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const id = this.safeString (trade, 'tid'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'info': trade, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': undefined, - 'side': undefined, - 'order': undefined, - 'takerOrMaker': undefined, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), - 'cost': this.safeFloat (trade, 'funds'), - 'fee': undefined, - }; - } - - async fetchTime (params = {}) { - const response = await this.publicGetTimestamp (params); - // - // 1594911427 - // - return response * 1000; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - return [ - this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (limit === undefined) { - limit = 500; // default is 30 - } - const request = { - 'market': market['id'], - 'period': this.timeframes[timeframe], - 'limit': limit, - }; - if (since !== undefined) { - request['timestamp'] = parseInt (since / 1000); - } - const response = await this.publicGetK (this.extend (request, params)); - return this.parseOHLCVs (response, market, timeframe, since, limit); - } - - parseOrderStatus (status) { - const statuses = { - 'done': 'closed', - 'wait': 'open', - 'cancel': 'canceled', - }; - return this.safeString (statuses, status, status); - } - - parseOrder (order, market = undefined) { - const marketId = this.safeString (order, 'market'); - const symbol = this.safeSymbol (marketId, market); - const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const status = this.parseOrderStatus (this.safeString (order, 'state')); - const type = this.safeString (order, 'type'); - const side = this.safeString (order, 'side'); - const id = this.safeString (order, 'id'); - return { - 'id': id, - 'clientOrderId': undefined, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': this.safeFloat (order, 'price'), - 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'volume'), - 'filled': this.safeFloat (order, 'executed_volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'trades': undefined, - 'fee': undefined, - 'info': order, - 'cost': undefined, - 'average': undefined, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': parseInt (id), - }; - const response = await this.privateGetOrder (this.extend (request, params)); - return this.parseOrder (response); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'market': this.marketId (symbol), - 'side': side, - 'volume': amount.toString (), - 'ord_type': type, - }; - if (type === 'limit') { - request['price'] = price.toString (); - } - const response = await this.privatePostOrders (this.extend (request, params)); - const marketId = this.safeValue (response, 'market'); - const market = this.safeValue (this.markets_by_id, marketId); - return this.parseOrder (response, market); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - const response = await this.privatePostOrderDelete (this.extend (request, params)); - const order = this.parseOrder (response); - const status = order['status']; - if (status === 'closed' || status === 'canceled') { - throw new OrderNotFound (this.id + ' ' + this.json (order)); - } - return order; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - // they have XRP but no docs on memo/tag - const request = { - 'currency': currency['id'], - 'sum': amount, - 'address': address, - }; - const response = await this.privatePostWithdraw (this.extend (request, params)); - // withdrawal response is undocumented - return { - 'info': response, - 'id': undefined, - }; - } - - nonce () { - return this.milliseconds (); - } - - encodeParams (params) { - if ('orders' in params) { - const orders = params['orders']; - let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); - for (let i = 0; i < orders.length; i++) { - const order = orders[i]; - const keys = Object.keys (order); - for (let k = 0; k < keys.length; k++) { - const key = keys[k]; - const value = order[key]; - query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); - } - } - return query; - } - return this.urlencode (this.keysort (params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let request = '/api/' + this.version + '/' + this.implodeParams (path, params); - if ('extension' in this.urls) { - request += this.urls['extension']; - } - const query = this.omit (params, this.extractParams (path)); - let url = this.urls['api'] + request; - if (api === 'public') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce ().toString (); - const query = this.encodeParams (this.extend ({ - 'access_key': this.apiKey, - 'tonce': nonce, - }, params)); - const auth = method + '|' + request + '|' + query; - const signed = this.hmac (this.encode (auth), this.encode (this.secret)); - const suffix = query + '&signature=' + signed; - if (method === 'GET') { - url += '?' + suffix; - } else { - body = suffix; - headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; - } - if (code === 400) { - const error = this.safeValue (response, 'error'); - const errorCode = this.safeString (error, 'code'); - const feedback = this.id + ' ' + this.json (response); - this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); - // fallback to default error handler - } - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aofex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aofex.js index 7899f09d5..69264394e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aofex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/aofex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, BadSymbol, InvalidOrder, PermissionDenied, InvalidAddress, AuthenticationError, InvalidNonce, BadRequest, InsufficientFunds, OrderNotFound } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -193,8 +194,8 @@ module.exports = class aofex extends Exchange { const symbol = base + '/' + quote; const numericId = this.safeInteger (market, 'id'); const precision = this.safeValue (precisions, id, {}); - const makerFee = this.safeFloat (market, 'maker_fee'); - const takerFee = this.safeFloat (market, 'taker_fee'); + const makerFee = this.safeNumber (market, 'maker_fee'); + const takerFee = this.safeNumber (market, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -212,12 +213,12 @@ module.exports = class aofex extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -245,11 +246,11 @@ module.exports = class aofex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -328,11 +329,11 @@ module.exports = class aofex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -355,8 +356,8 @@ module.exports = class aofex extends Exchange { return { 'info': response, 'symbol': symbol, - 'maker': this.safeFloat (result, 'fromFee'), - 'taker': this.safeFloat (result, 'toFee'), + 'maker': this.safeNumber (result, 'fromFee'), + 'taker': this.safeNumber (result, 'toFee'), }; } @@ -413,8 +414,8 @@ module.exports = class aofex extends Exchange { if (market) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); let change = undefined; if (symbol !== undefined) { change = parseFloat (this.priceToPrecision (symbol, last - open)); @@ -423,8 +424,8 @@ module.exports = class aofex extends Exchange { } const average = this.sum (last, open) / 2; const percentage = change / open * 100; - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); let vwap = this.vwap (baseVolume, quoteVolume); if (vwap !== undefined) { vwap = parseFloat (this.priceToPrecision (symbol, vwap)); @@ -433,8 +434,8 @@ module.exports = class aofex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -552,13 +553,15 @@ module.exports = class aofex extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'number'); - let cost = this.safeFloat (trade, 'total_price'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'number'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total_price'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -702,21 +705,21 @@ module.exports = class aofex extends Exchange { const orderType = this.safeString (order, 'type'); const type = (orderType === '2') ? 'limit' : 'market'; const side = this.safeString (order, 'side'); - // const amount = this.safeFloat (order, 'number'); - // const price = this.safeFloat (order, 'price'); + // const amount = this.safeNumber (order, 'number'); + // const price = this.safeNumber (order, 'price'); let cost = undefined; let price = undefined; let amount = undefined; let average = undefined; - const number = this.safeFloat (order, 'number'); - const totalPrice = this.safeFloat (order, 'total_price'); + const number = this.safeNumber (order, 'number'); + const totalPrice = this.safeNumber (order, 'total_price'); if (type === 'limit') { amount = number; - price = this.safeFloat (order, 'price'); + price = this.safeNumber (order, 'price'); } else { - average = this.safeFloat (order, 'deal_price'); + average = this.safeNumber (order, 'deal_price'); if (side === 'buy') { - amount = this.safeFloat (order, 'deal_number'); + amount = this.safeNumber (order, 'deal_number'); } else { amount = number; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ascendex.js similarity index 93% rename from Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmax.js rename to Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ascendex.js index 62cbf55d5..753148db2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/node_modules/ccxt/js/bitmax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ascendex.js @@ -4,16 +4,17 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, InvalidOrder, BadSymbol, PermissionDenied, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class bitmax extends Exchange { +module.exports = class ascendex extends Exchange { describe () { return this.deepExtend (super.describe (), { - 'id': 'bitmax', - 'name': 'BitMax', - 'countries': [ 'CN' ], // China + 'id': 'ascendex', + 'name': 'AscendEX', + 'countries': [ 'SG', 'CN' ], // Singapore, China 'rateLimit': 500, // new metainfo interface 'has': { @@ -55,14 +56,14 @@ module.exports = class bitmax extends Exchange { }, 'version': 'v1', 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/66820319-19710880-ef49-11e9-8fbe-16be62a11992.jpg', - 'api': 'https://bitmax.io', + 'logo': 'https://user-images.githubusercontent.com/1294454/112027508-47984600-8b48-11eb-9e17-d26459cc36c6.jpg', + 'api': 'https://ascendex.com', 'test': 'https://bitmax-test.io', - 'www': 'https://bitmax.io', + 'www': 'https://ascendex.com', 'doc': [ 'https://bitmax-exchange.github.io/bitmax-pro-api/#bitmax-pro-api-documentation', ], - 'fees': 'https://bitmax.io/#/feeRate/tradeRate', + 'fees': 'https://ascendex.com/en/feerate/transactionfee-traderate', 'referral': 'https://bitmax.io/#/register?inviteCode=EL6BXBQM', }, 'api': { @@ -131,6 +132,7 @@ module.exports = class bitmax extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'taker': 0.002, @@ -212,6 +214,7 @@ module.exports = class bitmax extends Exchange { 'broad': {}, }, 'commonCurrencies': { + 'BOND': 'BONDED', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', }, @@ -294,7 +297,7 @@ module.exports = class bitmax extends Exchange { const code = this.safeCurrencyCode (id); const precision = this.safeInteger2 (currency, 'precisionScale', 'nativeScale'); // why would the exchange API have different names for the same field - const fee = this.safeFloat2 (currency, 'withdrawFee', 'withdrawalFee'); + const fee = this.safeNumber2 (currency, 'withdrawFee', 'withdrawalFee'); const status = this.safeString2 (currency, 'status', 'statusCode'); const active = (status === 'Normal'); const margin = ('borrowAssetCode' in currency); @@ -322,7 +325,7 @@ module.exports = class bitmax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawalAmt'), + 'min': this.safeNumber (currency, 'minWithdrawalAmt'), 'max': undefined, }, }, @@ -423,8 +426,8 @@ module.exports = class bitmax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'Normal'); @@ -450,16 +453,16 @@ module.exports = class bitmax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minQty'), - 'max': this.safeFloat (market, 'maxQty'), + 'min': this.safeNumber (market, 'minQty'), + 'max': this.safeNumber (market, 'maxQty'), }, 'price': { - 'min': this.safeFloat (market, 'tickSize'), + 'min': this.safeNumber (market, 'tickSize'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minNotional'), - 'max': this.safeFloat (market, 'maxNotional'), + 'min': this.safeNumber (market, 'minNotional'), + 'max': this.safeNumber (market, 'maxNotional'), }, }, }); @@ -467,28 +470,6 @@ module.exports = class bitmax extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - // TODO: fee calculation here is incorrect, we need to support tiered fee calculation. - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { let accountGroup = this.safeString (this.options, 'account-group'); let response = undefined; @@ -593,11 +574,11 @@ module.exports = class bitmax extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'asset')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -669,10 +650,10 @@ module.exports = class bitmax extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', []); const ask = this.safeValue (ticker, 'ask', []); - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; let average = undefined; @@ -687,12 +668,12 @@ module.exports = class bitmax extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 0), - 'bidVolume': this.safeFloat (bid, 1), - 'ask': this.safeFloat (ask, 0), - 'askVolume': this.safeFloat (ask, 1), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 0), + 'bidVolume': this.safeNumber (bid, 1), + 'ask': this.safeNumber (ask, 0), + 'askVolume': this.safeNumber (ask, 1), 'vwap': undefined, 'open': open, 'close': close, @@ -701,20 +682,12 @@ module.exports = class bitmax extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -791,11 +764,11 @@ module.exports = class bitmax extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.safeInteger (data, 'ts'), - this.safeFloat (data, 'o'), - this.safeFloat (data, 'h'), - this.safeFloat (data, 'l'), - this.safeFloat (data, 'c'), - this.safeFloat (data, 'v'), + this.safeNumber (data, 'o'), + this.safeNumber (data, 'h'), + this.safeNumber (data, 'l'), + this.safeNumber (data, 'c'), + this.safeNumber (data, 'v'), ]; } @@ -860,12 +833,11 @@ module.exports = class bitmax extends Exchange { // } // const timestamp = this.safeInteger (trade, 'ts'); - const price = this.safeFloat2 (trade, 'price', 'p'); - const amount = this.safeFloat (trade, 'q'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString2 (trade, 'price', 'p'); + const amountString = this.safeString (trade, 'q'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const buyerIsMaker = this.safeValue (trade, 'bm', false); const makerOrTaker = buyerIsMaker ? 'maker' : 'taker'; const side = buyerIsMaker ? 'buy' : 'sell'; @@ -989,26 +961,12 @@ module.exports = class bitmax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '/'); - let timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); - let lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const average = this.safeFloat (order, 'avgPx'); - const filled = this.safeFloat2 (order, 'cumFilledQty', 'cumQty'); - let remaining = undefined; - if (filled !== undefined) { - if (filled === 0) { - timestamp = lastTradeTimestamp; - lastTradeTimestamp = undefined; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - let cost = undefined; - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } + const timestamp = this.safeInteger2 (order, 'timestamp', 'sendingTime'); + const lastTradeTimestamp = this.safeInteger (order, 'lastExecTime'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const average = this.safeNumber (order, 'avgPx'); + const filled = this.safeNumber2 (order, 'cumFilledQty', 'cumQty'); const id = this.safeString (order, 'orderId'); let clientOrderId = this.safeString (order, 'id'); if (clientOrderId !== undefined) { @@ -1018,7 +976,7 @@ module.exports = class bitmax extends Exchange { } const type = this.safeStringLower (order, 'orderType'); const side = this.safeStringLower (order, 'side'); - const feeCost = this.safeFloat (order, 'cumFee'); + const feeCost = this.safeNumber (order, 'cumFee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeAsset'); @@ -1028,8 +986,8 @@ module.exports = class bitmax extends Exchange { 'currency': feeCurrencyCode, }; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1044,14 +1002,14 @@ module.exports = class bitmax extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1088,7 +1046,7 @@ module.exports = class bitmax extends Exchange { request['orderPrice'] = this.priceToPrecision (symbol, price); } if ((type === 'stop_limit') || (type === 'stop_market')) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice parameter for ' + type + ' orders'); } else { @@ -1624,7 +1582,7 @@ module.exports = class bitmax extends Exchange { // } // const id = this.safeString (transaction, 'requestId'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const destAddress = this.safeValue (transaction, 'destAddress', {}); const address = this.safeString (destAddress, 'address'); const tag = this.safeString (destAddress, 'destTag'); @@ -1634,7 +1592,7 @@ module.exports = class bitmax extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'commission'); + const feeCost = this.safeNumber (transaction, 'commission'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Exchange.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Exchange.js index eb017b5bf..0cf2c9fb0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Exchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Exchange.js @@ -44,6 +44,7 @@ const { // eslint-disable-line object-curly-newline const { TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING } = functions.precisionConstants const BN = require ('../static_dependencies/BN/bn') +const Precise = require ('./Precise') // ---------------------------------------------------------------------------- @@ -224,6 +225,11 @@ module.exports = class Exchange { this.minFundingAddressLength = 1 // used in checkAddress this.substituteCommonCurrencyCodes = true // reserved + this.quoteJsonNumbers = true // treat numbers in json as quoted precise strings + this.number = Number // or String (a pointer to a function) + + // whether fees should be summed by currency code + this.reduceFees = true // do not delete this line, it is needed for users to be able to define their own fetchImplementation this.fetchImplementation = defaultFetch @@ -519,7 +525,7 @@ module.exports = class Exchange { parseJson (jsonString) { try { if (this.isJsonEncodedObject (jsonString)) { - return JSON.parse (jsonString) + return JSON.parse (this.onJsonResponse (jsonString)) } } catch (e) { // SyntaxError @@ -598,7 +604,11 @@ module.exports = class Exchange { } onRestResponse (statusCode, statusText, url, method, responseHeaders, responseBody, requestHeaders, requestBody) { - return responseBody.trim ().replace (/:(\d{15,}),/g, ':"$1",'); + return responseBody.trim () + } + + onJsonResponse (responseBody) { + return this.quoteJsonNumbers ? responseBody.replace (/":([+.0-9eE-]+),/g, '":"$1",') : responseBody; } setMarkets (markets, currencies = undefined) { @@ -918,8 +928,8 @@ module.exports = class Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = parseFloat (bidask[priceKey]) - const amount = parseFloat (bidask[amountKey]) + const price = this.safeNumber (bidask, priceKey) + const amount = this.safeNumber (bidask, amountKey) return [ price, amount ] } @@ -945,7 +955,7 @@ module.exports = class Exchange { } } - parseBalance (balance) { + parseBalance (balance, legacy = true) { const codes = Object.keys (this.omit (balance, [ 'info', 'free', 'used', 'total' ])); @@ -957,20 +967,34 @@ module.exports = class Exchange { const code = codes[i] if (balance[code].total === undefined) { if (balance[code].free !== undefined && balance[code].used !== undefined) { - balance[code].total = this.sum (balance[code].free, balance[code].used) + if (legacy) { + balance[code].total = this.sum (balance[code].free, balance[code].used) + } else { + balance[code].total = Precise.stringAdd (balance[code].free, balance[code].used) + } } } if (balance[code].free === undefined) { if (balance[code].total !== undefined && balance[code].used !== undefined) { - balance[code].free = this.sum (balance[code].total, -balance[code].used) + if (legacy) { + balance[code].free = this.sum (balance[code].total, -balance[code].used) + } else { + balance[code].free = Precise.stringSub (balance[code].total, balance[code].used) + } } } if (balance[code].used === undefined) { if (balance[code].total !== undefined && balance[code].free !== undefined) { - balance[code].used = this.sum (balance[code].total, -balance[code].free) + if (legacy) { + balance[code].used = this.sum (balance[code].total, -balance[code].free) + } else { + balance[code].used = Precise.stringSub (balance[code].total, balance[code].free) + } } } - + balance[code].free = this.parseNumber (balance[code].free) + balance[code].used = this.parseNumber (balance[code].used) + balance[code].total = this.parseNumber (balance[code].total) balance.free[code] = balance[code].free balance.used[code] = balance[code].used balance.total[code] = balance[code].total @@ -979,6 +1003,10 @@ module.exports = class Exchange { return balance } + async fetchBalance (params = {}) { + throw new NotSupported (this.id + ' fetchBalance not supported yet') + } + async fetchPartialBalance (part, params = {}) { const balance = await this.fetchBalance (params) return balance[part] @@ -1088,11 +1116,27 @@ module.exports = class Exchange { return indexed ? indexBy (result, key) : result } + parseTickers (tickers, symbols = undefined) { + const result = []; + for (let i = 0; i < tickers.length; i++) { + result.push (this.parseTicker (tickers[i])); + } + return this.filterByArray (result, 'symbol', symbols); + } + + parseDepositAddresses (addresses, codes = undefined) { + let result = []; + for (let i = 0; i < addresses.length; i++) { + const address = this.parseDepositAddress (addresses[i]); + result.push (address); + } + if (codes) { + result = this.filterByArray (result, 'currency', codes); + } + return this.indexBy (result, 'currency'); + } + parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (trades)) { - // throw new ExchangeError (this.id + ' parseTrades expected an array in the trades argument, but got ' + typeof trades); - // } let result = Object.values (trades || []).map ((trade) => this.extend (this.parseTrade (trade, market), params)) result = sortBy (result, 'timestamp') const symbol = (market !== undefined) ? market['symbol'] : undefined @@ -1101,10 +1145,6 @@ module.exports = class Exchange { } parseTransactions (transactions, currency = undefined, since = undefined, limit = undefined, params = {}) { - // this code is commented out temporarily to catch for exchange-specific errors - // if (!this.isArray (transactions)) { - // throw new ExchangeError (this.id + ' parseTransactions expected an array in the transactions argument, but got ' + typeof transactions); - // } let result = Object.values (transactions || []).map ((transaction) => this.extend (this.parseTransaction (transaction, currency), params)) result = this.sortBy (result, 'timestamp'); const code = (currency !== undefined) ? currency['code'] : undefined; @@ -1112,6 +1152,14 @@ module.exports = class Exchange { return this.filterByCurrencySinceLimit (result, code, since, limit, tail); } + parseTransfers (transfers, currency = undefined, since = undefined, limit = undefined, params = {}) { + let result = Object.values (transfers || []).map ((transfer) => this.extend (this.parseTransfer (transfer, currency), params)) + result = this.sortBy (result, 'timestamp'); + const code = (currency !== undefined) ? currency['code'] : undefined; + const tail = since === undefined; + return this.filterByCurrencySinceLimit (result, code, since, limit, tail); + } + parseLedger (data, currency = undefined, since = undefined, limit = undefined, params = {}) { let result = []; const array = Object.values (data || []); @@ -1256,19 +1304,19 @@ module.exports = class Exchange { return this.createOrder (symbol, ...args) } - createLimitOrder (symbol, side, amount, price = undefined, params = {}) { + createLimitOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'limit', side, amount, price, params) } - createMarketOrder (symbol, side, amount, price = undefined, params = {}) { + createMarketOrder (symbol, side, amount, price, params = {}) { return this.createOrder (symbol, 'market', side, amount, price, params) } - createLimitBuyOrder (symbol, amount, price = undefined, params = {}) { + createLimitBuyOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'buy', amount, price, params) } - createLimitSellOrder (symbol, amount, price = undefined, params = {}) { + createLimitSellOrder (symbol, amount, price, params = {}) { return this.createOrder (symbol, 'limit', 'sell', amount, price, params) } @@ -1301,15 +1349,43 @@ module.exports = class Exchange { } calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol] - const rate = market[takerOrMaker] - const cost = parseFloat (this.costToPrecision (symbol, amount * price)) + const market = this.markets[symbol]; + const feeSide = this.safeString (market, 'feeSide', 'quote'); + let key = 'quote'; + let cost = undefined; + if (feeSide === 'quote') { + // the fee is always in quote currency + cost = amount * price; + } else if (feeSide === 'base') { + // the fee is always in base currency + cost = amount; + } else if (feeSide === 'get') { + // the fee is always in the currency you get + cost = amount; + if (side === 'sell') { + cost *= price; + } else { + key = 'base'; + } + } else if (feeSide === 'give') { + // the fee is always in the currency you give + cost = amount; + if (side === 'buy') { + cost *= price; + } else { + key = 'base'; + } + } + const rate = market[takerOrMaker]; + if (cost !== undefined) { + cost *= rate; + } return { 'type': takerOrMaker, - 'currency': market['quote'], + 'currency': market[key], 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, rate * cost)), - } + 'cost': cost, + }; } checkRequiredDependencies () { @@ -1393,6 +1469,25 @@ module.exports = class Exchange { return new BN (a).pow (new BN (b)) } + reduceFeesByCurrency (fees) { + const reduced = {}; + for (let i = 0; i < fees.length; i++) { + const fee = fees[i]; + const feeCurrencyCode = this.safeValue (fee, 'currency'); + if (feeCurrencyCode !== undefined) { + if (feeCurrencyCode in reduced) { + reduced[feeCurrencyCode]['cost'] = this.sum (reduced[feeCurrencyCode]['cost'], fee['cost']); + } else { + reduced[feeCurrencyCode] = { + 'cost': fee['cost'], + 'currency': feeCurrencyCode, + }; + } + } + } + return Object.values (reduced); + } + safeOrder (order) { // Cost // Remaining @@ -1401,65 +1496,143 @@ module.exports = class Exchange { // 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']) + // first we try to calculate the order fields from the trades + let amount = this.safeValue (order, 'amount'); + let remaining = this.safeValue (order, 'remaining'); + let filled = this.safeValue (order, 'filled'); + let cost = this.safeValue (order, 'cost'); + let average = this.safeValue (order, 'average'); + let price = this.safeValue (order, 'price'); + let lastTradeTimeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); + const parseFilled = (filled === undefined); + const parseCost = (cost === undefined); + const parseLastTradeTimeTimestamp = (lastTradeTimeTimestamp === undefined); + const parseFee = this.safeValue (order, 'fee') === undefined; + const parseFees = this.safeValue (order, 'fees') === undefined; + const shouldParseFees = parseFee || parseFees; + const fees = shouldParseFees ? [] : undefined; + if (parseFilled || parseCost || shouldParseFees) { + const trades = this.safeValue (order, 'trades'); + if (trades !== undefined) { + if (parseFilled) { + filled = 0; + } + if (parseCost) { + cost = 0; + } + for (let i = 0; i < trades.length; i++) { + const trade = trades[i]; + const tradeAmount = this.safeValue (trade, 'amount'); + if (parseFilled && (tradeAmount !== undefined)) { + filled = this.sum (filled, tradeAmount); } - if (parseCost) { - order['cost'] = this.sum (order['cost'], trade['cost']) + const tradeCost = this.safeValue (trade, 'cost'); + if (parseCost && (tradeCost !== undefined)) { + cost = this.sum (cost, tradeCost); + } + const tradeTimestamp = this.safeValue (trade, 'timestamp'); + if (parseLastTradeTimeTimestamp && (tradeTimestamp !== undefined)) { + if (lastTradeTimeTimestamp === undefined) { + lastTradeTimeTimestamp = tradeTimestamp; + } else { + lastTradeTimeTimestamp = Math.max (lastTradeTimeTimestamp, tradeTimestamp); + } + } + if (shouldParseFees) { + const tradeFees = this.safeValue (trade, 'fees'); + if (tradeFees !== undefined) { + for (let j = 0; j < tradeFees.length; j++) { + const tradeFee = tradeFees[j]; + fees.push (this.extend ({}, tradeFee)); + } + } else { + const tradeFee = this.safeValue (trade, 'fee'); + if (tradeFee !== undefined) { + fees.push (this.extend ({}, tradeFee)); + } + } } } } } - // 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 (shouldParseFees) { + const reducedFees = this.reduceFees ? this.reduceFeesByCurrency (fees) : fees; + const reducedLength = reducedFees.length; + if (!parseFee && (reducedLength === 0)) { + reducedFees.push (order['fee']); + } + if (parseFees) { + order['fees'] = reducedFees; + } + if (parseFee && (reducedLength === 1)) { + order['fee'] = reducedFees[0]; } } - if (order['filled'] === undefined) { - if (order['amount'] !== undefined && order['remaining'] !== undefined) { - order['filled'] = Math.max (this.sum (order['amount'], -order['remaining']), 0) + if (amount === undefined) { + // ensure amount = filled + remaining + if (filled !== undefined && remaining !== undefined) { + amount = this.sum (filled, remaining); + } else if (this.safeString (order, 'status') === 'closed') { + amount = filled; } } - if (order['remaining'] === undefined) { - if (order['amount'] !== undefined && order['filled'] !== undefined) { - order['remaining'] = Math.max (this.sum (order['amount'], -order['filled']), 0) + if (filled === undefined) { + if (amount !== undefined && remaining !== undefined) { + filled = Math.max (this.sum (amount, -remaining), 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'] + if (remaining === undefined) { + if (amount !== undefined && filled !== undefined) { + remaining = Math.max (this.sum (amount, -filled), 0); } } - // 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'] + // ensure that the average field is calculated correctly + if (average === undefined) { + if ((filled !== undefined) && (cost !== undefined) && (cost > 0)) { + average = cost / filled; } - order['cost'] = costPrice * order['filled'] } - // We add support for market orders - if (order['price'] === undefined && order['type'] === 'market') { - order['price'] = order['average'] + // also ensure the cost field is calculated correctly + const costPriceExists = (average !== undefined) || (price !== undefined); + if (parseCost && (filled !== undefined) && costPriceExists) { + cost = (average === undefined) ? (price * filled) : (average * filled); } - return order + // support for market orders + const orderType = this.safeValue (order, 'type'); + const emptyPrice = (price === undefined) || (price === 0.0); + if (emptyPrice && (orderType === 'market')) { + price = average; + } + return this.extend (order, { + 'lastTradeTimestamp': lastTradeTimeTimestamp, + 'price': price, + 'amount': amount, + 'cost': cost, + 'average': average, + 'filled': filled, + 'remaining': remaining, + }); + } + + parseNumber (value, d = undefined) { + if (value === undefined) { + return d + } else { + try { + return this.number (value) + } catch (e) { + return d + } + } + } + + safeNumber (object, key, d = undefined) { + const value = this.safeString (object, key) + return this.parseNumber (value, d) + } + + safeNumber2 (object, key1, key2, d = undefined) { + const value = this.safeString2 (object, key1, key2) + return this.parseNumber (value, d) } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Precise.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Precise.js new file mode 100644 index 000000000..9bf17ad8d --- /dev/null +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/Precise.js @@ -0,0 +1,145 @@ +'use strict' + +const BN = require ('../static_dependencies/BN/bn') + +class Precise { + constructor (number, decimals = 0) { + const isBN = number instanceof BN + const isString = typeof number === 'string' + if (!(isBN || isString)) { + throw new Error ('Precise initiated with something other than a string or BN') + } + if (isBN) { + this.integer = number + this.decimals = decimals + } else { + if (decimals) { + throw new Error ('Cannot set decimals when initializing with a string') + } + let modifier = 0 + number = number.toLowerCase () + if (number.indexOf ('e') > -1) { + [ number, modifier ] = number.split ('e') + modifier = parseInt (modifier) + } + const decimalIndex = number.indexOf ('.') + this.decimals = (decimalIndex > -1) ? number.length - decimalIndex - 1 : 0 + const integerString = number.replace ('.', '') + this.integer = new BN (integerString) + this.decimals = this.decimals - modifier + } + this.base = 10 + this.reduce () + } + + mul (other) { + // other must be another instance of Precise + const integerResult = this.integer.mul (other.integer) + return new Precise (integerResult, this.decimals + other.decimals) + } + + div (other, precision = 18) { + const distance = precision - this.decimals + other.decimals + let numerator + if (distance === 0) { + numerator = this.integer + } else if (distance < 0) { + const exponent = new BN (this.base).pow (new BN (-distance)) + numerator = this.integer.div (exponent) + } else { + const exponent = new BN (this.base).pow (new BN (distance)) + numerator = this.integer.mul (exponent) + } + const result = numerator.div (other.integer) + return new Precise (result, precision) + } + + add (other) { + if (this.decimals === other.decimals) { + const integerResult = this.integer.add (other.integer) + return new Precise (integerResult, this.decimals) + } else { + const [ smaller, bigger ] = + (this.decimals > other.decimals) ? [ other, this ] : [ this, other ] + const exponent = new BN (bigger.decimals - smaller.decimals) + const normalised = smaller.integer.mul (new BN (this.base).pow (exponent)) + const result = normalised.add (bigger.integer) + return new Precise (result, bigger.decimals) + } + } + + sub (other) { + const negative = new Precise (other.integer.neg (), other.decimals) + return this.add (negative) + } + + reduce () { + const zero = new BN (0) + if (this.integer.eq (zero)) { + this.decimals = 0 + return this + } + const base = new BN (this.base) + let divmod = this.integer.divmod (base) + while (divmod.mod.eq (zero)) { + this.integer = divmod.div + this.decimals-- + divmod = this.integer.divmod (base) + } + return this + } + + toString () { + const sign = this.integer.negative ? '-' : '' + const integerArray = Array.from (this.integer.abs ().toString (this.base).padStart (this.decimals, '0')) + const index = integerArray.length - this.decimals + let item + if (index === 0) { + // if we are adding to the front + item = '0.' + } else if (this.decimals < 0) { + item = '0'.repeat (-this.decimals) + } else if (this.decimals === 0) { + item = '' + } else { + item = '.' + } + integerArray.splice (index, 0, item) + return sign + integerArray.join ('') + } + + static stringMul (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).mul (new Precise (string2)).toString () + } + + static stringDiv (string1, string2, precision = 18) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).div (new Precise (string2), precision).toString () + } + + static stringAdd (string1, string2) { + if ((string1 === undefined) && (string2 === undefined)) { + return undefined + } + if (string1 === undefined) { + return string2 + } else if (string2 === undefined) { + return string1 + } + return (new Precise (string1)).add (new Precise (string2)).toString () + } + + static stringSub (string1, string2) { + if ((string1 === undefined) || (string2 === undefined)) { + return undefined + } + return (new Precise (string1)).sub (new Precise (string2)).toString () + } +} + +module.exports = Precise; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/functions/encode.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/functions/encode.js index 0b4331ccf..e64251dbc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/functions/encode.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/base/functions/encode.js @@ -19,7 +19,6 @@ let base58Encoder = null module.exports = { json: (data, params = undefined) => JSON.stringify (data) - , unjson: JSON.parse , isJsonEncodedObject: object => ( (typeof object === 'string') && diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bibox.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bibox.js index 4d46d8f35..ed9826a1a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bibox.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bibox.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AccountSuspended, ArgumentsRequired, AuthenticationError, DDoSProtection, ExchangeNotAvailable, InvalidOrder, OrderNotFound, PermissionDenied, InsufficientFunds, BadSymbol, RateLimitExceeded, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -229,9 +230,9 @@ module.exports = class bibox extends Exchange { const quote = this.safeCurrencyCode (quoteId); symbol = base + '/' + quote; } - const last = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); - const baseVolume = this.safeFloat2 (ticker, 'vol', 'vol24H'); + const last = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); + const baseVolume = this.safeNumber2 (ticker, 'vol', 'vol24H'); let open = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; @@ -245,11 +246,11 @@ module.exports = class bibox extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -260,7 +261,7 @@ module.exports = class bibox extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': baseVolume, - 'quoteVolume': this.safeFloat (ticker, 'amount'), + 'quoteVolume': this.safeNumber (ticker, 'amount'), 'info': ticker, }; } @@ -276,17 +277,6 @@ module.exports = class bibox extends Exchange { return this.parseTicker (response['result'], market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - const ticker = this.parseTicker (rawTickers[i]); - if ((symbols === undefined) || (this.inArray (ticker['symbol'], symbols))) { - tickers.push (ticker); - } - } - return tickers; - } - async fetchTickers (symbols = undefined, params = {}) { const request = { 'cmd': 'marketAll', @@ -319,7 +309,7 @@ module.exports = class bibox extends Exchange { symbol = market['symbol']; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = this.safeString (trade, 'fee_symbol'); if (feeCurrency !== undefined) { if (feeCurrency in this.currencies_by_id) { @@ -329,12 +319,11 @@ module.exports = class bibox extends Exchange { } } const feeRate = undefined; // todo: deduce from market if market is defined - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if (feeCost !== undefined) { fee = { 'cost': -feeCost, @@ -385,7 +374,7 @@ module.exports = class bibox extends Exchange { request['size'] = limit; // default = 200 } const response = await this.publicGetMdata (this.extend (request, params)); - return this.parseOrderBook (response['result'], this.safeFloat (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); + return this.parseOrderBook (response['result'], this.safeNumber (response['result'], 'update_time'), 'bids', 'asks', 'price', 'volume'); } parseOHLCV (ohlcv, market = undefined) { @@ -401,11 +390,11 @@ module.exports = class bibox extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -497,7 +486,7 @@ module.exports = class bibox extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw_min'), + 'min': this.safeNumber (currency, 'withdraw_min'), 'max': undefined, }, }, @@ -629,19 +618,17 @@ module.exports = class bibox extends Exchange { code = this.currencies_by_id[code]['code']; } const account = this.account (); - let balance = indexed[id]; + const balance = indexed[id]; if (typeof balance === 'string') { - balance = parseFloat (balance); account['free'] = balance; - account['used'] = 0.0; account['total'] = balance; } else { - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDeposits (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -732,8 +719,8 @@ module.exports = class bibox extends Exchange { let tag = this.safeString (transaction, 'addr_remark'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'fee'); if (type === 'deposit') { feeCost = 0; tag = undefined; @@ -841,26 +828,19 @@ module.exports = class bibox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const type = (order['order_type'] === 1) ? 'market' : 'limit'; - const timestamp = order['createdAt']; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'deal_price'); - const filled = this.safeFloat (order, 'deal_amount'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat2 (order, 'deal_money', 'money'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - cost = price * filled; - } - } - const side = (order['order_side'] === 1) ? 'buy' : 'sell'; + const rawType = this.safeString (order, 'order_type'); + const type = (rawType === '1') ? 'market' : 'limit'; + const timestamp = this.safeInteger (order, 'createdAt'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'deal_price'); + const filled = this.safeNumber (order, 'deal_amount'); + const amount = this.safeNumber (order, 'amount'); + const cost = this.safeNumber2 (order, 'deal_money', 'money'); + const rawSide = this.safeString (order, 'order_side'); + const side = (rawSide === '1') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -868,8 +848,7 @@ module.exports = class bibox extends Exchange { 'currency': undefined, }; } - cost = cost ? cost : (parseFloat (price) * filled); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -887,11 +866,11 @@ module.exports = class bibox extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -1059,7 +1038,7 @@ module.exports = class bibox extends Exchange { }; const response = await this.privatePostTransfer (request); info[code] = response; - withdrawFees[code] = this.safeFloat (response['result'], 'withdraw_fee'); + withdrawFees[code] = this.safeNumber (response['result'], 'withdraw_fee'); } return { 'info': info, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bigone.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bigone.js index d6e940c4d..f30eec7a4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bigone.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bigone.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, OrderNotFound, InsufficientFunds, PermissionDenied, BadRequest, RateLimitExceeded, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -260,28 +261,28 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (ticker, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = undefined; - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const bid = this.safeValue (ticker, 'bid', {}); const ask = this.safeValue (ticker, 'ask', {}); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (bid, 'price'), - 'bidVolume': this.safeFloat (bid, 'quantity'), - 'ask': this.safeFloat (ask, 'price'), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (bid, 'price'), + 'bidVolume': this.safeNumber (bid, 'quantity'), + 'ask': this.safeNumber (ask, 'price'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, 'last': close, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'daily_change'), + 'change': this.safeNumber (ticker, 'daily_change'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -446,16 +447,13 @@ module.exports = class bigone extends Exchange { // } // const timestamp = this.parse8601 (this.safeString2 (trade, 'created_at', 'inserted_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } let side = this.safeString (trade, 'side'); const takerSide = this.safeString (trade, 'taker_side'); let takerOrMaker = undefined; @@ -529,8 +527,8 @@ module.exports = class bigone extends Exchange { takerCurrencyCode = market['quote']; } } - const makerFeeCost = this.safeFloat (trade, 'maker_fee'); - const takerFeeCost = this.safeFloat (trade, 'taker_fee'); + const makerFeeCost = this.safeNumber (trade, 'maker_fee'); + const takerFeeCost = this.safeNumber (trade, 'taker_fee'); if (makerFeeCost !== undefined) { if (takerFeeCost !== undefined) { result['fees'] = [ @@ -593,11 +591,11 @@ module.exports = class bigone extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -668,11 +666,11 @@ module.exports = class bigone extends Exchange { const symbol = this.safeString (balance, 'asset_symbol'); const code = this.safeCurrencyCode (symbol); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -694,13 +692,9 @@ module.exports = class bigone extends Exchange { const marketId = this.safeString (order, 'asset_pair_name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (amount !== undefined && filled !== undefined) { - remaining = Math.max (0, amount - filled); - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); const status = this.parseOrderStatus (this.safeString (order, 'state')); let side = this.safeString (order, 'side'); if (side === 'BID') { @@ -708,15 +702,9 @@ module.exports = class bigone extends Exchange { } else { side = 'sell'; } - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'updated_at')); - const average = this.safeFloat (order, 'avg_deal_price'); - return { + const average = this.safeNumber (order, 'avg_deal_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -731,14 +719,14 @@ module.exports = class bigone extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -762,7 +750,7 @@ module.exports = class bigone extends Exchange { const isStopLimit = (uppercaseType === 'STOP_LIMIT'); const isStopMarket = (uppercaseType === 'STOP_MARKET'); if (isStopLimit || isStopMarket) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price parameter'); } @@ -1101,7 +1089,7 @@ module.exports = class bigone extends Exchange { const currencyId = this.safeString (transaction, 'asset_symbol'); const code = this.safeCurrencyCode (currencyId); const id = this.safeInteger (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const timestamp = this.parse8601 (this.safeString (transaction, 'inserted_at')); const updated = this.parse8601 (this.safeString2 (transaction, 'updated_at', 'completed_at')); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/binance.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/binance.js index a115b3f7b..a5865c442 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/binance.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/binance.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, RateLimitExceeded, PermissionDenied, NotSupported, BadRequest, BadSymbol, AccountSuspended, OrderImmediatelyFillable } = require ('./base/errors'); -const { ROUND, TRUNCATE } = require ('./base/functions/number'); +const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -47,6 +48,8 @@ module.exports = class binance extends Exchange { 'fetchTransactions': false, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, + 'fetchTransfers': true, }, 'timeframes': { '1m': '1m', @@ -195,6 +198,26 @@ module.exports = class binance extends Exchange { 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/recentRecord', 'apiReferral/kickback/historicalRecord', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccount', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/info', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/recentRecord', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/status', + 'broker/subAccount/depositHist', + 'broker/subAccount/spotSummary', + 'broker/subAccount/marginSummary', + 'broker/subAccount/futuresSummary', + 'broker/rebate/futures/recentRecord', + 'broker/subAccountApi/ipRestriction', + 'broker/universalTransfer', + // v2 not supported yet + // GET /sapi/v2/broker/subAccount/futuresSummary ], 'post': [ 'asset/dust', @@ -234,11 +257,30 @@ module.exports = class binance extends Exchange { // leveraged token endpoints 'blvt/subscribe', 'blvt/redeem', - // broker api + // brokerage API 'apiReferral/customization', 'apiReferral/userCustomization', 'apiReferral/rebate/historicalRecord', 'apiReferral/kickback/historicalRecord', + 'broker/subAccount', + 'broker/subAccount/margin', + 'broker/subAccount/futures', + 'broker/subAccountApi', + 'broker/subAccountApi/permission', + 'broker/subAccountApi/commission', + 'broker/subAccountApi/commission/futures', + 'broker/subAccountApi/commission/coinFutures', + 'broker/transfer', + 'broker/transfer/futures', + 'broker/rebate/historicalRecord', + 'broker/subAccount/bnbBurn/spot', + 'broker/subAccount/bnbBurn/marginInterest', + 'broker/subAccount/blvt', + 'broker/subAccountApi/ipRestriction', + 'broker/subAccountApi/ipRestriction/ipList', + 'broker/universalTransfer', + 'broker/subAccountApi/permission/universalTransfer', + 'broker/subAccountApi/permission/vanillaOptions', ], 'put': [ 'userDataStream', @@ -249,6 +291,9 @@ module.exports = class binance extends Exchange { 'margin/order', 'userDataStream', 'userDataStream/isolated', + // brokerage API + 'broker/subAccountApi', + 'broker/subAccountApi/ipRestriction/ipList', ], }, 'wapi': { @@ -385,6 +430,8 @@ module.exports = class binance extends Exchange { 'positionSide/dual', 'userTrades', 'income', + 'commissionRate', + 'apiTradingStatus', // broker endpoints 'apiReferral/ifNewUser', 'apiReferral/customization', @@ -474,6 +521,7 @@ module.exports = class binance extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.001, @@ -498,7 +546,7 @@ module.exports = class binance extends Exchange { 'parseOrderToPrecision': false, // force amounts and costs in parseOrder to precision 'newOrderRespType': { 'market': 'FULL', // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills - 'limit': 'RESULT', // we change it from 'ACK' by default to 'RESULT' + 'limit': 'FULL', // we change it from 'ACK' by default to 'FULL' (returns immediately if limit is not hit) }, 'quoteOrderQty': true, // whether market orders support amounts in quote currency 'broker': { @@ -507,6 +555,25 @@ module.exports = class binance extends Exchange { 'future': 'x-xcKtGhcu', 'delivery': 'x-xcKtGhcu', }, + 'fetchPositions': { + 'future': 'fapiPrivateV2GetAccount', // 'fapiPrivateGetPositionRisk' + 'delivery': 'dapiPrivateGetAccount', // 'dapiPrivateGetPositionRisk' + }, + 'accountsByType': { + 'main': 'MAIN', + 'spot': 'MAIN', + 'margin': 'MARGIN', + 'future': 'UMFUTURE', + 'delivery': 'CMFUTURE', + 'mining': 'MINING', + }, + 'typesByAccount': { + 'MAIN': 'spot', + 'MARGIN': 'margin', + 'UMFUTURE': 'future', + 'CMFUTURE': 'delivery', + 'MINING': 'mining', + }, }, // https://binance-docs.github.io/apidocs/spot/en/#error-codes-2 'exceptions': { @@ -564,6 +631,8 @@ module.exports = class binance extends Exchange { '-3010': ExchangeError, // {"code":-3010,"msg":"Repay not allowed. Repay amount exceeds borrow amount."} '-3022': AccountSuspended, // You account's trading is banned. '-4028': BadRequest, // {"code":-4028,"msg":"Leverage 100 is not valid"} + '-3020': InsufficientFunds, // {"code":-3020,"msg":"Transfer out amount exceeds max amount."} + '-3041': InsufficientFunds, // {"code":-3041,"msg":"Balance is not enough"} '-5013': InsufficientFunds, // Asset transfer failed: insufficient balance" }, }); @@ -706,13 +775,14 @@ module.exports = class binance extends Exchange { let fee = undefined; for (let j = 0; j < networkList.length; j++) { const networkItem = networkList[j]; - const name = this.safeString (networkItem, 'name'); - const withdrawFee = this.safeFloat (networkItem, 'withdrawFee'); + const network = this.safeString (networkItem, 'network'); + // const name = this.safeString (networkItem, 'name'); + const withdrawFee = this.safeNumber (networkItem, 'withdrawFee'); const depositEnable = this.safeValue (networkItem, 'depositEnable'); const withdrawEnable = this.safeValue (networkItem, 'withdrawEnable'); isDepositEnabled = isDepositEnabled || depositEnable; isWithdrawEnabled = isWithdrawEnabled || withdrawEnable; - fees[name] = withdrawFee; + fees[network] = withdrawFee; const isDefault = this.safeValue (networkItem, 'isDefault'); if (isDefault || fee === undefined) { fee = withdrawFee; @@ -898,7 +968,7 @@ module.exports = class binance extends Exchange { if (this.options['adjustForTimeDifference']) { await this.loadTimeDifference (); } - const markets = this.safeValue (response, 'symbols'); + const markets = this.safeValue (response, 'symbols', []); const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -963,10 +1033,10 @@ module.exports = class binance extends Exchange { // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } @@ -977,47 +1047,26 @@ module.exports = class binance extends Exchange { const stepSize = this.safeString (filter, 'stepSize'); entry['precision']['amount'] = this.precisionFromString (stepSize); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat2 (filter, 'minNotional', 'notional'); + entry['limits']['cost']['min'] = this.safeNumber2 (filter, 'minNotional', 'notional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'spot'); @@ -1188,8 +1237,8 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -1202,13 +1251,13 @@ module.exports = class binance extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['used'] = this.safeFloat (balance, 'initialMargin'); - account['total'] = this.safeFloat2 (balance, 'marginBalance', 'balance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['used'] = this.safeString (balance, 'initialMargin'); + account['total'] = this.safeString2 (balance, 'marginBalance', 'balance'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -1261,36 +1310,36 @@ module.exports = class binance extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'openPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'openPrice'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } async fetchStatus (params = {}) { const response = await this.wapiGetSystemStatus (params); - let status = this.safeValue (response, 'status'); + let status = this.safeString (response, 'status'); if (status !== undefined) { - status = (status === 0) ? 'ok' : 'maintenance'; + status = (status === '0') ? 'ok' : 'maintenance'; this.status = this.extend (this.status, { 'status': status, 'updated': this.milliseconds (), @@ -1319,14 +1368,6 @@ module.exports = class binance extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); const defaultType = this.safeString2 (this.options, 'fetchBidsAsks', 'defaultType', 'spot'); @@ -1381,11 +1422,11 @@ module.exports = class binance extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -1516,8 +1557,11 @@ module.exports = class binance extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -1535,7 +1579,7 @@ module.exports = class binance extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -1548,10 +1592,6 @@ module.exports = class binance extends Exchange { } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } return { 'info': trade, 'timestamp': timestamp, @@ -1670,7 +1710,7 @@ module.exports = class binance extends Exchange { parseOrder (order, market = undefined) { // - // spot + // spot // // { // "symbol": "LTCBTC", @@ -1691,7 +1731,7 @@ module.exports = class binance extends Exchange { // "isWorking": true // } // - // futures + // futures // // { // "symbol": "BTCUSDT", @@ -1709,6 +1749,33 @@ module.exports = class binance extends Exchange { // "updateTime": 1499827319559 // } // + // createOrder with { "newOrderRespType": "FULL" } + // + // { + // "symbol": "BTCUSDT", + // "orderId": 5403233939, + // "orderListId": -1, + // "clientOrderId": "x-R4BD3S825e669e75b6c14f69a2c43e", + // "transactTime": 1617151923742, + // "price": "0.00000000", + // "origQty": "0.00050000", + // "executedQty": "0.00050000", + // "cummulativeQuoteQty": "29.47081500", + // "status": "FILLED", + // "timeInForce": "GTC", + // "type": "MARKET", + // "side": "BUY", + // "fills": [ + // { + // "price": "58941.63000000", + // "qty": "0.00050000", + // "commission": "0.00007050", + // "commissionAsset": "BNB", + // "tradeId": 737466631 + // } + // ] + // } + // const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -1718,80 +1785,26 @@ module.exports = class binance extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); // - Spot/Margin market: cummulativeQuoteQty // - Futures market: cumQuote. // Note this is not the actual cost, since Binance futures uses leverage to calculate margins. - let cost = this.safeFloat2 (order, 'cummulativeQuoteQty', 'cumQuote'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const cost = this.safeNumber2 (order, 'cummulativeQuoteQty', 'cumQuote'); const id = this.safeString (order, 'orderId'); let type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - if (this.options['parseOrderToPrecision']) { - price = parseFloat (this.priceToPrecision (symbol, price)); - } - } - } - } - } else if (type === 'limit_maker') { + if (type === 'limit_maker') { type = 'limit'; } const side = this.safeStringLower (order, 'side'); - let fee = undefined; - let trades = undefined; - const fills = this.safeValue (order, 'fills'); - if (fills !== undefined) { - trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - if (this.options['parseOrderToPrecision']) { - average = parseFloat (this.priceToPrecision (symbol, average)); - } - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const fills = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (fills, market); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = (type === 'limit_maker') || (timeInForce === 'GTX'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1807,13 +1820,13 @@ module.exports = class binance extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1860,8 +1873,11 @@ module.exports = class binance extends Exchange { } else { request['newClientOrderId'] = clientOrderId; } - if (market['spot']) { + if ((orderType === 'spot') || (orderType === 'margin')) { request['newOrderRespType'] = this.safeValue (this.options['newOrderRespType'], type, 'RESULT'); // 'ACK' for order id, 'RESULT' for full order or 'FULL' for order with fills + } else { + // delivery and future + request['newOrderRespType'] = 'RESULT'; // "ACK", "RESULT", default "ACK" } // additional required fields depending on the order type let timeInForceIsRequired = false; @@ -1891,7 +1907,7 @@ module.exports = class binance extends Exchange { if (uppercaseType === 'MARKET') { const quoteOrderQty = this.safeValue (this.options, 'quoteOrderQty', false); if (quoteOrderQty) { - const quoteOrderQty = this.safeFloat (params, 'quoteOrderQty'); + const quoteOrderQty = this.safeNumber (params, 'quoteOrderQty'); const precision = market['precision']['price']; if (quoteOrderQty !== undefined) { request['quoteOrderQty'] = this.decimalToPrecision (quoteOrderQty, TRUNCATE, precision, this.precisionMode); @@ -1911,7 +1927,7 @@ module.exports = class binance extends Exchange { } else if ((uppercaseType === 'STOP_LOSS') || (uppercaseType === 'TAKE_PROFIT')) { stopPriceIsRequired = true; quantityIsRequired = true; - if (market['future']) { + if (market['future'] || market['delivery']) { priceIsRequired = true; } } else if ((uppercaseType === 'STOP_LOSS_LIMIT') || (uppercaseType === 'TAKE_PROFIT_LIMIT')) { @@ -1934,7 +1950,7 @@ module.exports = class binance extends Exchange { stopPriceIsRequired = true; } else if (uppercaseType === 'TRAILING_STOP_MARKET') { quantityIsRequired = true; - const callbackRate = this.safeFloat (params, 'callbackRate'); + const callbackRate = this.safeNumber (params, 'callbackRate'); if (callbackRate === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a callbackRate extra param for a ' + type + ' order'); } @@ -1952,7 +1968,7 @@ module.exports = class binance extends Exchange { request['timeInForce'] = this.options['defaultTimeInForce']; // 'GTC' = Good To Cancel (default), 'IOC' = Immediate Or Cancel } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -2168,10 +2184,15 @@ module.exports = class binance extends Exchange { } } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.fetchBalance (params); - const info = this.safeValue (response, 'info', {}); + const defaultType = this.safeString (this.options, 'defaultType', 'future'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + const options = this.safeValue (this.options, 'fetchPositions', {}); + const defaultMethod = (type === 'delivery') ? 'dapiPrivateGetAccount' : 'fapiPrivateV2GetAccount'; + const method = this.safeString (options, type, defaultMethod); + const response = await this[method] (params); // // futures, delivery // @@ -2214,9 +2235,44 @@ module.exports = class binance extends Exchange { // ] // } // - const positions = this.safeValue2 (info, 'positions', 'userAssets', []); - // todo unify parsePosition/parsePositions - return positions; + // fapiPrivateGetPositionRisk, dapiPrivateGetPositionRisk + // + // [ + // { + // symbol: 'XRPUSD_210625', + // positionAmt: '0', + // entryPrice: '0.00000000', + // markPrice: '0.00000000', + // unRealizedProfit: '0.00000000', + // liquidationPrice: '0', + // leverage: '20', + // maxQty: '500000', + // marginType: 'cross', + // isolatedMargin: '0.00000000', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0', + // isolatedWallet: '0' + // }, + // { + // symbol: 'BTCUSD_210326', + // positionAmt: '1', + // entryPrice: '60665.79999885', + // markPrice: '60696.76856843', + // unRealizedProfit: '0.00000084', + // liquidationPrice: '58034.68208092', + // leverage: '20', + // maxQty: '50', + // marginType: 'isolated', + // isolatedMargin: '0.00008345', + // isAutoAddMargin: 'false', + // positionSide: 'BOTH', + // notionalValue: '0.00164753', + // isolatedWallet: '0.00008261' + // }, + // ] + // + return this.safeValue (response, 'positions', response); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -2354,7 +2410,7 @@ module.exports = class binance extends Exchange { // const fee = { 'currency': earnedCurrency, - 'cost': this.safeFloat (trade, 'serviceChargeAmount'), + 'cost': this.safeNumber (trade, 'serviceChargeAmount'), }; let symbol = undefined; let amount = undefined; @@ -2362,13 +2418,13 @@ module.exports = class binance extends Exchange { let side = undefined; if (tradedCurrencyIsQuote) { symbol = applicantSymbol; - amount = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); - cost = this.safeFloat (trade, 'amount'); + amount = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); + cost = this.safeNumber (trade, 'amount'); side = 'buy'; } else { symbol = tradedCurrency + '/' + earnedCurrency; - amount = this.safeFloat (trade, 'amount'); - cost = this.sum (this.safeFloat (trade, 'transferedAmount'), fee['cost']); + amount = this.safeNumber (trade, 'amount'); + cost = this.sum (this.safeNumber (trade, 'transferedAmount'), fee['cost']); side = 'sell'; } let price = undefined; @@ -2541,8 +2597,8 @@ module.exports = class binance extends Exchange { } } const status = this.parseTransactionStatusByType (this.safeString (transaction, 'status'), type); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'transactionFee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'transactionFee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -2569,6 +2625,151 @@ module.exports = class binance extends Exchange { }; } + parseTransferStatus (status) { + const statuses = { + 'CONFIRMED': 'ok', + }; + return this.safeString (statuses, status, status); + } + + parseTransfer (transfer, currency = undefined) { + // + // transfer + // + // { + // "tranId":13526853623 + // } + // + // fetchTransfers + // + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // } + // + const id = this.safeString (transfer, 'tranId'); + const currencyId = this.safeString (transfer, 'asset'); + const code = this.safeCurrencyCode (currencyId, currency); + const amount = this.safeNumber (transfer, 'amount'); + const type = this.safeString (transfer, 'type'); + let fromAccount = undefined; + let toAccount = undefined; + const typesByAccount = this.safeValue (this.options, 'typesByAccount', {}); + if (type !== undefined) { + const parts = type.split ('_'); + fromAccount = this.safeValue (parts, 0); + toAccount = this.safeValue (parts, 1); + fromAccount = this.safeString (typesByAccount, fromAccount, fromAccount); + toAccount = this.safeString (typesByAccount, toAccount, toAccount); + } + const timestamp = this.safeInteger (transfer, 'timestamp'); + const status = this.parseTransferStatus (this.safeString (transfer, 'status')); + return { + 'info': transfer, + 'id': id, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'currency': code, + 'amount': amount, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': status, + }; + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount, fromAccount); + const toId = this.safeString (accountsByType, toAccount, toAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'asset': currency['id'], + 'amount': this.currencyToPrecision (code, amount), + 'type': type, + }; + const response = await this.sapiPostAssetTransfer (this.extend (request, params)); + // + // { + // "tranId":13526853623 + // } + // + const transfer = this.parseTransfer (response, currency); + return this.extend (transfer, { + 'amount': amount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + }); + } + + async fetchTransfers (code = undefined, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const defaultType = this.safeString2 (this.options, 'fetchTransfers', 'defaultType', 'spot'); + const fromAccount = this.safeString (params, 'fromAccount', defaultType); + const defaultTo = (fromAccount === 'future') ? 'spot' : 'future'; + const toAccount = this.safeString (params, 'toAccount', defaultTo); + let type = this.safeString (params, 'type'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + if (type === undefined) { + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fromAccount parameter must be one of ' + keys.join (', ')); + } + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' toAccount parameter must be one of ' + keys.join (', ')); + } + type = fromId + '_' + toId; + } + const request = { + 'type': type, + }; + if (since !== undefined) { + request['startTime'] = since; + } + if (limit !== undefined) { + request['size'] = limit; + } + const response = await this.sapiGetAssetTransfer (this.extend (request, params)); + // + // { + // total: 3, + // rows: [ + // { + // timestamp: 1614640878000, + // asset: 'USDT', + // amount: '25', + // type: 'MAIN_UMFUTURE', + // status: 'CONFIRMED', + // tranId: 43000126248 + // }, + // ] + // } + // + const rows = this.safeValue (response, 'rows', []); + return this.parseTransfers (rows, currency, since, limit); + } + async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -2631,7 +2832,7 @@ module.exports = class binance extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (detail[id], 'withdrawFee'); + withdrawFees[code] = this.safeNumber (detail[id], 'withdrawFee'); } return { 'withdraw': withdrawFees, @@ -2678,8 +2879,8 @@ module.exports = class binance extends Exchange { return { 'info': fee, 'symbol': symbol, - 'maker': this.safeFloat (fee, 'maker'), - 'taker': this.safeFloat (fee, 'taker'), + 'maker': this.safeNumber (fee, 'maker'), + 'taker': this.safeNumber (fee, 'taker'), }; } @@ -2741,7 +2942,6 @@ module.exports = class binance extends Exchange { if (api === 'wapi') { url += '.html'; } - const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); if (path === 'historicalTrades') { if (this.apiKey) { headers = { @@ -2750,19 +2950,22 @@ module.exports = class binance extends Exchange { } else { throw new AuthenticationError (this.id + ' historicalTrades endpoint requires `apiKey` credential'); } - } else if (userDataStream) { + } + const userDataStream = (path === 'userDataStream') || (path === 'listenKey'); + if (userDataStream) { if (this.apiKey) { // v1 special case for userDataStream - body = this.urlencode (params); headers = { 'X-MBX-APIKEY': this.apiKey, 'Content-Type': 'application/x-www-form-urlencoded', }; + if (method !== 'GET') { + body = this.urlencode (params); + } } else { throw new AuthenticationError (this.id + ' userDataStream endpoint requires `apiKey` credential'); } - } - if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { + } else if ((api === 'private') || (api === 'sapi') || (api === 'wapi' && path !== 'systemStatus') || (api === 'dapiPrivate') || (api === 'fapiPrivate') || (api === 'fapiPrivateV2')) { this.checkRequiredCredentials (); let query = undefined; const recvWindow = this.safeInteger (this.options, 'recvWindow', 5000); @@ -2794,13 +2997,8 @@ module.exports = class binance extends Exchange { headers['Content-Type'] = 'application/x-www-form-urlencoded'; } } else { - // userDataStream endpoints are public, but POST, PUT, DELETE - // therefore they don't accept URL query arguments - // https://github.com/ccxt/ccxt/issues/5224 - if (!userDataStream) { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } + if (Object.keys (params).length) { + url += '?' + this.urlencode (params); } } return { 'url': url, 'method': method, 'body': body, 'headers': headers }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bit2c.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bit2c.js index a4d60733a..1f58d3f75 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bit2c.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bit2c.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, ExchangeError, InvalidNonce, AuthenticationError, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -155,12 +156,12 @@ module.exports = class bit2c extends Exchange { const currencyId = this.currencyId (code); const uppercase = currencyId.toUpperCase (); if (uppercase in balance) { - account['free'] = this.safeFloat (balance, 'AVAILABLE_' + uppercase); - account['total'] = this.safeFloat (balance, uppercase); + account['free'] = this.safeString (balance, 'AVAILABLE_' + uppercase); + account['total'] = this.safeString (balance, uppercase); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -179,22 +180,22 @@ module.exports = class bit2c extends Exchange { }; const ticker = await this.publicGetExchangesPairTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const averagePrice = this.safeFloat (ticker, 'av'); - const baseVolume = this.safeFloat (ticker, 'a'); + const averagePrice = this.safeNumber (ticker, 'av'); + const baseVolume = this.safeNumber (ticker, 'a'); let quoteVolume = undefined; if (baseVolume !== undefined && averagePrice !== undefined) { quoteVolume = baseVolume * averagePrice; } - const last = this.safeFloat (ticker, 'll'); + const last = this.safeNumber (ticker, 'll'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'h'), + 'bid': this.safeNumber (ticker, 'h'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'l'), + 'ask': this.safeNumber (ticker, 'l'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -276,14 +277,8 @@ module.exports = class bit2c extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -296,7 +291,7 @@ module.exports = class bit2c extends Exchange { } const id = this.safeString (order, 'id'); const status = this.safeString (order, 'status'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -313,12 +308,12 @@ module.exports = class bit2c extends Exchange { 'amount': amount, 'filled': undefined, 'remaining': undefined, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -344,16 +339,16 @@ module.exports = class bit2c extends Exchange { parseTrade (trade, market = undefined) { let timestamp = undefined; let id = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let orderId = undefined; let feeCost = undefined; let side = undefined; const reference = this.safeString (trade, 'reference'); if (reference !== undefined) { timestamp = this.safeTimestamp (trade, 'ticks'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'firstAmount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'firstAmount'); const reference_parts = reference.split ('|'); // reference contains 'pair|orderId|tradeId' if (market === undefined) { const marketId = this.safeString (trade, 'pair'); @@ -371,12 +366,12 @@ module.exports = class bit2c extends Exchange { } else if (side === 1) { side = 'sell'; } - feeCost = this.safeFloat (trade, 'feeAmount'); + feeCost = this.safeNumber (trade, 'feeAmount'); } else { timestamp = this.safeTimestamp (trade, 'date'); id = this.safeString (trade, 'tid'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'amount'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'amount'); side = this.safeValue (trade, 'isBid'); if (side !== undefined) { if (side) { @@ -390,6 +385,9 @@ module.exports = class bit2c extends Exchange { if (market !== undefined) { symbol = market['symbol']; } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, @@ -402,7 +400,7 @@ module.exports = class bit2c extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': { 'cost': feeCost, 'currency': 'NIS', diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbank.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbank.js index d357531d7..c3626b01f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbank.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbank.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -78,21 +79,23 @@ module.exports = class bitbank extends Exchange { }, }, 'markets': { + 'BAT/JPY': { 'id': 'bat_jpy', 'symbol': 'BAT/JPY', 'base': 'BAT', 'quote': 'JPY', 'baseId': 'bat', 'quoteId': 'jpy' }, + 'BAT/BTC': { 'id': 'bat_btc', 'symbol': 'BAT/BTC', 'base': 'BAT', 'quote': 'BTC', 'baseId': 'bat', 'quoteId': 'btc' }, 'BCH/BTC': { 'id': 'bcc_btc', 'symbol': 'BCH/BTC', 'base': 'BCH', 'quote': 'BTC', 'baseId': 'bcc', 'quoteId': 'btc' }, 'BCH/JPY': { 'id': 'bcc_jpy', 'symbol': 'BCH/JPY', 'base': 'BCH', 'quote': 'JPY', 'baseId': 'bcc', 'quoteId': 'jpy' }, + 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, + 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, + 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, + 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, + 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, 'MONA/BTC': { 'id': 'mona_btc', 'symbol': 'MONA/BTC', 'base': 'MONA', 'quote': 'BTC', 'baseId': 'mona', 'quoteId': 'btc' }, 'MONA/JPY': { 'id': 'mona_jpy', 'symbol': 'MONA/JPY', 'base': 'MONA', 'quote': 'JPY', 'baseId': 'mona', 'quoteId': 'jpy' }, 'QTUM/BTC': { 'id': 'qtum_btc', 'symbol': 'QTUM/BTC', 'base': 'QTUM', 'quote': 'BTC', 'baseId': 'qtum', 'quoteId': 'btc' }, 'QTUM/JPY': { 'id': 'qtum_jpy', 'symbol': 'QTUM/JPY', 'base': 'QTUM', 'quote': 'JPY', 'baseId': 'qtum', 'quoteId': 'jpy' }, - 'ETH/BTC': { 'id': 'eth_btc', 'symbol': 'ETH/BTC', 'base': 'ETH', 'quote': 'BTC', 'baseId': 'eth', 'quoteId': 'btc' }, - 'LTC/BTC': { 'id': 'ltc_btc', 'symbol': 'LTC/BTC', 'base': 'LTC', 'quote': 'BTC', 'baseId': 'ltc', 'quoteId': 'btc' }, - 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, - 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, - 'BTC/JPY': { 'id': 'btc_jpy', 'symbol': 'BTC/JPY', 'base': 'BTC', 'quote': 'JPY', 'baseId': 'btc', 'quoteId': 'jpy' }, - 'ETH/JPY': { 'id': 'eth_jpy', 'symbol': 'ETH/JPY', 'base': 'ETH', 'quote': 'JPY', 'baseId': 'eth', 'quoteId': 'jpy' }, - 'LTC/JPY': { 'id': 'ltc_jpy', 'symbol': 'LTC/JPY', 'base': 'LTC', 'quote': 'JPY', 'baseId': 'ltc', 'quoteId': 'jpy' }, - 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, 'XLM/BTC': { 'id': 'xlm_btc', 'symbol': 'XLM/BTC', 'base': 'XLM', 'quote': 'BTC', 'baseId': 'xlm', 'quoteId': 'btc' }, + 'XLM/JPY': { 'id': 'xlm_jpy', 'symbol': 'XLM/JPY', 'base': 'XLM', 'quote': 'JPY', 'baseId': 'xlm', 'quoteId': 'jpy' }, + 'XRP/BTC': { 'id': 'xrp_btc', 'symbol': 'XRP/BTC', 'base': 'XRP', 'quote': 'BTC', 'baseId': 'xrp', 'quoteId': 'btc' }, + 'XRP/JPY': { 'id': 'xrp_jpy', 'symbol': 'XRP/JPY', 'base': 'XRP', 'quote': 'JPY', 'baseId': 'xrp', 'quoteId': 'jpy' }, }, 'fees': { 'trading': { @@ -141,16 +144,16 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -160,7 +163,7 @@ module.exports = class bitbank extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -196,18 +199,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; feeCurrency = market['quote']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'transaction_id', 'trade_id'); const takerOrMaker = this.safeString (trade, 'maker_taker'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee_amount_quote'); + const feeCost = this.safeNumber (trade, 'fee_amount_quote'); if (feeCost !== undefined) { fee = { 'currency': feeCurrency, @@ -259,11 +259,11 @@ module.exports = class bitbank extends Exchange { // return [ this.safeInteger (ohlcv, 5), - this.safeFloat (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), + this.safeNumber (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), ]; } @@ -314,14 +314,13 @@ module.exports = class bitbank extends Exchange { const balance = assets[i]; const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'free_amount'), - 'used': this.safeFloat (balance, 'locked_amount'), - 'total': this.safeFloat (balance, 'onhand_amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'free_amount'); + account['used'] = this.safeString (balance, 'locked_amount'); + account['total'] = this.safeString (balance, 'onhand_amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -346,21 +345,15 @@ module.exports = class bitbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (order, 'ordered_at'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'start_amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const average = this.safeFloat (order, 'average_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'start_amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const average = this.safeNumber (order, 'average_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -374,7 +367,7 @@ module.exports = class bitbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, @@ -382,7 +375,7 @@ module.exports = class bitbank extends Exchange { 'trades': undefined, 'fee': undefined, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbay.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbay.js index 4f502e934..760fc7aa2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbay.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitbay.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { InvalidNonce, InsufficientFunds, AuthenticationError, InvalidOrder, ExchangeError, OrderNotFound, AccountSuspended, BadSymbol, OrderImmediatelyFillable, RateLimitExceeded, OnMaintenance, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -278,8 +279,8 @@ module.exports = class bitbay extends Exchange { if (this.inArray (base, fiatCurrencies) || this.inArray (quote, fiatCurrencies)) { fees = this.safeValue (this.fees, 'fiat', {}); } - const maker = this.safeFloat (fees, 'maker'); - const taker = this.safeFloat (fees, 'taker'); + const maker = this.safeNumber (fees, 'maker'); + const taker = this.safeNumber (fees, 'taker'); // todo: check that the limits have ben interpreted correctly // todo: parse the fees page result.push ({ @@ -295,7 +296,7 @@ module.exports = class bitbay extends Exchange { 'taker': taker, 'limits': { 'amount': { - 'min': this.safeFloat (first, 'minOffer'), + 'min': this.safeNumber (first, 'minOffer'), 'max': undefined, }, 'price': { @@ -303,7 +304,7 @@ module.exports = class bitbay extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (second, 'minOffer'), + 'min': this.safeNumber (second, 'minOffer'), 'max': undefined, }, }, @@ -343,16 +344,10 @@ module.exports = class bitbay extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (order, 'time'); - const amount = this.safeFloat (order, 'startAmount'); - const remaining = this.safeFloat (order, 'currentAmount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } + const amount = this.safeNumber (order, 'startAmount'); + const remaining = this.safeNumber (order, 'currentAmount'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'info': order, @@ -365,16 +360,16 @@ module.exports = class bitbay extends Exchange { 'timeInForce': undefined, 'postOnly': postOnly, 'side': this.safeStringLower (order, 'offerType'), - 'price': this.safeFloat (order, 'rate'), + 'price': this.safeNumber (order, 'rate'), 'stopPrice': undefined, 'amount': amount, 'cost': undefined, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'average': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -427,11 +422,11 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lockedFunds'); - account['free'] = this.safeFloat (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'lockedFunds'); + account['free'] = this.safeString (balance, 'availableFunds'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -450,22 +445,22 @@ module.exports = class bitbay extends Exchange { }; const ticker = await this.publicGetIdTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'volume'); - const vwap = this.safeFloat (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max'), + 'low': this.safeNumber (ticker, 'min'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -474,7 +469,7 @@ module.exports = class bitbay extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), + 'average': this.safeNumber (ticker, 'average'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -775,7 +770,7 @@ module.exports = class bitbay extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const change = this.safeValue (item, 'change', {}); - let amount = this.safeFloat (change, 'total'); + let amount = this.safeNumber (change, 'total'); let direction = 'in'; if (amount < 0) { direction = 'out'; @@ -787,9 +782,9 @@ module.exports = class bitbay extends Exchange { const referenceId = this.safeString (item, 'detailId'); const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const fundsBefore = this.safeValue (item, 'fundsBefore', {}); - const before = this.safeFloat (fundsBefore, 'total'); + const before = this.safeNumber (fundsBefore, 'total'); const fundsAfter = this.safeValue (item, 'fundsAfter', {}); - const after = this.safeFloat (fundsAfter, 'total'); + const after = this.safeNumber (fundsAfter, 'total'); return { 'info': item, 'id': id, @@ -846,11 +841,11 @@ module.exports = class bitbay extends Exchange { const first = this.safeValue (ohlcv, 1, {}); return [ this.safeInteger (ohlcv, 0), - this.safeFloat (first, 'o'), - this.safeFloat (first, 'h'), - this.safeFloat (first, 'l'), - this.safeFloat (first, 'c'), - this.safeFloat (first, 'v'), + this.safeNumber (first, 'o'), + this.safeNumber (first, 'h'), + this.safeNumber (first, 'l'), + this.safeNumber (first, 'c'), + this.safeNumber (first, 'v'), ]; } @@ -933,15 +928,12 @@ module.exports = class bitbay extends Exchange { if (wasTaker !== undefined) { takerOrMaker = wasTaker ? 'taker' : 'maker'; } - const price = this.safeFloat2 (trade, 'rate', 'r'); - const amount = this.safeFloat2 (trade, 'amount', 'a'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'commissionValue'); + const priceString = this.safeString2 (trade, 'rate', 'r'); + const amountString = this.safeString2 (trade, 'amount', 'a'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'commissionValue'); const marketId = this.safeString (trade, 'market'); market = this.safeMarket (marketId, market, '-'); const symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex.js index 6d34687ff..1d7643454 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { NotSupported, RateLimitExceeded, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, InvalidNonce, BadSymbol } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -45,6 +46,7 @@ module.exports = class bitfinex extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': '1m', @@ -158,6 +160,7 @@ module.exports = class bitfinex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': true, 'percentage': true, 'maker': 0.1 / 100, @@ -344,6 +347,8 @@ module.exports = class bitfinex extends Exchange { 'No summary found.': ExchangeError, // fetchTradingFees (summary) endpoint can give this vague error message 'Cannot evaluate your available balance, please try again': ExchangeNotAvailable, 'Unknown symbol': BadSymbol, + 'Cannot complete transfer. Exchange balance insufficient.': InsufficientFunds, + 'Momentary balance check. Please wait few seconds and try the transfer again.': ExchangeError, }, 'broad': { 'Invalid X-BFX-SIGNATURE': AuthenticationError, @@ -441,6 +446,15 @@ module.exports = class bitfinex extends Exchange { 'limit': 'exchange limit', 'market': 'exchange market', }, + 'accountsByType': { + 'spot': 'exchange', + 'margin': 'trading', + 'funding': 'deposit', + 'exchange': 'exchange', + 'trading': 'trading', + 'deposit': 'deposit', + 'derivatives': 'trading', + }, }, }); } @@ -454,7 +468,7 @@ module.exports = class bitfinex extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; const code = this.safeCurrencyCode (id); - withdraw[code] = this.safeFloat (fees, id); + withdraw[code] = this.safeNumber (fees, id); } return { 'info': response, @@ -490,14 +504,31 @@ module.exports = class bitfinex extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } async fetchMarkets (params = {}) { const ids = await this.publicGetSymbols (); + // + // [ "btcusd", "ltcusd", "ltcbtc" ] + // const details = await this.publicGetSymbolsDetails (); + // + // [ + // { + // "pair":"btcusd", + // "price_precision":5, + // "initial_margin":"10.0", + // "minimum_margin":"5.0", + // "maximum_order_size":"2000.0", + // "minimum_order_size":"0.0002", + // "expiration":"NA", + // "margin":true + // }, + // ] + // const result = []; for (let i = 0; i < details.length; i++) { const market = details[i]; @@ -528,8 +559,8 @@ module.exports = class bitfinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -540,6 +571,7 @@ module.exports = class bitfinex extends Exchange { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -548,6 +580,8 @@ module.exports = class bitfinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': true, + 'type': 'spot', + 'margin': margin, 'precision': precision, 'limits': limits, 'info': market, @@ -572,40 +606,15 @@ module.exports = class bitfinex extends Exchange { return this.decimalToPrecision (price, TRUNCATE, 8, DECIMAL_PLACES); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - const code = market[key]; - const currency = this.safeValue (this.currencies, code); - if (currency !== undefined) { - const precision = this.safeInteger (currency, 'precision'); - if (precision !== undefined) { - cost = parseFloat (this.currencyToPrecision (code, cost)); - } - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); - const types = { - 'exchange': 'exchange', - 'deposit': 'funding', - 'trading': 'margin', - }; - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } const query = this.omit (params, 'type'); const response = await this.privatePostBalances (query); // [ { type: 'deposit', @@ -621,12 +630,16 @@ module.exports = class bitfinex extends Exchange { // amount: '0.0005', // available: '0.0005' } ], const result = { 'info': response }; + const isDerivative = requestedType === 'derivatives'; for (let i = 0; i < response.length; i++) { const balance = response[i]; const type = this.safeString (balance, 'type'); - const parsedType = this.safeString (types, type); - if ((parsedType === balanceType) || (type === balanceType)) { - const currencyId = this.safeString (balance, 'currency'); + const currencyId = this.safeStringLower (balance, 'currency', ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { const code = this.safeCurrencyCode (currencyId); // bitfinex had BCH previously, now it's BAB, but the old // BCH symbol is kept for backward-compatibility @@ -635,13 +648,80 @@ module.exports = class bitfinex extends Exchange { // https://github.com/ccxt/ccxt/issues/4989 if (!(code in result)) { const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currencyId = this.currencyId (code); + const fromCurrencyId = this.convertDerivativesId (currencyId, fromAccount); + const toCurrencyId = this.convertDerivativesId (currencyId, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'walletfrom': fromId, + 'walletto': toId, + }; + const response = await this.privatePostTransfer (this.extend (request, params)); + // [ + // { + // status: 'success', + // message: '0.0001 Bitcoin transfered from Margin to Exchange' + // } + // ] + const result = this.safeValue (response, 0); + const status = this.safeString (result, 'status'); + const message = this.safeString (result, 'message'); + if (message === undefined) { + throw new ExchangeError (this.id + ' transfer failed'); + } + // [{"status":"error","message":"Momentary balance check. Please wait few seconds and try the transfer again."}] + if (status === 'error') { + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + return { + 'info': response, + 'status': status, + 'amount': requestedAmount, + 'code': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'timestamp': undefined, + 'datetime': undefined, + }; + } + + convertDerivativesId (currencyId, type) { + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if ((type !== 'derivatives' && type !== 'trading' && type !== 'margin') && isDerivativeCode) { + currencyId = currencyId.slice (0, start); + } else if (type === 'derivatives' && !isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + return currencyId; } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -680,7 +760,7 @@ module.exports = class bitfinex extends Exchange { } parseTicker (ticker, market = undefined) { - let timestamp = this.safeFloat (ticker, 'timestamp'); + let timestamp = this.safeNumber (ticker, 'timestamp'); if (timestamp !== undefined) { timestamp *= 1000; } @@ -703,16 +783,16 @@ module.exports = class bitfinex extends Exchange { } } } - const last = this.safeFloat (ticker, 'last_price'); + const last = this.safeNumber (ticker, 'last_price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -721,8 +801,8 @@ module.exports = class bitfinex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'mid'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'mid'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -730,24 +810,21 @@ module.exports = class bitfinex extends Exchange { parseTrade (trade, market) { const id = this.safeString (trade, 'tid'); - let timestamp = this.safeFloat (trade, 'timestamp'); + let timestamp = this.safeNumber (trade, 'timestamp'); if (timestamp !== undefined) { timestamp = parseInt (timestamp) * 1000; } const type = undefined; const side = this.safeStringLower (trade, 'type'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; if ('fee_amount' in trade) { - const feeCost = -this.safeFloat (trade, 'fee_amount'); + const feeCost = -this.safeNumber (trade, 'fee_amount'); const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { @@ -862,6 +939,30 @@ module.exports = class bitfinex extends Exchange { } parseOrder (order, market = undefined) { + // + // { + // id: 57334010955, + // cid: 1611584840966, + // cid_date: null, + // gid: null, + // symbol: 'ltcbtc', + // exchange: null, + // price: '0.0042125', + // avg_execution_price: '0.0042097', + // side: 'sell', + // type: 'exchange market', + // timestamp: '1611584841.0', + // is_live: false, + // is_cancelled: false, + // is_hidden: 0, + // oco_order: 0, + // was_forced: false, + // original_amount: '0.205176', + // remaining_amount: '0.0', + // executed_amount: '0.205176', + // src: 'web' + // } + // const side = this.safeString (order, 'side'); const open = this.safeValue (order, 'is_live'); const canceled = this.safeValue (order, 'is_cancelled'); @@ -873,30 +974,17 @@ module.exports = class bitfinex extends Exchange { } else { status = 'closed'; } - let symbol = undefined; - if (market === undefined) { - const marketId = this.safeStringUpper (order, 'symbol'); - if (marketId !== undefined) { - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - } - } - } - if (market !== undefined) { - symbol = market['symbol']; - } - let orderType = order['type']; + const marketId = this.safeStringUpper (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market); + let orderType = this.safeString (order, 'type', ''); const exchange = orderType.indexOf ('exchange ') >= 0; if (exchange) { const parts = order['type'].split (' '); orderType = parts[1]; } - let timestamp = this.safeFloat (order, 'timestamp'); - if (timestamp !== undefined) { - timestamp = parseInt (timestamp) * 1000; - } + const timestamp = this.safeTimestamp (order, 'timestamp'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -908,17 +996,17 @@ module.exports = class bitfinex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': side, - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_execution_price'), - 'amount': this.safeFloat (order, 'original_amount'), - 'remaining': this.safeFloat (order, 'remaining_amount'), - 'filled': this.safeFloat (order, 'executed_amount'), + 'average': this.safeNumber (order, 'avg_execution_price'), + 'amount': this.safeNumber (order, 'original_amount'), + 'remaining': this.safeNumber (order, 'remaining_amount'), + 'filled': this.safeNumber (order, 'executed_amount'), 'status': status, 'fee': undefined, 'cost': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -973,11 +1061,11 @@ module.exports = class bitfinex extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -1125,11 +1213,11 @@ module.exports = class bitfinex extends Exchange { // "timestamp_created": "1561716066.0" // } // - let timestamp = this.safeFloat (transaction, 'timestamp_created'); + let timestamp = this.safeNumber (transaction, 'timestamp_created'); if (timestamp !== undefined) { timestamp = parseInt (timestamp * 1000); } - let updated = this.safeFloat (transaction, 'timestamp'); + let updated = this.safeNumber (transaction, 'timestamp'); if (updated !== undefined) { updated = parseInt (updated * 1000); } @@ -1137,7 +1225,7 @@ module.exports = class bitfinex extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const type = this.safeStringLower (transaction, 'type'); // DEPOSIT or WITHDRAWAL const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -1150,7 +1238,7 @@ module.exports = class bitfinex extends Exchange { 'address': this.safeString (transaction, 'address'), // todo: this is actually the tag for XRP transfers (the address is missing) 'tag': undefined, // refix it properly for the tag from description 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -1204,7 +1292,7 @@ module.exports = class bitfinex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex2.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex2.js index b47da9faf..9313f2025 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex2.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitfinex2.js @@ -286,6 +286,15 @@ module.exports = class bitfinex2 extends bitfinex { 'JPY': 'JPY', 'GBP': 'GBP', }, + // actually the correct names unlike the v1 + // we don't want to extend this with accountsByType in v1 + 'v2AccountsByType': { + 'spot': 'exchange', + 'exchange': 'exchange', + 'funding': 'funding', + 'margin': 'margin', + 'derivatives': 'margin', + }, }, 'exceptions': { 'exact': { @@ -367,8 +376,8 @@ module.exports = class bitfinex2 extends bitfinex { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -379,6 +388,7 @@ module.exports = class bitfinex2 extends bitfinex { 'min': limits['amount']['min'] * limits['price']['min'], 'max': undefined, }; + const margin = this.safeValue (market, 'margin'); result.push ({ 'id': id, 'symbol': symbol, @@ -393,6 +403,7 @@ module.exports = class bitfinex2 extends bitfinex { 'type': type, 'swap': false, 'spot': spot, + 'margin': margin, 'futures': futures, }); } @@ -505,7 +516,7 @@ module.exports = class bitfinex2 extends bitfinex { const ids = this.safeValue (response, 0, []); const result = {}; for (let i = 0; i < ids.length; i++) { - let id = ids[i]; + const id = ids[i]; const code = this.safeCurrencyCode (id); const label = this.safeValue (indexed['label'], id, []); const name = this.safeString (label, 1); @@ -513,13 +524,14 @@ module.exports = class bitfinex2 extends bitfinex { const type = this.safeString (pool, 1); const feeValues = this.safeValue (indexed['fees'], id, []); const fees = this.safeValue (feeValues, 1, []); - const fee = this.safeFloat (fees, 1); + const fee = this.safeNumber (fees, 1); + const undl = this.safeValue (indexed['undl'], id, []); const precision = 8; // default precision, todo: fix "magic constants" - id = 'f' + id; + const fid = 'f' + id; result[code] = { - 'id': id, + 'id': fid, 'code': code, - 'info': [ id, label, pool, feeValues ], + 'info': [ id, label, pool, feeValues, undl ], 'type': type, 'name': name, 'active': true, @@ -550,40 +562,117 @@ module.exports = class bitfinex2 extends bitfinex { async fetchBalance (params = {}) { // this api call does not return the 'used' amount - use the v1 version instead (which also returns zero balances) + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 await this.loadMarkets (); - const response = await this.privatePostAuthRWallets (params); - const balanceType = this.safeString (params, 'type', 'exchange'); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const requestedType = this.safeString (params, 'type', 'exchange'); + const accountType = this.safeString (accountsByType, requestedType); + if (accountType === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' fetchBalance type parameter must be one of ' + keys.join (', ')); + } + const isDerivative = requestedType === 'derivatives'; + const query = this.omit (params, 'type'); + const response = await this.privatePostAuthRWallets (query); const result = { 'info': response }; - for (let b = 0; b < response.length; b++) { - const balance = response[b]; - const accountType = balance[0]; - let currency = balance[1]; - const total = balance[2]; - const available = balance[4]; - if (accountType === balanceType) { - if (currency[0] === 't') { - currency = currency.slice (1); - } - const code = this.safeCurrencyCode (currency); + for (let i = 0; i < response.length; i++) { + const balance = response[i]; + const type = this.safeString (balance, 0); + const currencyId = this.safeStringLower (balance, 1, ''); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'f0'; + // this will only filter the derivative codes if the requestedType is 'derivatives' + const derivativeCondition = (!isDerivative || isDerivativeCode); + if ((accountType === type) && derivativeCondition) { + const code = this.safeCurrencyCode (currencyId); const account = this.account (); - // do not fill in zeroes and missing values in the parser - // rewrite and unify the following to use the unified parseBalance - account['total'] = total; - if (!available) { - if (available === 0) { - account['free'] = 0; - account['used'] = total; - } else { - account['free'] = total; - } - } else { - account['free'] = available; - account['used'] = account['total'] - account['free']; - } + account['total'] = this.safeString (balance, 2); + account['free'] = this.safeString (balance, 4); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // transferring between derivatives wallet and regular wallet is not documented in their API + // however we support it in CCXT (from just looking at web inspector) + await this.loadMarkets (); + const accountsByType = this.safeValue (this.options, 'v2AccountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsByType, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' transfer toAccount must be one of ' + keys.join (', ')); + } + const currency = this.currency (code); + const fromCurrencyId = this.convertDerivativesId (currency, fromAccount); + const toCurrencyId = this.convertDerivativesId (currency, toAccount); + const requestedAmount = this.currencyToPrecision (code, amount); + // this request is slightly different from v1 fromAccount -> from + const request = { + 'amount': requestedAmount, + 'currency': fromCurrencyId, + 'currency_to': toCurrencyId, + 'from': fromId, + 'to': toId, + }; + const response = await this.privatePostAuthWTransfer (this.extend (request, params)); + // [1616451183763,"acc_tf",null,null,[1616451183763,"exchange","margin",null,"UST","UST",null,1],null,"SUCCESS","1.0 Tether USDt transfered from Exchange to Margin"] + const timestamp = this.safeInteger (response, 0); + // ["error",10001,"Momentary balance check. Please wait few seconds and try the transfer again."] + const error = this.safeString (response, 0); + if (error === 'error') { + const message = this.safeString (response, 2, ''); + // same message as in v1 + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + throw new ExchangeError (this.id + ' ' + message); + } + const info = this.safeValue (response, 4); + const fromResponse = this.safeString (info, 1); + const toResponse = this.safeString (info, 2); + const toCode = this.safeCurrencyCode (this.safeString (info, 5)); + const success = this.safeString (response, 6); + const status = (success === 'SUCCESS') ? 'ok' : undefined; + return { + 'info': response, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'status': status, + 'amount': requestedAmount, + 'code': toCode, + 'fromAccount': fromResponse, + 'toAccount': toResponse, + }; + } + + convertDerivativesId (currency, type) { + // there is a difference between this and the v1 api, namely trading wallet is called margin in v2 + // { + // id: 'fUSTF0', + // code: 'USTF0', + // info: [ 'USTF0', [], [], [], [ 'USTF0', 'UST' ] ], + const info = this.safeValue (currency, 'info'); + const transferId = this.safeString (info, 0); + const underlying = this.safeValue (info, 4, []); + let currencyId = undefined; + if (type === 'derivatives') { + currencyId = this.safeString (underlying, 0, transferId); + const start = currencyId.length - 2; + const isDerivativeCode = currencyId.slice (start) === 'F0'; + if (!isDerivativeCode) { + currencyId = currencyId + 'F0'; + } + } else if (type !== 'margin') { + currencyId = this.safeString (underlying, 1, transferId); + } else { + currencyId = transferId; + } + return currencyId; } async fetchOrder (id, symbol = undefined, params = {}) { @@ -613,9 +702,10 @@ module.exports = class bitfinex2 extends bitfinex { const priceIndex = (fullRequest['precision'] === 'R0') ? 1 : 0; for (let i = 0; i < orderbook.length; i++) { const order = orderbook[i]; - const price = order[priceIndex]; - const amount = Math.abs (order[2]); - const side = (order[2] > 0) ? 'bids' : 'asks'; + const price = this.safeNumber (order, priceIndex); + const signedAmount = this.safeNumber (order, 2); + const amount = Math.abs (signedAmount); + const side = (signedAmount > 0) ? 'bids' : 'asks'; result[side].push ([ price, amount ]); } result['bids'] = this.sortBy (result['bids'], 0, true); @@ -630,26 +720,26 @@ module.exports = class bitfinex2 extends bitfinex { symbol = market['symbol']; } const length = ticker.length; - const last = ticker[length - 4]; + const last = this.safeNumber (ticker, length - 4); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': ticker[length - 2], - 'low': ticker[length - 1], - 'bid': ticker[length - 10], + 'high': this.safeNumber (ticker, length - 2), + 'low': this.safeNumber (ticker, length - 1), + 'bid': this.safeNumber (ticker, length - 10), 'bidVolume': undefined, - 'ask': ticker[length - 8], + 'ask': this.safeNumber (ticker, length - 8), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': ticker[length - 6], - 'percentage': ticker[length - 5] * 100, + 'change': this.safeNumber (ticker, length - 6), + 'percentage': this.safeNumber (ticker, length - 5) * 100, 'average': undefined, - 'baseVolume': ticker[length - 3], + 'baseVolume': this.safeNumber (ticker, length - 3), 'quoteVolume': undefined, 'info': ticker, }; @@ -738,12 +828,12 @@ module.exports = class bitfinex2 extends bitfinex { // const tradeLength = trade.length; const isPrivate = (tradeLength > 5); - const id = trade[0].toString (); + const id = this.safeString (trade, 0); const amountIndex = isPrivate ? 4 : 2; - let amount = trade[amountIndex]; + let amount = this.safeNumber (trade, amountIndex); let cost = undefined; const priceIndex = isPrivate ? 5 : 3; - const price = trade[priceIndex]; + const price = this.safeNumber (trade, priceIndex); let side = undefined; let orderId = undefined; let takerOrMaker = undefined; @@ -751,7 +841,7 @@ module.exports = class bitfinex2 extends bitfinex { let fee = undefined; let symbol = undefined; const timestampIndex = isPrivate ? 2 : 1; - const timestamp = trade[timestampIndex]; + const timestamp = this.safeInteger (trade, timestampIndex); if (isPrivate) { const marketId = trade[1]; if (marketId in this.markets_by_id) { @@ -760,10 +850,12 @@ module.exports = class bitfinex2 extends bitfinex { } else { symbol = this.parseSymbol (marketId); } - orderId = trade[3].toString (); - takerOrMaker = (trade[8] === 1) ? 'maker' : 'taker'; - let feeCost = trade[9]; - const feeCurrency = this.safeCurrencyCode (trade[10]); + orderId = this.safeString (trade, 3); + const maker = this.safeInteger (trade, 8); + takerOrMaker = (maker === 1) ? 'maker' : 'taker'; + let feeCost = this.safeNumber (trade, 9); + const feeCurrencyId = this.safeString (trade, 10); + const feeCurrency = this.safeCurrencyCode (feeCurrencyId); if (feeCost !== undefined) { feeCost = -feeCost; if (symbol in this.markets) { @@ -904,10 +996,10 @@ module.exports = class bitfinex2 extends bitfinex { // https://github.com/ccxt/ccxt/issues/6686 // const timestamp = this.safeTimestamp (order, 5); const timestamp = this.safeInteger (order, 5); - const remaining = Math.abs (this.safeFloat (order, 6)); - const amount = Math.abs (this.safeFloat (order, 7)); - const filled = amount - remaining; - const side = (order[7] < 0) ? 'sell' : 'buy'; + const remaining = Math.abs (this.safeNumber (order, 6)); + const signedAmount = this.safeNumber (order, 7); + const amount = Math.abs (signedAmount); + const side = (signedAmount < 0) ? 'sell' : 'buy'; const orderType = this.safeString (order, 8); const type = this.safeString (this.safeValue (this.options, 'exchangeTypes'), orderType); let status = undefined; @@ -916,11 +1008,10 @@ module.exports = class bitfinex2 extends bitfinex { const parts = statusString.split (' @ '); status = this.parseOrderStatus (this.safeString (parts, 0)); } - const price = this.safeFloat (order, 16); - const average = this.safeFloat (order, 17); - const cost = price * filled; + const price = this.safeNumber (order, 16); + const average = this.safeNumber (order, 17); const clientOrderId = this.safeString (order, 2); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -935,14 +1026,14 @@ module.exports = class bitfinex2 extends bitfinex { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -959,11 +1050,11 @@ module.exports = class bitfinex2 extends bitfinex { if ((orderType === 'LIMIT') || (orderType === 'EXCHANGE LIMIT')) { request['price'] = this.numberToString (price); } else if ((orderType === 'STOP') || (orderType === 'EXCHANGE STOP')) { - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'STOP LIMIT') || (orderType === 'EXCHANGE STOP LIMIT')) { - const priceAuxLimit = this.safeFloat (params, 'price_aux_limit'); - let stopPrice = this.safeFloat (params, 'stopPrice'); + const priceAuxLimit = this.safeNumber (params, 'price_aux_limit'); + let stopPrice = this.safeNumber (params, 'stopPrice'); if (priceAuxLimit === undefined) { if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPrice parameter or a price_aux_limit parameter for a ' + orderType + ' order'); @@ -978,9 +1069,9 @@ module.exports = class bitfinex2 extends bitfinex { } request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'TRAILING STOP') || (orderType === 'EXCHANGE TRAILING STOP')) { - const priceTrailing = this.safeFloat (params, 'price_trailing'); + const priceTrailing = this.safeNumber (params, 'price_trailing'); request['price_trailing'] = this.numberToString (priceTrailing); - const stopPrice = this.safeFloat (params, 'stopPrice', price); + const stopPrice = this.safeNumber (params, 'stopPrice', price); request['price'] = this.numberToString (stopPrice); } else if ((orderType === 'FOK') || (orderType === 'EXCHANGE FOK') || (orderType === 'IOC') || (orderType === 'EXCHANGE IOC')) { request['price'] = this.numberToString (price); @@ -1312,11 +1403,11 @@ module.exports = class bitfinex2 extends bitfinex { if (currency !== undefined) { code = currency['code']; } - feeCost = this.safeFloat (data, 8); + feeCost = this.safeNumber (data, 8); if (feeCost !== undefined) { feeCost = -feeCost; } - amount = this.safeFloat (data, 5); + amount = this.safeNumber (data, 5); id = this.safeValue (data, 0); status = 'ok'; if (id === 0) { @@ -1330,7 +1421,7 @@ module.exports = class bitfinex2 extends bitfinex { timestamp = this.safeInteger (transaction, 5); updated = this.safeInteger (transaction, 6); status = this.parseTransactionStatus (this.safeString (transaction, 9)); - amount = this.safeFloat (transaction, 12); + amount = this.safeNumber (transaction, 12); if (amount !== undefined) { if (amount < 0) { type = 'withdrawal'; @@ -1338,7 +1429,7 @@ module.exports = class bitfinex2 extends bitfinex { type = 'deposit'; } } - feeCost = this.safeFloat (transaction, 13); + feeCost = this.safeNumber (transaction, 13); if (feeCost !== undefined) { feeCost = -feeCost; } @@ -1466,7 +1557,7 @@ module.exports = class bitfinex2 extends bitfinex { }); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privatePostPositions (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitflyer.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitflyer.js index f9c19b59a..911cb61f0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitflyer.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitflyer.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -185,11 +186,11 @@ module.exports = class bitflyer extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'amount'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -208,16 +209,16 @@ module.exports = class bitflyer extends Exchange { }; const ticker = await this.publicGetGetticker (this.extend (request, params)); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'ltp'); + const last = this.safeNumber (ticker, 'ltp'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'best_bid'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -227,7 +228,7 @@ module.exports = class bitflyer extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_by_product'), + 'baseVolume': this.safeNumber (ticker, 'volume_by_product'), 'quoteVolume': undefined, 'info': ticker, }; @@ -251,14 +252,11 @@ module.exports = class bitflyer extends Exchange { order = this.safeString (trade, 'child_order_acceptance_id'); } const timestamp = this.parse8601 (this.safeString (trade, 'exec_date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -334,18 +332,17 @@ module.exports = class bitflyer extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'child_order_date')); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'outstanding_size'); - const filled = this.safeFloat (order, 'executed_size'); - const price = this.safeFloat (order, 'price'); - const cost = price * filled; + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'outstanding_size'); + const filled = this.safeNumber (order, 'executed_size'); + const price = this.safeNumber (order, 'price'); const status = this.parseOrderStatus (this.safeString (order, 'child_order_state')); const type = this.safeStringLower (order, 'child_order_type'); const side = this.safeStringLower (order, 'side'); const marketId = this.safeString (order, 'product_code'); const symbol = this.safeSymbol (marketId, market); let fee = undefined; - const feeCost = this.safeFloat (order, 'total_commission'); + const feeCost = this.safeNumber (order, 'total_commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -354,7 +351,7 @@ module.exports = class bitflyer extends Exchange { }; } const id = this.safeString (order, 'child_order_acceptance_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -369,14 +366,14 @@ module.exports = class bitflyer extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrders (symbol = undefined, since = undefined, limit = 100, params = {}) { @@ -439,7 +436,7 @@ module.exports = class bitflyer extends Exchange { return this.parseTrades (response, market, since, limit); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { if (symbols === undefined) { throw new ArgumentsRequired (this.id + ' fetchPositions() requires a `symbols` argument, exactly one symbol in an array'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitforex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitforex.js index 8fa337979..0dfebbef7 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitforex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitforex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, OrderNotFound, InsufficientFunds, DDoSProtection, PermissionDenied, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -259,7 +260,7 @@ module.exports = class bitforex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -295,14 +296,11 @@ module.exports = class bitforex extends Exchange { const timestamp = this.safeInteger (trade, 'time'); const id = this.safeString (trade, 'tid'); const orderId = undefined; - const amount = this.safeFloat (trade, 'amount'); - const price = this.safeFloat (trade, 'price'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const sideId = this.safeInteger (trade, 'direction'); const side = this.parseSide (sideId); return { @@ -345,12 +343,12 @@ module.exports = class bitforex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'active'); - account['total'] = this.safeFloat (balance, 'fix'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'active'); + account['total'] = this.safeString (balance, 'fix'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTicker (symbol, params = {}) { @@ -366,21 +364,21 @@ module.exports = class bitforex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (data, 'high'), - 'low': this.safeFloat (data, 'low'), - 'bid': this.safeFloat (data, 'buy'), + 'high': this.safeNumber (data, 'high'), + 'low': this.safeNumber (data, 'low'), + 'bid': this.safeNumber (data, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (data, 'sell'), + 'ask': this.safeNumber (data, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (data, 'last'), - 'last': this.safeFloat (data, 'last'), + 'close': this.safeNumber (data, 'last'), + 'last': this.safeNumber (data, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (data, 'vol'), + 'baseVolume': this.safeNumber (data, 'vol'), 'quoteVolume': undefined, 'info': response, }; @@ -400,11 +398,11 @@ module.exports = class bitforex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'vol'), ]; } @@ -472,26 +470,24 @@ module.exports = class bitforex extends Exchange { parseOrder (order, market = undefined) { const id = this.safeString (order, 'orderId'); - const timestamp = this.safeFloat (order, 'createTime'); - const lastTradeTimestamp = this.safeFloat (order, 'lastTime'); + const timestamp = this.safeNumber (order, 'createTime'); + const lastTradeTimestamp = this.safeNumber (order, 'lastTime'); const symbol = market['symbol']; const sideId = this.safeInteger (order, 'tradeType'); const side = this.parseSide (sideId); const type = undefined; - const price = this.safeFloat (order, 'orderPrice'); - const average = this.safeFloat (order, 'avgPrice'); - const amount = this.safeFloat (order, 'orderAmount'); - const filled = this.safeFloat (order, 'dealAmount'); - const remaining = amount - filled; + const price = this.safeNumber (order, 'orderPrice'); + const average = this.safeNumber (order, 'avgPrice'); + const amount = this.safeNumber (order, 'orderAmount'); + const filled = this.safeNumber (order, 'dealAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderState')); - const cost = filled * price; const feeSide = (side === 'buy') ? 'base' : 'quote'; const feeCurrency = market[feeSide]; const fee = { - 'cost': this.safeFloat (order, 'tradeFee'), + 'cost': this.safeNumber (order, 'tradeFee'), 'currency': feeCurrency, }; - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -505,16 +501,15 @@ module.exports = class bitforex extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitget.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitget.js index 3c9581955..75e458fe0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitget.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitget.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -793,7 +794,7 @@ module.exports = class bitget extends Exchange { let swap = false; const baseId = this.safeString2 (market, 'base_currency', 'coin'); const quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { marketType = 'swap'; spot = false; @@ -811,7 +812,7 @@ module.exports = class bitget extends Exchange { 'amount': parseFloat ('1e-' + sizeIncrement), 'price': parseFloat ('1e-' + tickSize), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const status = this.safeString (market, 'status'); let active = undefined; if (status !== undefined) { @@ -1068,26 +1069,26 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat2 (ticker, 'last', 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'last', 'close'); + const open = this.safeNumber (ticker, 'open'); let bidVolume = undefined; let askVolume = undefined; let bid = this.safeValue (ticker, 'bid'); if (bid === undefined) { - bid = this.safeFloat (ticker, 'best_bid'); + bid = this.safeNumber (ticker, 'best_bid'); } else { - bidVolume = this.safeFloat (bid, 1); - bid = this.safeFloat (bid, 0); + bidVolume = this.safeNumber (bid, 1); + bid = this.safeNumber (bid, 0); } let ask = this.safeValue (ticker, 'ask'); if (ask === undefined) { - ask = this.safeFloat (ticker, 'best_ask'); + ask = this.safeNumber (ticker, 'best_ask'); } else { - askVolume = this.safeFloat (ask, 1); - ask = this.safeFloat (ask, 0); + askVolume = this.safeNumber (ask, 1); + ask = this.safeNumber (ask, 0); } - const baseVolume = this.safeFloat2 (ticker, 'amount', 'volume_24h'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber2 (ticker, 'amount', 'volume_24h'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; @@ -1101,8 +1102,8 @@ module.exports = class bitget extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -1337,9 +1338,12 @@ module.exports = class bitget extends Exchange { } let timestamp = this.safeInteger (trade, 'created_at'); timestamp = this.safeInteger2 (trade, 'timestamp', 'ts', timestamp); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'filled_amount', 'order_qty'); - amount = this.safeFloat2 (trade, 'size', 'amount', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'filled_amount', 'order_qty'); + amountString = this.safeString2 (trade, 'size', 'amount', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -1358,18 +1362,13 @@ module.exports = class bitget extends Exchange { type = this.parseOrderType (side); side = this.parseOrderSide (side); } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - let feeCost = this.safeFloat (trade, 'fee'); - if (feeCost === undefined) { - feeCost = this.safeFloat (trade, 'filled_fees'); + let feeCostString = this.safeString (trade, 'fee'); + if (feeCostString === undefined) { + feeCostString = this.safeString (trade, 'filled_fees'); } else { - feeCost = -feeCost; + feeCostString = (feeCostString[0] === '-') ? feeCostString.slice (1) : feeCostString; } + const feeCost = this.parseNumber (feeCostString); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -1492,23 +1491,23 @@ module.exports = class bitget extends Exchange { const volumeIndex = this.safeString (volume, market['type'], 'amount'); return [ this.safeInteger (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, bitget will return base volume in the 7th element for future markets ]; } else { const volumeIndex = this.safeValue (volume, market['type'], 6); return [ this.safeInteger (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, volumeIndex), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, volumeIndex), // Base Volume ]; } } @@ -1610,13 +1609,13 @@ module.exports = class bitget extends Exchange { } const type = this.safeValue (balance, 'type'); if (type === 'trade') { - result[code]['free'] = this.safeFloat (balance, 'balance'); + result[code]['free'] = this.safeString (balance, 'balance'); } else if ((type === 'frozen') || (type === 'lock')) { - const used = this.safeFloat (result[code], 'used'); - result[code]['used'] = this.sum (used, this.safeFloat (balance, 'balance')); + const used = this.safeString (result[code], 'used'); + result[code]['used'] = Precise.stringAdd (used, this.safeString (balance, 'balance')); } } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseSwapBalance (response) { @@ -1640,11 +1639,11 @@ module.exports = class bitget extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeString (balance, 'equity'); + account['free'] = this.safeString (balance, 'total_avail_balance'); result[symbol] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchAccounts (params = {}) { @@ -1921,26 +1920,13 @@ module.exports = class bitget extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let amount = this.safeFloat2 (order, 'amount', 'size'); - const filled = this.safeFloat2 (order, 'filled_amount', 'filled_qty'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - amount = Math.max (amount, filled); - remaining = Math.max (0, amount - filled); - } - } - if (type === 'market') { - remaining = 0; - } - const cost = this.safeFloat (order, 'filled_cash_amount'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); - if ((average === undefined) && (filled !== undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } + const amount = this.safeNumber2 (order, 'amount', 'size'); + const filled = this.safeNumber2 (order, 'filled_amount', 'filled_qty'); + const cost = this.safeNumber (order, 'filled_cash_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'price_avg'); const status = this.parseOrderStatus (this.safeString2 (order, 'state', 'status')); - const feeCost = this.safeFloat2 (order, 'filled_fees', 'fee'); + const feeCost = this.safeNumber2 (order, 'filled_fees', 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -1950,7 +1936,7 @@ module.exports = class bitget extends Exchange { }; } const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1968,11 +1954,11 @@ module.exports = class bitget extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -2019,7 +2005,7 @@ module.exports = class bitget extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'amount'); + let cost = this.safeNumber (params, 'amount'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2569,12 +2555,12 @@ module.exports = class bitget extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const txid = this.safeString (transaction, 'tx_hash'); const timestamp = this.safeInteger (transaction, 'created_at'); const updated = this.safeInteger (transaction, 'updated_at'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -2764,7 +2750,7 @@ module.exports = class bitget extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.swapGetPositionAllPosition (params); // diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bithumb.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bithumb.js index ef4e7d479..051562718 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bithumb.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bithumb.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, AuthenticationError, BadRequest, PermissionDenied, InvalidAddress, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); const { DECIMAL_PLACES, SIGNIFICANT_DIGITS, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -198,12 +199,12 @@ module.exports = class bithumb extends Exchange { const account = this.account (); const currency = this.currency (code); const lowerCurrencyId = this.safeStringLower (currency, 'id'); - account['total'] = this.safeFloat (balances, 'total_' + lowerCurrencyId); - account['used'] = this.safeFloat (balances, 'in_use_' + lowerCurrencyId); - account['free'] = this.safeFloat (balances, 'available_' + lowerCurrencyId); + account['total'] = this.safeString (balances, 'total_' + lowerCurrencyId); + account['used'] = this.safeString (balances, 'in_use_' + lowerCurrencyId); + account['free'] = this.safeString (balances, 'available_' + lowerCurrencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -265,8 +266,8 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const open = this.safeFloat (ticker, 'opening_price'); - const close = this.safeFloat (ticker, 'closing_price'); + const open = this.safeNumber (ticker, 'opening_price'); + const close = this.safeNumber (ticker, 'closing_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -277,18 +278,18 @@ module.exports = class bithumb extends Exchange { } average = this.sum (open, close) / 2; } - const baseVolume = this.safeFloat (ticker, 'units_traded_24H'); - const quoteVolume = this.safeFloat (ticker, 'acc_trade_value_24H'); + const baseVolume = this.safeNumber (ticker, 'units_traded_24H'); + const quoteVolume = this.safeNumber (ticker, 'acc_trade_value_24H'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -394,11 +395,11 @@ module.exports = class bithumb extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -488,18 +489,16 @@ module.exports = class bithumb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'units_traded', 'units'); - let cost = this.safeFloat (trade, 'total'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'units_traded', 'units'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.commonCurrencyCode (feeCurrencyId); @@ -702,14 +701,14 @@ module.exports = class bithumb extends Exchange { const sideProperty = this.safeValue2 (order, 'type', 'side'); const side = (sideProperty === 'bid') ? 'buy' : 'sell'; const status = this.parseOrderStatus (this.safeString (order, 'order_status')); - let price = this.safeFloat2 (order, 'order_price', 'price'); + let price = this.safeNumber2 (order, 'order_price', 'price'); let type = 'limit'; if (price === 0) { price = undefined; type = 'market'; } - const amount = this.safeFloat2 (order, 'order_qty', 'units'); - let remaining = this.safeFloat (order, 'units_remaining'); + const amount = this.safeNumber2 (order, 'order_qty', 'units'); + let remaining = this.safeNumber (order, 'units_remaining'); if (remaining === undefined) { if (status === 'closed') { remaining = 0; @@ -728,65 +727,14 @@ module.exports = class bithumb extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let filled = undefined; - let cost = undefined; - let average = undefined; const id = this.safeString (order, 'order_id'); - const rawTrades = this.safeValue (order, 'contract'); - let trades = undefined; - let fee = undefined; - let fees = undefined; - let feesByCurrency = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'side': side, - 'symbol': symbol, - 'order': id, - }); - filled = 0; - feesByCurrency = {}; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - filled = this.sum (filled, trade['amount']); - cost = this.sum (cost, trade['cost']); - const tradeFee = trade['fee']; - const feeCurrency = tradeFee['currency']; - if (feeCurrency in feesByCurrency) { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': this.sum (feesByCurrency[feeCurrency]['cost'], tradeFee['cost']), - }; - } else { - feesByCurrency[feeCurrency] = { - 'currency': feeCurrency, - 'cost': tradeFee['cost'], - }; - } - } - const feeCurrencies = Object.keys (feesByCurrency); - const feeCurrenciesLength = feeCurrencies.length; - if (feeCurrenciesLength > 1) { - fees = []; - for (let i = 0; i < feeCurrencies.length; i++) { - const feeCurrency = feeCurrencies[i]; - fees.push (feesByCurrency[feeCurrency]); - } - } else { - fee = this.safeValue (feesByCurrency, feeCurrencies[0]); - } - if (filled !== 0) { - average = cost / filled; - } - } - if (amount !== undefined) { - if ((filled === undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if ((remaining === undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const result = { + const rawTrades = this.safeValue (order, 'contract', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'side': side, + 'symbol': symbol, + 'order': id, + }); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -801,20 +749,14 @@ module.exports = class bithumb extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'average': average, - 'filled': filled, + 'cost': undefined, + 'average': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': trades, - }; - if (fee !== undefined) { - result['fee'] = fee; - } else if (fees !== undefined) { - result['fees'] = fees; - } - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmart.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmart.js index 4ad47118a..9ec806c6e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmart.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmart.js @@ -435,16 +435,16 @@ module.exports = class bitmart extends Exchange { // const pricePrecision = this.safeInteger (market, 'price_max_precision'); const precision = { - 'amount': this.safeFloat (market, 'base_min_size'), + 'amount': this.safeNumber (market, 'base_min_size'), 'price': parseFloat (this.decimalToPrecision (Math.pow (10, -pricePrecision), ROUND, 10)), }; - const minBuyCost = this.safeFloat (market, 'min_buy_amount'); - const minSellCost = this.safeFloat (market, 'min_sell_amount'); + const minBuyCost = this.safeNumber (market, 'min_buy_amount'); + const minSellCost = this.safeNumber (market, 'min_sell_amount'); const minCost = Math.max (minBuyCost, minSellCost); const limits = { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': { 'min': undefined, @@ -554,16 +554,16 @@ module.exports = class bitmart extends Exchange { // // the docs are wrong: https://github.com/ccxt/ccxt/issues/5612 // - const amountPrecision = this.safeFloat (contract, 'vol_unit'); - const pricePrecision = this.safeFloat (contract, 'price_unit'); + const amountPrecision = this.safeNumber (contract, 'vol_unit'); + const pricePrecision = this.safeNumber (contract, 'price_unit'); const precision = { 'amount': amountPrecision, 'price': pricePrecision, }; const limits = { 'amount': { - 'min': this.safeFloat (contract, 'min_vol'), - 'max': this.safeFloat (contract, 'max_vol'), + 'min': this.safeNumber (contract, 'min_vol'), + 'max': this.safeNumber (contract, 'max_vol'), }, 'price': { 'min': undefined, @@ -586,8 +586,8 @@ module.exports = class bitmart extends Exchange { future = true; } const feeConfig = this.safeValue (market, 'fee_config', {}); - const maker = this.safeFloat (feeConfig, 'maker_fee'); - const taker = this.safeFloat (feeConfig, 'taker_fee'); + const maker = this.safeNumber (feeConfig, 'maker_fee'); + const taker = this.safeNumber (feeConfig, 'taker_fee'); result.push ({ 'id': id, 'numericId': numericId, @@ -675,33 +675,33 @@ module.exports = class bitmart extends Exchange { const timestamp = this.safeTimestamp (ticker, 'timestamp', this.milliseconds ()); const marketId = this.safeString2 (ticker, 'symbol', 'contract_id'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat2 (ticker, 'close_24h', 'last_price'); - let percentage = this.safeFloat (ticker, 'fluctuation', 'rise_fall_rate'); + const last = this.safeNumber2 (ticker, 'close_24h', 'last_price'); + let percentage = this.safeNumber (ticker, 'fluctuation', 'rise_fall_rate'); if (percentage !== undefined) { percentage *= 100; } - const baseVolume = this.safeFloat2 (ticker, 'base_volume_24h', 'base_coin_volume'); - const quoteVolume = this.safeFloat2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); + const baseVolume = this.safeNumber2 (ticker, 'base_volume_24h', 'base_coin_volume'); + const quoteVolume = this.safeNumber2 (ticker, 'quote_volume_24h', 'quote_coin_volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const open = this.safeFloat2 (ticker, 'open_24h', 'open'); + const open = this.safeNumber2 (ticker, 'open_24h', 'open'); let average = undefined; if ((last !== undefined) && (open !== undefined)) { average = this.sum (last, open) / 2; } - average = this.safeFloat (ticker, 'avg_price', average); + average = this.safeNumber (ticker, 'avg_price', average); const price = this.safeValue (ticker, 'depth_price', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high', 'high_24h'), - 'low': this.safeFloat2 (ticker, 'low', 'low_24h'), - 'bid': this.safeFloat (price, 'best_bid', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (price, 'best_ask', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber2 (ticker, 'high', 'high_24h'), + 'low': this.safeNumber2 (ticker, 'low', 'low_24h'), + 'bid': this.safeNumber (price, 'best_bid', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (price, 'best_ask', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open_24h'), + 'open': this.safeNumber (ticker, 'open_24h'), 'close': last, 'last': last, 'previousClose': undefined, @@ -1005,18 +1005,18 @@ module.exports = class bitmart extends Exchange { if (execType !== undefined) { takerOrMaker = (execType === 'M') ? 'maker' : 'taker'; } - let price = this.safeFloat2 (trade, 'price', 'deal_price'); - price = this.safeFloat (trade, 'price_avg', price); - let amount = this.safeFloat2 (trade, 'amount', 'deal_vol'); - amount = this.safeFloat (trade, 'size', amount); - let cost = this.safeFloat2 (trade, 'count', 'notional'); + let price = this.safeNumber2 (trade, 'price', 'deal_price'); + price = this.safeNumber (trade, 'price_avg', price); + let amount = this.safeNumber2 (trade, 'amount', 'deal_vol'); + amount = this.safeNumber (trade, 'size', amount); + let cost = this.safeNumber2 (trade, 'count', 'notional'); if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { cost = amount * price; } const orderId = this.safeInteger (trade, 'order_id'); const marketId = this.safeString2 (trade, 'contract_id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (trade, 'fees'); + const feeCost = this.safeNumber (trade, 'fees'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_coin_name'); @@ -1144,11 +1144,11 @@ module.exports = class bitmart extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1475,11 +1475,11 @@ module.exports = class bitmart extends Exchange { currencyId = this.safeString (balance, 'coind_code', currencyId); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat2 (balance, 'available', 'available_vol'); - account['used'] = this.safeFloat2 (balance, 'frozen', 'freeze_vol'); + account['free'] = this.safeString2 (balance, 'available', 'available_vol'); + account['used'] = this.safeString2 (balance, 'frozen', 'freeze_vol'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -1548,29 +1548,10 @@ module.exports = class bitmart extends Exchange { if (market !== undefined) { status = this.parseOrderStatusByType (market['type'], this.safeString (order, 'status')); } - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat2 (order, 'price_avg', 'done_avg_price'); - const amount = this.safeFloat2 (order, 'size', 'vol'); - let cost = undefined; - let filled = this.safeFloat2 (order, 'filled_size', 'done_vol'); - let remaining = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - if (filled === undefined) { - filled = Math.max (0, amount - remaining); - } - } - if (filled !== undefined) { - if (remaining === undefined) { - remaining = Math.max (0, amount - filled); - } - if (cost === undefined) { - if (average !== undefined) { - cost = average * filled; - } - } - } - } + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber2 (order, 'price_avg', 'done_avg_price'); + const amount = this.safeNumber2 (order, 'size', 'vol'); + const filled = this.safeNumber2 (order, 'filled_size', 'done_vol'); let side = this.safeString (order, 'side'); // 1 = Open long // 2 = Close short @@ -1592,7 +1573,7 @@ module.exports = class bitmart extends Exchange { average = undefined; } } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -1607,14 +1588,14 @@ module.exports = class bitmart extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatusByType (type, status) { @@ -1655,7 +1636,7 @@ module.exports = class bitmart extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2241,12 +2222,12 @@ module.exports = class bitmart extends Exchange { type = 'deposit'; id = depositId; } - const amount = this.safeFloat (transaction, 'arrival_amount'); + const amount = this.safeNumber (transaction, 'arrival_amount'); const timestamp = this.safeInteger (transaction, 'tapply_timeime'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmex.js index 4f5a0552a..8eddc8287 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitmex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, ExchangeNotAvailable, InsufficientFunds, InvalidOrder, OrderNotFound, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -215,8 +216,8 @@ module.exports = class bitmex extends Exchange { 'amount': undefined, 'price': undefined, }; - const lotSize = this.safeFloat (market, 'lotSize'); - const tickSize = this.safeFloat (market, 'tickSize'); + const lotSize = this.safeNumber (market, 'lotSize'); + const tickSize = this.safeNumber (market, 'tickSize'); if (lotSize !== undefined) { precision['amount'] = lotSize; } @@ -230,7 +231,7 @@ module.exports = class bitmex extends Exchange { }, 'price': { 'min': tickSize, - 'max': this.safeFloat (market, 'maxPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { 'min': undefined, @@ -240,7 +241,7 @@ module.exports = class bitmex extends Exchange { const limitField = (position === quote) ? 'cost' : 'amount'; limits[limitField] = { 'min': lotSize, - 'max': this.safeFloat (market, 'maxOrderQty'), + 'max': this.safeNumber (market, 'maxOrderQty'), }; result.push ({ 'id': id, @@ -252,8 +253,8 @@ module.exports = class bitmex extends Exchange { 'active': active, 'precision': precision, 'limits': limits, - 'taker': this.safeFloat (market, 'takerFee'), - 'maker': this.safeFloat (market, 'makerFee'), + 'taker': this.safeNumber (market, 'takerFee'), + 'maker': this.safeNumber (market, 'makerFee'), 'type': type, 'spot': false, 'swap': swap, @@ -319,21 +320,17 @@ module.exports = class bitmex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - let free = this.safeFloat (balance, 'availableMargin'); - let total = this.safeFloat (balance, 'marginBalance'); + let free = this.safeString (balance, 'availableMargin'); + let total = this.safeString (balance, 'marginBalance'); if (code === 'BTC') { - if (free !== undefined) { - free /= 100000000; - } - if (total !== undefined) { - total /= 100000000; - } + free = Precise.stringDiv (free, '1e8'); + total = Precise.stringDiv (total, '1e8'); } account['free'] = free; account['total'] = total; result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -412,8 +409,8 @@ module.exports = class bitmex extends Exchange { for (let i = 0; i < response.length; i++) { const order = response[i]; const side = (order['side'] === 'Sell') ? 'asks' : 'bids'; - const amount = this.safeFloat (order, 'size'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const price = this.safeNumber (order, 'price'); // https://github.com/ccxt/ccxt/issues/4926 // https://github.com/ccxt/ccxt/issues/4927 // the exchange sometimes returns null price in the orderbook @@ -619,7 +616,7 @@ module.exports = class bitmex extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'transactType')); const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount !== undefined) { amount = amount / 100000000; } @@ -630,7 +627,7 @@ module.exports = class bitmex extends Exchange { // for unrealized pnl and other transactions without a timestamp timestamp = 0; // see comments above } - let feeCost = this.safeFloat (item, 'fee', 0); + let feeCost = this.safeNumber (item, 'fee', 0); if (feeCost !== undefined) { feeCost = feeCost / 100000000; } @@ -638,7 +635,7 @@ module.exports = class bitmex extends Exchange { 'cost': feeCost, 'currency': code, }; - let after = this.safeFloat (item, 'walletBalance'); + let after = this.safeNumber (item, 'walletBalance'); if (after !== undefined) { after = after / 100000000; } @@ -957,8 +954,8 @@ module.exports = class bitmex extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const open = this.safeFloat (ticker, 'prevPrice24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'prevPrice24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; if (last !== undefined && open !== undefined) { @@ -971,13 +968,13 @@ module.exports = class bitmex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askPrice'), + 'ask': this.safeNumber (ticker, 'askPrice'), 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'vwap'), + 'vwap': this.safeNumber (ticker, 'vwap'), 'open': open, 'close': last, 'last': last, @@ -985,8 +982,8 @@ module.exports = class bitmex extends Exchange { 'change': change, 'percentage': percentage, 'average': this.sum (open, last) / 2, - 'baseVolume': this.safeFloat (ticker, 'homeNotional24h'), - 'quoteVolume': this.safeFloat (ticker, 'foreignNotional24h'), + 'baseVolume': this.safeNumber (ticker, 'homeNotional24h'), + 'quoteVolume': this.safeNumber (ticker, 'foreignNotional24h'), 'info': ticker, }; } @@ -1011,11 +1008,11 @@ module.exports = class bitmex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1144,23 +1141,23 @@ module.exports = class bitmex extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat2 (trade, 'avgPx', 'price'); - const amount = this.safeFloat2 (trade, 'size', 'lastQty'); + const price = this.safeNumber2 (trade, 'avgPx', 'price'); + const amount = this.safeNumber2 (trade, 'size', 'lastQty'); const id = this.safeString (trade, 'trdMatchID'); const order = this.safeString (trade, 'orderID'); const side = this.safeStringLower (trade, 'side'); // price * amount doesn't work for all symbols (e.g. XBT, ETH) - let cost = this.safeFloat (trade, 'execCost'); + let cost = this.safeNumber (trade, 'execCost'); if (cost !== undefined) { cost = Math.abs (cost) / 100000000; } let fee = undefined; if ('execComm' in trade) { - let feeCost = this.safeFloat (trade, 'execComm'); + let feeCost = this.safeNumber (trade, 'execComm'); feeCost = feeCost / 100000000; const currencyId = this.safeString (trade, 'settlCurrency'); const feeCurrency = this.safeCurrencyCode (currencyId); - const feeRate = this.safeFloat (trade, 'commission'); + const feeRate = this.safeNumber (trade, 'commission'); fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -1262,33 +1259,19 @@ module.exports = class bitmex extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'transactTime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty', 0.0); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (amount - filled, 0.0); - } - } - const average = this.safeFloat (order, 'avgPx'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = average * filled; - } else if (price !== undefined) { - cost = price * filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty', 0.0); + const average = this.safeNumber (order, 'avgPx'); const id = this.safeString (order, 'orderID'); const type = this.safeStringLower (order, 'ordType'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'clOrdID'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const execInst = this.safeString (order, 'execInst'); const postOnly = (execInst === 'ParticipateDoNotInitiate'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1303,14 +1286,14 @@ module.exports = class bitmex extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { @@ -1371,7 +1354,7 @@ module.exports = class bitmex extends Exchange { 'ordType': orderType, }; if ((orderType === 'Stop') || (orderType === 'StopLimit') || (orderType === 'MarketIfTouched') || (orderType === 'LimitIfTouched')) { - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stopPx or stopPrice parameter for the ' + orderType + ' order type'); } else { @@ -1488,7 +1471,7 @@ module.exports = class bitmex extends Exchange { return this.parseOrders (response, market); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPosition (params); // [ diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitpanda.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitpanda.js index b440aba7d..5f857014b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitpanda.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitpanda.js @@ -328,7 +328,7 @@ module.exports = class bitpanda extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; @@ -401,9 +401,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -450,8 +450,8 @@ module.exports = class bitpanda extends Exchange { const activeFeeTier = this.safeValue (response, 'active_fee_tier', {}); const result = { 'info': response, - 'maker': this.safeFloat (activeFeeTier, 'maker_fee'), - 'taker': this.safeFloat (activeFeeTier, 'taker_fee'), + 'maker': this.safeNumber (activeFeeTier, 'maker_fee'), + 'taker': this.safeNumber (activeFeeTier, 'taker_fee'), 'percentage': true, 'tierBased': true, }; @@ -460,9 +460,9 @@ module.exports = class bitpanda extends Exchange { const makerFees = []; for (let i = 0; i < feeTiers.length; i++) { const tier = feeTiers[i]; - const volume = this.safeFloat (tier, 'volume'); - let taker = this.safeFloat (tier, 'taker_fee'); - let maker = this.safeFloat (tier, 'maker_fee'); + const volume = this.safeNumber (tier, 'volume'); + let taker = this.safeNumber (tier, 'taker_fee'); + let maker = this.safeNumber (tier, 'maker_fee'); taker /= 100; maker /= 100; takerFees.push ([ volume, taker ]); @@ -500,27 +500,27 @@ module.exports = class bitpanda extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last_price'); - const percentage = this.safeFloat (ticker, 'price_change_percentage'); - const change = this.safeFloat (ticker, 'price_change'); + const last = this.safeNumber (ticker, 'last_price'); + const percentage = this.safeNumber (ticker, 'price_change_percentage'); + const change = this.safeNumber (ticker, 'price_change'); let open = undefined; let average = undefined; if ((last !== undefined) && (change !== undefined)) { open = last - change; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'best_bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'best_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'best_ask'), + 'ask': this.safeNumber (ticker, 'best_ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -705,11 +705,11 @@ module.exports = class bitpanda extends Exchange { const volumeField = this.safeString (options, 'volume', 'total_amount'); return [ alignedTimestamp, - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -795,21 +795,21 @@ module.exports = class bitpanda extends Exchange { timestamp = this.parse8601 (this.safeString (trade, 'time')); } const side = this.safeStringLower2 (trade, 'side', 'taker_side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + let cost = this.safeNumber (trade, 'volume'); if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { cost = amount * price; } const marketId = this.safeString (trade, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const feeCost = this.safeFloat (feeInfo, 'fee_amount'); + const feeCost = this.safeNumber (feeInfo, 'fee_amount'); let takerOrMaker = undefined; let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (feeInfo, 'fee_percentage'); + const feeRate = this.safeNumber (feeInfo, 'fee_percentage'); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, @@ -892,11 +892,11 @@ module.exports = class bitpanda extends Exchange { const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -1150,12 +1150,12 @@ module.exports = class bitpanda extends Exchange { // } // const id = this.safeString (transaction, 'transaction_id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const currencyId = this.safeString (transaction, 'currency'); currency = this.safeCurrency (currencyId, currency); const status = 'ok'; // the exchange returns cleared transactions only - const feeCost = this.safeFloat2 (transaction, 'fee_amount', 'fee'); + const feeCost = this.safeNumber2 (transaction, 'fee_amount', 'fee'); let fee = undefined; const addressTo = this.safeString (transaction, 'recipient'); const tagTo = this.safeString (transaction, 'destination_tag'); @@ -1270,72 +1270,34 @@ module.exports = class bitpanda extends Exchange { // ] // } // - const rawTrades = this.safeValue (order, 'trades', []); - order = this.safeValue (order, 'order', order); - const id = this.safeString (order, 'order_id'); - const clientOrderId = this.safeString (order, 'client_id'); - const timestamp = this.parse8601 (this.safeString (order, 'time')); - let status = this.parseOrderStatus (this.safeString (order, 'status')); - const marketId = this.safeString (order, 'instrument_code'); + const rawOrder = this.safeValue (order, 'order', order); + const id = this.safeString (rawOrder, 'order_id'); + const clientOrderId = this.safeString (rawOrder, 'client_id'); + const timestamp = this.parse8601 (this.safeString (rawOrder, 'time')); + const rawStatus = this.parseOrderStatus (this.safeString (rawOrder, 'status')); + const status = this.parseOrderStatus (rawStatus); + const marketId = this.safeString (rawOrder, 'instrument_code'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - if (status === undefined) { - if (remaining > 0) { - status = 'open'; - } else { - status = 'closed'; - } - } - } - } - const side = this.safeStringLower (order, 'side'); - const type = this.safeStringLower (order, 'type'); - const trades = this.parseTrades (rawTrades, market, undefined, undefined); - const fees = []; - const numTrades = trades.length; - let lastTradeTimestamp = undefined; - let tradeCost = undefined; - let tradeAmount = undefined; - if (numTrades > 0) { - lastTradeTimestamp = trades[0]['timestamp']; - tradeCost = 0; - tradeAmount = 0; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - fees.push (trade['fee']); - lastTradeTimestamp = Math.max (lastTradeTimestamp, trade['timestamp']); - tradeCost = this.sum (tradeCost, trade['cost']); - tradeAmount = this.sum (tradeAmount, trade['amount']); - } - } - let average = this.safeFloat (order, 'average_price'); - if (average === undefined) { - if ((tradeCost !== undefined) && (tradeAmount !== undefined) && (tradeAmount !== 0)) { - average = tradeCost / tradeAmount; - } - } - if (cost === undefined) { - if ((average !== undefined) && (filled !== undefined)) { - cost = average * filled; - } - } - const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'trigger_price'); - const postOnly = this.safeValue (order, 'is_post_only'); - const result = { + const price = this.safeNumber (rawOrder, 'price'); + const amount = this.safeNumber (rawOrder, 'amount'); + const filledString = this.safeString (rawOrder, 'filled_amount'); + const filled = this.parseNumber (filledString); + const side = this.safeStringLower (rawOrder, 'side'); + const type = this.safeStringLower (rawOrder, 'type'); + const timeInForce = this.parseTimeInForce (this.safeString (rawOrder, 'time_in_force')); + const stopPrice = this.safeNumber (rawOrder, 'trigger_price'); + const postOnly = this.safeValue (rawOrder, 'is_post_only'); + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'type': type, + }); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -1344,41 +1306,14 @@ module.exports = class bitpanda extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, // 'fee': undefined, 'trades': trades, - }; - const numFees = fees.length; - if (numFees > 0) { - if (numFees === 1) { - result['fee'] = fees[0]; - } else { - const feesByCurrency = this.groupBy (fees, 'currency'); - const feeCurrencies = Object.keys (feesByCurrency); - const numFeesByCurrency = feeCurrencies.length; - if (numFeesByCurrency === 1) { - const feeCurrency = feeCurrencies[0]; - const feeArray = this.safeValue (feesByCurrency, feeCurrency); - let feeCost = 0; - for (let i = 0; i < feeArray.length; i++) { - feeCost = this.sum (feeCost, feeArray[i]['cost']); - } - result['fee'] = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } else { - result['fees'] = fees; - } - } - } else { - result['fee'] = undefined; - } - return result; + }); } parseTimeInForce (timeInForce) { @@ -1412,7 +1347,7 @@ module.exports = class bitpanda extends Exchange { priceIsRequired = true; } if (uppercaseType === 'STOP') { - const triggerPrice = this.safeFloat (params, 'trigger_price'); + const triggerPrice = this.safeNumber (params, 'trigger_price'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a trigger_price param for ' + type + ' orders'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitso.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitso.js index d8bc07145..defcece54 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitso.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitso.js @@ -157,28 +157,28 @@ module.exports = class bitso extends Exchange { const symbol = base + '/' + quote; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), - 'max': this.safeFloat (market, 'maximum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), + 'max': this.safeNumber (market, 'maximum_amount'), }, 'price': { - 'min': this.safeFloat (market, 'minimum_price'), - 'max': this.safeFloat (market, 'maximum_price'), + 'min': this.safeNumber (market, 'minimum_price'), + 'max': this.safeNumber (market, 'maximum_price'), }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), - 'max': this.safeFloat (market, 'maximum_value'), + 'min': this.safeNumber (market, 'minimum_value'), + 'max': this.safeNumber (market, 'maximum_value'), }, }; - const defaultPricePrecision = this.safeFloat (this.options['precision'], quote, this.options['defaultPrecision']); - const pricePrecision = this.safeFloat (market, 'tick_size', defaultPricePrecision); + const defaultPricePrecision = this.safeNumber (this.options['precision'], quote, this.options['defaultPrecision']); + const pricePrecision = this.safeNumber (market, 'tick_size', defaultPricePrecision); const precision = { - 'amount': this.safeFloat (this.options['precision'], base, this.options['defaultPrecision']), + 'amount': this.safeNumber (this.options['precision'], base, this.options['defaultPrecision']), 'price': pricePrecision, }; const fees = this.safeValue (market, 'fees', {}); const flatRate = this.safeValue (fees, 'flat_rate', {}); - const maker = this.safeFloat (flatRate, 'maker'); - const taker = this.safeFloat (flatRate, 'taker'); + const maker = this.safeNumber (flatRate, 'maker'); + const taker = this.safeNumber (flatRate, 'taker'); const feeTiers = this.safeValue (fees, 'structure', []); const fee = { 'taker': parseFloat (this.decimalToPrecision (taker / 100, ROUND, 0.00000001, TICK_SIZE)), @@ -190,9 +190,9 @@ module.exports = class bitso extends Exchange { const makerFees = []; for (let j = 0; j < feeTiers.length; j++) { const tier = feeTiers[j]; - const volume = this.safeFloat (tier, 'volume'); - const takerFee = this.safeFloat (tier, 'taker'); - const makerFee = this.safeFloat (tier, 'maker'); + const volume = this.safeNumber (tier, 'volume'); + const takerFee = this.safeNumber (tier, 'taker'); + const makerFee = this.safeNumber (tier, 'maker'); const takerFeeToPrecision = parseFloat (this.decimalToPrecision (takerFee / 100, ROUND, 0.00000001, TICK_SIZE)); const makerFeeToPrecision = parseFloat (this.decimalToPrecision (makerFee / 100, ROUND, 0.00000001, TICK_SIZE)); takerFees.push ([ volume, takerFeeToPrecision ]); @@ -232,14 +232,13 @@ module.exports = class bitso extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'locked'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -261,22 +260,22 @@ module.exports = class bitso extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'payload'); const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -297,12 +296,12 @@ module.exports = class bitso extends Exchange { const marketId = this.safeString (trade, 'book'); const symbol = this.safeSymbol (marketId, market, '_'); const side = this.safeString2 (trade, 'side', 'maker_side'); - let amount = this.safeFloat2 (trade, 'amount', 'major'); + let amount = this.safeNumber2 (trade, 'amount', 'major'); if (amount !== undefined) { amount = Math.abs (amount); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fees_amount'); + const feeCost = this.safeNumber (trade, 'fees_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fees_currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -311,11 +310,11 @@ module.exports = class bitso extends Exchange { 'currency': feeCurrency, }; } - let cost = this.safeFloat (trade, 'minor'); + let cost = this.safeNumber (trade, 'minor'); if (cost !== undefined) { cost = Math.abs (cost); } - const price = this.safeFloat (trade, 'price'); + const price = this.safeNumber (trade, 'price'); const orderId = this.safeString (trade, 'oid'); const id = this.safeString (trade, 'tid'); return { @@ -416,17 +415,11 @@ module.exports = class bitso extends Exchange { const symbol = this.safeSymbol (marketId, market, '_'); const orderType = this.safeString (order, 'type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'unfilled_amount'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'unfilled_amount'); const clientOrderId = this.safeString (order, 'client_id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -443,12 +436,12 @@ module.exports = class bitso extends Exchange { 'amount': amount, 'cost': undefined, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = 25, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp.js index 4671385bf..0ac6fe9f7 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp.js @@ -115,6 +115,16 @@ module.exports = class bitstamp extends Exchange { 'usdc_address/', 'omg_withdrawal/', 'omg_address/', + 'dai_withdrawal/', + 'dai_address/', + 'knc_withdrawal/', + 'knc_address/', + 'mkr_withdrawal/', + 'mkr_address/', + 'zrx_withdrawal/', + 'zrx_address/', + 'gusd_withdrawal/', + 'gusd_address/', 'transfer-to-main/', 'transfer-from-main/', 'withdrawal-requests/', @@ -249,13 +259,15 @@ module.exports = class bitstamp extends Exchange { const symbolId = baseId + '_' + quoteId; const id = this.safeString (market, 'url_symbol'); const precision = { - 'amount': market['base_decimals'], - 'price': market['counter_decimals'], + 'amount': this.safeInteger (market, 'base_decimals'), + 'price': this.safeInteger (market, 'counter_decimals'), }; - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; // let [ cost, currency ] = market['minimum_order'].split (' '); - const active = (market['trading'] === 'Enabled'); + const trading = this.safeString (market, 'trading'); + const active = (trading === 'Enabled'); result.push ({ 'id': id, 'symbol': symbol, @@ -299,7 +311,7 @@ module.exports = class bitstamp extends Exchange { 'type': currencyType, 'name': name, 'active': true, - 'fee': this.safeFloat (description['fees']['funding']['withdraw'], code), + 'fee': this.safeNumber (description['fees']['funding']['withdraw'], code), 'precision': precision, 'limits': { 'amount': { @@ -352,13 +364,16 @@ module.exports = class bitstamp extends Exchange { quote = this.safeCurrencyCode (quote); const description = this.safeString (market, 'description'); const [ baseDescription, quoteDescription ] = description.split (' / '); - const parts = market['minimum_order'].split (' '); + const minimumOrder = this.safeString (market, 'minimum_order'); + const parts = minimumOrder.split (' '); const cost = parts[0]; if (!(base in result)) { - result[base] = this.constructCurrencyObject (baseId, base, baseDescription, market['base_decimals'], undefined, market); + const baseDecimals = this.safeInteger (market, 'base_decimals'); + result[base] = this.constructCurrencyObject (baseId, base, baseDescription, baseDecimals, undefined, market); } if (!(quote in result)) { - result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, market['counter_decimals'], parseFloat (cost), market); + const counterDecimals = this.safeInteger (market, 'counter_decimals'); + result[quote] = this.constructCurrencyObject (quoteId, quote, quoteDescription, counterDecimals, parseFloat (cost), market); } } return result; @@ -400,25 +415,25 @@ module.exports = class bitstamp extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -461,7 +476,7 @@ module.exports = class bitstamp extends Exchange { for (let i = 0; i < ids.length; i++) { const id = ids[i]; if (id.indexOf ('_') < 0) { - const value = this.safeFloat (transaction, id); + const value = this.safeNumber (transaction, id); if ((value !== undefined) && (value !== 0)) { return id; } @@ -543,11 +558,11 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString2 (trade, 'id', 'tid'); let symbol = undefined; let side = undefined; - let price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat (trade, 'amount'); + let price = this.safeNumber (trade, 'price'); + let amount = this.safeNumber (trade, 'amount'); const orderId = this.safeString (trade, 'order_id'); const type = undefined; - let cost = this.safeFloat (trade, 'cost'); + let cost = this.safeNumber (trade, 'cost'); if (market === undefined) { const keys = Object.keys (trade); for (let i = 0; i < keys.length; i++) { @@ -564,12 +579,12 @@ module.exports = class bitstamp extends Exchange { market = this.getMarketFromTrade (trade); } } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let feeCurrency = undefined; if (market !== undefined) { - price = this.safeFloat (trade, market['symbolId'], price); - amount = this.safeFloat (trade, market['baseId'], amount); - cost = this.safeFloat (trade, market['quoteId'], cost); + price = this.safeNumber (trade, market['symbolId'], price); + amount = this.safeNumber (trade, market['baseId'], amount); + cost = this.safeNumber (trade, market['quoteId'], cost); feeCurrency = market['quote']; symbol = market['symbol']; } @@ -638,7 +653,7 @@ module.exports = class bitstamp extends Exchange { parseTradingFee (balances, symbol) { const market = this.market (symbol); - const tradeFee = this.safeFloat (balances, market['id'] + '_fee'); + const tradeFee = this.safeNumber (balances, market['id'] + '_fee'); return { 'symbol': symbol, 'maker': tradeFee, @@ -688,11 +703,11 @@ module.exports = class bitstamp extends Exchange { // return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -750,12 +765,12 @@ module.exports = class bitstamp extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFee (symbol, params = {}) { @@ -802,7 +817,7 @@ module.exports = class bitstamp extends Exchange { if (id.indexOf ('_withdrawal_fee') >= 0) { const currencyId = id.split ('_')[0]; const code = this.safeCurrencyCode (currencyId); - withdraw[code] = this.safeFloat (balance, id); + withdraw[code] = this.safeNumber (balance, id); } } return { @@ -1048,16 +1063,16 @@ module.exports = class bitstamp extends Exchange { const id = this.safeString (transaction, 'id'); const currencyId = this.getCurrencyIdFromTransaction (transaction); const code = this.safeCurrencyCode (currencyId, currency); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let feeCurrency = undefined; let amount = undefined; if ('amount' in transaction) { - amount = this.safeFloat (transaction, 'amount'); + amount = this.safeNumber (transaction, 'amount'); } else if (currency !== undefined) { - amount = this.safeFloat (transaction, currency['id'], amount); + amount = this.safeNumber (transaction, currency['id'], amount); feeCurrency = currency['code']; } else if ((code !== undefined) && (currencyId !== undefined)) { - amount = this.safeFloat (transaction, currencyId, amount); + amount = this.safeNumber (transaction, currencyId, amount); feeCurrency = code; } if (amount !== undefined) { @@ -1182,83 +1197,23 @@ module.exports = class bitstamp extends Exchange { } // there is no timestamp from fetchOrder const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - let lastTradeTimestamp = undefined; - let symbol = undefined; - let marketId = this.safeStringLower (order, 'currency_pair'); - if (marketId !== undefined) { - marketId = marketId.replace ('/', ''); - if (marketId in this.markets_by_id) { - market = this.markets_by_id[marketId]; - symbol = market['symbol']; - } - } - let amount = this.safeFloat (order, 'amount'); - let filled = 0.0; - const trades = []; - const transactions = this.safeValue (order, 'transactions', []); - let feeCost = undefined; - let cost = undefined; - const numTransactions = transactions.length; - if (numTransactions > 0) { - feeCost = 0.0; - for (let i = 0; i < numTransactions; i++) { - const trade = this.parseTrade (this.extend ({ - 'order_id': id, - 'side': side, - }, transactions[i]), market); - filled = this.sum (filled, trade['amount']); - feeCost = this.sum (feeCost, trade['fee']['cost']); - if (cost === undefined) { - cost = 0.0; - } - cost = this.sum (cost, trade['cost']); - trades.push (trade); - } - lastTradeTimestamp = trades[numTransactions - 1]['timestamp']; - } + const marketId = this.safeStringLower (order, 'currency_pair'); + let symbol = this.safeSymbol (marketId, market, '/'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((status === 'closed') && (amount === undefined)) { - amount = filled; + const amount = this.safeNumber (order, 'amount'); + const transactions = this.safeValue (order, 'transactions', []); + const trades = this.parseTrades (transactions, market); + const length = trades.length; + if (length) { + symbol = trades[0]['symbol']; } - let remaining = undefined; - if (amount !== undefined) { - remaining = amount - filled; - } - let price = this.safeFloat (order, 'price'); - if (market === undefined) { - market = this.getMarketFromTrades (trades); - } - let feeCurrency = undefined; - if (market !== undefined) { - if (symbol === undefined) { - symbol = market['symbol']; - } - feeCurrency = market['quote']; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if (price === undefined) { - if (filled > 0) { - price = cost / filled; - } - } - let fee = undefined; - if (feeCost !== undefined) { - if (feeCurrency !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { + const price = this.safeNumber (order, 'price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'status': status, 'symbol': symbol, 'type': undefined, @@ -1267,15 +1222,15 @@ module.exports = class bitstamp extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, - 'filled': filled, - 'remaining': remaining, + 'filled': undefined, + 'remaining': undefined, 'trades': trades, - 'fee': fee, + 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } parseLedgerEntryType (type) { @@ -1355,11 +1310,11 @@ module.exports = class bitstamp extends Exchange { const parsedTransaction = this.parseTransaction (item); let direction = undefined; if ('amount' in item) { - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); direction = amount > 0 ? 'in' : 'out'; } else if (('currency' in parsedTransaction) && parsedTransaction['currency'] !== undefined) { const currencyId = this.currencyId (parsedTransaction['currency']); - const amount = this.safeFloat (item, currencyId); + const amount = this.safeNumber (item, currencyId); direction = amount > 0 ? 'in' : 'out'; } return { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp1.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp1.js index 8d8de5db1..2b6b70a04 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp1.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitstamp1.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -100,25 +101,25 @@ module.exports = class bitstamp1 extends Exchange { await this.loadMarkets (); const ticker = await this.publicGetTicker (params); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, @@ -141,14 +142,11 @@ module.exports = class bitstamp1 extends Exchange { } } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -192,12 +190,12 @@ module.exports = class bitstamp1 extends Exchange { const currency = this.currency (code); const currencyId = currency['id']; const account = this.account (); - account['free'] = this.safeFloat (balance, currencyId + '_available'); - account['used'] = this.safeFloat (balance, currencyId + '_reserved'); - account['total'] = this.safeFloat (balance, currencyId + '_balance'); + account['free'] = this.safeString (balance, currencyId + '_available'); + account['used'] = this.safeString (balance, currencyId + '_reserved'); + account['total'] = this.safeString (balance, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bittrex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bittrex.js index 1e11d600a..fb8f6fb09 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bittrex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bittrex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, DDoSProtection, PermissionDenied, AddressPending, OnMaintenance, BadRequest, InvalidAddress } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -280,7 +281,7 @@ module.exports = class bittrex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeSize'), + 'min': this.safeNumber (market, 'minTradeSize'), 'max': undefined, }, 'price': { @@ -308,11 +309,11 @@ module.exports = class bittrex extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); const balance = indexed[currencyId]; - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -372,7 +373,7 @@ module.exports = class bittrex extends Exchange { const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); const precision = 8; // default precision, todo: fix "magic constants" - const fee = this.safeFloat (currency, 'txFee'); // todo: redesign + const fee = this.safeNumber (currency, 'txFee'); // todo: redesign const isActive = this.safeString (currency, 'status'); result[code] = { 'id': id, @@ -433,17 +434,17 @@ module.exports = class bittrex extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'updatedAt')); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const percentage = this.safeFloat (ticker, 'percentChange'); - const last = this.safeFloat (ticker, 'lastTradeRate'); + const percentage = this.safeNumber (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'lastTradeRate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidRate'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidRate'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'askRate'), + 'ask': this.safeNumber (ticker, 'askRate'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -453,8 +454,8 @@ module.exports = class bittrex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -567,21 +568,18 @@ module.exports = class bittrex extends Exchange { const order = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'marketSymbol'); market = this.safeMarket (marketId, market, '-'); - let cost = undefined; - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'quantity'); - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = undefined; const isTaker = this.safeValue (trade, 'isTaker'); if (isTaker !== undefined) { takerOrMaker = isTaker ? 'taker' : 'maker'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -651,11 +649,11 @@ module.exports = class bittrex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'startsAt')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -762,9 +760,9 @@ module.exports = class bittrex extends Exchange { let cost = undefined; if (isCeilingLimit) { request['limit'] = this.priceToPrecision (symbol, price); - cost = this.safeFloat2 (params, 'ceiling', 'cost', amount); + cost = this.safeNumber2 (params, 'ceiling', 'cost', amount); } else if (isCeilingMarket) { - cost = this.safeFloat2 (params, 'ceiling', 'cost'); + cost = this.safeNumber2 (params, 'ceiling', 'cost'); if (cost === undefined) { if (price === undefined) { cost = amount; @@ -923,7 +921,7 @@ module.exports = class bittrex extends Exchange { // } // const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const address = this.safeString (transaction, 'cryptoAddress'); const txid = this.safeString (transaction, 'txId'); const updated = this.parse8601 (this.safeString (transaction, 'updatedAt')); @@ -959,7 +957,7 @@ module.exports = class bittrex extends Exchange { status = 'ok'; } } - let feeCost = this.safeFloat (transaction, 'txCost'); + let feeCost = this.safeNumber (transaction, 'txCost'); if (feeCost === undefined) { if (type === 'deposit') { // according to https://support.bittrex.com/hc/en-us/articles/115000199651-What-fees-does-Bittrex-charge- @@ -1016,15 +1014,9 @@ module.exports = class bittrex extends Exchange { // } // const marketSymbol = this.safeString (order, 'marketSymbol'); - let symbol = undefined; - let feeCurrency = undefined; - if (marketSymbol !== undefined) { - const [ baseId, quoteId ] = marketSymbol.split ('-'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - symbol = base + '/' + quote; - feeCurrency = quote; - } + market = this.safeMarket (marketSymbol, market, '-'); + const symbol = market['symbol']; + const feeCurrency = market['quote']; const direction = this.safeStringLower (order, 'direction'); const createdAt = this.safeString (order, 'createdAt'); const updatedAt = this.safeString (order, 'updatedAt'); @@ -1037,32 +1029,15 @@ module.exports = class bittrex extends Exchange { } const timestamp = this.parse8601 (createdAt); const type = this.safeStringLower (order, 'type'); - const quantity = this.safeFloat (order, 'quantity'); - const limit = this.safeFloat (order, 'limit'); - const fillQuantity = this.safeFloat (order, 'fillQuantity'); - const commission = this.safeFloat (order, 'commission'); - const proceeds = this.safeFloat (order, 'proceeds'); - let average = undefined; - let remaining = undefined; - if (fillQuantity !== undefined) { - if (proceeds !== undefined) { - if (fillQuantity > 0) { - average = proceeds / fillQuantity; - } else if (proceeds === 0) { - average = 0; - } - } - if (quantity !== undefined) { - remaining = quantity - fillQuantity; - } - } - let status = this.safeStringLower (order, 'status'); - if ((status === 'closed') && (remaining !== undefined) && (remaining > 0)) { - status = 'canceled'; - } + const quantity = this.safeNumber (order, 'quantity'); + const limit = this.safeNumber (order, 'limit'); + const fillQuantity = this.safeNumber (order, 'fillQuantity'); + const commission = this.safeNumber (order, 'commission'); + const proceeds = this.safeNumber (order, 'proceeds'); + const status = this.safeStringLower (order, 'status'); const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'timestamp': timestamp, @@ -1076,10 +1051,10 @@ module.exports = class bittrex extends Exchange { 'price': limit, 'stopPrice': undefined, 'cost': proceeds, - 'average': average, + 'average': undefined, 'amount': quantity, 'filled': fillQuantity, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': { 'cost': commission, @@ -1087,7 +1062,7 @@ module.exports = class bittrex extends Exchange { }, 'info': order, 'trades': undefined, - }; + }); } parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { @@ -1136,9 +1111,9 @@ module.exports = class bittrex extends Exchange { 'side': this.safeString (order, 'side'), 'order': this.safeString (order, 'id'), 'type': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'average'), - 'amount': this.safeFloat (order, 'filled'), - 'cost': this.safeFloat (order, 'cost'), + 'price': this.safeNumber (order, 'average'), + 'amount': this.safeNumber (order, 'filled'), + 'cost': this.safeNumber (order, 'cost'), 'symbol': this.safeString (order, 'symbol'), 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitvavo.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitvavo.js index e6633b568..ef66620ca 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitvavo.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitvavo.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadSymbol, AuthenticationError, InsufficientFunds, InvalidOrder, ArgumentsRequired, OrderNotFound, InvalidAddress, BadRequest, RateLimitExceeded, PermissionDenied, ExchangeNotAvailable, AccountSuspended, OnMaintenance } = require ('./base/errors'); const { SIGNIFICANT_DIGITS, DECIMAL_PLACES, TRUNCATE, ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -306,7 +307,7 @@ module.exports = class bitvavo extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minOrderInBaseAsset'), + 'min': this.safeNumber (market, 'minOrderInBaseAsset'), 'max': undefined, }, 'price': { @@ -314,7 +315,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderInQuoteAsset'), + 'min': this.safeNumber (market, 'minOrderInQuoteAsset'), 'max': undefined, }, }, @@ -377,7 +378,7 @@ module.exports = class bitvavo extends Exchange { 'code': code, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -393,7 +394,7 @@ module.exports = class bitvavo extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMinAmount'), + 'min': this.safeNumber (currency, 'withdrawalMinAmount'), 'max': undefined, }, }, @@ -450,14 +451,14 @@ module.exports = class bitvavo extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.safeInteger (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); + const last = this.safeNumber (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); const vwap = this.vwap (baseVolume, quoteVolume); let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'open'); + const open = this.safeNumber (ticker, 'open'); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -469,12 +470,12 @@ module.exports = class bitvavo extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': vwap, 'open': open, 'close': last, @@ -490,14 +491,6 @@ module.exports = class bitvavo extends Exchange { return result; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24h (params); @@ -611,12 +604,11 @@ module.exports = class bitvavo extends Exchange { // feeCurrency: 'EUR' // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'side'); const id = this.safeString2 (trade, 'id', 'fillId'); @@ -627,7 +619,7 @@ module.exports = class bitvavo extends Exchange { if (taker !== undefined) { takerOrMaker = taker ? 'taker' : 'maker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); @@ -698,11 +690,11 @@ module.exports = class bitvavo extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -750,13 +742,12 @@ module.exports = class bitvavo extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'inOrder'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'inOrder'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchDepositAddress (code, params = {}) { @@ -806,7 +797,7 @@ module.exports = class bitvavo extends Exchange { if (price !== undefined) { cost = amount * price; } else { - cost = this.safeFloat2 (params, 'cost', 'amountQuote'); + cost = this.safeNumber2 (params, 'cost', 'amountQuote'); } if (cost !== undefined) { const precision = market['precision']['price']; @@ -819,7 +810,7 @@ module.exports = class bitvavo extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['amount'] = this.amountToPrecision (symbol, amount); } else if (isStopMarket || isStopLimit) { - let stopPrice = this.safeFloat2 (params, 'stopPrice', 'triggerAmount'); + let stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerAmount'); if (stopPrice === undefined) { if (isStopLimit) { throw new ArgumentsRequired (this.id + ' createOrder requires a stopPrice parameter for a ' + type + ' order'); @@ -881,7 +872,7 @@ module.exports = class bitvavo extends Exchange { await this.loadMarkets (); const market = this.market (symbol); let request = {}; - const amountRemaining = this.safeFloat (params, 'amountRemaining'); + const amountRemaining = this.safeNumber (params, 'amountRemaining'); params = this.omit (params, 'amountRemaining'); if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); @@ -946,7 +937,6 @@ module.exports = class bitvavo extends Exchange { throw new ArgumentsRequired (this.id + ' fetchOrder() requires a symbol argument'); } await this.loadMarkets (); - await this.loadMarkets (); const market = this.market (symbol); const request = { 'orderId': id, @@ -1172,26 +1162,13 @@ module.exports = class bitvavo extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let remaining = this.safeFloat (order, 'amountRemaining'); - let filled = this.safeFloat (order, 'filledAmount'); - const remainingCost = this.safeFloat (order, 'remainingCost'); - if ((remainingCost !== undefined) && (remainingCost === 0.0)) { - remaining = 0; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - const cost = this.safeFloat (order, 'filledAmountQuote'); - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amountRemaining'); + const filled = this.safeNumber (order, 'filledAmount'); + const cost = this.safeNumber (order, 'filledAmountQuote'); let fee = undefined; - const feeCost = this.safeFloat (order, 'feePaid'); + const feeCost = this.safeNumber (order, 'feePaid'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1200,32 +1177,24 @@ module.exports = class bitvavo extends Exchange { 'currency': feeCurrencyCode, }; } - let lastTradeTimestamp = undefined; - const rawTrades = this.safeValue (order, 'fills'); - let trades = undefined; - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'symbol': symbol, - 'order': id, - 'side': side, - }); - const numTrades = trades.length; - if (numTrades > 0) { - const lastTrade = this.safeValue (trades, numTrades - 1); - lastTradeTimestamp = lastTrade['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'fills', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'symbol': symbol, + 'order': id, + 'side': side, + 'type': type, + }); const timeInForce = this.safeString (order, 'timeInForce'); const postOnly = this.safeValue (order, 'postOnly'); // https://github.com/ccxt/ccxt/issues/8489 - const stopPrice = this.safeFloat (order, 'triggerPrice'); - return { + const stopPrice = this.safeNumber (order, 'triggerPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': timeInForce, @@ -1235,13 +1204,13 @@ module.exports = class bitvavo extends Exchange { 'stopPrice': stopPrice, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1436,11 +1405,11 @@ module.exports = class bitvavo extends Exchange { const currencyId = this.safeString (transaction, 'symbol'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitz.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitz.js index 816bb15a4..d78900841 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitz.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bitz.js @@ -59,7 +59,7 @@ module.exports = class bitz extends Exchange { 'assets': 'https://{hostname}', }, 'www': 'https://www.bitz.com', - 'doc': 'https://apidoc.bitz.com/en/', + 'doc': 'https://apidocv2.bitz.plus/en/', 'fees': 'https://www.bitz.com/fee?type=1', 'referral': 'https://u.bitz.com/register?invite_code=1429193', }, @@ -76,6 +76,11 @@ module.exports = class bitz extends Exchange { 'currencyRate', 'currencyCoinRate', 'coinRate', + 'getContractCoin', + 'getContractKline', + 'getContractOrderBook', + 'getContractTradesHistory', + 'getContractTickers', ], }, 'trade': { @@ -88,6 +93,10 @@ module.exports = class bitz extends Exchange { 'getUserNowEntrustSheet', // open orders 'getEntrustSheetInfo', // order 'depositOrWithdraw', // transactions + 'getCoinAddress', + 'getCoinAddressList', + 'marketTrade', + 'addEntrustSheetBatch', ], }, 'assets': { @@ -95,6 +104,20 @@ module.exports = class bitz extends Exchange { 'getUserAssets', ], }, + 'contract': { + 'post': [ + 'addContractTrade', + 'cancelContractTrade', + 'getContractActivePositions', + 'getContractAccountInfo', + 'getContractMyPositions', + 'getContractOrderResult', + 'getContractTradeResult', + 'getContractOrder', + 'getContractMyHistoryTrade', + 'getContractMyTrades', + ], + }, }, 'fees': { 'trading': { @@ -281,8 +304,8 @@ module.exports = class bitz extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTrade'), - 'max': this.safeFloat (market, 'maxTrade'), + 'min': this.safeNumber (market, 'minTrade'), + 'max': this.safeNumber (market, 'maxTrade'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -331,12 +354,12 @@ module.exports = class bitz extends Exchange { const currencyId = this.safeString (balance, 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'lock'); - account['total'] = this.safeFloat (balance, 'num'); - account['free'] = this.safeFloat (balance, 'over'); + account['used'] = this.safeString (balance, 'lock'); + account['total'] = this.safeString (balance, 'num'); + account['free'] = this.safeString (balance, 'over'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTicker (ticker, market = undefined) { @@ -366,8 +389,8 @@ module.exports = class bitz extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'now'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'now'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -378,22 +401,22 @@ module.exports = class bitz extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': undefined, 'open': open, 'close': last, 'last': last, 'previousClose': undefined, 'change': change, - 'percentage': this.safeFloat (ticker, 'priceChange24h'), + 'percentage': this.safeNumber (ticker, 'priceChange24h'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -583,8 +606,8 @@ module.exports = class bitz extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const price = this.safeFloat (trade, 'p'); - const amount = this.safeFloat (trade, 'n'); + const price = this.safeNumber (trade, 'p'); + const amount = this.safeNumber (trade, 'n'); let cost = undefined; if (price !== undefined) { if (amount !== undefined) { @@ -652,11 +675,11 @@ module.exports = class bitz extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -754,22 +777,17 @@ module.exports = class bitz extends Exchange { if (side !== undefined) { side = (side === 'sale') ? 'sell' : 'buy'; } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'number'); - const remaining = this.safeFloat (order, 'numberOver'); - const filled = this.safeFloat (order, 'numberDeal'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'number'); + const remaining = this.safeNumber (order, 'numberOver'); + const filled = this.safeNumber (order, 'numberDeal'); let timestamp = this.safeInteger (order, 'timestamp'); if (timestamp === undefined) { timestamp = this.safeTimestamp (order, 'created'); } - let cost = this.safeFloat (order, 'orderTotalPrice'); - if (price !== undefined) { - if (filled !== undefined) { - cost = filled * price; - } - } + const cost = this.safeNumber (order, 'orderTotalPrice'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -791,7 +809,7 @@ module.exports = class bitz extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1118,7 +1136,7 @@ module.exports = class bitz extends Exchange { const type = this.safeStringLower (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'network_fee'); + const feeCost = this.safeNumber (transaction, 'network_fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1133,7 +1151,7 @@ module.exports = class bitz extends Exchange { 'address': this.safeString (transaction, 'wallet'), 'tag': this.safeString (transaction, 'memo'), 'type': type, - 'amount': this.safeFloat (transaction, 'number'), + 'amount': this.safeNumber (transaction, 'number'), 'currency': code, 'status': status, 'updated': timestamp, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bl3p.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bl3p.js index bb84442ec..832b5dc6f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bl3p.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bl3p.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -81,17 +82,19 @@ module.exports = class bl3p extends Exchange { const available = this.safeValue (wallet, 'available', {}); const balance = this.safeValue (wallet, 'balance', {}); const account = this.account (); - account['free'] = this.safeFloat (available, 'value'); - account['total'] = this.safeFloat (balance, 'value'); + account['free'] = this.safeString (available, 'value'); + account['total'] = this.safeString (balance, 'value'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { + const price = this.safeNumber (bidask, priceKey); + const size = this.safeNumber (bidask, amountKey); return [ - bidask[priceKey] / 100000.0, - bidask[amountKey] / 100000000.0, + price / 100000.0, + size / 100000000.0, ]; } @@ -111,16 +114,16 @@ module.exports = class bl3p extends Exchange { }; const ticker = await this.publicGetMarketTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -130,7 +133,7 @@ module.exports = class bl3p extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker['volume'], '24h'), + 'baseVolume': this.safeNumber (ticker['volume'], '24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -139,20 +142,13 @@ module.exports = class bl3p extends Exchange { parseTrade (trade, market = undefined) { const id = this.safeString (trade, 'trade_id'); const timestamp = this.safeInteger (trade, 'date'); - let price = this.safeFloat (trade, 'price_int'); - if (price !== undefined) { - price /= 100000.0; - } - let amount = this.safeFloat (trade, 'amount_int'); - if (amount !== undefined) { - amount /= 100000000.0; - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + let priceString = this.safeString (trade, 'price_int'); + priceString = Precise.stringDiv (priceString, '100000'); + let amountString = this.safeString (trade, 'amount_int'); + amountString = Precise.stringDiv (amountString, '100000000'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bleutrade.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bleutrade.js index 67262da33..01e7d30ce 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bleutrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bleutrade.js @@ -163,8 +163,8 @@ module.exports = class bleutrade extends Exchange { 'code': code, 'name': this.safeString (item, 'AssetLong'), 'active': this.safeValue (item, 'IsActive') && !this.safeValue (item, 'MaintenanceMode'), - 'fee': this.safeFloat (item, 'WithdrawTxFee'), - 'precision': this.safeFloat (item, 'DecimalPlaces'), + 'fee': this.safeNumber (item, 'WithdrawTxFee'), + 'precision': this.safeNumber (item, 'DecimalPlaces'), 'info': item, 'limits': this.limits, }; @@ -216,7 +216,7 @@ module.exports = class bleutrade extends Exchange { 'taker': this.fees['trading']['taker'], 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinTradeSize'), + 'min': this.safeNumber (market, 'MinTradeSize'), 'max': undefined, }, 'price': { @@ -292,8 +292,8 @@ module.exports = class bleutrade extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'TimeStamp')); const marketId = this.safeString (ticker, 'MarketName'); const symbol = this.safeSymbol (marketId, market, '_'); - const previous = this.safeFloat (ticker, 'PrevDay'); - const last = this.safeFloat (ticker, 'Last'); + const previous = this.safeNumber (ticker, 'PrevDay'); + const last = this.safeNumber (ticker, 'Last'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -308,11 +308,11 @@ module.exports = class bleutrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'High'), - 'low': this.safeFloat (ticker, 'Low'), - 'bid': this.safeFloat (ticker, 'Bid'), + 'high': this.safeNumber (ticker, 'High'), + 'low': this.safeNumber (ticker, 'Low'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': previous, @@ -322,8 +322,8 @@ module.exports = class bleutrade extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume'), - 'quoteVolume': this.safeFloat (ticker, 'BaseVolume'), + 'baseVolume': this.safeNumber (ticker, 'Volume'), + 'quoteVolume': this.safeNumber (ticker, 'BaseVolume'), 'info': ticker, }; } @@ -331,11 +331,11 @@ module.exports = class bleutrade extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (ohlcv['TimeStamp'] + '+00:00'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } @@ -411,11 +411,11 @@ module.exports = class bleutrade extends Exchange { const currencyId = this.safeString (item, 'Asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (item, 'Available'); - account['total'] = this.safeFloat (item, 'Balance'); + account['free'] = this.safeString (item, 'Available'); + account['total'] = this.safeString (item, 'Balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -558,7 +558,7 @@ module.exports = class bleutrade extends Exchange { // } const timestamp = this.parse8601 (this.safeString (item, 'TimeStamp')); - let amount = this.safeFloat (item, 'Amount'); + let amount = this.safeNumber (item, 'Amount'); let direction = undefined; if (amount !== undefined) { direction = 'in'; @@ -632,27 +632,12 @@ module.exports = class bleutrade extends Exchange { if ('Created' in order) { timestamp = this.parse8601 (order['Created'] + '+00:00'); } - let price = this.safeFloat (order, 'Price'); - let cost = undefined; - const amount = this.safeFloat (order, 'Quantity'); - const remaining = this.safeFloat (order, 'QuantityRemaining'); - let filled = undefined; - if (amount !== undefined && remaining !== undefined) { - filled = amount - remaining; - } - if (!cost) { - if (price && filled) { - cost = price * filled; - } - } - if (!price) { - if (cost && filled) { - price = cost / filled; - } - } - const average = this.safeFloat (order, 'PricePerUnit'); + const price = this.safeNumber (order, 'Price'); + const amount = this.safeNumber (order, 'Quantity'); + const remaining = this.safeNumber (order, 'QuantityRemaining'); + const average = this.safeNumber (order, 'PricePerUnit'); const id = this.safeString (order, 'OrderID'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -666,15 +651,15 @@ module.exports = class bleutrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -711,7 +696,7 @@ module.exports = class bleutrade extends Exchange { // Symbol: 'BTC' } // const id = this.safeString (transaction, 'ID'); - let amount = this.safeFloat (transaction, 'Amount'); + let amount = this.safeNumber (transaction, 'Amount'); let type = 'deposit'; if (amount < 0) { amount = Math.abs (amount); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/braziliex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/braziliex.js index 0c54e4840..31a519468 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/braziliex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/braziliex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -184,11 +185,11 @@ module.exports = class braziliex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': this.safeFloat (currency, 'txWithdrawalFee'), + 'fee': this.safeNumber (currency, 'txWithdrawalFee'), }, 'deposit': { 'active': canDeposit, - 'fee': this.safeFloat (currency, 'txDepositFee'), + 'fee': this.safeNumber (currency, 'txDepositFee'), }, }, 'limits': { @@ -205,11 +206,11 @@ module.exports = class braziliex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'MinWithdrawal'), + 'min': this.safeNumber (currency, 'MinWithdrawal'), 'max': Math.pow (10, precision), }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, }, @@ -257,9 +258,9 @@ module.exports = class braziliex extends Exchange { const quoteIsFiat = this.safeInteger (quoteCurrency, 'is_fiat', 0); let minCost = undefined; if (quoteIsFiat) { - minCost = this.safeFloat (baseCurrency, 'minAmountTradeFIAT'); + minCost = this.safeNumber (baseCurrency, 'minAmountTradeFIAT'); } else { - minCost = this.safeFloat (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); + minCost = this.safeNumber (baseCurrency, 'minAmountTrade' + uppercaseQuoteId); } const isActive = this.safeInteger (market, 'active'); const active = (isActive === 1); @@ -302,27 +303,27 @@ module.exports = class braziliex extends Exchange { symbol = market['symbol']; } const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highestBid24'), - 'low': this.safeFloat (ticker, 'lowestAsk24'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'highestBid24'), + 'low': this.safeNumber (ticker, 'lowestAsk24'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'percentChange'), + 'change': this.safeNumber (ticker, 'percentChange'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume24'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume24'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24'), 'info': ticker, }; } @@ -362,13 +363,18 @@ module.exports = class braziliex extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString2 (trade, 'date_exec', 'date')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } - const cost = this.safeFloat (trade, 'total'); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_number'); const type = 'limit'; const side = this.safeString (trade, 'type'); @@ -410,11 +416,11 @@ module.exports = class braziliex extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -436,21 +442,16 @@ module.exports = class braziliex extends Exchange { if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'date')); } - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'total', 0.0); - const amount = this.safeFloat (order, 'amount'); - const filledPercentage = this.safeFloat (order, 'progress'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'total'); + const amount = this.safeNumber (order, 'amount'); + const filledPercentage = this.safeNumber (order, 'progress'); const filled = amount * filledPercentage; - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); - let info = order; - if ('info' in info) { - info = order['info']; - } const id = this.safeString (order, 'order_number'); const fee = this.safeValue (order, 'fee'); // propagated from createOrder const status = (filledPercentage === 1.0) ? 'closed' : 'open'; const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -467,12 +468,12 @@ module.exports = class braziliex extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, - 'info': info, + 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -524,7 +525,7 @@ module.exports = class braziliex extends Exchange { 'price': this.safeString (priceParts, 1), 'total': this.safeString (totalParts, 1), 'fee': { - 'cost': this.safeFloat (feeParts, 1), + 'cost': this.safeNumber (feeParts, 1), 'currency': this.safeString (feeParts, 2), }, 'progress': '0.0', diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcalpha.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcalpha.js index 820234604..f7a890dfb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcalpha.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcalpha.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, DDoSProtection, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -145,8 +146,8 @@ module.exports = class btcalpha extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_order_size'), - 'max': this.safeFloat (market, 'maximum_order_size'), + 'min': this.safeNumber (market, 'minimum_order_size'), + 'max': this.safeNumber (market, 'maximum_order_size'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -198,14 +199,11 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'id', 'tid'); const side = this.safeString2 (trade, 'my_side', 'side'); const orderId = this.safeString (trade, 'o_id'); @@ -254,11 +252,11 @@ module.exports = class btcalpha extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -295,11 +293,11 @@ module.exports = class btcalpha extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'reserve'); - account['total'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserve'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -320,8 +318,8 @@ module.exports = class btcalpha extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (order, 'date'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString2 (order, 'oid', 'id'); let trades = this.safeValue (order, 'trades', []); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcbox.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcbox.js index 1a5f82456..48a455625 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcbox.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcbox.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, InvalidOrder, AuthenticationError, PermissionDenied, InvalidNonce, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -88,12 +89,12 @@ module.exports = class btcbox extends Exchange { if (free in response) { const account = this.account (); const used = currencyId + '_lock'; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -114,16 +115,16 @@ module.exports = class btcbox extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -133,8 +134,8 @@ module.exports = class btcbox extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -158,14 +159,11 @@ module.exports = class btcbox extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeString (trade, 'type'); return { @@ -265,15 +263,15 @@ module.exports = class btcbox extends Exchange { if (datetimeString !== undefined) { timestamp = this.parse8601 (order['datetime'] + '+09:00'); // Tokyo time } - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let cost = undefined; if (price !== undefined) { if (filled !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcmarkets.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcmarkets.js index 2340d1960..44cdd0f78 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcmarkets.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcmarkets.js @@ -246,11 +246,11 @@ module.exports = class btcmarkets extends Exchange { const tagTo = tag; const addressFrom = undefined; const tagFrom = undefined; - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const currencyId = this.safeString (transaction, 'assetName'); const code = this.safeCurrencyCode (currencyId); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (fee) { amount -= fee; } @@ -303,10 +303,10 @@ module.exports = class btcmarkets extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const fees = this.safeValue (this.safeValue (this.options, 'fees', {}), quote, this.fees); - const pricePrecision = this.safeFloat (market, 'priceDecimals'); - const amountPrecision = this.safeFloat (market, 'amountDecimals'); - const minAmount = this.safeFloat (market, 'minOrderAmount'); - const maxAmount = this.safeFloat (market, 'maxOrderAmount'); + const pricePrecision = this.safeNumber (market, 'priceDecimals'); + const amountPrecision = this.safeNumber (market, 'amountDecimals'); + const minAmount = this.safeNumber (market, 'minOrderAmount'); + const maxAmount = this.safeNumber (market, 'maxOrderAmount'); let minPrice = undefined; if (quote === 'AUD') { minPrice = Math.pow (10, -pricePrecision); @@ -365,14 +365,12 @@ module.exports = class btcmarkets extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetName'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance, 'balance'); - const used = this.safeFloat (balance, 'locked'); const account = this.account (); - account['used'] = used; - account['total'] = total; + account['used'] = this.safeString (balance, 'locked'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -388,11 +386,11 @@ module.exports = class btcmarkets extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 0)), - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 2), // high - this.safeFloat (ohlcv, 3), // low - this.safeFloat (ohlcv, 4), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 2), // high + this.safeNumber (ohlcv, 3), // low + this.safeNumber (ohlcv, 4), // close + this.safeNumber (ohlcv, 5), // volume ]; } @@ -488,21 +486,21 @@ module.exports = class btcmarkets extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'lastPrice'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); - const quoteVolume = this.safeFloat (ticker, 'volumeQte24h'); + const last = this.safeNumber (ticker, 'lastPrice'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); + const quoteVolume = this.safeNumber (ticker, 'volumeQte24h'); const vwap = this.vwap (baseVolume, quoteVolume); - const change = this.safeFloat (ticker, 'price24h'); - const percentage = this.safeFloat (ticker, 'pricePct24h'); + const change = this.safeNumber (ticker, 'price24h'); + const percentage = this.safeNumber (ticker, 'pricePct24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bestBid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'bestAsk'), + 'ask': this.safeNumber (ticker, 'bestAsk'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -613,8 +611,8 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -623,7 +621,7 @@ module.exports = class btcmarkets extends Exchange { } const orderId = this.safeString (trade, 'orderId'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -714,7 +712,7 @@ module.exports = class btcmarkets extends Exchange { } } if (triggerPriceIsRequired) { - const triggerPrice = this.safeFloat (params, 'triggerPrice'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); params = this.omit (params, 'triggerPrice'); if (triggerPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a triggerPrice parameter for a ' + type + 'order'); @@ -847,9 +845,9 @@ module.exports = class btcmarkets extends Exchange { side = 'sell'; } const type = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'openAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'openAmount'); let filled = undefined; if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); @@ -864,7 +862,7 @@ module.exports = class btcmarkets extends Exchange { const id = this.safeString (order, 'orderId'); const clientOrderId = this.safeString (order, 'clientOrderId'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btctradeua.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btctradeua.js index 011bc33b6..32527f881 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btctradeua.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btctradeua.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -106,10 +107,10 @@ module.exports = class btctradeua extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -249,14 +250,11 @@ module.exports = class btctradeua extends Exchange { const id = this.safeString (trade, 'id'); const type = 'limit'; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amnt_trade'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amnt_trade'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -337,11 +335,11 @@ module.exports = class btctradeua extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeString (order, 'type'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'amount': this.safeFloat (order, 'amnt_trade'), + 'amount': this.safeNumber (order, 'amnt_trade'), 'filled': 0, - 'remaining': this.safeFloat (order, 'amnt_trade'), + 'remaining': this.safeNumber (order, 'amnt_trade'), 'trades': undefined, 'info': order, 'cost': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcturk.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcturk.js index 32ea74550..2ef97bc99 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcturk.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/btcturk.js @@ -125,13 +125,13 @@ module.exports = class btcturk extends Exchange { const used = currency['id'] + '_reserved'; if (free in response) { const account = this.account (); - account['free'] = this.safeFloat (response, free); - account['total'] = this.safeFloat (response, total); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['total'] = this.safeString (response, total); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -151,26 +151,26 @@ module.exports = class btcturk extends Exchange { symbol = market['symbol']; } const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'average'), - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'average': this.safeNumber (ticker, 'average'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -204,8 +204,8 @@ module.exports = class btcturk extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -247,11 +247,11 @@ module.exports = class btcturk extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.parse8601 (this.safeString (ohlcv, 'Time')), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/buda.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/buda.js index e78c228ea..ac71ec42b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/buda.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/buda.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { AddressPending, AuthenticationError, ExchangeError, NotSupported, PermissionDenied, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -220,7 +221,7 @@ module.exports = class buda extends Exchange { } const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); - const precision = this.safeFloat (currency, 'input_decimals'); + const precision = this.safeNumber (currency, 'input_decimals'); const minimum = Math.pow (10, -precision); result[code] = { 'id': id, @@ -381,24 +382,25 @@ module.exports = class buda extends Exchange { let timestamp = undefined; let side = undefined; const type = undefined; - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; const order = undefined; const fee = undefined; let symbol = undefined; - let cost = undefined; if (market) { symbol = market['symbol']; } if (Array.isArray (trade)) { - timestamp = parseInt (trade[0]); - price = parseFloat (trade[1]); - amount = parseFloat (trade[2]); - cost = price * amount; - side = trade[3]; - id = trade[4].toString (); + timestamp = this.safeInteger (trade, 0); + priceString = this.safeString (trade, 1); + amountString = this.safeString (trade, 2); + side = this.safeString (trade, 3); + id = this.safeString (trade, 4); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': order, @@ -453,11 +455,11 @@ module.exports = class buda extends Exchange { const currencyId = this.safeString (balance, 'id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = parseFloat (balance['available_amount'][0]); - account['total'] = parseFloat (balance['amount'][0]); + account['free'] = this.safeString (balance['available_amount'], 0); + account['total'] = this.safeString (balance['amount'], 0); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -565,15 +567,15 @@ module.exports = class buda extends Exchange { const side = this.safeStringLower (order, 'type'); const status = this.parseOrderStatus (this.safeString (order, 'state')); const originalAmount = this.safeValue (order, 'original_amount', []); - const amount = this.safeFloat (originalAmount, 0); + const amount = this.safeNumber (originalAmount, 0); const remainingAmount = this.safeValue (order, 'amount', []); - const remaining = this.safeFloat (remainingAmount, 0); + const remaining = this.safeNumber (remainingAmount, 0); const tradedAmount = this.safeValue (order, 'traded_amount', []); - const filled = this.safeFloat (tradedAmount, 0); + const filled = this.safeNumber (tradedAmount, 0); const totalExchanged = this.safeValue (order, 'totalExchanged', []); - const cost = this.safeFloat (totalExchanged, 0); + const cost = this.safeNumber (totalExchanged, 0); const limitPrice = this.safeValue (order, 'limit', []); - let price = this.safeFloat (limitPrice, 0); + let price = this.safeNumber (limitPrice, 0); if (price === undefined) { if (limitPrice !== undefined) { price = limitPrice; @@ -584,7 +586,7 @@ module.exports = class buda extends Exchange { average = this.priceToPrecision (symbol, cost / filled); } const paidFee = this.safeValue (order, 'paid_fee', []); - const feeCost = this.safeFloat (paidFee, 0); + const feeCost = this.safeNumber (paidFee, 0); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (paidFee, 1); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bw.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bw.js index 388946b39..4fb3b4192 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bw.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bw.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { RateLimitExceeded, BadSymbol, OrderNotFound, ExchangeError, AuthenticationError, ArgumentsRequired, ExchangeNotAvailable } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -185,7 +186,7 @@ module.exports = class bw extends Exchange { const symbol = base + '/' + quote; const state = this.safeInteger (market, 'state'); const active = (state === 1); - const fee = this.safeFloat (market, 'defaultFee'); + const fee = this.safeNumber (market, 'defaultFee'); result.push ({ 'id': id, 'active': active, @@ -206,7 +207,7 @@ module.exports = class bw extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -292,11 +293,11 @@ module.exports = class bw extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'drawFee'), + 'fee': this.safeNumber (currency, 'drawFee'), 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'limitAmount', 0), + 'min': this.safeNumber (currency, 'limitAmount', 0), 'max': undefined, }, 'price': { @@ -309,7 +310,7 @@ module.exports = class bw extends Exchange { }, 'withdraw': { 'min': undefined, - 'max': this.safeFloat (currency, 'onceDrawLimit'), + 'max': this.safeNumber (currency, 'onceDrawLimit'), }, }, }; @@ -346,9 +347,9 @@ module.exports = class bw extends Exchange { 'high': parseFloat (this.safeValue (ticker, 2)), 'low': parseFloat (this.safeValue (ticker, 3)), 'bid': parseFloat (this.safeValue (ticker, 7)), - 'bidVolume': this.safeFloat (bid, 'quantity'), + 'bidVolume': this.safeNumber (bid, 'quantity'), 'ask': parseFloat (this.safeValue (ticker, 8)), - 'askVolume': this.safeFloat (ask, 'quantity'), + 'askVolume': this.safeNumber (ask, 'quantity'), 'vwap': undefined, 'open': undefined, 'close': close, @@ -477,8 +478,11 @@ module.exports = class bw extends Exchange { // ... // const timestamp = this.safeTimestamp (trade, 2); - const price = this.safeFloat (trade, 5); - const amount = this.safeFloat (trade, 6); + const priceString = this.safeString (trade, 5); + const amountString = this.safeString (trade, 6); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 1); let symbol = undefined; if (marketId !== undefined) { @@ -495,12 +499,6 @@ module.exports = class bw extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const sideString = this.safeString (trade, 4); const side = (sideString === 'ask') ? 'sell' : 'buy'; return { @@ -514,7 +512,7 @@ module.exports = class bw extends Exchange { 'takerOrMaker': undefined, 'price': price, 'amount': amount, - 'cost': parseFloat (cost), + 'cost': cost, 'fee': undefined, 'info': trade, }; @@ -571,11 +569,11 @@ module.exports = class bw extends Exchange { // return [ this.safeTimestamp (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), - this.safeFloat (ohlcv, 6), - this.safeFloat (ohlcv, 7), - this.safeFloat (ohlcv, 8), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + this.safeNumber (ohlcv, 6), + this.safeNumber (ohlcv, 7), + this.safeNumber (ohlcv, 8), ]; } @@ -633,11 +631,11 @@ module.exports = class bw extends Exchange { const currencyId = this.safeString (balance, 'currencyTypeId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'amount'); - account['used'] = this.safeFloat (balance, 'freeze'); + account['free'] = this.safeString (balance, 'amount'); + account['used'] = this.safeString (balance, 'freeze'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -733,25 +731,13 @@ module.exports = class bw extends Exchange { } else if (side === '1') { side = 'buy'; } - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'completeAmount'); - let remaining = this.safeFloat2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available - let cost = this.safeFloat (order, 'totalMoney'); - if (filled !== undefined) { - if (amount !== undefined) { - if (remaining === undefined) { - remaining = amount - filled; - } - } - if (cost === undefined) { - if (price !== undefined) { - cost = filled * cost; - } - } - } + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'completeAmount'); + const remaining = this.safeNumber2 (order, 'availabelAmount', 'availableAmount'); // typo in the docs or in the API, availabel vs available + const cost = this.safeNumber (order, 'totalMoney'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'entrustId'), 'clientOrderId': undefined, @@ -773,7 +759,7 @@ module.exports = class bw extends Exchange { 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1069,12 +1055,12 @@ module.exports = class bw extends Exchange { code = currency['code']; } const type = ('depositId' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat2 (transaction, 'actuallyAmount', 'amount'); + const amount = this.safeNumber2 (transaction, 'actuallyAmount', 'amount'); const status = this.parseTransactionStatus (this.safeString2 (transaction, 'verifyStatus', 'state')); const timestamp = this.safeInteger (transaction, 'createTime'); const txid = this.safeString (transaction, 'txId'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bybit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bybit.js index f74d0db18..7f818c6e3 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bybit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bybit.js @@ -42,6 +42,7 @@ module.exports = class bybit extends Exchange { 'fetchTrades': true, 'fetchTransactions': false, 'fetchWithdrawals': true, + 'fetchPositions': true, }, 'timeframes': { '1m': '1', @@ -73,6 +74,34 @@ module.exports = class bybit extends Exchange { 'referral': 'https://www.bybit.com/app/register?ref=X7Prm', }, 'api': { + 'futures': { + 'private': { + 'get': [ + 'position/list', + 'order/list', + 'order', + 'stop-order/list', + 'stop-order', + 'execution/list', + 'trade/closed-pnl/list', + ], + 'post': [ + 'order/create', + 'order/cancel', + 'order/cancelAll', + 'order/replace', + 'stop-order/create', + 'stop-order/cancel', + 'stop-order/cancelAll', + 'stop-order/replace', + 'position/change-position-margin', + 'position/trading-stop', + 'position/leverage/save', + 'position/switch-mode', + 'position/switch-isolated', + ], + }, + }, 'v2': { 'public': { 'get': [ @@ -286,7 +315,11 @@ module.exports = class bybit extends Exchange { 'LTC/USDT': 'linear', 'XTZ/USDT': 'linear', 'LINK/USDT': 'linear', + 'ADA/USDT': 'linear', + 'DOT/USDT': 'linear', + 'UNI/USDT': 'linear', }, + 'defaultType': 'linear', // may also be inverse or inverseFuture 'code': 'BTC', 'cancelAllOrders': { // 'method': 'v2PrivatePostOrderCancelAll', // v2PrivatePostStopOrderCancelAll @@ -401,8 +434,8 @@ module.exports = class bybit extends Exchange { const lotSizeFilter = this.safeValue (market, 'lot_size_filter', {}); const priceFilter = this.safeValue (market, 'price_filter', {}); const precision = { - 'amount': this.safeFloat (lotSizeFilter, 'qty_step'), - 'price': this.safeFloat (priceFilter, 'tick_size'), + 'amount': this.safeNumber (lotSizeFilter, 'qty_step'), + 'price': this.safeNumber (priceFilter, 'tick_size'), }; const status = this.safeString (market, 'status'); let active = undefined; @@ -416,8 +449,8 @@ module.exports = class bybit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'type': 'future', 'spot': false, 'future': true, @@ -426,12 +459,12 @@ module.exports = class bybit extends Exchange { 'inverse': inverse, 'limits': { 'amount': { - 'min': this.safeFloat (lotSizeFilter, 'min_trading_qty'), - 'max': this.safeFloat (lotSizeFilter, 'max_trading_qty'), + 'min': this.safeNumber (lotSizeFilter, 'min_trading_qty'), + 'max': this.safeNumber (lotSizeFilter, 'max_trading_qty'), }, 'price': { - 'min': this.safeFloat (priceFilter, 'min_price'), - 'max': this.safeFloat (priceFilter, 'max_price'), + 'min': this.safeNumber (priceFilter, 'min_price'), + 'max': this.safeNumber (priceFilter, 'max_price'), }, 'cost': { 'min': undefined, @@ -477,9 +510,9 @@ module.exports = class bybit extends Exchange { const timestamp = undefined; const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const open = this.safeFloat (ticker, 'prev_price_24h'); - let percentage = this.safeFloat (ticker, 'price_24h_pcnt'); + const last = this.safeNumber (ticker, 'last_price'); + const open = this.safeNumber (ticker, 'prev_price_24h'); + let percentage = this.safeNumber (ticker, 'price_24h_pcnt'); if (percentage !== undefined) { percentage *= 100; } @@ -489,18 +522,18 @@ module.exports = class bybit extends Exchange { change = last - open; average = this.sum (open, last) / 2; } - const baseVolume = this.safeFloat (ticker, 'turnover_24h'); - const quoteVolume = this.safeFloat (ticker, 'volume_24h'); + const baseVolume = this.safeNumber (ticker, 'turnover_24h'); + const quoteVolume = this.safeNumber (ticker, 'volume_24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price_24h'), - 'low': this.safeFloat (ticker, 'low_price_24h'), - 'bid': this.safeFloat (ticker, 'bid_price'), + 'high': this.safeNumber (ticker, 'high_price_24h'), + 'low': this.safeNumber (ticker, 'low_price_24h'), + 'bid': this.safeNumber (ticker, 'bid_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask_price'), + 'ask': this.safeNumber (ticker, 'ask_price'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -649,11 +682,11 @@ module.exports = class bybit extends Exchange { // return [ this.safeTimestamp2 (ohlcv, 'open_time', 'start_at'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat2 (ohlcv, 'turnover', 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber2 (ohlcv, 'turnover', 'volume'), ]; } @@ -779,9 +812,9 @@ module.exports = class bybit extends Exchange { const marketId = this.safeString (trade, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat2 (trade, 'qty', 'exec_qty'); - let cost = this.safeFloat (trade, 'exec_value'); - const price = this.safeFloat2 (trade, 'exec_price', 'price'); + const amount = this.safeNumber2 (trade, 'qty', 'exec_qty'); + let cost = this.safeNumber (trade, 'exec_value'); + const price = this.safeNumber2 (trade, 'exec_price', 'price'); if (cost === undefined) { if (amount !== undefined) { if (price !== undefined) { @@ -796,14 +829,14 @@ module.exports = class bybit extends Exchange { const side = this.safeStringLower (trade, 'side'); const lastLiquidityInd = this.safeString (trade, 'last_liquidity_ind'); const takerOrMaker = (lastLiquidityInd === 'AddedLiquidity') ? 'maker' : 'taker'; - const feeCost = this.safeFloat (trade, 'exec_fee'); + const feeCost = this.safeNumber (trade, 'exec_fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyCode = market['inverse'] ? market['base'] : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'fee_rate'), + 'rate': this.safeNumber (trade, 'fee_rate'), }; } return { @@ -963,12 +996,12 @@ module.exports = class bybit extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['used'] = this.safeFloat (balance, 'used_margin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'used_margin'); + account['total'] = this.safeString (balance, 'equity'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -1095,56 +1128,42 @@ module.exports = class bybit extends Exchange { // const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); - let symbol = undefined; - let base = undefined; + const symbol = market['symbol']; + let feeCurrency = undefined; const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const id = this.safeString2 (order, 'order_id', 'stop_order_id'); const type = this.safeStringLower (order, 'order_type'); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - let average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'qty'); - let cost = this.safeFloat (order, 'cum_exec_value'); - let filled = this.safeFloat (order, 'cum_exec_qty'); - let remaining = this.safeFloat (order, 'leaves_qty'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'qty'); + const cost = this.safeNumber (order, 'cum_exec_value'); + const filled = this.safeNumber (order, 'cum_exec_qty'); + const remaining = this.safeNumber (order, 'leaves_qty'); + const marketTypes = this.safeValue (this.options, 'marketTypes', {}); + const marketType = this.safeString (marketTypes, symbol); if (market !== undefined) { - symbol = market['symbol']; - base = market['base']; + if (marketType === 'linear') { + feeCurrency = market['quote']; + } else { + feeCurrency = market['base']; + } } let lastTradeTimestamp = this.safeTimestamp (order, 'last_exec_time'); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = amount - remaining; - } - if (filled !== undefined) { - if ((remaining === undefined) && (amount !== undefined)) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if ((type === 'market') && (cost !== undefined) && (cost > 0)) { - price = undefined; - if (average === undefined) { - average = filled / cost; - } - } - } const status = this.parseOrderStatus (this.safeString2 (order, 'order_status', 'stop_order_status')); const side = this.safeStringLower (order, 'side'); - let feeCost = this.safeFloat (order, 'cum_exec_fee'); + let feeCost = this.safeNumber (order, 'cum_exec_fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); fee = { 'cost': feeCost, - 'currency': base, + 'currency': feeCurrency, }; } let clientOrderId = this.safeString (order, 'order_link_id'); @@ -1152,9 +1171,9 @@ module.exports = class bybit extends Exchange { clientOrderId = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); - const stopPrice = this.safeFloat (order, 'stop_px'); + const stopPrice = this.safeNumber (order, 'stop_px'); const postOnly = (timeInForce === 'PO'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1176,7 +1195,7 @@ module.exports = class bybit extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -2027,7 +2046,8 @@ module.exports = class bybit extends Exchange { const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); + const type = this.safeStringLower (transaction, 'type'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -2047,8 +2067,8 @@ module.exports = class bybit extends Exchange { 'tag': undefined, 'tagTo': undefined, 'tagFrom': undefined, - 'type': 'withdrawal', - 'amount': this.safeFloat (transaction, 'amount'), + 'type': type, + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -2131,8 +2151,8 @@ module.exports = class bybit extends Exchange { // const currencyId = this.safeString (item, 'coin'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'wallet_balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'wallet_balance'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -2198,7 +2218,8 @@ module.exports = class bybit extends Exchange { 'recv_window': this.options['recvWindow'], 'timestamp': timestamp, }); - const auth = this.rawencode (this.keysort (query)); + const sortedQuery = this.keysort (query); + const auth = this.rawencode (sortedQuery); const signature = this.hmac (this.encode (auth), this.encode (this.secret)); if (method === 'POST') { body = this.json (this.extend (query, { @@ -2208,7 +2229,7 @@ module.exports = class bybit extends Exchange { 'Content-Type': 'application/json', }; } else { - request += '?' + auth + '&sign=' + signature; + request += '?' + this.urlencode (sortedQuery) + '&sign=' + signature; } } url += request; @@ -2231,12 +2252,43 @@ module.exports = class bybit extends Exchange { // time_now: '1583934106.590436' // } // - const errorCode = this.safeValue (response, 'ret_code'); - if (errorCode !== 0) { + const errorCode = this.safeString (response, 'ret_code'); + if (errorCode !== '0') { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, feedback); this.throwBroadlyMatchedException (this.exceptions['broad'], body, feedback); throw new ExchangeError (feedback); // unknown message } } + + async fetchPositions (symbols = undefined, params = {}) { + await this.loadMarkets (); + const request = {}; + if (Array.isArray (symbols)) { + const length = symbols.length; + if (length !== 1) { + throw new ArgumentsRequired (this.id + ' fetchPositions takes exactly one symbol'); + } + request['symbol'] = this.marketId (symbols[0]); + } + const defaultType = this.safeString (this.options, 'defaultType', 'linear'); + const type = this.safeString (params, 'type', defaultType); + params = this.omit (params, 'type'); + let response = undefined; + if (type === 'linear') { + response = await this.privateLinearGetPositionList (this.extend (request, params)); + } else if (type === 'inverse') { + response = await this.v2PrivateGetPositionList (this.extend (request, params)); + } else if (type === 'inverseFuture') { + response = await this.futuresPrivateGetPositionList (this.extend (request, params)); + } + // { + // ret_code: 0, + // ret_msg: 'OK', + // ext_code: '', + // ext_info: '', + // result: [] or {} depending on the request + // } + return this.safeValue (response, 'result'); + } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bytetrade.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bytetrade.js index 25953b6f7..ad0c929d8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bytetrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/bytetrade.js @@ -186,12 +186,12 @@ module.exports = class bytetrade extends Exchange { const limits = this.safeValue (currency, 'limits'); const deposit = this.safeValue (limits, 'deposit'); const amountPrecision = this.safeInteger (currency, 'basePrecision'); - let maxDeposit = this.safeFloat (deposit, 'max'); + let maxDeposit = this.safeNumber (deposit, 'max'); if (maxDeposit === -1.0) { maxDeposit = undefined; } const withdraw = this.safeValue (limits, 'withdraw'); - let maxWithdraw = this.safeFloat (withdraw, 'max'); + let maxWithdraw = this.safeNumber (withdraw, 'max'); if (maxWithdraw === -1.0) { maxWithdraw = undefined; } @@ -207,11 +207,11 @@ module.exports = class bytetrade extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (deposit, 'min'), + 'min': this.safeNumber (deposit, 'min'), 'max': maxDeposit, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'min'), + 'min': this.safeNumber (withdraw, 'min'), 'max': maxWithdraw, }, }, @@ -265,12 +265,12 @@ module.exports = class bytetrade extends Exchange { 'normalSymbol': normalSymbol, 'limits': { 'amount': { - 'min': this.safeFloat (amount, 'min'), - 'max': this.safeFloat (amount, 'max'), + 'min': this.safeNumber (amount, 'min'), + 'max': this.safeNumber (amount, 'max'), }, 'price': { - 'min': this.safeFloat (price, 'min'), - 'max': this.safeFloat (price, 'max'), + 'min': this.safeNumber (price, 'min'), + 'max': this.safeNumber (price, 'max'), }, 'cost': { 'min': undefined, @@ -298,11 +298,11 @@ module.exports = class bytetrade extends Exchange { const currencyId = this.safeString (balance, 'code'); const code = this.safeCurrencyCode (currencyId, undefined); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'used'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'used'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -363,22 +363,22 @@ module.exports = class bytetrade extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), - 'open': this.safeFloat (ticker, 'open'), - 'close': this.safeFloat (ticker, 'close'), - 'last': this.safeFloat (ticker, 'last'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), + 'open': this.safeNumber (ticker, 'open'), + 'close': this.safeNumber (ticker, 'close'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, // previous day close - 'change': this.safeFloat (ticker, 'change'), - 'percentage': this.safeFloat (ticker, 'percentage'), + 'change': this.safeNumber (ticker, 'change'), + 'percentage': this.safeNumber (ticker, 'percentage'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -421,24 +421,16 @@ module.exports = class bytetrade extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidsAsks (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetDepth (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetDepth (params); + return this.parseTickers (response, symbols); } async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const rawTickers = await this.marketGetTickers (params); - return this.parseTickers (rawTickers, symbols); + const response = await this.marketGetTickers (params); + return this.parseTickers (response, symbols); } parseOHLCV (ohlcv, market = undefined) { @@ -454,11 +446,11 @@ module.exports = class bytetrade extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -488,9 +480,9 @@ module.exports = class bytetrade extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeInteger (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - const cost = this.safeFloat (trade, 'cost'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); + const cost = this.safeNumber (trade, 'cost'); const id = this.safeString (trade, 'id'); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'takerOrMaker'); @@ -560,12 +552,12 @@ module.exports = class bytetrade extends Exchange { const timestamp = this.safeInteger (order, 'timestamp'); const datetime = this.safeString (order, 'datetime'); const lastTradeTimestamp = this.safeInteger (order, 'lastTradeTimestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled'); - const remaining = this.safeFloat (order, 'remaining'); - const cost = this.safeFloat (order, 'cost'); - const average = this.safeFloat (order, 'average'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled'); + const remaining = this.safeNumber (order, 'remaining'); + const cost = this.safeNumber (order, 'cost'); + const average = this.safeNumber (order, 'average'); const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); @@ -958,7 +950,7 @@ module.exports = class bytetrade extends Exchange { }; } - async transfer (code, amount, address, message = '', params = {}) { + async transfer (code, amount, fromAccount, toAccount, params = {}) { this.checkRequiredDependencies (); if (this.apiKey === undefined) { throw new ArgumentsRequired ('transfer() requires this.apiKey'); @@ -976,6 +968,7 @@ module.exports = class bytetrade extends Exchange { expirationDatetime = expirationDatetime.split ('.')[0]; const feeAmount = '300000000000000'; const defaultDappId = 'Sagittarius'; + const message = this.safeString (params, 'message', ''); const dappId = this.safeString (params, 'dappId', defaultDappId); const eightBytes = this.integerPow ('2', '64'); const byteStringArray = [ @@ -989,8 +982,8 @@ module.exports = class bytetrade extends Exchange { this.numberToLE (feeAmount, 8), // string for 32 bit php this.numberToLE (this.apiKey.length, 1), this.stringToBinary (this.encode (this.apiKey)), - this.numberToLE (address.length, 1), - this.stringToBinary (this.encode (address)), + this.numberToLE (toAccount.length, 1), + this.stringToBinary (this.encode (toAccount)), this.numberToLE (assetType, 4), this.numberToLE (this.integerDivide (amountChain, eightBytes), 8), this.numberToLE (this.integerModulo (amountChain, eightBytes), 8), @@ -1011,7 +1004,7 @@ module.exports = class bytetrade extends Exchange { const operation = { 'fee': '300000000000000', 'from': this.apiKey, - 'to': address, + 'to': toAccount, 'asset_type': parseInt (currency['id']), 'amount': amountChain.toString (), 'message': message, @@ -1165,9 +1158,9 @@ module.exports = class bytetrade extends Exchange { const datetime = this.safeString (transaction, 'datetime'); const type = this.safeString (transaction, 'type'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const feeInfo = this.safeValue (transaction, 'fee'); - const feeCost = this.safeFloat (feeInfo, 'cost'); + const feeCost = this.safeNumber (feeInfo, 'cost'); const feeCurrencyId = this.safeString (feeInfo, 'code'); const feeCode = this.safeCurrencyCode (feeCurrencyId, currency); const fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/cex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/cex.js index 77473d391..876830762 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/cex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/cex.js @@ -256,7 +256,7 @@ module.exports = class cex extends Exchange { 'fee': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimumCurrencyAmount'), + 'min': this.safeNumber (currency, 'minimumCurrencyAmount'), 'max': undefined, }, 'price': { @@ -268,7 +268,7 @@ module.exports = class cex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimalWithdrawalAmount'), + 'min': this.safeNumber (currency, 'minimalWithdrawalAmount'), 'max': undefined, }, }, @@ -351,15 +351,15 @@ module.exports = class cex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minLotSize'), - 'max': this.safeFloat (market, 'maxLotSize'), + 'min': this.safeNumber (market, 'minLotSize'), + 'max': this.safeNumber (market, 'maxLotSize'), }, 'price': { - 'min': this.safeFloat (market, 'minPrice'), - 'max': this.safeFloat (market, 'maxPrice'), + 'min': this.safeNumber (market, 'minPrice'), + 'max': this.safeNumber (market, 'maxPrice'), }, 'cost': { - 'min': this.safeFloat (market, 'minLotSizeS2'), + 'min': this.safeNumber (market, 'minLotSizeS2'), 'max': undefined, }, }, @@ -380,13 +380,13 @@ module.exports = class cex extends Exchange { const currencyId = currencyIds[i]; const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); + account['free'] = this.safeString (balance, 'available'); // https://github.com/ccxt/ccxt/issues/5484 - account['used'] = this.safeFloat (balance, 'orders', 0.0); + account['used'] = this.safeString (balance, 'orders', '0'); const code = this.safeCurrencyCode (currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -415,11 +415,11 @@ module.exports = class cex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -461,12 +461,12 @@ module.exports = class cex extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const volume = this.safeFloat (ticker, 'volume'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'last'); + const volume = this.safeNumber (ticker, 'volume'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'last'); let symbol = undefined; if (market) { symbol = market['symbol']; @@ -528,8 +528,8 @@ module.exports = class cex extends Exchange { const id = this.safeString (trade, 'tid'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let cost = undefined; if (amount !== undefined) { if (price !== undefined) { @@ -601,8 +601,8 @@ module.exports = class cex extends Exchange { // "complete": false // } // - const placedAmount = this.safeFloat (response, 'amount'); - const remaining = this.safeFloat (response, 'pending'); + const placedAmount = this.safeNumber (response, 'amount'); + const remaining = this.safeNumber (response, 'pending'); const timestamp = this.safeValue (response, 'time'); const complete = this.safeValue (response, 'complete'); const status = complete ? 'closed' : 'open'; @@ -621,7 +621,7 @@ module.exports = class cex extends Exchange { 'side': this.safeString (response, 'type'), 'symbol': symbol, 'status': status, - 'price': this.safeFloat (response, 'price'), + 'price': this.safeNumber (response, 'price'), 'amount': placedAmount, 'cost': undefined, 'average': undefined, @@ -663,42 +663,42 @@ module.exports = class cex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - let amount = this.safeFloat (order, 'amount'); + const price = this.safeNumber (order, 'price'); + let amount = this.safeNumber (order, 'amount'); // sell orders can have a negative amount // https://github.com/ccxt/ccxt/issues/5338 if (amount !== undefined) { amount = Math.abs (amount); } - const remaining = this.safeFloat2 (order, 'pending', 'remains'); + const remaining = this.safeNumber2 (order, 'pending', 'remains'); const filled = amount - remaining; let fee = undefined; let cost = undefined; if (market !== undefined) { symbol = market['symbol']; - const taCost = this.safeFloat (order, 'ta:' + market['quote']); - const ttaCost = this.safeFloat (order, 'tta:' + market['quote']); + const taCost = this.safeNumber (order, 'ta:' + market['quote']); + const ttaCost = this.safeNumber (order, 'tta:' + market['quote']); cost = this.sum (taCost, ttaCost); const baseFee = 'fa:' + market['base']; const baseTakerFee = 'tfa:' + market['base']; const quoteFee = 'fa:' + market['quote']; const quoteTakerFee = 'tfa:' + market['quote']; - let feeRate = this.safeFloat (order, 'tradingFeeMaker'); + let feeRate = this.safeNumber (order, 'tradingFeeMaker'); if (!feeRate) { - feeRate = this.safeFloat (order, 'tradingFeeTaker', feeRate); + feeRate = this.safeNumber (order, 'tradingFeeTaker', feeRate); } if (feeRate) { feeRate /= 100.0; // convert to mathematically-correct percentage coefficients: 1.0 = 100% } if ((baseFee in order) || (baseTakerFee in order)) { - const baseFeeCost = this.safeFloat2 (order, baseFee, baseTakerFee); + const baseFeeCost = this.safeNumber2 (order, baseFee, baseTakerFee); fee = { 'currency': market['base'], 'rate': feeRate, 'cost': baseFeeCost, }; } else if ((quoteFee in order) || (quoteTakerFee in order)) { - const quoteFeeCost = this.safeFloat2 (order, quoteFee, quoteTakerFee); + const quoteFeeCost = this.safeNumber2 (order, quoteFee, quoteTakerFee); fee = { 'currency': market['quote'], 'rate': feeRate, @@ -738,7 +738,7 @@ module.exports = class cex extends Exchange { // ds: 0 } continue; } - const tradePrice = this.safeFloat (item, 'price'); + const tradePrice = this.safeNumber (item, 'price'); if (tradePrice === undefined) { // this represents the order // { @@ -842,8 +842,8 @@ module.exports = class cex extends Exchange { // "fee_amount": "0.03" // } const tradeTimestamp = this.parse8601 (this.safeString (item, 'time')); - const tradeAmount = this.safeFloat (item, 'amount'); - const feeCost = this.safeFloat (item, 'fee_amount'); + const tradeAmount = this.safeNumber (item, 'amount'); + const feeCost = this.safeNumber (item, 'fee_amount'); let absTradeAmount = (tradeAmount < 0) ? -tradeAmount : tradeAmount; let tradeCost = undefined; if (tradeSide === 'sell') { @@ -1188,12 +1188,12 @@ module.exports = class cex extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const side = this.safeString (order, 'type'); - const baseAmount = this.safeFloat (order, 'a:' + baseId + ':cds'); - const quoteAmount = this.safeFloat (order, 'a:' + quoteId + ':cds'); - const fee = this.safeFloat (order, 'f:' + quoteId + ':cds'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const remaining = this.safeFloat (order, 'remains'); + const baseAmount = this.safeNumber (order, 'a:' + baseId + ':cds'); + const quoteAmount = this.safeNumber (order, 'a:' + quoteId + ':cds'); + const fee = this.safeNumber (order, 'f:' + quoteId + ':cds'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const remaining = this.safeNumber (order, 'remains'); const filled = amount - remaining; let orderAmount = undefined; let cost = undefined; @@ -1205,10 +1205,10 @@ module.exports = class cex extends Exchange { cost = quoteAmount; average = orderAmount / cost; } else { - const ta = this.safeFloat (order, 'ta:' + quoteId, 0); - const tta = this.safeFloat (order, 'tta:' + quoteId, 0); - const fa = this.safeFloat (order, 'fa:' + quoteId, 0); - const tfa = this.safeFloat (order, 'tfa:' + quoteId, 0); + const ta = this.safeNumber (order, 'ta:' + quoteId, 0); + const tta = this.safeNumber (order, 'tta:' + quoteId, 0); + const fa = this.safeNumber (order, 'fa:' + quoteId, 0); + const tfa = this.safeNumber (order, 'tfa:' + quoteId, 0); if (side === 'sell') { cost = this.sum (this.sum (ta, tta), this.sum (fa, tfa)); } else { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/chilebit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/chilebit.js deleted file mode 100644 index 4aeeb9ec3..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/chilebit.js +++ /dev/null @@ -1,32 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const foxbit = require ('./foxbit.js'); - -// --------------------------------------------------------------------------- - -module.exports = class chilebit extends foxbit { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'chilebit', - 'name': 'ChileBit', - 'countries': [ 'CL' ], - 'has': { - 'CORS': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27991414-1298f0d8-647f-11e7-9c40-d56409266336.jpg', - 'api': { - 'public': 'https://api.blinktrade.com/api', - 'private': 'https://api.blinktrade.com/tapi', - }, - 'www': 'https://chilebit.net', - 'doc': 'https://blinktrade.com/docs', - }, - 'options': { - 'brokerId': '9', // https://blinktrade.com/docs/#brokers - }, - }); - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbase.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbase.js index cfceba2a4..1413a7064 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbase.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbase.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError, RateLimitExceeded, InvalidNonce } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -411,10 +412,10 @@ module.exports = class coinbase extends Exchange { const timestamp = this.parse8601 (this.safeValue (transaction, 'created_at')); const updated = this.parse8601 (this.safeValue (transaction, 'updated_at')); const type = this.safeString (transaction, 'resource'); - const amount = this.safeFloat (subtotalObject, 'amount'); + const amount = this.safeNumber (subtotalObject, 'amount'); const currencyId = this.safeString (subtotalObject, 'currency'); const currency = this.safeCurrencyCode (currencyId); - const feeCost = this.safeFloat (feeObject, 'amount'); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -490,15 +491,12 @@ module.exports = class coinbase extends Exchange { const orderId = undefined; const side = this.safeString (trade, 'resource'); const type = undefined; - const cost = this.safeFloat (subtotalObject, 'amount'); - const amount = this.safeFloat (amountObject, 'amount'); - let price = undefined; - if (cost !== undefined) { - if ((amount !== undefined) && (amount > 0)) { - price = cost / amount; - } - } - const feeCost = this.safeFloat (feeObject, 'amount'); + const costString = this.safeString (subtotalObject, 'amount'); + const amountString = this.safeString (amountObject, 'amount'); + const cost = this.parseNumber (costString); + const amount = this.parseNumber (amountString); + const price = this.parseNumber (Precise.stringDiv (costString, amountString)); + const feeCost = this.safeNumber (feeObject, 'amount'); const feeCurrencyId = this.safeString (feeObject, 'currency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); const fee = { @@ -566,7 +564,7 @@ module.exports = class coinbase extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (quoteCurrency, 'min_size'), + 'min': this.safeNumber (quoteCurrency, 'min_size'), 'max': undefined, }, }, @@ -648,7 +646,7 @@ module.exports = class coinbase extends Exchange { 'precision': undefined, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min_size'), + 'min': this.safeNumber (currency, 'min_size'), 'max': undefined, }, 'price': { @@ -679,9 +677,9 @@ module.exports = class coinbase extends Exchange { const buy = await this.publicGetPricesSymbolBuy (request); const sell = await this.publicGetPricesSymbolSell (request); const spot = await this.publicGetPricesSymbolSpot (request); - const ask = this.safeFloat (buy['data'], 'amount'); - const bid = this.safeFloat (sell['data'], 'amount'); - const last = this.safeFloat (spot['data'], 'amount'); + const ask = this.safeNumber (buy['data'], 'amount'); + const bid = this.safeNumber (sell['data'], 'amount'); + const last = this.safeNumber (spot['data'], 'amount'); return { 'symbol': symbol, 'timestamp': timestamp, @@ -724,7 +722,7 @@ module.exports = class coinbase extends Exchange { if (this.inArray (balance['type'], accounts)) { const currencyId = this.safeString (balance['balance'], 'currency'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (balance['balance'], 'amount'); + const total = this.safeNumber (balance['balance'], 'amount'); const free = total; const used = undefined; if (code in result) { @@ -1025,7 +1023,7 @@ module.exports = class coinbase extends Exchange { // } // const amountInfo = this.safeValue (item, 'amount', {}); - let amount = this.safeFloat (amountInfo, 'amount'); + let amount = this.safeNumber (amountInfo, 'amount'); let direction = undefined; if (amount < 0) { direction = 'out'; @@ -1051,7 +1049,7 @@ module.exports = class coinbase extends Exchange { if (feeInfo !== undefined) { const feeCurrencyId = this.safeString (feeInfo, 'currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId, currency); - const feeAmount = this.safeFloat (feeInfo, 'amount'); + const feeAmount = this.safeNumber (feeInfo, 'amount'); fee = { 'cost': feeAmount, 'currency': feeCurrencyCode, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbasepro.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbasepro.js index 582c03a61..6d8c48454 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbasepro.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinbasepro.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ArgumentsRequired, ExchangeError, InvalidOrder, InvalidAddress, AuthenticationError, NotSupported, OrderNotFound, OnMaintenance, PermissionDenied, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -239,7 +240,7 @@ module.exports = class coinbasepro extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const details = this.safeValue (currency, 'details', {}); - const precision = this.safeFloat (currency, 'max_precision'); + const precision = this.safeNumber (currency, 'max_precision'); const status = this.safeString (currency, 'status'); const active = (status === 'online'); result[code] = { @@ -253,7 +254,7 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (details, 'min_size'), + 'min': this.safeNumber (details, 'min_size'), 'max': undefined, }, 'price': { @@ -265,7 +266,7 @@ module.exports = class coinbasepro extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (details, 'min_withdrawal_amount'), + 'min': this.safeNumber (details, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -309,12 +310,12 @@ module.exports = class coinbasepro extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const priceLimits = { - 'min': this.safeFloat (market, 'quote_increment'), + 'min': this.safeNumber (market, 'quote_increment'), 'max': undefined, }; const precision = { - 'amount': this.safeFloat (market, 'base_increment'), - 'price': this.safeFloat (market, 'quote_increment'), + 'amount': this.safeNumber (market, 'base_increment'), + 'price': this.safeNumber (market, 'quote_increment'), }; const status = this.safeString (market, 'status'); const active = (status === 'online'); @@ -328,13 +329,13 @@ module.exports = class coinbasepro extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'base_min_size'), - 'max': this.safeFloat (market, 'base_max_size'), + 'min': this.safeNumber (market, 'base_min_size'), + 'max': this.safeNumber (market, 'base_max_size'), }, 'price': priceLimits, 'cost': { - 'min': this.safeFloat (market, 'min_market_funds'), - 'max': this.safeFloat (market, 'max_market_funds'), + 'min': this.safeNumber (market, 'min_market_funds'), + 'max': this.safeNumber (market, 'max_market_funds'), }, }, 'active': active, @@ -391,14 +392,13 @@ module.exports = class coinbasepro extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'hold'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'hold'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -455,29 +455,29 @@ module.exports = class coinbasepro extends Exchange { // } // const timestamp = this.parse8601 (this.safeValue (ticker, 'time')); - const bid = this.safeFloat (ticker, 'bid'); - const ask = this.safeFloat (ticker, 'ask'); - const last = this.safeFloat (ticker, 'price'); + const bid = this.safeNumber (ticker, 'bid'); + const ask = this.safeNumber (ticker, 'ask'); + const last = this.safeNumber (ticker, 'price'); const symbol = (market === undefined) ? undefined : market['symbol']; return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': undefined, 'ask': ask, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -550,7 +550,7 @@ module.exports = class coinbasepro extends Exchange { if (market !== undefined) { const feeCurrencyId = this.safeStringLower (market, 'quoteId'); const costField = feeCurrencyId + '_value'; - cost = this.safeFloat (trade, costField); + cost = this.safeNumber (trade, costField); feeCurrency = market['quote']; const liquidity = this.safeString (trade, 'liquidity'); if (liquidity !== undefined) { @@ -558,7 +558,7 @@ module.exports = class coinbasepro extends Exchange { feeRate = market[takerOrMaker]; } } - const feeCost = this.safeFloat2 (trade, 'fill_fees', 'fee'); + const feeCost = this.safeNumber2 (trade, 'fill_fees', 'fee'); const fee = { 'cost': feeCost, 'currency': feeCurrency, @@ -572,10 +572,12 @@ module.exports = class coinbasepro extends Exchange { if (orderId !== undefined) { side = (trade['side'] === 'buy') ? 'buy' : 'sell'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - cost = amount * price; + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -637,11 +639,11 @@ module.exports = class coinbasepro extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -721,17 +723,11 @@ module.exports = class coinbasepro extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'filled_size'); - const amount = this.safeFloat (order, 'size', filled); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'executed_value'); - const feeCost = this.safeFloat (order, 'fill_fees'); + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'filled_size'); + const amount = this.safeNumber (order, 'size', filled); + const cost = this.safeNumber (order, 'executed_value'); + const feeCost = this.safeNumber (order, 'fill_fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrencyCode = undefined; @@ -749,9 +745,9 @@ module.exports = class coinbasepro extends Exchange { const side = this.safeString (order, 'side'); const timeInForce = this.safeString (order, 'time_in_force'); const postOnly = this.safeValue (order, 'post_only'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); const clientOrderId = this.safeString (order, 'client_oid'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -769,11 +765,11 @@ module.exports = class coinbasepro extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -863,7 +859,7 @@ module.exports = class coinbasepro extends Exchange { request['client_oid'] = clientOrderId; params = this.omit (params, [ 'clientOrderId', 'client_oid' ]); } - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop_price'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stop_price'); if (stopPrice !== undefined) { request['stop_price'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, [ 'stopPrice', 'stop_price' ]); @@ -877,7 +873,7 @@ module.exports = class coinbasepro extends Exchange { request['price'] = this.priceToPrecision (symbol, price); request['size'] = this.amountToPrecision (symbol, amount); } else if (type === 'market') { - let cost = this.safeFloat2 (params, 'cost', 'funds'); + let cost = this.safeNumber2 (params, 'cost', 'funds'); if (cost === undefined) { if (price !== undefined) { cost = amount * price; @@ -948,19 +944,6 @@ module.exports = class coinbasepro extends Exchange { return await this.privateDeleteOrders (this.extend (request, params)); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - const cost = amount * price; - const currency = market['quote']; - return { - 'type': takerOrMaker, - 'currency': currency, - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (currency, rate * cost)), - }; - } - async fetchPaymentMethods (params = {}) { return await this.privateGetPaymentMethods (params); } @@ -1099,7 +1082,7 @@ module.exports = class coinbasepro extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (transaction); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let type = this.safeString (transaction, 'type'); let address = this.safeString (details, 'crypto_address'); const tag = this.safeString (details, 'destination_tag'); @@ -1108,7 +1091,7 @@ module.exports = class coinbasepro extends Exchange { if (type === 'withdraw') { type = 'withdrawal'; address = this.safeString (details, 'sent_to_address', address); - const feeCost = this.safeFloat (details, 'fee'); + const feeCost = this.safeNumber (details, 'fee'); if (feeCost !== undefined) { if (amount !== undefined) { amount -= feeCost; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coincheck.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coincheck.js index 807882d02..e7a3db265 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coincheck.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coincheck.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -127,12 +128,12 @@ module.exports = class coincheck extends Exchange { if (currencyId in balances) { const account = this.account (); const reserved = currencyId + '_reserved'; - account['free'] = this.safeFloat (balances, currencyId); - account['used'] = this.safeFloat (balances, reserved); + account['free'] = this.safeString (balances, currencyId); + account['used'] = this.safeString (balances, reserved); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -170,23 +171,13 @@ module.exports = class coincheck extends Exchange { const id = this.safeString (order, 'id'); const side = this.safeString (order, 'order_type'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const amount = this.safeFloat (order, 'pending_amount'); - const remaining = this.safeFloat (order, 'pending_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = Math.max (amount - remaining, 0); - if (price !== undefined) { - cost = filled * price; - } - } - } + const amount = this.safeNumber (order, 'pending_amount'); + const remaining = this.safeNumber (order, 'pending_amount'); + const price = this.safeNumber (order, 'rate'); const status = undefined; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -194,7 +185,7 @@ module.exports = class coincheck extends Exchange { 'lastTradeTimestamp': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'side': side, 'type': undefined, 'timeInForce': undefined, @@ -203,12 +194,12 @@ module.exports = class coincheck extends Exchange { 'symbol': symbol, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'info': order, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -232,16 +223,16 @@ module.exports = class coincheck extends Exchange { }; const ticker = await this.publicGetTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -251,7 +242,7 @@ module.exports = class coincheck extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -260,7 +251,7 @@ module.exports = class coincheck extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'rate'); + const priceString = this.safeString (trade, 'rate'); const marketId = this.safeString (trade, 'pair'); market = this.safeValue (this.markets_by_id, marketId, market); let symbol = undefined; @@ -287,7 +278,7 @@ module.exports = class coincheck extends Exchange { } } let takerOrMaker = undefined; - let amount = undefined; + let amountString = undefined; let cost = undefined; let side = undefined; let fee = undefined; @@ -299,24 +290,22 @@ module.exports = class coincheck extends Exchange { takerOrMaker = 'maker'; } const funds = this.safeValue (trade, 'funds', {}); - amount = this.safeFloat (funds, baseId); - cost = this.safeFloat (funds, quoteId); + amountString = this.safeString (funds, baseId); + cost = this.safeNumber (funds, quoteId); fee = { 'currency': this.safeString (trade, 'fee_currency'), - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), }; side = this.safeString (trade, 'side'); orderId = this.safeString (trade, 'order_id'); } else { - amount = this.safeFloat (trade, 'amount'); + amountString = this.safeString (trade, 'amount'); side = this.safeString (trade, 'order_type'); } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'id': id, @@ -387,6 +376,10 @@ module.exports = class coincheck extends Exchange { return await this.privateDeleteExchangeOrdersId (this.extend (request, params)); } + nonce () { + return this.milliseconds (); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { let url = this.urls['api'] + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinegg.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinegg.js index e270e3bf7..0b2e2ef89 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinegg.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinegg.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InvalidNonce, InsufficientFunds, InvalidOrder, OrderNotFound, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -214,8 +215,8 @@ module.exports = class coinegg extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; let change = undefined; let average = undefined; @@ -229,11 +230,11 @@ module.exports = class coinegg extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -243,8 +244,8 @@ module.exports = class coinegg extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVol'), 'info': ticker, }; } @@ -273,15 +274,12 @@ module.exports = class coinegg extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = this.costToPrecision (symbol, price * amount); - } - } const type = 'limit'; const side = this.safeString (trade, 'type'); const id = this.safeString (trade, 'tid'); @@ -328,9 +326,9 @@ module.exports = class coinegg extends Exchange { result[code] = this.account (); } const type = (accountType === 'lock') ? 'used' : 'free'; - result[code][type] = this.safeFloat (balances, key); + result[code][type] = this.safeString (balances, key); } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -339,15 +337,9 @@ module.exports = class coinegg extends Exchange { symbol = market['symbol']; } const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount_original'); - const remaining = this.safeFloat (order, 'amount_outstanding'); - let filled = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount_original'); + const remaining = this.safeNumber (order, 'amount_outstanding'); let status = this.safeString (order, 'status'); if (status === 'cancelled') { status = 'canceled'; @@ -358,7 +350,7 @@ module.exports = class coinegg extends Exchange { const type = 'limit'; const side = this.safeString (order, 'type'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -374,13 +366,13 @@ module.exports = class coinegg extends Exchange { 'stopPrice': undefined, 'cost': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'trades': undefined, 'fee': undefined, 'info': info, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinex.js index cc344ee72..575d0f239 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, OrderNotFound, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -196,13 +197,13 @@ module.exports = class coinex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': this.safeFloat (market, 'taker_fee_rate'), - 'maker': this.safeFloat (market, 'maker_fee_rate'), + 'taker': this.safeNumber (market, 'taker_fee_rate'), + 'maker': this.safeNumber (market, 'maker_fee_rate'), 'info': market, 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -222,16 +223,16 @@ module.exports = class coinex extends Exchange { symbol = market['symbol']; } ticker = this.safeValue (ticker, 'ticker', {}); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -241,7 +242,7 @@ module.exports = class coinex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat2 (ticker, 'vol', 'volume'), + 'baseVolume': this.safeNumber2 (ticker, 'vol', 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -301,16 +302,18 @@ module.exports = class coinex extends Exchange { } const tradeId = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market); - let cost = this.safeFloat (trade, 'deal_money'); - if (!cost) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); + let cost = this.safeNumber (trade, 'deal_money'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_asset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -363,11 +366,11 @@ module.exports = class coinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -428,11 +431,11 @@ module.exports = class coinex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -471,11 +474,11 @@ module.exports = class coinex extends Exchange { // } // const timestamp = this.safeTimestamp (order, 'create_time'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'deal_money'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'deal_amount'); - const average = this.safeFloat (order, 'avg_price'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'deal_money'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'deal_amount'); + const average = this.safeNumber (order, 'avg_price'); let symbol = undefined; const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); @@ -487,11 +490,11 @@ module.exports = class coinex extends Exchange { feeCurrency = market['quote']; } } - const remaining = this.safeFloat (order, 'left'); + const remaining = this.safeNumber (order, 'left'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -513,10 +516,10 @@ module.exports = class coinex extends Exchange { 'trades': undefined, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'deal_fee'), + 'cost': this.safeNumber (order, 'deal_fee'), }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -762,8 +765,8 @@ module.exports = class coinex extends Exchange { const timestamp = this.safeTimestamp (transaction, 'create_time'); const type = ('coin_withdraw_id' in transaction) ? 'withdraw' : 'deposit'; const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); - let feeCost = this.safeFloat (transaction, 'tx_fee'); + let amount = this.safeNumber (transaction, 'amount'); + let feeCost = this.safeNumber (transaction, 'tx_fee'); if (type === 'deposit') { feeCost = 0; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfalcon.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfalcon.js index 6c264b4ec..8d3077293 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfalcon.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfalcon.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, RateLimitExceeded, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -136,11 +137,11 @@ module.exports = class coinfalcon extends Exchange { 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'change_in_24h'), + 'change': this.safeNumber (ticker, 'change_in_24h'), 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -177,20 +178,17 @@ module.exports = class coinfalcon extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const symbol = market['symbol']; - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } const tradeId = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'order_id'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = this.safeString (trade, 'fee_currency_code'); fee = { @@ -258,14 +256,13 @@ module.exports = class coinfalcon extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'currency_code'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available_balance'), - 'used': this.safeFloat (balance, 'hold_balance'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available_balance'); + account['used'] = this.safeString (balance, 'hold_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -300,19 +297,9 @@ module.exports = class coinfalcon extends Exchange { const marketId = this.safeString (order, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'created_at')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'size_filled'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (price !== undefined) { - cost = filled * price; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'size_filled'); const status = this.parseOrderStatus (this.safeString (order, 'status')); let type = this.safeString (order, 'operation_type'); if (type !== undefined) { @@ -321,7 +308,7 @@ module.exports = class coinfalcon extends Exchange { } const side = this.safeString (order, 'order_type'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -334,16 +321,16 @@ module.exports = class coinfalcon extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'lastTradeTimestamp': undefined, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfloor.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfloor.js index 7fff650de..790ac8c50 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfloor.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinfloor.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { InsufficientFunds, ExchangeError, InvalidNonce, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -105,14 +106,14 @@ module.exports = class coinfloor extends Exchange { const baseIdLower = this.safeStringLower (market, 'baseId'); const quoteIdLower = this.safeStringLower (market, 'quoteId'); result[base] = { - 'free': this.safeFloat (response, baseIdLower + '_available'), - 'used': this.safeFloat (response, baseIdLower + '_reserved'), - 'total': this.safeFloat (response, baseIdLower + '_balance'), + 'free': this.safeNumber (response, baseIdLower + '_available'), + 'used': this.safeNumber (response, baseIdLower + '_reserved'), + 'total': this.safeNumber (response, baseIdLower + '_balance'), }; result[quote] = { - 'free': this.safeFloat (response, quoteIdLower + '_available'), - 'used': this.safeFloat (response, quoteIdLower + '_reserved'), - 'total': this.safeFloat (response, quoteIdLower + '_balance'), + 'free': this.safeNumber (response, quoteIdLower + '_available'), + 'used': this.safeNumber (response, quoteIdLower + '_reserved'), + 'total': this.safeNumber (response, quoteIdLower + '_balance'), }; return this.parseBalance (result); } @@ -133,22 +134,22 @@ module.exports = class coinfloor extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -177,14 +178,11 @@ module.exports = class coinfloor extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -302,8 +300,8 @@ module.exports = class coinfloor extends Exchange { const parts = key.split ('_'); const numParts = parts.length; if (numParts === 2) { - const tmpBaseAmount = this.safeFloat (item, parts[0]); - const tmpQuoteAmount = this.safeFloat (item, parts[1]); + const tmpBaseAmount = this.safeNumber (item, parts[0]); + const tmpQuoteAmount = this.safeNumber (item, parts[1]); if (tmpBaseAmount !== undefined && tmpQuoteAmount !== undefined) { baseId = parts[0]; quoteId = parts[1]; @@ -319,7 +317,7 @@ module.exports = class coinfloor extends Exchange { const referenceId = this.safeString (item, 'id'); const timestamp = this.parse8601 (this.safeString (item, 'datetime')); let fee = undefined; - const feeCost = this.safeFloat (item, 'fee'); + const feeCost = this.safeNumber (item, 'fee'); const result = { 'id': undefined, 'timestamp': timestamp, @@ -423,8 +421,8 @@ module.exports = class coinfloor extends Exchange { 'datetime': this.iso8601 (timestamp), 'timestamp': timestamp, 'type': type, - 'price': this.safeFloat (response, 'price'), - 'remaining': this.safeFloat (response, 'amount'), + 'price': this.safeNumber (response, 'price'), + 'remaining': this.safeNumber (response, 'amount'), 'info': response, }; } @@ -449,19 +447,14 @@ module.exports = class coinfloor extends Exchange { parseOrder (order, market = undefined) { const timestamp = this.parse8601 (this.safeString (order, 'datetime')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); let side = undefined; const status = this.safeString (order, 'status'); - if (order['type'] === 0) { + const rawType = this.safeString (order, 'type'); + if (rawType === '0') { side = 'buy'; - } else if (order['type'] === 1) { + } else if (rawType === '1') { side = 'sell'; } let symbol = undefined; @@ -469,7 +462,7 @@ module.exports = class coinfloor extends Exchange { symbol = market['symbol']; } const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -487,11 +480,11 @@ module.exports = class coinfloor extends Exchange { 'amount': undefined, 'filled': undefined, 'remaining': amount, - 'cost': cost, + 'cost': undefined, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coingi.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coingi.js index 650d80885..931325ea6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coingi.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coingi.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -165,14 +166,14 @@ module.exports = class coingi extends Exchange { const currencyId = this.safeString (balance['currency'], 'name'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - const blocked = this.safeFloat (balance, 'blocked'); - const inOrders = this.safeFloat (balance, 'inOrders'); - const withdrawing = this.safeFloat (balance, 'withdrawing'); - account['used'] = this.sum (blocked, inOrders, withdrawing); + account['free'] = this.safeString (balance, 'available'); + const blocked = this.safeString (balance, 'blocked'); + const inOrders = this.safeString (balance, 'inOrders'); + const withdrawing = this.safeString (balance, 'withdrawing'); + account['used'] = Precise.stringAdd (Precise.stringAdd (blocked, inOrders), withdrawing); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = 512, params = {}) { @@ -198,11 +199,11 @@ module.exports = class coingi extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -212,8 +213,8 @@ module.exports = class coingi extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'counterVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'counterVolume'), 'info': ticker, }; } @@ -246,14 +247,11 @@ module.exports = class coingi extends Exchange { } parseTrade (trade, market = undefined) { - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const timestamp = this.safeInteger (trade, 'timestamp'); const id = this.safeString (trade, 'id'); const marketId = this.safeString (trade, 'currencyPair'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmarketcap.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmarketcap.js index 171a65889..85edd4882 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmarketcap.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmarketcap.js @@ -208,16 +208,16 @@ module.exports = class coinmarketcap extends Exchange { if (timestamp === undefined) { timestamp = this.milliseconds (); } - const change = this.safeFloat (ticker, 'percent_change_24h'); + const change = this.safeNumber (ticker, 'percent_change_24h'); let last = undefined; let symbol = undefined; let volume = undefined; if (market !== undefined) { symbol = market['symbol']; const priceKey = 'price_' + market['quoteId']; - last = this.safeFloat (ticker, priceKey); + last = this.safeNumber (ticker, priceKey); const volumeKey = '24h_volume_' + market['quoteId']; - volume = this.safeFloat (ticker, volumeKey); + volume = this.safeNumber (ticker, volumeKey); } return { 'symbol': symbol, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmate.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmate.js index b03ce8783..821e5d7e8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmate.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinmate.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder, OrderNotFound, RateLimitExceeded, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -230,7 +231,7 @@ module.exports = class coinmate extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -258,12 +259,12 @@ module.exports = class coinmate extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -286,16 +287,16 @@ module.exports = class coinmate extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'data'); const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'vwap': undefined, 'askVolume': undefined, 'open': undefined, @@ -305,7 +306,7 @@ module.exports = class coinmate extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'amount'), + 'baseVolume': this.safeNumber (ticker, 'amount'), 'quoteVolume': undefined, 'info': ticker, }; @@ -374,8 +375,8 @@ module.exports = class coinmate extends Exchange { // } // const timestamp = this.safeInteger (item, 'timestamp'); - const amount = this.safeFloat (item, 'amount'); - const fee = this.safeFloat (item, 'fee'); + const amount = this.safeNumber (item, 'amount'); + const fee = this.safeNumber (item, 'fee'); const txid = this.safeString (item, 'txid'); const address = this.safeString (item, 'destination'); const tag = this.safeString (item, 'destinationTag'); @@ -453,21 +454,18 @@ module.exports = class coinmate extends Exchange { // const marketId = this.safeString (trade, 'currencyPair'); market = this.safeMarket (marketId, market, '_'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeStringLower2 (trade, 'type', 'tradeType'); const type = this.safeStringLower (trade, 'orderType'); const orderId = this.safeString (trade, 'orderId'); const id = this.safeString (trade, 'transactionId'); const timestamp = this.safeInteger2 (trade, 'timestamp', 'createdTimestamp'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -608,11 +606,11 @@ module.exports = class coinmate extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.safeInteger (order, 'timestamp'); const side = this.safeStringLower (order, 'type'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'originalAmount'); - let remaining = this.safeFloat (order, 'remainingAmount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'originalAmount'); + let remaining = this.safeNumber (order, 'remainingAmount'); if (remaining === undefined) { - remaining = this.safeFloat (order, 'amount'); + remaining = this.safeNumber (order, 'amount'); } let status = this.parseOrderStatus (this.safeString (order, 'status')); const type = this.parseOrderType (this.safeString (order, 'orderTradeType')); @@ -627,11 +625,11 @@ module.exports = class coinmate extends Exchange { cost = filled * price; } } - const average = this.safeFloat (order, 'avgPrice'); + const average = this.safeNumber (order, 'avgPrice'); const marketId = this.safeString (order, 'currencyPair'); const symbol = this.safeSymbol (marketId, market, '_'); const clientOrderId = this.safeString (order, 'clientOrderId'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); return { 'id': id, 'clientOrderId': clientOrderId, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinone.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinone.js index 0c86365b6..cd0f3585c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinone.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinone.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, BadRequest, ExchangeError, ArgumentsRequired, OrderNotFound, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -142,11 +143,11 @@ module.exports = class coinone extends Exchange { const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'avail'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -199,13 +200,13 @@ module.exports = class coinone extends Exchange { parseTicker (ticker, market = undefined) { const timestamp = this.safeTimestamp (ticker, 'timestamp'); - const first = this.safeFloat (ticker, 'first'); - const last = this.safeFloat (ticker, 'last'); + const first = this.safeNumber (ticker, 'first'); + const last = this.safeNumber (ticker, 'last'); let average = undefined; if (first !== undefined && last !== undefined) { average = this.sum (first, last) / 2; } - const previousClose = this.safeFloat (ticker, 'yesterday_last'); + const previousClose = this.safeNumber (ticker, 'yesterday_last'); let change = undefined; let percentage = undefined; if (last !== undefined && previousClose !== undefined) { @@ -219,8 +220,8 @@ module.exports = class coinone extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -233,7 +234,7 @@ module.exports = class coinone extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -279,20 +280,17 @@ module.exports = class coinone extends Exchange { side = 'buy'; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'fee'); + let feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); - let feeRate = this.safeFloat (trade, 'feeRate'); + let feeRate = this.safeNumber (trade, 'feeRate'); feeRate = Math.abs (feeRate); let feeCurrencyCode = undefined; if (market !== undefined) { @@ -452,7 +450,7 @@ module.exports = class coinone extends Exchange { // } // const id = this.safeString (order, 'orderId'); - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); const timestamp = this.safeTimestamp (order, 'timestamp'); let side = this.safeString (order, 'type'); if (side === 'ask') { @@ -460,9 +458,8 @@ module.exports = class coinone extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const remaining = this.safeFloat (order, 'remainQty'); - let filled = undefined; - const amount = this.safeFloat (order, 'qty'); + const remaining = this.safeNumber (order, 'remainQty'); + const amount = this.safeNumber (order, 'qty'); let status = this.safeString (order, 'status'); // https://github.com/ccxt/ccxt/pull/7067 if (status === 'live') { @@ -472,14 +469,7 @@ module.exports = class coinone extends Exchange { } } } - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (amount - remaining); - } status = this.parseOrderStatus (status); - let cost = undefined; - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } let symbol = undefined; let base = undefined; let quote = undefined; @@ -499,16 +489,16 @@ module.exports = class coinone extends Exchange { quote = market['quote']; } let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = (side === 'sell') ? quote : base; fee = { 'cost': feeCost, - 'rate': this.safeFloat (order, 'feeRate'), + 'rate': this.safeNumber (order, 'feeRate'), 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -522,15 +512,15 @@ module.exports = class coinone extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': amount, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -605,8 +595,8 @@ module.exports = class coinone extends Exchange { // eslint-disable-next-line quotes throw new ArgumentsRequired (this.id + " cancelOrder() requires a symbol argument. To cancel the order, pass a symbol argument and {'price': 12345, 'qty': 1.2345, 'is_ask': 0} in the params argument of cancelOrder."); } - const price = this.safeFloat (params, 'price'); - const qty = this.safeFloat (params, 'qty'); + const price = this.safeNumber (params, 'price'); + const qty = this.safeNumber (params, 'qty'); const isAsk = this.safeInteger (params, 'is_ask'); if ((price === undefined) || (qty === undefined) || (isAsk === undefined)) { // eslint-disable-next-line quotes diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinspot.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinspot.js index e04c42b5d..63c9b3fd2 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinspot.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/coinspot.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -123,7 +124,7 @@ module.exports = class coinspot extends Exchange { const balance = currencies[currencyId]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } } @@ -133,11 +134,11 @@ module.exports = class coinspot extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -157,16 +158,16 @@ module.exports = class coinspot extends Exchange { id = id.toLowerCase (); const ticker = response['prices'][id]; const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -214,11 +215,13 @@ module.exports = class coinspot extends Exchange { // "market":"BTC/AUD" // } // - const price = this.safeFloat (trade, 'rate'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'total'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger (trade, 'solddate'); const marketId = this.safeString (trade, 'market'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/crex24.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/crex24.js index 7c1298090..5c3a3ccde 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/crex24.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/crex24.js @@ -4,6 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, InvalidNonce, RequestTimeout, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, AuthenticationError, BadSymbol } = require ('./base/errors'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -110,6 +112,7 @@ module.exports = class crex24 extends Exchange { ], }, }, + 'precisionMode': TICK_SIZE, 'fees': { 'trading': { 'tierBased': true, @@ -130,6 +133,7 @@ module.exports = class crex24 extends Exchange { 'BIT': 'BitMoney', 'BULL': 'BuySell', 'CREDIT': 'TerraCredit', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'GHOST': 'GHOSTPRISM', 'IQ': 'IQ.Cash', 'PUT': 'PutinCoin', @@ -163,6 +167,7 @@ module.exports = class crex24 extends Exchange { 'API Key': AuthenticationError, // "API Key '9edc48de-d5b0-4248-8e7e-f59ffcd1c7f1' doesn't exist." 'Insufficient funds': InsufficientFunds, // "Insufficient funds: new order requires 10 ETH which is more than the available balance." 'has been delisted.': BadSymbol, // {"errorDescription":"Instrument '$PAC-BTC' has been delisted."} + 'is currently suspended.': BadSymbol, // {"errorDescription":"Trading in BITG-BTC is currently suspended."} 'Mandatory parameter': BadRequest, // {"errorDescription":"Mandatory parameter 'feeCurrency' is missing."} }, }, @@ -204,12 +209,12 @@ module.exports = class crex24 extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const tickSize = this.safeValue (market, 'tickSize'); - const minPrice = this.safeValue (market, 'minPrice'); - const minAmount = this.safeFloat (market, 'minVolume'); + const tickSize = this.safeNumber (market, 'tickSize'); + const minPrice = this.safeNumber (market, 'minPrice'); + const minAmount = this.safeNumber (market, 'minVolume'); const precision = { - 'amount': this.precisionFromString (this.numberToString (minAmount)), - 'price': this.precisionFromString (this.numberToString (tickSize)), + 'amount': minAmount, + 'price': tickSize, }; const active = (market['state'] === 'active'); result.push ({ @@ -274,7 +279,8 @@ module.exports = class crex24 extends Exchange { const currency = response[i]; const id = this.safeString (currency, 'symbol'); const code = this.safeCurrencyCode (id); - const precision = this.safeInteger (currency, 'withdrawalPrecision'); + const withdrawalPrecision = this.safeInteger (currency, 'withdrawalPrecision'); + const precision = Math.pow (10, -withdrawalPrecision); const address = this.safeValue (currency, 'BaseAddress'); const active = (currency['depositsAllowed'] && currency['withdrawalsAllowed'] && !currency['isDelisted']); const type = currency['isFiat'] ? 'fiat' : 'crypto'; @@ -286,7 +292,7 @@ module.exports = class crex24 extends Exchange { 'type': type, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'flatWithdrawalFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'flatWithdrawalFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -302,12 +308,12 @@ module.exports = class crex24 extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'minDeposit'), + 'min': this.safeNumber (currency, 'minDeposit'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -337,11 +343,11 @@ module.exports = class crex24 extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -393,16 +399,16 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); const marketId = this.safeString (ticker, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -410,10 +416,10 @@ module.exports = class crex24 extends Exchange { 'last': last, 'previousClose': undefined, // previous day close 'change': undefined, - 'percentage': this.safeFloat (ticker, 'percentChange'), + 'percentage': this.safeNumber (ticker, 'percentChange'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'baseVolume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'baseVolume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -483,14 +489,6 @@ module.exports = class crex24 extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - parseTrade (trade, market = undefined) { // // public fetchTrades @@ -515,14 +513,11 @@ module.exports = class crex24 extends Exchange { // } // const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeString (trade, 'side'); const orderId = this.safeString (trade, 'orderId'); @@ -531,7 +526,7 @@ module.exports = class crex24 extends Exchange { let fee = undefined; const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCode = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -592,11 +587,11 @@ module.exports = class crex24 extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -665,50 +660,19 @@ module.exports = class crex24 extends Exchange { const marketId = this.safeString (order, 'instrument'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'timestamp')); - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remainingVolume'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remainingVolume'); const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'lastUpdate')); - let cost = undefined; - if (remaining !== undefined) { - if (amount !== undefined) { - filled = amount - remaining; - if (this.options['parseOrderToPrecision']) { - filled = parseFloat (this.amountToPrecision (symbol, filled)); - } - filled = Math.max (filled, 0.0); - if (price !== undefined) { - cost = price * filled; - } - } - } const id = this.safeString (order, 'id'); const type = this.safeString (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeString (order, 'side'); const fee = undefined; const trades = undefined; - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } - } + const average = undefined; const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -722,14 +686,14 @@ module.exports = class crex24 extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -764,7 +728,7 @@ module.exports = class crex24 extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPrice extra param for a ' + type + ' order'); } else { @@ -1183,8 +1147,8 @@ module.exports = class crex24 extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'createdAt')); const updated = this.parse8601 (this.safeString (transaction, 'processedAt')); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); const fee = { 'cost': feeCost, 'currency': code, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/currencycom.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/currencycom.js index c8570f1d4..17aa6bfa5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/currencycom.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/currencycom.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, BadRequest } = require ('./base/errors'); -const { ROUND, TICK_SIZE } = require ('./base/functions/number'); +const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -92,6 +93,7 @@ module.exports = class currencycom extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.002, @@ -250,7 +252,7 @@ module.exports = class currencycom extends Exchange { const filtersByType = this.indexBy (filters, 'filterType'); const precision = { 'amount': 1 / Math.pow (1, this.safeInteger (market, 'baseAssetPrecision')), - 'price': this.safeFloat (market, 'tickSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const status = this.safeString (market, 'status'); const active = (status === 'TRADING'); @@ -283,14 +285,14 @@ module.exports = class currencycom extends Exchange { 'max': undefined, }, 'cost': { - 'min': -1 * Math.log10 (precision['amount']), + 'min': -Math.log10 (precision['amount']), 'max': undefined, }, }, }; - const exchangeFee = this.safeFloat2 (market, 'exchangeFee', 'tradingFee'); - const makerFee = this.safeFloat (market, 'makerFee', exchangeFee); - const takerFee = this.safeFloat (market, 'takerFee', exchangeFee); + const exchangeFee = this.safeNumber2 (market, 'exchangeFee', 'tradingFee'); + const makerFee = this.safeNumber (market, 'makerFee', exchangeFee); + const takerFee = this.safeNumber (market, 'takerFee', exchangeFee); if (makerFee !== undefined) { entry['maker'] = makerFee / 100; } @@ -299,65 +301,44 @@ module.exports = class currencycom extends Exchange { } if ('PRICE_FILTER' in filtersByType) { const filter = this.safeValue (filtersByType, 'PRICE_FILTER', {}); - entry['precision']['price'] = this.safeFloat (filter, 'tickSize'); + entry['precision']['price'] = this.safeNumber (filter, 'tickSize'); // PRICE_FILTER reports zero values for maxPrice // since they updated filter types in November 2018 // https://github.com/ccxt/ccxt/issues/4286 // therefore limits['price']['max'] doesn't have any meaningful value except undefined entry['limits']['price'] = { - 'min': this.safeFloat (filter, 'minPrice'), + 'min': this.safeNumber (filter, 'minPrice'), 'max': undefined, }; - const maxPrice = this.safeFloat (filter, 'maxPrice'); + const maxPrice = this.safeNumber (filter, 'maxPrice'); if ((maxPrice !== undefined) && (maxPrice > 0)) { entry['limits']['price']['max'] = maxPrice; } } if ('LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'LOT_SIZE', {}); - entry['precision']['amount'] = this.safeFloat (filter, 'stepSize'); + entry['precision']['amount'] = this.safeNumber (filter, 'stepSize'); entry['limits']['amount'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MARKET_LOT_SIZE' in filtersByType) { const filter = this.safeValue (filtersByType, 'MARKET_LOT_SIZE', {}); entry['limits']['market'] = { - 'min': this.safeFloat (filter, 'minQty'), - 'max': this.safeFloat (filter, 'maxQty'), + 'min': this.safeNumber (filter, 'minQty'), + 'max': this.safeNumber (filter, 'maxQty'), }; } if ('MIN_NOTIONAL' in filtersByType) { const filter = this.safeValue (filtersByType, 'MIN_NOTIONAL', {}); - entry['limits']['cost']['min'] = this.safeFloat (filter, 'minNotional'); + entry['limits']['cost']['min'] = this.safeNumber (filter, 'minNotional'); } result.push (entry); } return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchAccounts (params = {}) { const response = await this.privateGetAccount (params); // @@ -404,8 +385,8 @@ module.exports = class currencycom extends Exchange { const response = await this.privateGetAccount (params); return { 'info': response, - 'maker': this.safeFloat (response, 'makerCommission'), - 'taker': this.safeFloat (response, 'takerCommission'), + 'maker': this.safeNumber (response, 'makerCommission'), + 'taker': this.safeNumber (response, 'takerCommission'), }; } @@ -439,11 +420,11 @@ module.exports = class currencycom extends Exchange { const currencyId = this.safeString (balance, 'asset'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -542,8 +523,8 @@ module.exports = class currencycom extends Exchange { const timestamp = this.safeInteger (ticker, 'closeTime'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPrice'); - const open = this.safeFloat (ticker, 'openPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); let average = undefined; if ((open !== undefined) && (last !== undefined)) { average = this.sum (open, last) / 2; @@ -552,22 +533,22 @@ module.exports = class currencycom extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat (ticker, 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat (ticker, 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), - 'vwap': this.safeFloat (ticker, 'weightedAvgPrice'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber (ticker, 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber (ticker, 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), + 'vwap': this.safeNumber (ticker, 'weightedAvgPrice'), 'open': open, 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'prevClosePrice'), // previous day close - 'change': this.safeFloat (ticker, 'priceChange'), - 'percentage': this.safeFloat (ticker, 'priceChangePercent'), + 'previousClose': this.safeNumber (ticker, 'prevClosePrice'), // previous day close + 'change': this.safeNumber (ticker, 'priceChange'), + 'percentage': this.safeNumber (ticker, 'priceChangePercent'), 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume'), 'info': ticker, }; } @@ -602,14 +583,6 @@ module.exports = class currencycom extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker24hr (params); @@ -642,11 +615,11 @@ module.exports = class currencycom extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -712,8 +685,11 @@ module.exports = class currencycom extends Exchange { // } // const timestamp = this.safeInteger2 (trade, 'T', 'time'); - const price = this.safeFloat2 (trade, 'p', 'price'); - const amount = this.safeFloat2 (trade, 'q', 'qty'); + const priceString = this.safeString2 (trade, 'p', 'price'); + const amountString = this.safeString2 (trade, 'q', 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString2 (trade, 'a', 'id'); let side = undefined; const orderId = this.safeString (trade, 'orderId'); @@ -729,7 +705,7 @@ module.exports = class currencycom extends Exchange { let fee = undefined; if ('commission' in trade) { fee = { - 'cost': this.safeFloat (trade, 'commission'), + 'cost': this.safeNumber (trade, 'commission'), 'currency': this.safeCurrencyCode (this.safeString (trade, 'commissionAsset')), }; } @@ -751,7 +727,7 @@ module.exports = class currencycom extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': price * amount, + 'cost': cost, 'fee': fee, }; } @@ -827,66 +803,21 @@ module.exports = class currencycom extends Exchange { } else if ('transactTime' in order) { timestamp = this.safeInteger (order, 'transactTime'); } - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'origQty'); - const filled = this.safeFloat (order, 'executedQty'); - let remaining = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - if (this.options['parseOrderToPrecision']) { - remaining = parseFloat (this.amountToPrecision (symbol, remaining)); - } - remaining = Math.max (remaining, 0.0); - } - if (price !== undefined) { - if (cost === undefined) { - cost = price * filled; - } - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'origQty'); + const filled = this.safeNumber (order, 'executedQty'); + const remaining = undefined; + const cost = this.safeNumber (order, 'cummulativeQuoteQty'); const id = this.safeString (order, 'orderId'); const type = this.safeStringLower (order, 'type'); - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const side = this.safeStringLower (order, 'side'); - let fee = undefined; let trades = undefined; const fills = this.safeValue (order, 'fills'); if (fills !== undefined) { trades = this.parseTrades (fills, market); - const numTrades = trades.length; - if (numTrades > 0) { - cost = trades[0]['cost']; - fee = { - 'cost': trades[0]['fee']['cost'], - 'currency': trades[0]['fee']['currency'], - }; - for (let i = 1; i < trades.length; i++) { - cost = this.sum (cost, trades[i]['cost']); - fee['cost'] = this.sum (fee['cost'], trades[i]['fee']['cost']); - } - } - } - let average = undefined; - if (cost !== undefined) { - if (filled) { - average = cost / filled; - } - if (this.options['parseOrderToPrecision']) { - cost = parseFloat (this.costToPrecision (symbol, cost)); - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'timestamp': timestamp, @@ -900,13 +831,13 @@ module.exports = class currencycom extends Exchange { 'stopPrice': undefined, 'amount': amount, 'cost': cost, - 'average': average, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/delta.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/delta.js index 9b3c559bf..028cdf3ac 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/delta.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/delta.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, BadRequest, BadSymbol, InvalidOrder, AuthenticationError, ArgumentsRequired, OrderNotFound, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -258,14 +259,14 @@ module.exports = class delta extends Exchange { 'name': this.safeString (currency, 'name'), 'info': currency, // the original payload 'active': active, - 'fee': this.safeFloat (currency, 'base_withdrawal_fee'), + 'fee': this.safeNumber (currency, 'base_withdrawal_fee'), 'precision': 1 / Math.pow (10, precision), 'limits': { 'amount': { 'min': undefined, 'max': undefined }, 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal_amount'), + 'min': this.safeNumber (currency, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -399,26 +400,26 @@ module.exports = class delta extends Exchange { } const precision = { 'amount': 1.0, // number of contracts - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; const limits = { 'amount': { 'min': 1.0, - 'max': this.safeFloat (market, 'position_size_limit'), + 'max': this.safeNumber (market, 'position_size_limit'), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_size'), + 'min': this.safeNumber (market, 'min_size'), 'max': undefined, }, }; const state = this.safeString (market, 'state'); const active = (state === 'live'); - const maker = this.safeFloat (market, 'maker_commission_rate'); - const taker = this.safeFloat (market, 'taker_commission_rate'); + const maker = this.safeNumber (market, 'maker_commission_rate'); + const taker = this.safeNumber (market, 'taker_commission_rate'); result.push ({ 'id': id, 'numericId': numericId, @@ -466,8 +467,8 @@ module.exports = class delta extends Exchange { const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.001); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'close'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; let percentage = undefined; @@ -478,15 +479,15 @@ module.exports = class delta extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'turnover'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'turnover'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -656,12 +657,11 @@ module.exports = class delta extends Exchange { const orderId = this.safeString (trade, 'order_id'); let timestamp = this.parse8601 (this.safeString (trade, 'created_at')); timestamp = this.safeIntegerProduct (trade, 'timestamp', 0.001, timestamp); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const product = this.safeValue (trade, 'product', {}); const marketId = this.safeString (product, 'symbol'); const symbol = this.safeSymbol (marketId, market); @@ -680,7 +680,7 @@ module.exports = class delta extends Exchange { if (type !== undefined) { type = type.replace ('_order', ''); } - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { const settlingAsset = this.safeValue (product, 'settling_asset', {}); @@ -747,11 +747,11 @@ module.exports = class delta extends Exchange { // return [ this.safeTimestamp (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -821,11 +821,11 @@ module.exports = class delta extends Exchange { const currency = this.safeValue (currenciesByNumericId, currencyId); const code = (currency === undefined) ? currencyId : currency['code']; const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchPosition (symbol, params = undefined) { @@ -849,7 +849,7 @@ module.exports = class delta extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetPositionsMargined (params); // @@ -930,20 +930,12 @@ module.exports = class delta extends Exchange { const side = this.safeString (order, 'side'); let type = this.safeString (order, 'order_type'); type = type.replace ('_order', ''); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'size'); - const remaining = this.safeFloat (order, 'unfilled_size'); - let filled = undefined; - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let cost = undefined; - const average = this.safeFloat (order, 'average_fill_price'); - if ((average !== undefined) && filled) { - cost = average * filled; - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'size'); + const remaining = this.safeNumber (order, 'unfilled_size'); + const average = this.safeNumber (order, 'average_fill_price'); let fee = undefined; - const feeCost = this.safeFloat (order, 'paid_commission'); + const feeCost = this.safeNumber (order, 'paid_commission'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -956,7 +948,7 @@ module.exports = class delta extends Exchange { 'currency': feeCurrencyCode, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -968,14 +960,14 @@ module.exports = class delta extends Exchange { 'side': side, 'price': price, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1374,9 +1366,9 @@ module.exports = class delta extends Exchange { const currenciesByNumericId = this.safeValue (this.options, 'currenciesByNumericId'); currency = this.safeValue (currenciesByNumericId, currencyId, currency); const code = (currency === undefined) ? undefined : currency['code']; - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'created_at')); - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const before = Math.max (0, after - amount); const status = 'ok'; return { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/deribit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/deribit.js index f277c3975..1a7c91bec 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/deribit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/deribit.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); const { AuthenticationError, ExchangeError, ArgumentsRequired, PermissionDenied, InvalidOrder, OrderNotFound, DDoSProtection, NotSupported, ExchangeNotAvailable, InsufficientFunds, BadRequest, InvalidAddress, OnMaintenance } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -435,8 +436,8 @@ module.exports = class deribit extends Exchange { const future = (type === 'future'); const option = (type === 'option'); const active = this.safeValue (market, 'is_active'); - const minTradeAmount = this.safeFloat (market, 'min_trade_amount'); - const tickSize = this.safeFloat (market, 'tick_size'); + const minTradeAmount = this.safeNumber (market, 'min_trade_amount'); + const tickSize = this.safeNumber (market, 'tick_size'); const precision = { 'amount': minTradeAmount, 'price': tickSize, @@ -448,8 +449,8 @@ module.exports = class deribit extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_commission'), - 'maker': this.safeFloat (market, 'maker_commission'), + 'taker': this.safeNumber (market, 'taker_commission'), + 'maker': this.safeNumber (market, 'maker_commission'), 'limits': { 'amount': { 'min': minTradeAmount, @@ -532,11 +533,11 @@ module.exports = class deribit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const currencyCode = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableFunds'); - account['used'] = this.safeFloat (balance, 'maintenanceMargin'); - account['total'] = this.safeFloat (balance, 'equity'); + account['free'] = this.safeString (balance, 'availableFunds'); + account['used'] = this.safeString (balance, 'maintenanceMargin'); + account['total'] = this.safeString (balance, 'equity'); result[currencyCode] = account; - return this.parseBalance (result); + return this.parseBalance (result, false); } async createDepositAddress (code, params = {}) { @@ -654,18 +655,18 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger2 (ticker, 'timestamp', 'creation_timestamp'); const marketId = this.safeString (ticker, 'instrument_name'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat2 (ticker, 'last_price', 'last'); + const last = this.safeNumber2 (ticker, 'last_price', 'last'); const stats = this.safeValue (ticker, 'stats', ticker); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (stats, 'high', 'max_price'), - 'low': this.safeFloat2 (stats, 'low', 'min_price'), - 'bid': this.safeFloat2 (ticker, 'best_bid_price', 'bid_price'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_amount'), - 'ask': this.safeFloat2 (ticker, 'best_ask_price', 'ask_price'), - 'askVolume': this.safeFloat (ticker, 'best_ask_amount'), + 'high': this.safeNumber2 (stats, 'high', 'max_price'), + 'low': this.safeNumber2 (stats, 'low', 'min_price'), + 'bid': this.safeNumber2 (ticker, 'best_bid_price', 'bid_price'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_amount'), + 'ask': this.safeNumber2 (ticker, 'best_ask_price', 'ask_price'), + 'askVolume': this.safeNumber (ticker, 'best_ask_amount'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -675,7 +676,7 @@ module.exports = class deribit extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (stats, 'volume'), + 'quoteVolume': this.safeNumber (stats, 'volume'), 'info': ticker, }; } @@ -862,21 +863,18 @@ module.exports = class deribit extends Exchange { const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeString (trade, 'direction'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const liquidity = this.safeString (trade, 'liquidity'); let takerOrMaker = undefined; if (liquidity !== undefined) { // M = maker, T = taker, MT = both takerOrMaker = (liquidity === 'M') ? 'maker' : 'taker'; } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -1056,31 +1054,21 @@ module.exports = class deribit extends Exchange { const timestamp = this.safeInteger (order, 'creation_timestamp'); const lastUpdate = this.safeInteger (order, 'last_update_timestamp'); const id = this.safeString (order, 'order_id'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'average_price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'average_price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); let lastTradeTimestamp = undefined; if (filled !== undefined) { if (filled > 0) { lastTradeTimestamp = lastUpdate; } } - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = price * filled; - } - } const status = this.parseOrderStatus (this.safeString (order, 'order_state')); const marketId = this.safeString (order, 'instrument_name'); market = this.safeMarket (marketId, market); const side = this.safeStringLower (order, 'direction'); - let feeCost = this.safeFloat (order, 'commission'); + let feeCost = this.safeNumber (order, 'commission'); let fee = undefined; if (feeCost !== undefined) { feeCost = Math.abs (feeCost); @@ -1098,7 +1086,7 @@ module.exports = class deribit extends Exchange { const timeInForce = this.parseTimeInForce (this.safeString (order, 'time_in_force')); const stopPrice = this.safeValue (order, 'stop_price'); const postOnly = this.safeValue (order, 'post_only'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1113,14 +1101,14 @@ module.exports = class deribit extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1197,7 +1185,7 @@ module.exports = class deribit extends Exchange { } } if (stopPriceIsRequired) { - const stopPrice = this.safeFloat2 (params, 'stop_price', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stop_price', 'stopPrice'); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a stop_price or stopPrice param for a ' + type + ' order'); } else { @@ -1596,7 +1584,7 @@ module.exports = class deribit extends Exchange { const updated = this.safeInteger (transaction, 'updated_timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const address = this.safeString (transaction, 'address'); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let type = 'deposit'; let fee = undefined; if (feeCost !== undefined) { @@ -1619,7 +1607,7 @@ module.exports = class deribit extends Exchange { 'tagTo': undefined, 'tagFrom': undefined, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, @@ -1665,7 +1653,7 @@ module.exports = class deribit extends Exchange { return result; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.codeFromOptions ('fetchPositions'); const currency = this.currency (code); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/digifinex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/digifinex.js index 6584b919c..528126688 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/digifinex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/digifinex.js @@ -3,7 +3,8 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); -const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ArgumentsRequired, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const { AccountSuspended, BadRequest, BadResponse, NetworkError, DDoSProtection, AuthenticationError, PermissionDenied, ExchangeError, InsufficientFunds, InvalidOrder, InvalidNonce, OrderNotFound, InvalidAddress, RateLimitExceeded, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -61,11 +62,6 @@ module.exports = class digifinex extends Exchange { 'referral': 'https://www.digifinex.com/en-ww/from/DhOzBg?channelCode=ljaUPp', }, 'api': { - 'v2': { - 'get': [ - 'ticker', - ], - }, 'public': { 'get': [ '{market}/symbols', @@ -191,6 +187,7 @@ module.exports = class digifinex extends Exchange { }, 'commonCurrencies': { 'BHT': 'Black House Test', + 'EPS': 'Epanus', 'MBN': 'Mobilian Coin', 'TEL': 'TEL666', }, @@ -245,7 +242,7 @@ module.exports = class digifinex extends Exchange { const depositStatus = this.safeValue (currency, 'deposit_status', 1); const withdrawStatus = this.safeValue (currency, 'withdraw_status', 1); const active = depositStatus && withdrawStatus; - const fee = this.safeFloat (currency, 'withdraw_fee_rate'); + const fee = this.safeNumber (currency, 'withdraw_fee_rate'); if (code in result) { if (Array.isArray (result[code]['info'])) { result[code]['info'].push (currency); @@ -276,7 +273,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw_amount'), + 'min': this.safeNumber (currency, 'min_withdraw_amount'), 'max': undefined, }, }, @@ -330,7 +327,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minimum_amount'), + 'min': this.safeNumber (market, 'minimum_amount'), 'max': undefined, }, 'price': { @@ -338,7 +335,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minimum_value'), + 'min': this.safeNumber (market, 'minimum_value'), 'max': undefined, }, }; @@ -352,7 +349,7 @@ module.exports = class digifinex extends Exchange { // const status = this.safeString (market, 'status'); // const active = (status === 'TRADING'); // - const isAllowed = this.safeValue (market, 'is_allow', 1); + const isAllowed = this.safeInteger (market, 'is_allow', 1); const active = isAllowed ? true : false; const type = 'spot'; const spot = (type === 'spot'); @@ -408,7 +405,7 @@ module.exports = class digifinex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), + 'min': this.safeNumber (market, 'min_volume'), 'max': undefined, }, 'price': { @@ -416,7 +413,7 @@ module.exports = class digifinex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, }; @@ -461,12 +458,12 @@ module.exports = class digifinex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['used'] = this.safeFloat (balance, 'frozen'); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['used'] = this.safeString (balance, 'frozen'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -500,87 +497,67 @@ module.exports = class digifinex extends Exchange { } async fetchTickers (symbols = undefined, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTickers() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); - const request = { - 'apiKey': apiKey, - }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (params); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const result = {}; - const tickers = this.safeValue (response, 'ticker', {}); + const tickers = this.safeValue (response, 'ticker', []); const date = this.safeInteger (response, 'date'); - const reversedMarketIds = Object.keys (tickers); - for (let i = 0; i < reversedMarketIds.length; i++) { - const reversedMarketId = reversedMarketIds[i]; - const ticker = this.extend ({ + for (let i = 0; i < tickers.length; i++) { + const rawTicker = this.extend ({ 'date': date, - }, tickers[reversedMarketId]); - const [ quoteId, baseId ] = reversedMarketId.split ('_'); - const marketId = baseId.toUpperCase () + '_' + quoteId.toUpperCase (); - const market = this.safeMarket (marketId, undefined, '_'); - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); + }, tickers[i]); + const ticker = this.parseTicker (rawTicker); + const symbol = ticker['symbol']; + result[symbol] = ticker; } return this.filterByArray (result, 'symbol', symbols); } async fetchTicker (symbol, params = {}) { - const apiKey = this.safeValue (params, 'apiKey', this.apiKey); - if (!apiKey) { - throw new ArgumentsRequired (this.id + ' fetchTicker() is a private v2 endpoint that requires an `exchange.apiKey` credential or an `apiKey` extra parameter'); - } await this.loadMarkets (); const market = this.market (symbol); - // reversed base/quote in v2 - const marketId = market['quoteId'].toLowerCase () + '_' + market['baseId'].toLowerCase (); const request = { - 'symbol': marketId, - 'apiKey': apiKey, + 'symbol': market['id'], }; - const response = await this.v2GetTicker (this.extend (request, params)); + const response = await this.publicGetTicker (this.extend (request, params)); // - // { - // "ticker":{ - // "btc_eth":{ - // "last":0.021957, - // "base_vol":2249.3521732227, - // "change":-0.6, - // "vol":102443.5111, - // "sell":0.021978, - // "low":0.021791, - // "buy":0.021946, - // "high":0.022266 - // } - // }, - // "date":1564518452, - // "code":0 - // } + // { + // "ticker": [{ + // "vol": 40717.4461, + // "change": -1.91, + // "base_vol": 392447999.65374, + // "sell": 9592.23, + // "last": 9592.22, + // "symbol": "btc_usdt", + // "low": 9476.24, + // "buy": 9592.03, + // "high": 9793.87 + // }], + // "date": 1589874294, + // "code": 0 + // } // const date = this.safeInteger (response, 'date'); - const ticker = this.safeValue (response, 'ticker', {}); - let result = this.safeValue (ticker, marketId, {}); - result = this.extend ({ 'date': date }, result); + const tickers = this.safeValue (response, 'ticker', []); + const firstTicker = this.safeValue (tickers, 0, {}); + const result = this.extend ({ 'date': date }, firstTicker); return this.parseTicker (result, market); } @@ -590,6 +567,7 @@ module.exports = class digifinex extends Exchange { // // { // "last":0.021957, + // "symbol": "btc_usdt", // "base_vol":2249.3521732227, // "change":-0.6, // "vol":102443.5111, @@ -600,22 +578,20 @@ module.exports = class digifinex extends Exchange { // "date"1564518452, // injected from fetchTicker/fetchTickers // } // - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeStringUpper (ticker, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -625,8 +601,8 @@ module.exports = class digifinex extends Exchange { 'change': undefined, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'base_vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'base_vol'), 'info': ticker, }; } @@ -662,18 +638,15 @@ module.exports = class digifinex extends Exchange { const orderId = this.safeString (trade, 'order_id'); const timestamp = this.safeTimestamp2 (trade, 'date', 'timestamp'); const side = this.safeString2 (trade, 'type', 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); const takerOrMaker = this.safeValue (trade, 'is_maker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency'); @@ -775,11 +748,11 @@ module.exports = class digifinex extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 5), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 1), // volume + this.safeNumber (ohlcv, 5), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 1), // volume ]; } @@ -970,21 +943,11 @@ module.exports = class digifinex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executed_amount'); - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_price'); - let remaining = undefined; - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - return { + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executed_amount'); + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1000,13 +963,13 @@ module.exports = class digifinex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'average': average, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1200,7 +1163,7 @@ module.exports = class digifinex extends Exchange { const code = this.safeCurrencyCode (this.safeString (item, 'currency_mark'), currency); const timestamp = this.safeTimestamp (item, 'time'); const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -1263,16 +1226,6 @@ module.exports = class digifinex extends Exchange { return this.parseLedger (items, currency, since, limit); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -1425,8 +1378,8 @@ module.exports = class digifinex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_date')); const updated = this.parse8601 (this.safeString (transaction, 'finished_date')); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'amount'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; @@ -1476,7 +1429,7 @@ module.exports = class digifinex extends Exchange { } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const version = (api === 'v2') ? api : this.version; + const version = this.version; let url = this.urls['api'] + '/' + version + '/' + this.implodeParams (path, params); const query = this.omit (params, this.extractParams (path)); const urlencoded = this.urlencode (this.keysort (query)); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/dsx.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/dsx.js deleted file mode 100644 index 349fc2489..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/dsx.js +++ /dev/null @@ -1,1274 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, BadRequest, InsufficientFunds, PermissionDenied, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class dsx extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'dsx', - 'name': 'DSX', - 'countries': [ 'UK' ], - 'rateLimit': 1500, - 'version': 'v3', - 'has': { - 'cancelOrder': true, - 'CORS': false, - 'createDepositAddress': true, - 'createMarketOrder': false, - 'createOrder': true, - 'fetchBalance': true, - 'fetchClosedOrders': false, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOHLCV': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchOrderBooks': true, - 'fetchOrders': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTransactions': true, - 'fetchTrades': true, - 'withdraw': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/76909626-cb2bb100-68bc-11ea-99e0-28ba54f04792.jpg', - 'api': { - 'public': 'https://dsxglobal.com/mapi', // market data - 'private': 'https://dsxglobal.com/tapi', // trading - 'dwapi': 'https://dsxglobal.com/dwapi', // deposit/withdraw - }, - 'www': 'https://dsxglobal.com', - 'doc': [ - 'https://dsxglobal.com/developers/publicApi', - ], - }, - 'fees': { - 'trading': { - 'tierBased': true, - 'percentage': true, - 'maker': 0.15 / 100, - 'taker': 0.25 / 100, - }, - }, - 'timeframes': { - '1m': 'm', - '1h': 'h', - '1d': 'd', - }, - 'api': { - // market data (public) - 'public': { - 'get': [ - 'barsFromMoment/{pair}/{period}/{start}', - 'depth/{pair}', - 'info', - 'lastBars/{pair}/{period}/{amount}', // period is 'm', 'h' or 'd' - 'periodBars/{pair}/{period}/{start}/{end}', - 'ticker/{pair}', - 'trades/{pair}', - ], - }, - // trading (private) - 'private': { - 'post': [ - 'info/account', - 'history/transactions', - 'history/trades', - 'history/orders', - 'orders', - 'order/cancel', - // 'order/cancel/all', - 'order/status', - 'order/new', - 'volume', - 'fees', // trading fee schedule - ], - }, - // deposit / withdraw (private) - 'dwapi': { - 'post': [ - 'deposit/cryptoaddress', - 'withdraw/crypto', - 'withdraw/fiat', - 'withdraw/submit', - // 'withdraw/cancel', - 'transaction/status', // see 'history/transactions' in private tapi above - ], - }, - }, - 'exceptions': { - 'exact': { - 'Sign is invalid': AuthenticationError, // {"success":0,"error":"Sign is invalid"} - 'Order was rejected. Incorrect price.': InvalidOrder, // {"success":0,"error":"Order was rejected. Incorrect price."} - "Order was rejected. You don't have enough money.": InsufficientFunds, // {"success":0,"error":"Order was rejected. You don't have enough money."} - 'This method is blocked for your pair of keys': PermissionDenied, // {"success":0,"error":"This method is blocked for your pair of keys"} - }, - 'broad': { - 'INVALID_PARAMETER': BadRequest, - 'Invalid pair name': ExchangeError, // {"success":0,"error":"Invalid pair name: btc_eth"} - 'invalid api key': AuthenticationError, - 'invalid sign': AuthenticationError, - 'api key dont have trade permission': AuthenticationError, - 'invalid parameter': InvalidOrder, - 'invalid order': InvalidOrder, - 'Requests too often': DDoSProtection, - 'not available': ExchangeNotAvailable, - 'data unavailable': ExchangeNotAvailable, - 'external service unavailable': ExchangeNotAvailable, - 'nonce is invalid': InvalidNonce, // {"success":0,"error":"Parameter: nonce is invalid"} - 'Incorrect volume': InvalidOrder, // {"success": 0,"error":"Order was rejected. Incorrect volume."} - }, - }, - 'options': { - 'fetchTickersMaxLength': 250, - }, - 'commonCurrencies': { - 'DSH': 'DASH', - }, - }); - } - - async fetchMarkets (params = {}) { - const response = await this.publicGetInfo (params); - // - // { - // "server_time": 1522057909, - // "pairs": { - // "ethusd": { - // "decimal_places": 5, - // "min_price": 100, - // "max_price": 1500, - // "min_amount": 0.01, - // "hidden": 0, - // "fee": 0, - // "amount_decimal_places": 4, - // "quoted_currency": "USD", - // "base_currency": "ETH" - // } - // } - // } - // - const markets = this.safeValue (response, 'pairs'); - const keys = Object.keys (markets); - const result = []; - for (let i = 0; i < keys.length; i++) { - const id = keys[i]; - const market = markets[id]; - const baseId = this.safeString (market, 'base_currency'); - const quoteId = this.safeString (market, 'quoted_currency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const precision = { - 'amount': this.safeInteger (market, 'decimal_places'), - 'price': this.safeInteger (market, 'decimal_places'), - }; - const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), - }; - const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), - }; - const costLimits = { - 'min': this.safeFloat (market, 'min_total'), - }; - const limits = { - 'amount': amountLimits, - 'price': priceLimits, - 'cost': costLimits, - }; - const hidden = this.safeInteger (market, 'hidden'); - const active = (hidden === 0); - // see parseMarket below - // https://github.com/ccxt/ccxt/pull/5786 - const otherId = base.toLowerCase () + quote.toLowerCase (); - result.push ({ - 'id': id, - 'otherId': otherId, // https://github.com/ccxt/ccxt/pull/5786 - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': active, - 'precision': precision, - 'limits': limits, - 'info': market, - }); - } - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostInfoAccount (); - // - // { - // "success" : 1, - // "return" : { - // "funds" : { - // "BTC" : { - // "total" : 0, - // "available" : 0 - // }, - // "USD" : { - // "total" : 0, - // "available" : 0 - // }, - // "USDT" : { - // "total" : 0, - // "available" : 0 - // } - // }, - // "rights" : { - // "info" : 1, - // "trade" : 1 - // }, - // "transactionCount" : 0, - // "openOrders" : 0, - // "serverTime" : 1537451465 - // } - // } - // - const balances = this.safeValue (response, 'return'); - const result = { 'info': response }; - const funds = this.safeValue (balances, 'funds'); - const currencyIds = Object.keys (funds); - for (let i = 0; i < currencyIds.length; i++) { - const currencyId = currencyIds[i]; - const code = this.safeCurrencyCode (currencyId); - const balance = this.safeValue (funds, currencyId, {}); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseTicker (ticker, market = undefined) { - // - // { high: 0.03492, - // low: 0.03245, - // avg: 29.46133, - // vol: 500.8661, - // vol_cur: 17.000797104, - // last: 0.03364, - // buy: 0.03362, - // sell: 0.03381, - // updated: 1537521993, - // pair: "ethbtc" } - // - const timestamp = this.safeTimestamp (ticker, 'updated'); - let symbol = undefined; - const marketId = this.safeString (ticker, 'pair'); - market = this.parseMarket (marketId); - if (market !== undefined) { - symbol = market['symbol']; - } - // dsx average is inverted, liqui average is not - let average = this.safeFloat (ticker, 'avg'); - if (average !== undefined) { - if (average > 0) { - average = 1 / average; - } - } - const last = this.safeFloat (ticker, 'last'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_cur'), - 'info': ticker, - }; - } - - parseTrade (trade, market = undefined) { - // - // fetchTrades (public) - // - // { - // "amount" : 0.0128, - // "price" : 6483.99000, - // "timestamp" : 1540334614, - // "tid" : 35684364, - // "type" : "ask" - // } - // - // fetchMyTrades (private) - // - // { - // "number": "36635882", // <-- this is present if the trade has come from the '/order/status' call - // "id": "36635882", // <-- this may have been artifically added by the parseTrades method - // "pair": "btcusd", - // "type": "buy", - // "volume": 0.0595, - // "rate": 9750, - // "orderId": 77149299, - // "timestamp": 1519612317, - // "commission": 0.00020825, - // "commissionCurrency": "btc" - // } - // - const timestamp = this.safeTimestamp (trade, 'timestamp'); - let side = this.safeString (trade, 'type'); - if (side === 'ask') { - side = 'sell'; - } else if (side === 'bid') { - side = 'buy'; - } - const price = this.safeFloat2 (trade, 'rate', 'price'); - const id = this.safeString2 (trade, 'number', 'id'); - const orderId = this.safeString (trade, 'orderId'); - const marketId = this.safeString (trade, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const amount = this.safeFloat2 (trade, 'amount', 'volume'); - const type = 'limit'; // all trades are still limit trades - let takerOrMaker = undefined; - let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); - if (feeCost !== undefined) { - const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); - const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - fee = { - 'cost': feeCost, - 'currency': feeCurrencyCode, - }; - } - const isYourOrder = this.safeValue (trade, 'is_your_order'); - if (isYourOrder !== undefined) { - takerOrMaker = 'taker'; - if (isYourOrder) { - takerOrMaker = 'maker'; - } - if (fee === undefined) { - fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); - } - } - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - return { - 'id': id, - 'order': orderId, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'type': type, - 'side': side, - 'takerOrMaker': takerOrMaker, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - 'info': trade, - }; - } - - parseTrades (trades, market = undefined, since = undefined, limit = undefined, params = {}) { - let result = []; - if (Array.isArray (trades)) { - for (let i = 0; i < trades.length; i++) { - result.push (this.parseTrade (trades[i], market)); - } - } else { - const ids = Object.keys (trades); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const trade = this.parseTrade (trades[id], market); - result.push (this.extend (trade, { 'id': id }, params)); - } - } - result = this.sortBy (result, 'timestamp'); - const symbol = (market !== undefined) ? market['symbol'] : undefined; - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const market_id_in_reponse = (market['id'] in response); - if (!market_id_in_reponse) { - throw new ExchangeError (this.id + ' ' + market['symbol'] + ' order book is empty or not available'); - } - const orderbook = response[market['id']]; - return this.parseOrderBook (orderbook); - } - - async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let ids = undefined; - if (symbols === undefined) { - ids = this.ids.join ('-'); - // max URL length is 2083 symbols, including http schema, hostname, tld, etc... - if (ids.length > 2048) { - const numIds = this.ids.length; - throw new ExchangeError (this.id + ' has ' + numIds.toString () + ' symbols exceeding max URL length, you are required to specify a list of symbols in the first argument to fetchOrderBooks'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - if (limit !== undefined) { - request['limit'] = limit; // default = 150, max = 2000 - } - const response = await this.publicGetDepthPair (this.extend (request, params)); - const result = {}; - ids = Object.keys (response); - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - let symbol = id; - if (id in this.markets_by_id) { - const market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseOrderBook (response[id]); - } - return result; - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - let ids = this.ids; - if (symbols === undefined) { - const numIds = ids.length; - ids = ids.join ('-'); - const maxLength = this.safeInteger (this.options, 'fetchTickersMaxLength', 2048); - // max URL length is 2048 symbols, including http schema, hostname, tld, etc... - if (ids.length > this.options['fetchTickersMaxLength']) { - throw new ArgumentsRequired (this.id + ' has ' + numIds.toString () + ' markets exceeding max URL length for this endpoint (' + maxLength.toString () + ' characters), please, specify a list of symbols of interest in the first argument to fetchTickers'); - } - } else { - ids = this.marketIds (symbols); - ids = ids.join ('-'); - } - const request = { - 'pair': ids, - }; - const tickers = await this.publicGetTickerPair (this.extend (request, params)); - // - // { - // "bchbtc" : { - // "high" : 0.02989, - // "low" : 0.02736, - // "avg" : 33.90585, - // "vol" : 0.65982205, - // "vol_cur" : 0.0194604180960, - // "last" : 0.03000, - // "buy" : 0.02980, - // "sell" : 0.03001, - // "updated" : 1568104614, - // "pair" : "bchbtc" - // }, - // "ethbtc" : { - // "high" : 0.01772, - // "low" : 0.01742, - // "avg" : 56.89082, - // "vol" : 229.247115044, - // "vol_cur" : 4.02959737298943, - // "last" : 0.01769, - // "buy" : 0.01768, - // "sell" : 0.01776, - // "updated" : 1568104614, - // "pair" : "ethbtc" - // } - // } - // - const result = {}; - const keys = Object.keys (tickers); - for (let k = 0; k < keys.length; k++) { - const id = keys[k]; - const ticker = tickers[id]; - let symbol = id; - let market = undefined; - if (id in this.markets_by_id) { - market = this.markets_by_id[id]; - symbol = market['symbol']; - } - result[symbol] = this.parseTicker (ticker, market); - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchTicker (symbol, params = {}) { - const tickers = await this.fetchTickers ([ symbol ], params); - return tickers[symbol]; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - }; - if (limit !== undefined) { - request['limit'] = limit; - } - const response = await this.publicGetTradesPair (this.extend (request, params)); - if (Array.isArray (response)) { - const numElements = response.length; - if (numElements === 0) { - return []; - } - } - return this.parseTrades (response[market['id']], market, since, limit); - } - - parseOHLCV (ohlcv, market = undefined) { - // - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // } - // - return [ - this.safeInteger (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), - ]; - } - - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair': market['id'], - 'period': this.timeframes[timeframe], - }; - let method = 'publicGetLastBarsPairPeriodAmount'; - if (since === undefined) { - if (limit === undefined) { - limit = 100; // required, max 2000 - } - request['amount'] = limit; - } else { - method = 'publicGetPeriodBarsPairPeriodStartEnd'; - // in their docs they expect milliseconds - // but it returns empty arrays with milliseconds - // however, it does work properly with seconds - request['start'] = parseInt (since / 1000); - if (limit === undefined) { - request['end'] = this.seconds (); - } else { - const duration = this.parseTimeframe (timeframe) * 1000; - const end = this.sum (since, duration * limit); - request['end'] = parseInt (end / 1000); - } - } - const response = await this[method] (this.extend (request, params)); - // - // { - // "ethbtc": [ - // { - // "high" : 0.01955, - // "open" : 0.01955, - // "low" : 0.01955, - // "close" : 0.01955, - // "amount" : 2.5, - // "timestamp" : 1565155740000 - // }, - // { - // "high" : 0.01967, - // "open" : 0.01967, - // "low" : 0.01967, - // "close" : 0.01967, - // "amount" : 0, - // "timestamp" : 1565155680000 - // } - // ] - // } - // - const candles = this.safeValue (response, market['id'], []); - return this.parseOHLCVs (candles, market, timeframe, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - if (type === 'market' && price === undefined) { - throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument even for market orders, that is the worst price that you agree to fill your order for'); - } - const request = { - 'pair': market['id'], - 'type': side, - 'volume': this.amountToPrecision (symbol, amount), - 'rate': this.priceToPrecision (symbol, price), - 'orderType': type, - }; - price = parseFloat (price); - amount = parseFloat (amount); - const response = await this.privatePostOrderNew (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "received": 0, - // "remains": 10, - // "funds": { - // "BTC": { - // "total": 100, - // "available": 95 - // }, - // "USD": { - // "total": 10000, - // "available": 9995 - // }, - // "EUR": { - // "total": 1000, - // "available": 995 - // }, - // "LTC": { - // "total": 1000, - // "available": 995 - // } - // }, - // "orderId": 0, // https://github.com/ccxt/ccxt/issues/3677 - // } - // } - // - let status = 'open'; - let filled = 0.0; - let remaining = amount; - const responseReturn = this.safeValue (response, 'return'); - let id = this.safeString2 (responseReturn, 'orderId', 'order_id'); - if (id === '0') { - id = this.safeString (responseReturn, 'initOrderId', 'init_order_id'); - status = 'closed'; - } - filled = this.safeFloat (responseReturn, 'received', 0.0); - remaining = this.safeFloat (responseReturn, 'remains', amount); - const timestamp = this.milliseconds (); - return { - 'info': response, - 'id': id, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': type, - 'side': side, - 'price': price, - 'cost': price * filled, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'fee': undefined, - // 'trades': this.parseTrades (order['trades'], market), - }; - } - - parseOrderStatus (status) { - const statuses = { - '0': 'open', // Active - '1': 'closed', // Filled - '2': 'canceled', // Killed - '3': 'canceling', // Killing - '7': 'canceled', // Rejected - }; - return this.safeString (statuses, status, status); - } - - parseMarket (id) { - if (id in this.markets_by_id) { - return this.markets_by_id[id]; - } else { - // the following is a fix for - // https://github.com/ccxt/ccxt/pull/5786 - // https://github.com/ccxt/ccxt/issues/5770 - let markets_by_other_id = this.safeValue (this.options, 'markets_by_other_id'); - if (markets_by_other_id === undefined) { - this.options['markets_by_other_id'] = this.indexBy (this.markets, 'otherId'); - markets_by_other_id = this.options['markets_by_other_id']; - } - if (id in markets_by_other_id) { - return markets_by_other_id[id]; - } - } - return undefined; - } - - parseOrder (order, market = undefined) { - // - // fetchOrder - // - // { - // "number": 36635882, - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // - const id = this.safeString (order, 'id'); - const status = this.parseOrderStatus (this.safeString (order, 'status')); - const timestamp = this.safeTimestamp (order, 'timestampCreated'); - const marketId = this.safeString (order, 'pair'); - market = this.parseMarket (marketId); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const remaining = this.safeFloat (order, 'remainingVolume'); - const amount = this.safeFloat (order, 'volume'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } - } - const orderType = this.safeString (order, 'orderType'); - const side = this.safeString (order, 'type'); - let fee = undefined; - const deals = this.safeValue (order, 'deals', []); - const numDeals = deals.length; - let trades = undefined; - let lastTradeTimestamp = undefined; - if (numDeals > 0) { - trades = this.parseTrades (deals); - let feeCost = undefined; - let feeCurrency = undefined; - for (let i = 0; i < trades.length; i++) { - const trade = trades[i]; - if (feeCost === undefined) { - feeCost = 0; - } - feeCost = this.sum (feeCost, trade['fee']['cost']); - feeCurrency = trade['fee']['currency']; - lastTradeTimestamp = trade['timestamp']; - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': feeCurrency, - }; - } - } - return { - 'info': order, - 'id': id, - 'clientOrderId': undefined, - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, - 'type': orderType, - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': side, - 'price': price, - 'stopPrice': undefined, - 'cost': cost, - 'amount': amount, - 'remaining': remaining, - 'filled': filled, - 'status': status, - 'fee': fee, - 'trades': trades, - }; - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': parseInt (id), - }; - const response = await this.privatePostOrderStatus (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit", - // "deals": [ - // { - // "pair": "btcusd", - // "type": "buy", - // "amount": 1, - // "rate": 1000.0, - // "orderId": 1, - // "timestamp": 1496672724, - // "commission": 0.001, - // "commissionCurrency": "btc" - // } - // ] - // } - // } - // - return this.parseOrder (this.extend ({ - 'id': id, - }, response['return'])); - } - - parseOrdersById (orders, symbol = undefined, since = undefined, limit = undefined) { - const ids = Object.keys (orders); - const result = []; - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.parseOrder (this.extend ({ - 'id': id.toString (), - }, orders[id])); - result.push (order); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - const response = await this.privatePostOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - // 'count': 10, // Decimal, The maximum number of orders to return - // 'fromId': 123, // Decimal, ID of the first order of the selection - // 'endId': 321, // Decimal, ID of the last order of the selection - // 'order': 'ASC', // String, Order in which orders shown. Possible values are "ASC" — from first to last, "DESC" — from last to first. - }; - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryOrders (this.extend (request, params)); - // - // { - // "success": 1, - // "return": { - // "0": { - // "pair": "btcusd", - // "type": "buy", - // "remainingVolume": 10, - // "volume": 10, - // "rate": 1000.0, - // "timestampCreated": 1496670, - // "status": 0, - // "orderType": "limit" - // } - // } - // } - // - return this.parseOrdersById (this.safeValue (response, 'return', {}), symbol, since, limit); - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'orderId': id, - }; - const response = await this.privatePostOrderCancel (this.extend (request, params)); - return response; - } - - parseOrders (orders, market = undefined, since = undefined, limit = undefined, params = {}) { - const result = []; - const ids = Object.keys (orders); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - for (let i = 0; i < ids.length; i++) { - const id = ids[i]; - const order = this.extend ({ 'id': id }, orders[id]); - result.push (this.extend (this.parseOrder (order, market), params)); - } - return this.filterBySymbolSinceLimit (result, symbol, since, limit); - } - - async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - const orders = await this.fetchOrders (symbol, since, limit, params); - return this.filterBy (orders, 'status', 'closed'); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let market = undefined; - // some derived classes use camelcase notation for request fields - const request = { - // 'from': 123456789, // trade ID, from which the display starts numerical 0 (test result: liqui ignores this field) - // 'count': 1000, // the number of trades for display numerical, default = 1000 - // 'from_id': trade ID, from which the display starts numerical 0 - // 'end_id': trade ID on which the display ends numerical ∞ - // 'order': 'ASC', // sorting, default = DESC (test result: liqui ignores this field, most recent trade always goes last) - // 'since': 1234567890, // UTC start time, default = 0 (test result: liqui ignores this field) - // 'end': 1234567890, // UTC end time, default = ∞ (test result: liqui ignores this field) - // 'pair': 'eth_btc', // default = all markets - }; - if (symbol !== undefined) { - market = this.market (symbol); - request['pair'] = market['id']; - } - if (limit !== undefined) { - request['count'] = parseInt (limit); - } - if (since !== undefined) { - request['since'] = parseInt (since / 1000); - } - const response = await this.privatePostHistoryTrades (this.extend (request, params)); - let trades = []; - if ('return' in response) { - trades = response['return']; - } - return this.parseTrades (trades, market, since, limit); - } - - async fetchTransactions (code = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - let currency = undefined; - const request = {}; - if (code !== undefined) { - currency = this.currency (code); - request['currency'] = currency['id']; - } - if (since !== undefined) { - request['since'] = since; - } - if (limit !== undefined) { - request['count'] = limit; - } - const response = await this.privatePostHistoryTransactions (this.extend (request, params)); - // - // { - // "success": 1, - // "return": [ - // { - // "id": 1, - // "timestamp": 11, - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // ] - // } - // - const transactions = this.safeValue (response, 'return', []); - return this.parseTransactions (transactions, currency, since, limit); - } - - parseTransactionStatus (status) { - const statuses = { - '1': 'failed', - '2': 'ok', - '3': 'pending', - '4': 'failed', - }; - return this.safeString (statuses, status, status); - } - - parseTransaction (transaction, currency = undefined) { - // - // { - // "id": 1, - // "timestamp": 11, // 11 in their docs ( - // "type": "Withdraw", - // "amount": 1, - // "currency": "btc", - // "confirmationsCount": 6, - // "address": "address", - // "status": 2, - // "commission": 0.0001 - // } - // - const timestamp = this.safeTimestamp (transaction, 'timestamp'); - let type = this.safeString (transaction, 'type'); - if (type !== undefined) { - if (type === 'Incoming') { - type = 'deposit'; - } else if (type === 'Withdraw') { - type = 'withdrawal'; - } - } - const currencyId = this.safeString (transaction, 'currency'); - const code = this.safeCurrencyCode (currencyId, currency); - const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - return { - 'id': this.safeString (transaction, 'id'), - 'txid': this.safeString (transaction, 'txid'), - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'address': this.safeString (transaction, 'address'), - 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), - 'currency': code, - 'status': status, - 'fee': { - 'currency': code, - 'cost': this.safeFloat (transaction, 'commission'), - 'rate': undefined, - }, - 'info': transaction, - }; - } - - async createDepositAddress (code, params = {}) { - const request = { - 'new': 1, - }; - const response = await this.fetchDepositAddress (code, this.extend (request, params)); - return response; - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency': currency['id'], - }; - const response = await this.dwapiPostDepositCryptoaddress (this.extend (request, params)); - const result = this.safeValue (response, 'return', {}); - const address = this.safeString (result, 'address'); - this.checkAddress (address); - return { - 'currency': code, - 'address': address, - 'tag': undefined, // not documented in DSX API - 'info': response, - }; - } - - async withdraw (code, amount, address, tag = undefined, params = {}) { - this.checkAddress (address); - await this.loadMarkets (); - const currency = this.currency (code); - const commission = this.safeValue (params, 'commission'); - if (commission === undefined) { - throw new ArgumentsRequired (this.id + ' withdraw() requires a `commission` (withdrawal fee) parameter (string)'); - } - params = this.omit (params, commission); - const request = { - 'currency': currency['id'], - 'amount': parseFloat (amount), - 'address': address, - 'commission': commission, - }; - if (tag !== undefined) { - request['address'] += ':' + tag; - } - const response = await this.dwapiPostWithdrawCrypto (this.extend (request, params)); - // - // [ - // { - // "success": 1, - // "return": { - // "transactionId": 2863073 - // } - // } - // ] - // - const data = this.safeValue (response, 'return', {}); - const id = this.safeString (data, 'transactionId'); - return { - 'info': response, - 'id': id, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'][api]; - const query = this.omit (params, this.extractParams (path)); - if (api === 'private' || api === 'dwapi') { - url += '/' + this.version + '/' + this.implodeParams (path, params); - this.checkRequiredCredentials (); - const nonce = this.nonce (); - body = this.urlencode (this.extend ({ - 'nonce': nonce, - }, query)); - const signature = this.hmac (this.encode (body), this.encode (this.secret), 'sha512', 'base64'); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': signature, - }; - } else if (api === 'public') { - url += '/' + this.implodeParams (path, params); - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - url += '/' + this.implodeParams (path, params); - if (method === 'GET') { - if (Object.keys (query).length) { - url += '?' + this.urlencode (query); - } - } else { - if (Object.keys (query).length) { - body = this.json (query); - headers = { - 'Content-Type': 'application/json', - }; - } - } - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - handleErrors (httpCode, reason, url, method, headers, body, response, requestHeaders, requestBody) { - if (response === undefined) { - return; // fallback to default error handler - } - if ('success' in response) { - // - // 1 - Liqui only returns the integer 'success' key from their private API - // - // { "success": 1, ... } httpCode === 200 - // { "success": 0, ... } httpCode === 200 - // - // 2 - However, exchanges derived from Liqui, can return non-integers - // - // It can be a numeric string - // { "sucesss": "1", ... } - // { "sucesss": "0", ... }, httpCode >= 200 (can be 403, 502, etc) - // - // Or just a string - // { "success": "true", ... } - // { "success": "false", ... }, httpCode >= 200 - // - // Or a boolean - // { "success": true, ... } - // { "success": false, ... }, httpCode >= 200 - // - // 3 - Oversimplified, Python PEP8 forbids comparison operator (===) of different types - // - // 4 - We do not want to copy-paste and duplicate the code of this handler to other exchanges derived from Liqui - // - // To cover points 1, 2, 3 and 4 combined this handler should work like this: - // - let success = this.safeValue (response, 'success', false); - if (typeof success === 'string') { - if ((success === 'true') || (success === '1')) { - success = true; - } else { - success = false; - } - } - if (!success) { - const code = this.safeString (response, 'code'); - const message = this.safeString (response, 'error'); - const feedback = this.id + ' ' + body; - this.throwExactlyMatchedException (this.exceptions['exact'], code, feedback); - this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - this.throwBroadlyMatchedException (this.exceptions['broad'], message, feedback); - throw new ExchangeError (feedback); // unknown message - } - } - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/equos.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/equos.js index 5dc44a2ac..0b90d79ed 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/equos.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/equos.js @@ -221,7 +221,7 @@ module.exports = class equos extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minTradeVol'), + 'min': this.safeNumber (market, 'minTradeVol'), 'max': undefined, }, 'price': { @@ -287,7 +287,7 @@ module.exports = class equos extends Exchange { const name = this.safeString (currency, 6); const status = this.safeInteger (currency, 4); const active = (status === 1); - const fee = this.safeFloat (currency, 5); // withdraw_fee + const fee = this.safeNumber (currency, 5); // withdraw_fee return { 'id': id, 'info': currency, @@ -379,8 +379,8 @@ module.exports = class equos extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); return [ this.convertFromScale (price, market['precision']['price']), this.convertFromScale (amount, market['precision']['amount']), @@ -526,9 +526,9 @@ module.exports = class equos extends Exchange { orderId = this.safeString (trade, 'orderId'); side = this.safeStringLower (trade, 'side'); type = this.parseOrderType (this.safeString (trade, 'ordType')); - price = this.safeFloat (trade, 'lastPx'); - amount = this.safeFloat (trade, 'quoteQty'); - let feeCost = this.safeFloat (trade, 'commission'); + price = this.safeNumber (trade, 'lastPx'); + amount = this.safeNumber (trade, 'quoteQty'); + let feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { feeCost = -feeCost; const feeCurrencyId = this.safeString (trade, 'commCurrency'); @@ -599,8 +599,8 @@ module.exports = class equos extends Exchange { if (assetType === 'ASSET') { const currencyId = this.safeString (position, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const quantity = this.safeFloat (position, 'quantity'); - const availableQuantity = this.safeFloat (position, 'availableQuantity'); + const quantity = this.safeNumber (position, 'quantity'); + const availableQuantity = this.safeNumber (position, 'availableQuantity'); const scale = this.safeInteger (position, 'quantity_scale'); const account = this.account (); account['free'] = this.convertFromScale (availableQuantity, scale); @@ -646,7 +646,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -743,7 +743,7 @@ module.exports = class equos extends Exchange { request['ordType'] = 2; request['price'] = this.convertToScale (price, this.getScale (price)); } else { - const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stopPx'); + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'stopPx'); params = this.omit (params, [ 'stopPrice', 'stopPx' ]); if (stopPrice === undefined) { if (type === 'stop') { @@ -1116,7 +1116,7 @@ module.exports = class equos extends Exchange { address = undefined; } const type = this.safeString (transaction, 'type'); - let amount = this.safeFloat (transaction, 'balance_change'); + let amount = this.safeNumber (transaction, 'balance_change'); if (amount === undefined) { amount = this.safeInteger (transaction, 'quantity'); const amountScale = this.safeInteger (transaction, 'quantity_scale'); @@ -1199,8 +1199,8 @@ module.exports = class equos extends Exchange { for (let i = 0; i < tradingFees.length; i++) { const tradingFee = tradingFees[i]; if (this.safeString (tradingFee, 'tier') !== undefined) { - taker[tradingFee['tier']] = this.safeFloat (tradingFee, 'taker'); - maker[tradingFee['tier']] = this.safeFloat (tradingFee, 'maker'); + taker[tradingFee['tier']] = this.safeNumber (tradingFee, 'taker'); + maker[tradingFee['tier']] = this.safeNumber (tradingFee, 'maker'); } } return { @@ -1331,28 +1331,6 @@ module.exports = class equos extends Exchange { let remaining = this.safeInteger (order, 'leavesQty'); const remainingScale = this.safeInteger (order, 'leavesQty_scale'); remaining = this.convertFromScale (remaining, remainingScale); - if (remaining <= 0) { - if ((filled !== undefined) && (amount !== undefined) && (filled < amount)) { - remaining = undefined; - } - } - if ((remaining === undefined) && (amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0); - } - let average = this.safeInteger (order, 'price', 0); - if (average === 0) { - average = undefined; - } - const averageScale = this.safeInteger (order, 'price_scale'); - average = this.convertFromScale (average, averageScale); - let cost = undefined; - if (filled !== 0) { - if (average > 0) { - cost = average * filled; - } else if (price > 0) { - cost = price * filled; - } - } let fee = undefined; const currencyId = this.safeInteger (order, 'feeInstrumentId'); const feeCurrencyCode = this.safeCurrencyCode (currencyId); @@ -1375,7 +1353,7 @@ module.exports = class equos extends Exchange { } const stopPriceScale = this.safeInteger (order, 'stopPx_scale', 0); const stopPrice = this.convertFromScale (this.safeInteger (order, 'stopPx'), stopPriceScale); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, @@ -1390,14 +1368,14 @@ module.exports = class equos extends Exchange { 'price': price, 'stopPrice': stopPrice, 'amount': amount, - 'cost': cost, - 'average': average, + 'cost': undefined, + 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/eterbase.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/eterbase.js index 40d2893d3..531327d1d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/eterbase.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/eterbase.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, InvalidOrder, ExchangeError, BadRequest, BadSymbol } = require ('./base/errors'); const { TRUNCATE, SIGNIFICANT_DIGITS } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // ---------------------------------------------------------------------------- @@ -217,7 +218,7 @@ module.exports = class eterbase extends Exchange { const rule = rules[i]; const attribute = this.safeString (rule, 'attribute'); const condition = this.safeString (rule, 'condition'); - const value = this.safeFloat (rule, 'value'); + const value = this.safeNumber (rule, 'value'); if ((attribute === 'Qty') && (condition === 'Min')) { minAmount = value; } else if ((attribute === 'Qty') && (condition === 'Max')) { @@ -307,7 +308,7 @@ module.exports = class eterbase extends Exchange { 'type': type, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawalFee'), + 'fee': this.safeNumber (currency, 'withdrawalFee'), 'precision': precision, 'limits': { 'amount': { @@ -323,8 +324,8 @@ module.exports = class eterbase extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalMin'), - 'max': this.safeFloat (currency, 'withdrawalMax'), + 'min': this.safeNumber (currency, 'withdrawalMin'), + 'max': this.safeNumber (currency, 'withdrawalMax'), }, }, }; @@ -351,17 +352,17 @@ module.exports = class eterbase extends Exchange { const marketId = this.safeString (ticker, 'marketId'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const last = this.safeFloat (ticker, 'price'); - const baseVolume = this.safeFloat (ticker, 'volumeBase'); - const quoteVolume = this.safeFloat (ticker, 'volume'); + const last = this.safeNumber (ticker, 'price'); + const baseVolume = this.safeNumber (ticker, 'volumeBase'); + const quoteVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); - const percentage = this.safeFloat (ticker, 'change'); + const percentage = this.safeNumber (ticker, 'change'); const result = { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -403,14 +404,6 @@ module.exports = class eterbase extends Exchange { return this.parseTicker (response, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { @@ -465,10 +458,12 @@ module.exports = class eterbase extends Exchange { // "filledAt": 1556355722341 // } // - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -477,9 +472,9 @@ module.exports = class eterbase extends Exchange { 'currency': feeCurrencyCode, }; } - let cost = this.safeFloat (trade, 'qty'); - if ((cost === undefined) && (price !== undefined) && (amount !== undefined)) { - cost = price * amount; + let cost = this.safeNumber (trade, 'qty'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const timestamp = this.safeInteger2 (trade, 'executedAt', 'filledAt'); const tradeSide = this.safeString (trade, 'side'); @@ -577,11 +572,11 @@ module.exports = class eterbase extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -644,14 +639,13 @@ module.exports = class eterbase extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'assetId'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': this.safeFloat (balance, 'reserved'), - 'total': this.safeFloat (balance, 'balance'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -778,18 +772,18 @@ module.exports = class eterbase extends Exchange { } else { type = 'stoplimit'; } - let price = this.safeFloat (order, 'limitPrice'); - const amount = this.safeFloat (order, 'qty'); - let remaining = this.safeFloat (order, 'remainingQty'); + let price = this.safeNumber (order, 'limitPrice'); + const amount = this.safeNumber (order, 'qty'); + let remaining = this.safeNumber (order, 'remainingQty'); let filled = undefined; - const remainingCost = this.safeFloat (order, 'remainingCost'); + const remainingCost = this.safeNumber (order, 'remainingCost'); if ((remainingCost !== undefined) && (remainingCost === 0.0)) { remaining = 0; } if ((amount !== undefined) && (remaining !== undefined)) { filled = Math.max (0, amount - remaining); } - const cost = this.safeFloat (order, 'cost'); + const cost = this.safeNumber (order, 'cost'); if (type === 'market') { if (price === 0.0) { if ((cost !== undefined) && (filled !== undefined)) { @@ -806,7 +800,7 @@ module.exports = class eterbase extends Exchange { } } const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -979,7 +973,7 @@ module.exports = class eterbase extends Exchange { } if ((uppercaseType === 'MARKET') && (uppercaseSide === 'BUY')) { // for market buy it requires the amount of quote currency to spend - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); if (this.options['createMarketBuyOrderRequiresPrice']) { if (cost === undefined) { if (price !== undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exmo.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exmo.js index c9e19479d..d79e42079 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exmo.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exmo.js @@ -112,6 +112,7 @@ module.exports = class exmo extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.2 / 100, @@ -581,18 +582,18 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = marketId.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const maxAmount = this.safeFloat (limit, 'max_q'); - const maxPrice = this.safeFloat (limit, 'max_p'); - const maxCost = this.safeFloat (limit, 'max_a'); - const minAmount = this.safeFloat (limit, 'min_q'); - const minPrice = this.safeFloat (limit, 'min_p'); - const minCost = this.safeFloat (limit, 'min_a'); - minAmounts[base] = Math.min (this.safeFloat (minAmounts, base, minAmount), minAmount); - maxAmounts[base] = Math.max (this.safeFloat (maxAmounts, base, maxAmount), maxAmount); - minPrices[quote] = Math.min (this.safeFloat (minPrices, quote, minPrice), minPrice); - minCosts[quote] = Math.min (this.safeFloat (minCosts, quote, minCost), minCost); - maxPrices[quote] = Math.max (this.safeFloat (maxPrices, quote, maxPrice), maxPrice); - maxCosts[quote] = Math.max (this.safeFloat (maxCosts, quote, maxCost), maxCost); + const maxAmount = this.safeNumber (limit, 'max_q'); + const maxPrice = this.safeNumber (limit, 'max_p'); + const maxCost = this.safeNumber (limit, 'max_a'); + const minAmount = this.safeNumber (limit, 'min_q'); + const minPrice = this.safeNumber (limit, 'min_p'); + const minCost = this.safeNumber (limit, 'min_a'); + minAmounts[base] = Math.min (this.safeNumber (minAmounts, base, minAmount), minAmount); + maxAmounts[base] = Math.max (this.safeNumber (maxAmounts, base, maxAmount), maxAmount); + minPrices[quote] = Math.min (this.safeNumber (minPrices, quote, minPrice), minPrice); + minCosts[quote] = Math.min (this.safeNumber (minCosts, quote, minCost), minCost); + maxPrices[quote] = Math.max (this.safeNumber (maxPrices, quote, maxPrice), maxPrice); + maxCosts[quote] = Math.max (this.safeNumber (maxCosts, quote, maxCost), maxCost); } const result = {}; for (let i = 0; i < ids.length; i++) { @@ -609,16 +610,16 @@ module.exports = class exmo extends Exchange { 'precision': 8, 'limits': { 'amount': { - 'min': this.safeFloat (minAmounts, code), - 'max': this.safeFloat (maxAmounts, code), + 'min': this.safeNumber (minAmounts, code), + 'max': this.safeNumber (maxAmounts, code), }, 'price': { - 'min': this.safeFloat (minPrices, code), - 'max': this.safeFloat (maxPrices, code), + 'min': this.safeNumber (minPrices, code), + 'max': this.safeNumber (maxPrices, code), }, 'cost': { - 'min': this.safeFloat (minCosts, code), - 'max': this.safeFloat (maxCosts, code), + 'min': this.safeNumber (minCosts, code), + 'max': this.safeNumber (maxCosts, code), }, }, 'info': id, @@ -653,8 +654,8 @@ module.exports = class exmo extends Exchange { const [ baseId, quoteId ] = symbol.split ('/'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); - const taker = this.safeFloat (market, 'commission_taker_percent'); - const maker = this.safeFloat (market, 'commission_maker_percent'); + const taker = this.safeNumber (market, 'commission_taker_percent'); + const maker = this.safeNumber (market, 'commission_maker_percent'); result.push ({ 'id': id, 'symbol': symbol, @@ -667,16 +668,16 @@ module.exports = class exmo extends Exchange { 'maker': maker / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, }, 'precision': { @@ -749,11 +750,11 @@ module.exports = class exmo extends Exchange { // return [ this.safeInteger (ohlcv, 't'), - this.safeFloat (ohlcv, 'o'), - this.safeFloat (ohlcv, 'h'), - this.safeFloat (ohlcv, 'l'), - this.safeFloat (ohlcv, 'c'), - this.safeFloat (ohlcv, 'v'), + this.safeNumber (ohlcv, 'o'), + this.safeNumber (ohlcv, 'h'), + this.safeNumber (ohlcv, 'l'), + this.safeNumber (ohlcv, 'c'), + this.safeNumber (ohlcv, 'v'), ]; } @@ -769,14 +770,14 @@ module.exports = class exmo extends Exchange { const currencyId = this.currencyId (code); const account = this.account (); if (currencyId in free) { - account['free'] = this.safeFloat (free, currencyId); + account['free'] = this.safeString (free, currencyId); } if (currencyId in used) { - account['used'] = this.safeFloat (used, currencyId); + account['used'] = this.safeString (used, currencyId); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -834,16 +835,16 @@ module.exports = class exmo extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy_price'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy_price'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell_price'), + 'ask': this.safeNumber (ticker, 'sell_price'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -852,9 +853,9 @@ module.exports = class exmo extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'vol_curr'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'vol_curr'), 'info': ticker, }; } @@ -915,9 +916,9 @@ module.exports = class exmo extends Exchange { let symbol = undefined; const id = this.safeString (trade, 'trade_id'); const orderId = this.safeString (trade, 'order_id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'quantity'); + const cost = this.safeNumber (trade, 'amount'); const side = this.safeString (trade, 'type'); const type = undefined; const marketId = this.safeString (trade, 'pair'); @@ -936,11 +937,11 @@ module.exports = class exmo extends Exchange { } const takerOrMaker = this.safeString (trade, 'exec_type'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission_amount'); + const feeCost = this.safeNumber (trade, 'commission_amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commission_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (trade, 'commission_percent'); + let feeRate = this.safeNumber (trade, 'commission_percent'); if (feeRate !== undefined) { feeRate /= 1000; } @@ -1239,13 +1240,13 @@ module.exports = class exmo extends Exchange { market = this.markets_by_id[marketId]; } } - let amount = this.safeFloat (order, 'quantity'); + let amount = this.safeNumber (order, 'quantity'); if (amount === undefined) { const amountField = (side === 'buy') ? 'in_amount' : 'out_amount'; - amount = this.safeFloat (order, amountField); + amount = this.safeNumber (order, amountField); } - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'amount'); + let price = this.safeNumber (order, 'price'); + let cost = this.safeNumber (order, 'amount'); let filled = 0.0; const trades = []; const transactions = this.safeValue (order, 'trades', []); @@ -1366,24 +1367,6 @@ module.exports = class exmo extends Exchange { return undefined; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { await this.loadMarkets (); const currency = this.currency (code); @@ -1428,7 +1411,7 @@ module.exports = class exmo extends Exchange { // } // const timestamp = this.safeTimestamp (transaction, 'dt'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -1458,7 +1441,7 @@ module.exports = class exmo extends Exchange { // fixed funding fees only (for now) if (!this.fees['funding']['percentage']) { const key = (type === 'withdrawal') ? 'withdraw' : 'deposit'; - let feeCost = this.safeFloat (this.options['fundingFees'][key], code); + let feeCost = this.safeNumber (this.options['fundingFees'][key], code); // users don't pay for cashbacks, no fees for that const provider = this.safeString (transaction, 'provider'); if (provider === 'cashback') { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exx.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exx.js index c4c12d03f..72b59ef1b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exx.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/exx.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ExchangeNotAvailable, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -148,26 +149,26 @@ module.exports = class exx extends Exchange { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); ticker = ticker['ticker']; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'riseRate'), + 'change': this.safeNumber (ticker, 'riseRate'), 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -217,14 +218,11 @@ module.exports = class exx extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -269,14 +267,13 @@ module.exports = class exx extends Exchange { const currencyId = currencies[i]; const balance = balances[currencyId]; const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'balance'), - 'used': this.safeFloat (balance, 'freeze'), - 'total': this.safeFloat (balance, 'total'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'freeze'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { @@ -296,11 +293,10 @@ module.exports = class exx extends Exchange { // const symbol = market['symbol']; const timestamp = parseInt (order['trade_date']); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'trade_money'); - const amount = this.safeFloat (order, 'total_amount'); - const filled = this.safeFloat (order, 'trade_amount', 0.0); - const remaining = parseFloat (this.amountToPrecision (symbol, amount - filled)); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'trade_money'); + const amount = this.safeNumber (order, 'total_amount'); + const filled = this.safeNumber (order, 'trade_amount', 0.0); let status = this.safeInteger (order, 'status'); if (status === 1) { status = 'canceled'; @@ -312,11 +308,11 @@ module.exports = class exx extends Exchange { let fee = undefined; if ('fees' in order) { fee = { - 'cost': this.safeFloat (order, 'fees'), + 'cost': this.safeNumber (order, 'fees'), 'currency': market['quote'], }; } - return { + return this.safeOrder ({ 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -333,12 +329,12 @@ module.exports = class exx extends Exchange { 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/fcoin.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/fcoin.js index 2d1c845ab..2d90e7cce 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/fcoin.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/fcoin.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeError, ExchangeNotAvailable, ArgumentsRequired, InsufficientFunds, InvalidOrder, RateLimitExceeded, InvalidNonce, AuthenticationError, NotSupported } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -223,8 +224,8 @@ module.exports = class fcoin extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'limit_amount_min'), - 'max': this.safeFloat (market, 'limit_amount_max'), + 'min': this.safeNumber (market, 'limit_amount_min'), + 'max': this.safeNumber (market, 'limit_amount_max'), }, 'price': { 'min': Math.pow (10, -precision['price']), @@ -319,12 +320,12 @@ module.exports = class fcoin extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseBidsAsks (orders, priceKey = 0, amountKey = 1) { @@ -337,8 +338,8 @@ module.exports = class fcoin extends Exchange { const priceField = this.sum (index, priceKey); const amountField = this.sum (index, amountKey); result.push ([ - this.safeFloat (orders, priceField), - this.safeFloat (orders, amountField), + this.safeNumber (orders, priceField), + this.safeNumber (orders, amountField), ]); } return result; @@ -386,17 +387,17 @@ module.exports = class fcoin extends Exchange { } } const values = ticker['ticker']; - const last = this.safeFloat (values, 0); + const last = this.safeNumber (values, 0); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (values, 7), - 'low': this.safeFloat (values, 8), - 'bid': this.safeFloat (values, 2), - 'bidVolume': this.safeFloat (values, 3), - 'ask': this.safeFloat (values, 4), - 'askVolume': this.safeFloat (values, 5), + 'high': this.safeNumber (values, 7), + 'low': this.safeNumber (values, 8), + 'bid': this.safeNumber (values, 2), + 'bidVolume': this.safeNumber (values, 3), + 'ask': this.safeNumber (values, 4), + 'askVolume': this.safeNumber (values, 5), 'vwap': undefined, 'open': undefined, 'close': last, @@ -405,8 +406,8 @@ module.exports = class fcoin extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (values, 9), - 'quoteVolume': this.safeFloat (values, 10), + 'baseVolume': this.safeNumber (values, 9), + 'quoteVolume': this.safeNumber (values, 10), 'info': ticker, }; } @@ -419,14 +420,11 @@ module.exports = class fcoin extends Exchange { const timestamp = this.safeInteger (trade, 'ts'); const side = this.safeStringLower (trade, 'side'); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = undefined; return { 'id': id, @@ -551,38 +549,25 @@ module.exports = class fcoin extends Exchange { const symbol = market['symbol']; const orderType = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'created_at'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'filled_amount'); - let remaining = undefined; - let price = this.safeFloat (order, 'price'); - let cost = this.safeFloat (order, 'executed_value'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } else if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'filled_amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'executed_value'); let feeCurrency = undefined; let feeCost = undefined; - const feeRebate = this.safeFloat (order, 'fees_income'); + const feeRebate = this.safeNumber (order, 'fees_income'); if ((feeRebate !== undefined) && (feeRebate > 0)) { if (market !== undefined) { feeCurrency = (side === 'buy') ? market['quote'] : market['base']; } feeCost = -feeRebate; } else { - feeCost = this.safeFloat (order, 'fill_fees'); + feeCost = this.safeNumber (order, 'fill_fees'); if (market !== undefined) { feeCurrency = (side === 'buy') ? market['base'] : market['quote']; } } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -598,7 +583,7 @@ module.exports = class fcoin extends Exchange { 'stopPrice': undefined, 'cost': cost, 'amount': amount, - 'remaining': remaining, + 'remaining': undefined, 'filled': filled, 'average': undefined, 'status': status, @@ -607,7 +592,7 @@ module.exports = class fcoin extends Exchange { 'currency': feeCurrency, }, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -649,11 +634,11 @@ module.exports = class fcoin extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_vol'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_vol'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/flowbtc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/flowbtc.js index 12646489b..45d80935d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/flowbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/flowbtc.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -131,11 +132,11 @@ module.exports = class flowbtc extends Exchange { const currencyId = balance['name']; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['total'] = this.safeFloat (balance, 'hold'); + account['free'] = this.safeString (balance, 'balance'); + account['total'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -156,16 +157,16 @@ module.exports = class flowbtc extends Exchange { }; const ticker = await this.publicPostGetTicker (this.extend (request, params)); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -175,8 +176,8 @@ module.exports = class flowbtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume24hr'), - 'quoteVolume': this.safeFloat (ticker, 'volume24hrProduct2'), + 'baseVolume': this.safeNumber (ticker, 'volume24hr'), + 'quoteVolume': this.safeNumber (ticker, 'volume24hrProduct2'), 'info': ticker, }; } @@ -185,14 +186,11 @@ module.exports = class flowbtc extends Exchange { const timestamp = this.safeTimestamp (trade, 'unixtime'); const side = (trade['incomingOrderSide'] === 0) ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'px'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'px'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'timestamp': timestamp, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/foxbit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/foxbit.js index 5830969a3..b1fb3032b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/foxbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/foxbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89,11 +90,11 @@ module.exports = class foxbit extends Exchange { // otherwise we will lose the info if the currency balance has been funded or traded or not if (currencyId in balances) { const account = this.account (); - let used = this.safeFloat (balances, currencyId + '_locked'); + let used = this.safeNumber (balances, currencyId + '_locked'); if (used !== undefined) { used *= 1e-8; } - let total = this.safeFloat (balances, currencyId); + let total = this.safeNumber (balances, currencyId); if (total !== undefined) { total *= 1e-8; } @@ -128,16 +129,16 @@ module.exports = class foxbit extends Exchange { const timestamp = this.milliseconds (); const lowercaseQuote = market['quote'].toLowerCase (); const quoteVolume = 'vol_' + lowercaseQuote; - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -147,8 +148,8 @@ module.exports = class foxbit extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -161,14 +162,11 @@ module.exports = class foxbit extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ftx.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ftx.js index 18b572cc6..a0e42e8e4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ftx.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ftx.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending } = require ('./base/errors'); +const { ExchangeError, InvalidOrder, BadRequest, InsufficientFunds, OrderNotFound, AuthenticationError, RateLimitExceeded, ExchangeNotAvailable, CancelPending, ArgumentsRequired, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -243,6 +244,7 @@ module.exports = class ftx extends Exchange { 'An unexpected error occurred': ExchangeNotAvailable, // {"error":"An unexpected error occurred, please try again later (58BC21C795).","success":false} 'Please retry request': ExchangeNotAvailable, // {"error":"Please retry request","success":false} 'Please try again': ExchangeNotAvailable, // {"error":"Please try again","success":false} + 'Only have permissions for subaccount': PermissionDenied, // {"success":false,"error":"Only have permissions for subaccount *sub_name*"} }, }, 'precisionMode': TICK_SIZE, @@ -366,8 +368,8 @@ module.exports = class ftx extends Exchange { // check if a market is a spot or future market const symbol = (type === 'future') ? this.safeString (market, 'name') : (base + '/' + quote); const active = this.safeValue (market, 'enabled'); - const sizeIncrement = this.safeFloat (market, 'sizeIncrement'); - const priceIncrement = this.safeFloat (market, 'priceIncrement'); + const sizeIncrement = this.safeNumber (market, 'sizeIncrement'); + const priceIncrement = this.safeNumber (market, 'priceIncrement'); const precision = { 'amount': sizeIncrement, 'price': priceIncrement, @@ -445,28 +447,28 @@ module.exports = class ftx extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); const timestamp = this.safeTimestamp (ticker, 'time', this.milliseconds ()); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidSize'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askSize'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidSize'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askSize'), 'vwap': undefined, 'open': undefined, 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'change24h'), + 'percentage': this.safeNumber (ticker, 'change24h'), 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'quoteVolume24h'), + 'quoteVolume': this.safeNumber (ticker, 'quoteVolume24h'), 'info': ticker, }; } @@ -506,14 +508,6 @@ module.exports = class ftx extends Exchange { return this.parseTicker (result, market); } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetMarkets (params); @@ -592,11 +586,11 @@ module.exports = class ftx extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -717,6 +711,45 @@ module.exports = class ftx extends Exchange { // "type": "otc" // } // + // with -ve fee + // { + // "id": 1171258927, + // "fee": -0.0000713875, + // "side": "sell", + // "size": 1, + // "time": "2021-03-11T13:34:35.523627+00:00", + // "type": "order", + // "price": 14.2775, + // "future": null, + // "market": "SOL/USD", + // "feeRate": -0.000005, + // "orderId": 33182929044, + // "tradeId": 582936801, + // "liquidity": "maker", + // "feeCurrency": "USD", + // "baseCurrency": "SOL", + // "quoteCurrency": "USD" + // } + // + // // from OTC order + // { + // "id": 1172129651, + // "fee": 0, + // "side": "sell", + // "size": 1.47568846, + // "time": "2021-03-11T15:04:46.893383+00:00", + // "type": "otc", + // "price": 14.60932598, + // "future": null, + // "market": null, + // "feeRate": 0, + // "orderId": null, + // "tradeId": null, + // "liquidity": "taker", + // "feeCurrency": "USD", + // "baseCurrency": "BCHA", + // "quoteCurrency": "USD" + // } const id = this.safeString (trade, 'id'); const takerOrMaker = this.safeString (trade, 'liquidity'); const marketId = this.safeString (trade, 'market'); @@ -734,25 +767,24 @@ module.exports = class ftx extends Exchange { } } const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (price !== undefined && amount !== undefined) { - cost = price * amount; - } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { 'cost': feeCost, 'currency': feeCurrencyCode, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } const orderId = this.safeString (trade, 'orderId'); @@ -858,8 +890,8 @@ module.exports = class ftx extends Exchange { const result = this.safeValue (response, 'result', {}); return { 'info': response, - 'maker': this.safeFloat (result, 'makerFee'), - 'taker': this.safeFloat (result, 'takerFee'), + 'maker': this.safeNumber (result, 'makerFee'), + 'taker': this.safeNumber (result, 'takerFee'), }; } @@ -886,11 +918,11 @@ module.exports = class ftx extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'coin')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'free'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -1013,9 +1045,9 @@ module.exports = class ftx extends Exchange { const id = this.safeString (order, 'id'); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); let status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filledSize'); - let remaining = this.safeFloat (order, 'remainingSize'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filledSize'); + let remaining = this.safeNumber (order, 'remainingSize'); if ((remaining === 0.0) && (amount !== undefined) && (filled !== undefined)) { remaining = Math.max (amount - filled, 0); if (remaining > 0) { @@ -1039,15 +1071,15 @@ module.exports = class ftx extends Exchange { } const side = this.safeString (order, 'side'); const type = this.safeString (order, 'type'); - const average = this.safeFloat (order, 'avgFillPrice'); - const price = this.safeFloat2 (order, 'price', 'triggerPrice', average); + const average = this.safeNumber (order, 'avgFillPrice'); + const price = this.safeNumber2 (order, 'price', 'triggerPrice', average); let cost = undefined; if (filled !== undefined && price !== undefined) { cost = filled * price; } const lastTradeTimestamp = this.parse8601 (this.safeString (order, 'triggeredAt')); const clientOrderId = this.safeString (order, 'clientId'); - const stopPrice = this.safeFloat (order, 'triggerPrice'); + const stopPrice = this.safeNumber (order, 'triggerPrice'); const postOnly = this.safeValue (order, 'postOnly'); return { 'info': order, @@ -1093,22 +1125,28 @@ module.exports = class ftx extends Exchange { request['clientId'] = clientOrderId; params = this.omit (params, [ 'clientId', 'clientOrderId' ]); } - let priceToPrecision = undefined; - if (price !== undefined) { - priceToPrecision = parseFloat (this.priceToPrecision (symbol, price)); - } - let method = 'privatePostConditionalOrders'; + let method = undefined; if (type === 'limit') { method = 'privatePostOrders'; - request['price'] = priceToPrecision; + request['price'] = parseFloat (this.priceToPrecision (symbol, price)); } else if (type === 'market') { method = 'privatePostOrders'; request['price'] = null; } else if ((type === 'stop') || (type === 'takeProfit')) { - request['triggerPrice'] = priceToPrecision; - // request['orderPrice'] = number; // optional, order type is limit if this is specified, otherwise market + method = 'privatePostConditionalOrders'; + const stopPrice = this.safeNumber2 (params, 'stopPrice', 'triggerPrice'); + if (stopPrice === undefined) { + throw new ArgumentsRequired (this.id + ' createOrder () requires a stopPrice parameter or a triggerPrice parameter for ' + type + ' orders'); + } else { + params = this.omit (params, [ 'stopPrice', 'triggerPrice' ]); + request['triggerPrice'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + } + if (price !== undefined) { + request['orderPrice'] = parseFloat (this.priceToPrecision (symbol, price)); // optional, order type is limit if this is specified, otherwise market + } } else if (type === 'trailingStop') { - request['trailValue'] = priceToPrecision; // negative for "sell", positive for "buy" + method = 'privatePostConditionalOrders'; + request['trailValue'] = parseFloat (this.priceToPrecision (symbol, price)); // negative for "sell", positive for "buy" } else { throw new InvalidOrder (this.id + ' createOrder () does not support order type ' + type + ', only limit, market, stop, trailingStop, or takeProfit orders are supported'); } @@ -1174,9 +1212,9 @@ module.exports = class ftx extends Exchange { const request = {}; let method = undefined; const clientOrderId = this.safeString2 (params, 'client_order_id', 'clientOrderId'); - const triggerPrice = this.safeFloat (params, 'triggerPrice'); - const orderPrice = this.safeFloat (params, 'orderPrice'); - const trailValue = this.safeFloat (params, 'trailValue'); + const triggerPrice = this.safeNumber (params, 'triggerPrice'); + const orderPrice = this.safeNumber (params, 'orderPrice'); + const trailValue = this.safeNumber (params, 'trailValue'); params = this.omit (params, [ 'client_order_id', 'clientOrderId', 'triggerPrice', 'orderPrice', 'trailValue' ]); const triggerPriceIsDefined = (triggerPrice !== undefined); const orderPriceIsDefined = (orderPrice !== undefined); @@ -1539,7 +1577,7 @@ module.exports = class ftx extends Exchange { return this.parseTransaction (result, currency); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetAccount (params); // @@ -1672,7 +1710,7 @@ module.exports = class ftx extends Exchange { // const code = this.safeCurrencyCode (this.safeString (transaction, 'coin')); const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'size'); + const amount = this.safeNumber (transaction, 'size'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const timestamp = this.parse8601 (this.safeString (transaction, 'time')); const txid = this.safeString (transaction, 'txid'); @@ -1689,7 +1727,7 @@ module.exports = class ftx extends Exchange { address = notes.slice (12); } } - const fee = this.safeFloat (transaction, 'fee'); + const fee = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gateio.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gateio.js index f0835c774..eac7234c9 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gateio.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gateio.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, ArgumentsRequired, InvalidAddress, OrderNotFound, NotSupported, DDoSProtection, InsufficientFunds, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,9 +165,12 @@ module.exports = class gateio extends Exchange { }, }, 'commonCurrencies': { + '88MPH': 'MPH', + 'BIFI': 'Bitcoin File', 'BOX': 'DefiBox', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', + 'MPH': 'Morpher', // conflict with 88MPH 'SBTC': 'Super Bitcoin', 'TNC': 'Trinity Network Credit', }, @@ -213,9 +217,9 @@ module.exports = class gateio extends Exchange { const currency = coin[id]; const code = this.safeCurrencyCode (id); const delisted = this.safeValue (currency, 'delisted', 0); - const withdrawDisabled = this.safeValue (currency, 'withdraw_disabled', 0); - const depositDisabled = this.safeValue (currency, 'deposit_disabled', 0); - const tradeDisabled = this.safeValue (currency, 'trade_disabled', 0); + const withdrawDisabled = this.safeInteger2 (currency, 'withdraw_disabled', 0); + const depositDisabled = this.safeInteger2 (currency, 'deposit_disabled', 0); + const tradeDisabled = this.safeInteger2 (currency, 'trade_disabled', 0); const listed = (delisted === 0); const withdrawEnabled = (withdrawDisabled === 0); const depositEnabled = (depositDisabled === 0); @@ -304,7 +308,7 @@ module.exports = class gateio extends Exchange { 'price': this.safeInteger (details, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (details, 'min_amount'), + 'min': this.safeNumber (details, 'min_amount'), 'max': undefined, }; const priceLimits = { @@ -312,7 +316,7 @@ module.exports = class gateio extends Exchange { 'max': undefined, }; const defaultCost = amountLimits['min'] * priceLimits['min']; - const minCost = this.safeFloat (this.options['limits']['cost']['min'], quote, defaultCost); + const minCost = this.safeNumber (this.options['limits']['cost']['min'], quote, defaultCost); const costLimits = { 'min': minCost, 'max': undefined, @@ -322,10 +326,10 @@ module.exports = class gateio extends Exchange { 'price': priceLimits, 'cost': costLimits, }; - const disabled = this.safeValue (details, 'trade_disabled'); + const disabled = this.safeInteger (details, 'trade_disabled'); const active = !disabled; const uppercaseId = id.toUpperCase (); - const fee = this.safeFloat (details, 'fee'); + const fee = this.safeNumber (details, 'fee'); result.push ({ 'id': id, 'uppercaseId': uppercaseId, @@ -359,11 +363,11 @@ module.exports = class gateio extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (available, currencyId); - account['used'] = this.safeFloat (locked, currencyId); + account['free'] = this.safeString (available, currencyId); + account['used'] = this.safeString (locked, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -379,11 +383,11 @@ module.exports = class gateio extends Exchange { // they return [ Timestamp, Volume, Close, High, Low, Open ] return [ this.safeInteger (ohlcv, 0), // t - this.safeFloat (ohlcv, 5), // o - this.safeFloat (ohlcv, 3), // h - this.safeFloat (ohlcv, 4), // l - this.safeFloat (ohlcv, 2), // c - this.safeFloat (ohlcv, 1), // v + this.safeNumber (ohlcv, 5), // o + this.safeNumber (ohlcv, 3), // h + this.safeNumber (ohlcv, 4), // l + this.safeNumber (ohlcv, 2), // c + this.safeNumber (ohlcv, 1), // v ]; } @@ -395,11 +399,11 @@ module.exports = class gateio extends Exchange { 'group_sec': this.timeframes[timeframe], }; // max limit = 1001 - if (limit !== undefined) { - const periodDurationInSeconds = this.parseTimeframe (timeframe); - const hours = parseInt ((periodDurationInSeconds * limit) / 3600); - request['range_hour'] = Math.max (0, hours - 1); - } + // if (limit !== undefined) { + // const periodDurationInSeconds = this.parseTimeframe (timeframe); + // const hours = parseInt ((periodDurationInSeconds * limit) / 3600); + // request['range_hour'] = Math.max (1, hours - 1); + // } const response = await this.publicGetCandlestick2Id (this.extend (request, params)); // // { @@ -423,8 +427,8 @@ module.exports = class gateio extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'percentChange'); let open = undefined; let change = undefined; let average = undefined; @@ -434,17 +438,17 @@ module.exports = class gateio extends Exchange { change = last - open; average = this.sum (last, open) / 2; } - open = this.safeFloat (ticker, 'open', open); - change = this.safeFloat (ticker, 'change', change); + open = this.safeNumber (ticker, 'open', open); + change = this.safeNumber (ticker, 'change', change); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat2 (ticker, 'high24hr', 'high'), - 'low': this.safeFloat2 (ticker, 'low24hr', 'low'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber2 (ticker, 'high24hr', 'high'), + 'low': this.safeNumber2 (ticker, 'low24hr', 'low'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -454,8 +458,8 @@ module.exports = class gateio extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), // gateio has them reversed - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), // gateio has them reversed + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -501,27 +505,24 @@ module.exports = class gateio extends Exchange { const id = this.safeString2 (trade, 'tradeID', 'id'); // take either of orderid or orderId const orderId = this.safeString2 (trade, 'orderid', 'orderNumber'); - const price = this.safeFloat2 (trade, 'rate', 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString2 (trade, 'rate', 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = this.safeString (trade, 'type'); const takerOrMaker = this.safeString (trade, 'role'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } let fee = undefined; let feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee_coin')); - let feeCost = this.safeFloat (trade, 'point_fee'); + let feeCost = this.safeNumber (trade, 'point_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'gt_fee'); + feeCost = this.safeNumber (trade, 'gt_fee'); if ((feeCost === undefined) || (feeCost === 0)) { - feeCost = this.safeFloat (trade, 'fee'); + feeCost = this.safeNumber (trade, 'fee'); } else { feeCurrency = this.safeCurrencyCode ('GT'); } @@ -665,23 +666,20 @@ module.exports = class gateio extends Exchange { } else if (side === '2') { side = 'buy'; } - const price = this.safeFloat2 (order, 'initialRate', 'rate'); - const average = this.safeFloat (order, 'filledRate'); - const amount = this.safeFloat2 (order, 'initialAmount', 'amount'); - const filled = this.safeFloat (order, 'filledAmount'); + const price = this.safeNumber2 (order, 'initialRate', 'rate'); + const average = this.safeNumber (order, 'filledRate'); + const amount = this.safeNumber2 (order, 'initialAmount', 'amount'); + const filled = this.safeNumber (order, 'filledAmount'); // In the order status response, this field has a different name. - let remaining = this.safeFloat2 (order, 'leftAmount', 'left'); - if (remaining === undefined) { - remaining = amount - filled; - } - const feeCost = this.safeFloat (order, 'feeValue'); + const remaining = this.safeNumber2 (order, 'leftAmount', 'left'); + const feeCost = this.safeNumber (order, 'feeValue'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - let feeRate = this.safeFloat (order, 'feePercentage'); + let feeRate = this.safeNumber (order, 'feePercentage'); if (feeRate !== undefined) { feeRate = feeRate / 100; } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -707,7 +705,7 @@ module.exports = class gateio extends Exchange { 'rate': feeRate, }, 'info': order, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -898,7 +896,7 @@ module.exports = class gateio extends Exchange { const code = this.safeCurrencyCode (currencyId, currency); const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'txid'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); if (address === 'false') { address = undefined; @@ -906,7 +904,7 @@ module.exports = class gateio extends Exchange { const timestamp = this.safeTimestamp (transaction, 'timestamp'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.parseTransactionType (id[0]); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gemini.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gemini.js index 6f28ef220..36892fa47 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gemini.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gemini.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidOrder, InvalidNonce, InsufficientFunds, AuthenticationError, PermissionDenied, NotSupported, OnMaintenance, RateLimitExceeded, ExchangeNotAvailable } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -221,16 +222,16 @@ module.exports = class gemini extends Exchange { // const base = this.safeCurrencyCode (baseId); const minAmountString = cells[1].replace ('', ''); const minAmountParts = minAmountString.split (' '); - const minAmount = this.safeFloat (minAmountParts, 0); + const minAmount = this.safeNumber (minAmountParts, 0); const amountPrecisionString = cells[2].replace ('', ''); const amountPrecisionParts = amountPrecisionString.split (' '); - const amountPrecision = this.safeFloat (amountPrecisionParts, 0); + const amountPrecision = this.safeNumber (amountPrecisionParts, 0); const idLength = marketId.length - 0; const quoteId = marketId.slice (idLength - 3, idLength); const quote = this.safeCurrencyCode (quoteId); const pricePrecisionString = cells[3].replace ('', ''); const pricePrecisionParts = pricePrecisionString.split (' '); - const pricePrecision = this.safeFloat (pricePrecisionParts, 0); + const pricePrecision = this.safeNumber (pricePrecisionParts, 0); const baseId = marketId.replace (quoteId, ''); const base = this.safeCurrencyCode (baseId); const symbol = base + '/' + quote; @@ -458,11 +459,11 @@ module.exports = class gemini extends Exchange { base = market['base']; quote = market['quote']; } - const price = this.safeFloat (ticker, 'price'); - const last = this.safeFloat2 (ticker, 'last', 'close', price); - let percentage = this.safeFloat (ticker, 'percentChange24h'); + const price = this.safeNumber (ticker, 'price'); + const last = this.safeNumber2 (ticker, 'last', 'close', price); + let percentage = this.safeNumber (ticker, 'percentChange24h'); let change = undefined; - let open = this.safeFloat (ticker, 'open'); + let open = this.safeNumber (ticker, 'open'); let average = undefined; if (last !== undefined) { if (open !== undefined) { @@ -479,18 +480,18 @@ module.exports = class gemini extends Exchange { average = this.sum (last, open) / 2; } } - const baseVolume = this.safeFloat (volume, baseId); - const quoteVolume = this.safeFloat (volume, quoteId); + const baseVolume = this.safeNumber (volume, baseId); + const quoteVolume = this.safeNumber (volume, quoteId); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -506,14 +507,6 @@ module.exports = class gemini extends Exchange { }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetV1Pricefeed (params); @@ -554,17 +547,14 @@ module.exports = class gemini extends Exchange { const feeCurrencyId = this.safeString (trade, 'fee_currency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); const fee = { - 'cost': this.safeFloat (trade, 'fee_amount'), + 'cost': this.safeNumber (trade, 'fee_amount'), 'currency': feeCurrencyCode, }; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = undefined; const side = this.safeStringLower (trade, 'type'); const symbol = this.safeSymbol (undefined, market); @@ -617,18 +607,18 @@ module.exports = class gemini extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'amount'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrder (order, market = undefined) { const timestamp = this.safeInteger (order, 'timestampms'); - const amount = this.safeFloat (order, 'original_amount'); - const remaining = this.safeFloat (order, 'remaining_amount'); - const filled = this.safeFloat (order, 'executed_amount'); + const amount = this.safeNumber (order, 'original_amount'); + const remaining = this.safeNumber (order, 'remaining_amount'); + const filled = this.safeNumber (order, 'executed_amount'); let status = 'closed'; if (order['is_live']) { status = 'open'; @@ -636,14 +626,8 @@ module.exports = class gemini extends Exchange { if (order['is_cancelled']) { status = 'canceled'; } - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'avg_execution_price'); - let cost = undefined; - if (filled !== undefined) { - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'avg_execution_price'); let type = this.safeString (order, 'type'); if (type === 'exchange limit') { type = 'limit'; @@ -658,7 +642,7 @@ module.exports = class gemini extends Exchange { const id = this.safeString (order, 'order_id'); const side = this.safeStringLower (order, 'side'); const clientOrderId = this.safeString (order, 'client_order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -674,13 +658,13 @@ module.exports = class gemini extends Exchange { 'price': price, 'stopPrice': undefined, 'average': average, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'remaining': remaining, 'fee': fee, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -795,7 +779,7 @@ module.exports = class gemini extends Exchange { status = 'ok'; } let fee = undefined; - const feeAmount = this.safeFloat (transaction, 'feeAmount'); + const feeAmount = this.safeNumber (transaction, 'feeAmount'); if (feeAmount !== undefined) { fee = { 'cost': feeAmount, @@ -811,7 +795,7 @@ module.exports = class gemini extends Exchange { 'address': address, 'tag': undefined, // or is it defined? 'type': type, // direction of the transaction, ('deposit' | 'withdraw') - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gopax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gopax.js index e3150163a..b27308f19 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gopax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/gopax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound, InvalidAddress, BadRequest } = require ('./base/errors'); const { TRUNCATE, ROUND, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -218,8 +219,8 @@ module.exports = class gopax extends Exchange { const minimums = this.safeValue (market, 'restApiOrderAmountMin', {}); const marketAsk = this.safeValue (minimums, 'marketAsk', {}); const marketBid = this.safeValue (minimums, 'marketBid', {}); - const takerFeePercent = this.safeFloat (market, 'takerFeePercent'); - const makerFeePercent = this.safeFloat (market, 'makerFeePercent'); + const takerFeePercent = this.safeNumber (market, 'takerFeePercent'); + const makerFeePercent = this.safeNumber (market, 'makerFeePercent'); const taker = parseFloat (this.decimalToPrecision (takerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); const maker = parseFloat (this.decimalToPrecision (makerFeePercent / 100, ROUND, 0.00000001, TICK_SIZE)); result.push ({ @@ -237,15 +238,15 @@ module.exports = class gopax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (marketAsk, 'amount'), + 'min': this.safeNumber (marketAsk, 'amount'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'priceMin'), + 'min': this.safeNumber (market, 'priceMin'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (marketBid, 'amount'), + 'min': this.safeNumber (marketBid, 'amount'), 'max': undefined, }, }, @@ -280,8 +281,8 @@ module.exports = class gopax extends Exchange { const id = this.safeString (currency, 'id'); const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'name'); - const fee = this.safeFloat (currency, 'withdrawalFee'); - const precision = this.safeFloat (currency, 'scale'); + const fee = this.safeNumber (currency, 'withdrawalFee'); + const precision = this.safeNumber (currency, 'scale'); result[code] = { 'id': id, 'info': currency, @@ -304,7 +305,7 @@ module.exports = class gopax extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawalAmountMin'), + 'min': this.safeNumber (currency, 'withdrawalAmountMin'), 'max': undefined, }, }, @@ -372,8 +373,8 @@ module.exports = class gopax extends Exchange { const marketId = this.safeString (ticker, 'name'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (ticker, 'time')); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat2 (ticker, 'price', 'close'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber2 (ticker, 'price', 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -384,20 +385,20 @@ module.exports = class gopax extends Exchange { percentage = change / open * 100; } } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bidVolume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'askVolume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bidVolume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'askVolume'), 'vwap': vwap, 'open': open, 'close': last, @@ -433,14 +434,6 @@ module.exports = class gopax extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTradingPairsStats (params); @@ -462,8 +455,8 @@ module.exports = class gopax extends Exchange { parsePublicTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'time')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'amount'); let symbol = undefined; if ('symbol' in market) { symbol = this.safeString (market, 'symbol'); @@ -489,14 +482,14 @@ module.exports = class gopax extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const symbol = this.safeString (trade, 'tradingPairName').replace ('-', '/'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'baseAmount'); + const price = this.safeNumber (trade, 'price'); + const amount = this.safeNumber (trade, 'baseAmount'); let feeCurrency = symbol.slice (0, 3); if (side === 'sell') { feeCurrency = symbol.slice (4); } const fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': feeCurrency, 'rate': undefined, }; @@ -578,15 +571,15 @@ module.exports = class gopax extends Exchange { } else if (type === '2') { type = 'market'; } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'baseAmount'); - let cost = this.safeFloat (trade, 'quoteAmount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'baseAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteAmount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -653,11 +646,11 @@ module.exports = class gopax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -697,14 +690,14 @@ module.exports = class gopax extends Exchange { const balance = response[i]; const currencyId = this.safeString2 (balance, 'asset', 'isoAlpha3'); const code = this.safeCurrencyCode (currencyId); - const hold = this.safeFloat (balance, 'hold'); - const pendingWithdrawal = this.safeFloat (balance, 'pendingWithdrawal'); + const hold = this.safeString (balance, 'hold'); + const pendingWithdrawal = this.safeString (balance, 'pendingWithdrawal'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.sum (hold, pendingWithdrawal); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = Precise.stringAdd (hold, pendingWithdrawal); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchBalance (params = {}) { @@ -781,42 +774,36 @@ module.exports = class gopax extends Exchange { const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); const timeInForce = this.safeStringUpper (order, 'timeInForce'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const stopPrice = this.safeFloat (order, 'stopPrice'); - const remaining = this.safeFloat (order, 'remaining'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const stopPrice = this.safeNumber (order, 'stopPrice'); + const remaining = this.safeNumber (order, 'remaining'); const marketId = this.safeString (order, 'tradingPairName'); market = this.safeMarket (marketId, market, '-'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const balanceChange = this.safeValue (order, 'balanceChange', {}); - let filled = this.safeFloat (balanceChange, 'baseNet'); - let cost = this.safeFloat (balanceChange, 'quoteNet'); + const filled = this.safeNumber (balanceChange, 'baseNet'); + let cost = this.safeNumber (balanceChange, 'quoteNet'); if (cost !== undefined) { cost = Math.abs (cost); } let updated = undefined; - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } if ((filled !== undefined) && (filled > 0)) { updated = this.parse8601 (this.safeString (order, 'updatedAt')); } - if ((cost === undefined) && (price !== undefined) && (filled !== undefined)) { - cost = filled * price; - } let fee = undefined; if (side === 'buy') { const baseFee = this.safeValue (balanceChange, 'baseFee', {}); - const taking = this.safeFloat (baseFee, 'taking'); - const making = this.safeFloat (baseFee, 'making'); + const taking = this.safeNumber (baseFee, 'taking'); + const making = this.safeNumber (baseFee, 'making'); fee = { 'currency': market['base'], 'cost': this.sum (taking, making), }; } else { const quoteFee = this.safeValue (balanceChange, 'quoteFee', {}); - const taking = this.safeFloat (quoteFee, 'taking'); - const making = this.safeFloat (quoteFee, 'making'); + const taking = this.safeNumber (quoteFee, 'taking'); + const making = this.safeNumber (quoteFee, 'making'); fee = { 'currency': market['quote'], 'cost': this.sum (taking, making), @@ -826,7 +813,7 @@ module.exports = class gopax extends Exchange { if (timeInForce !== undefined) { postOnly = (timeInForce === 'PO'); } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'datetime': this.iso8601 (timestamp), @@ -848,7 +835,7 @@ module.exports = class gopax extends Exchange { 'trades': undefined, 'fee': fee, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -996,7 +983,7 @@ module.exports = class gopax extends Exchange { request['clientOrderId'] = clientOrderId; params = this.omit (params, 'clientOrderId'); } - const stopPrice = this.safeFloat (params, 'stopPrice'); + const stopPrice = this.safeNumber (params, 'stopPrice'); if (stopPrice !== undefined) { request['stopPrice'] = this.priceToPrecision (symbol, stopPrice); params = this.omit (params, 'stopPrice'); @@ -1125,18 +1112,6 @@ module.exports = class gopax extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetCryptoDepositAddresses (params); @@ -1201,8 +1176,8 @@ module.exports = class gopax extends Exchange { } else if ((type === 'crypto_deposit' || type === 'fiat_deposit')) { type = 'deposit'; } - const amount = this.safeFloat (transaction, 'netAmount'); - const feeCost = this.safeFloat (transaction, 'feeAmount'); + const amount = this.safeNumber (transaction, 'netAmount'); + const feeCost = this.safeNumber (transaction, 'feeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hbtc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hbtc.js index d819c3d77..5dfd98ec5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hbtc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, OrderNotFound, ArgumentsRequired, BadSymbol, BadRequest, NullResponse, InvalidOrder, BadResponse, NotSupported, ExchangeNotAvailable, RequestTimeout, RateLimitExceeded, PermissionDenied, InsufficientFunds, InvalidAddress } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -304,23 +305,23 @@ module.exports = class hbtc extends Exchange { const filter = filters[j]; const filterType = this.safeString (filter, 'filterType'); if (filterType === 'LOT_SIZE') { - amountMin = this.safeFloat (filter, 'minQty'); - amountMax = this.safeFloat (filter, 'maxQty'); + amountMin = this.safeNumber (filter, 'minQty'); + amountMax = this.safeNumber (filter, 'maxQty'); } if (filterType === 'PRICE_FILTER') { - priceMin = this.safeFloat (filter, 'minPrice'); - priceMax = this.safeFloat (filter, 'maxPrice'); + priceMin = this.safeNumber (filter, 'minPrice'); + priceMax = this.safeNumber (filter, 'maxPrice'); } if (filterType === 'MIN_NOTIONAL') { - costMin = this.safeFloat (filter, 'minNotional'); + costMin = this.safeNumber (filter, 'minNotional'); } } if ((costMin === undefined) && (amountMin !== undefined) && (priceMin !== undefined)) { costMin = amountMin * priceMin; } const precision = { - 'price': this.safeFloat2 (market, 'quotePrecision', 'quoteAssetPrecision'), - 'amount': this.safeFloat (market, 'baseAssetPrecision'), + 'price': this.safeNumber2 (market, 'quotePrecision', 'quoteAssetPrecision'), + 'amount': this.safeNumber (market, 'baseAssetPrecision'), }; const limits = { 'amount': { @@ -558,14 +559,6 @@ module.exports = class hbtc extends Exchange { return this.parseTicker (response, market); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchBidAsk (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -717,8 +710,8 @@ module.exports = class hbtc extends Exchange { const currencyId = this.safeString2 (balance, 'asset', 'tokenName'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'free'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'free'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } } else { @@ -728,12 +721,12 @@ module.exports = class hbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = response[currencyId]; const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableMargin'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'availableMargin'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTrades (symbol, since = undefined, limit = 50, params = {}) { @@ -774,11 +767,11 @@ module.exports = class hbtc extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -1464,8 +1457,8 @@ module.exports = class hbtc extends Exchange { // const currencyId = this.safeString (item, 'tokenId'); const code = this.safeCurrencyCode (currencyId, currency); - const amount = this.safeFloat (item, 'change'); - const after = this.safeFloat (item, 'total'); + const amount = this.safeNumber (item, 'change'); + const after = this.safeNumber (item, 'total'); const direction = (amount < 0) ? 'out' : 'in'; let before = undefined; if (after !== undefined && amount !== undefined) { @@ -1605,8 +1598,8 @@ module.exports = class hbtc extends Exchange { } else { type = 'withdrawal'; } - const amount = this.safeFloat (transaction, 'quantity'); - const feeCost = this.safeFloat (transaction, 'fee'); + const amount = this.safeNumber (transaction, 'quantity'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'feeTokenId'); @@ -1667,8 +1660,8 @@ module.exports = class hbtc extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'openPrice'); - const close = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'openPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); let change = undefined; let percentage = undefined; let average = undefined; @@ -1679,19 +1672,19 @@ module.exports = class hbtc extends Exchange { percentage = (change / open) * 100; } } - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPrice'), - 'low': this.safeFloat (ticker, 'lowPrice'), - 'bid': this.safeFloat2 (ticker, 'bestBidPrice', 'bidPrice'), - 'bidVolume': this.safeFloat (ticker, 'bidQty'), - 'ask': this.safeFloat2 (ticker, 'bestAskPrice', 'askPrice'), - 'askVolume': this.safeFloat (ticker, 'askQty'), + 'high': this.safeNumber (ticker, 'highPrice'), + 'low': this.safeNumber (ticker, 'lowPrice'), + 'bid': this.safeNumber2 (ticker, 'bestBidPrice', 'bidPrice'), + 'bidVolume': this.safeNumber (ticker, 'bidQty'), + 'ask': this.safeNumber2 (ticker, 'bestAskPrice', 'askPrice'), + 'askVolume': this.safeNumber (ticker, 'askQty'), 'vwap': vwap, 'open': open, 'close': close, @@ -1741,17 +1734,14 @@ module.exports = class hbtc extends Exchange { // } // const id = this.safeString (trade, 'id'); - const timestamp = this.safeFloat (trade, 'time'); + const timestamp = this.safeNumber (trade, 'time'); const type = undefined; const orderId = this.safeString (trade, 'orderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'qty'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'qty'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let side = undefined; let takerOrMaker = undefined; if ('isBuyerMaker' in trade) { @@ -1765,7 +1755,7 @@ module.exports = class hbtc extends Exchange { side = isBuyer ? 'buy' : 'sell'; } let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionAsset'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1871,30 +1861,30 @@ module.exports = class hbtc extends Exchange { const symbol = this.safeSymbol (marketId, market); let type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); - let price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'avgPrice'); + let price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'avgPrice'); let amount = undefined; - let cost = this.safeFloat (order, 'cummulativeQuoteQty'); + let cost = this.safeNumber (order, 'cummulativeQuoteQty'); let filled = undefined; let remaining = undefined; if (type === undefined) { type = this.safeStringLower (order, 'orderType'); if ((market !== undefined) && market['inverse']) { - cost = this.safeFloat (order, 'executedQty'); + cost = this.safeNumber (order, 'executedQty'); amount = undefined; } if (cost === 0.0) { filled = 0; } } else { - amount = this.safeFloat (order, 'origQty'); + amount = this.safeNumber (order, 'origQty'); if (type === 'market') { price = undefined; if (side === 'buy') { amount = undefined; } } - filled = this.safeFloat (order, 'executedQty'); + filled = this.safeNumber (order, 'executedQty'); if (filled !== undefined) { if (amount !== undefined) { remaining = amount - filled; @@ -1906,7 +1896,7 @@ module.exports = class hbtc extends Exchange { } const status = this.parseOrderStatus (this.safeString (order, 'status')); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const result = { 'info': order, 'id': id, @@ -1935,7 +1925,7 @@ module.exports = class hbtc extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'fee'); + const feeCost = this.safeNumber (fees[i], 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'feeToken'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hitbtc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hitbtc.js index b66392816..b7fd38b04 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hitbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hitbtc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, PermissionDenied, ExchangeError, ExchangeNotAvailable, OrderNotFound, InsufficientFunds, InvalidOrder, RequestTimeout, AuthenticationError } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -44,6 +45,7 @@ module.exports = class hitbtc extends Exchange { 'fetchTransactions': true, 'fetchWithdrawals': false, 'withdraw': true, + 'transfer': true, }, 'timeframes': { '1m': 'M1', @@ -81,10 +83,10 @@ module.exports = class hitbtc extends Exchange { 'api': { 'public': { 'get': [ - 'symbol', // Available Currency Symbols - 'symbol/{symbol}', // Get symbol info 'currency', // Available Currencies 'currency/{currency}', // Get currency info + 'symbol', // Available Currency Symbols + 'symbol/{symbol}', // Get symbol info 'ticker', // Ticker list for all symbols 'ticker/{symbol}', // Ticker for symbol 'trades', @@ -102,11 +104,20 @@ module.exports = class hitbtc extends Exchange { 'order/{clientOrderId}', // Get a single order by clientOrderId 'trading/fee/all', // Get trading fee rate 'trading/fee/{symbol}', // Get trading fee rate + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', 'history/order', // Get historical orders 'history/trades', // Get historical trades 'history/order/{orderId}/trades', // Get historical trades by specified order 'account/balance', // Get main acccount balance - 'account/crypto/address/{currency}', // Get deposit crypro address + 'account/crypto/address/{currency}', // Get current address + 'account/crypto/addresses/{currency}', // Get last 10 deposit addresses for currency + 'account/crypto/used-addresses/{currency}', // Get last 10 unique addresses used for withdraw by currency + 'account/crypto/estimate-withdraw', 'account/crypto/is-mine/{address}', 'account/transactions', // Get account transactions 'account/transactions/{id}', // Get account transaction by id @@ -117,23 +128,33 @@ module.exports = class hitbtc extends Exchange { ], 'post': [ 'order', // Create new order - 'account/crypto/address/{currency}', // Create new deposit crypro address - 'account/crypto/withdraw', // Withdraw crypro + 'margin/order', + 'account/crypto/address/{currency}', // Create new crypto deposit address + 'account/crypto/withdraw', // Withdraw crypto 'account/crypto/transfer-convert', - 'account/transfer', // Transfer amount to trading + 'account/transfer', // Transfer amount to trading account or to main account + 'account/transfer/internal', 'sub-acc/freeze', 'sub-acc/activate', 'sub-acc/transfer', ], 'put': [ 'order/{clientOrderId}', // Create new order - 'account/crypto/withdraw/{id}', // Commit withdraw crypro + 'margin/account/{symbol}', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Commit crypto withdrawal 'sub-acc/acl/{subAccountUserId}', ], 'delete': [ 'order', // Cancel all open orders 'order/{clientOrderId}', // Cancel order - 'account/crypto/withdraw/{id}', // Rollback withdraw crypro + 'margin/account', + 'margin/account/{symbol}', + 'margin/position', + 'margin/position/{symbol}', + 'margin/order', + 'margin/order/{clientOrderId}', + 'account/crypto/withdraw/{id}', // Rollback crypto withdrawal ], // outdated? 'patch': [ @@ -152,8 +173,20 @@ module.exports = class hitbtc extends Exchange { }, 'options': { 'defaultTimeInForce': 'FOK', + 'accountsByType': { + 'bank': 'bank', + 'exchange': 'exchange', + 'main': 'bank', // alias of the above + 'trading': 'exchange', + }, + 'fetchBalanceMethod': { + 'account': 'account', + 'main': 'account', + 'trading': 'trading', + }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BCC': 'BCC', // initial symbol for Bitcoin Cash, now inactive 'BET': 'DAO.Casino', 'BOX': 'BOX Token', @@ -180,7 +213,6 @@ module.exports = class hitbtc extends Exchange { '20002': OrderNotFound, // canceling non-existent order '20001': InsufficientFunds, // {"error":{"code":20001,"message":"Insufficient funds","description":"Check that the funds are sufficient, given commissions"}} }, - 'orders': {}, // orders cache / emulation }); } @@ -217,14 +249,14 @@ module.exports = class hitbtc extends Exchange { if (id.indexOf ('_') >= 0) { symbol = id; } - const lot = this.safeFloat (market, 'quantityIncrement'); - const step = this.safeFloat (market, 'tickSize'); + const lot = this.safeNumber (market, 'quantityIncrement'); + const step = this.safeNumber (market, 'tickSize'); const precision = { 'price': step, 'amount': lot, }; - const taker = this.safeFloat (market, 'takeLiquidityRate'); - const maker = this.safeFloat (market, 'provideLiquidityRate'); + const taker = this.safeNumber (market, 'takeLiquidityRate'); + const maker = this.safeNumber (market, 'provideLiquidityRate'); const feeCurrencyId = this.safeString (market, 'feeCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); result.push (this.extend (this.fees['trading'], { @@ -259,6 +291,49 @@ module.exports = class hitbtc extends Exchange { return result; } + async transfer (code, amount, fromAccount, toAccount, params = {}) { + // account can be "exchange" or "bank", with aliases "main" or "trading" respectively + await this.loadMarkets (); + const currency = this.currency (code); + const requestAmount = this.currencyToPrecision (code, amount); + const request = { + 'currency': currency['id'], + 'amount': requestAmount, + }; + let type = this.safeString (params, 'type'); + if (type === undefined) { + const accountsByType = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsByType, fromAccount); + const toId = this.safeString (accountsByType, toAccount); + const keys = Object.keys (accountsByType); + if (fromId === undefined) { + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ') + ' instead of ' + fromId); + } + if (toId === undefined) { + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ') + ' instead of ' + toId); + } + if (fromId === toId) { + throw new ExchangeError (this.id + ' from and to cannot be the same account'); + } + type = fromId + 'To' + this.capitalize (toId); + } + request['type'] = type; + const response = await this.privatePostAccountTransfer (this.extend (request, params)); + // { id: '2db6ebab-fb26-4537-9ef8-1a689472d236' } + const id = this.safeString (response, 'id'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'amount': requestAmount, + 'currency': code, + 'fromAccount': fromAccount, + 'toAccount': toAccount, + 'status': undefined, + }; + } + async fetchCurrencies (params = {}) { const response = await this.publicGetCurrency (params); // @@ -314,7 +389,7 @@ module.exports = class hitbtc extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (currency, 'payoutFee'), // todo: redesign + 'fee': this.safeNumber (currency, 'payoutFee'), // todo: redesign 'precision': precision, 'limits': { 'amount': { @@ -354,15 +429,20 @@ module.exports = class hitbtc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } async fetchBalance (params = {}) { await this.loadMarkets (); const type = this.safeString (params, 'type', 'trading'); - const method = 'privateGet' + this.capitalize (type) + 'Balance'; + const fetchBalanceAccounts = this.safeValue (this.options, 'fetchBalanceMethod', {}); + const typeId = this.safeString (fetchBalanceAccounts, type); + if (typeId === undefined) { + throw new ExchangeError (this.id + ' fetchBalance account type must be either main or trading'); + } + const method = 'privateGet' + this.capitalize (typeId) + 'Balance'; const query = this.omit (params, 'type'); const response = await this[method] (query); const result = { 'info': response }; @@ -371,11 +451,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'reserved'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -392,11 +472,11 @@ module.exports = class hitbtc extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'max'), - this.safeFloat (ohlcv, 'min'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'max'), + this.safeNumber (ohlcv, 'min'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -442,10 +522,10 @@ module.exports = class hitbtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const baseVolume = this.safeFloat (ticker, 'volume'); - const quoteVolume = this.safeFloat (ticker, 'volumeQuote'); - const open = this.safeFloat (ticker, 'open'); - const last = this.safeFloat (ticker, 'last'); + const baseVolume = this.safeNumber (ticker, 'volume'); + const quoteVolume = this.safeNumber (ticker, 'volumeQuote'); + const open = this.safeNumber (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); let change = undefined; let percentage = undefined; let average = undefined; @@ -461,11 +541,11 @@ module.exports = class hitbtc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -541,7 +621,7 @@ module.exports = class hitbtc extends Exchange { market = this.safeMarket (marketId, market); const symbol = market['symbol']; let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyCode = market ? market['feeCurrency'] : undefined; fee = { @@ -553,9 +633,11 @@ module.exports = class hitbtc extends Exchange { // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const orderId = this.safeString (trade, 'clientOrderId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = price * amount; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); const id = this.safeString (trade, 'id'); return { @@ -654,11 +736,11 @@ module.exports = class hitbtc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const txid = this.safeString (transaction, 'hash'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -846,66 +928,25 @@ module.exports = class hitbtc extends Exchange { const marketId = this.safeString (order, 'symbol'); market = this.safeMarket (marketId, market); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'cumQuantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'cumQuantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); // we use clientOrderId as the order id with this exchange intentionally // because most of their endpoints will require clientOrderId // explained here: https://github.com/ccxt/ccxt/issues/5674 const id = this.safeString (order, 'clientOrderId'); const clientOrderId = id; - let price = this.safeFloat (order, 'price'); - let remaining = undefined; - let cost = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - if (price !== undefined) { - cost = filled * price; - } - } - } + const price = this.safeNumber (order, 'price'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); let trades = this.safeValue (order, 'tradesReport'); - let fee = undefined; - let average = this.safeValue (order, 'avgPrice'); + const fee = undefined; + const average = this.safeNumber (order, 'avgPrice'); if (trades !== undefined) { trades = this.parseTrades (trades, market); - let feeCost = undefined; - const numTrades = trades.length; - let tradesCost = 0; - for (let i = 0; i < numTrades; i++) { - if (feeCost === undefined) { - feeCost = 0; - } - tradesCost = this.sum (tradesCost, trades[i]['cost']); - const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); - if (tradeFeeCost !== undefined) { - feeCost = this.sum (feeCost, tradeFeeCost); - } - } - cost = tradesCost; - if ((filled !== undefined) && (filled > 0)) { - if (average === undefined) { - average = cost / filled; - } - if (type === 'market') { - if (price === undefined) { - price = average; - } - } - } - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } } const timeInForce = this.safeString (order, 'timeInForce'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, // https://github.com/ccxt/ccxt/issues/5674 'timestamp': created, @@ -920,13 +961,13 @@ module.exports = class hitbtc extends Exchange { 'stopPrice': undefined, 'average': average, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hollaex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hollaex.js index 52e81fec3..bde50ed15 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hollaex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/hollaex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadRequest, AuthenticationError, NetworkError, ArgumentsRequired, OrderNotFound, InsufficientFunds } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -15,7 +16,7 @@ module.exports = class hollaex extends Exchange { 'name': 'HollaEx', 'countries': [ 'KR' ], 'rateLimit': 333, - 'version': 'v1', + 'version': 'v2', 'has': { 'CORS': false, 'fetchMarkets': true, @@ -35,13 +36,13 @@ module.exports = class hollaex extends Exchange { 'cancelOrder': true, 'cancelAllOrders': true, 'fetchOpenOrders': true, - 'fetchClosedOrders': false, + 'fetchClosedOrders': true, 'fetchOpenOrder': true, 'fetchOrder': false, 'fetchDeposits': true, 'fetchWithdrawals': true, 'fetchTransactions': false, - 'fetchOrders': false, + 'fetchOrders': true, 'fetchMyTrades': true, 'withdraw': true, 'fetchDepositAddress': true, @@ -66,13 +67,17 @@ module.exports = class hollaex extends Exchange { 'public': { 'get': [ 'health', - 'constant', + 'constants', + 'kit', + 'tiers', 'ticker', - 'ticker/all', + 'tickers', + 'orderbook', 'orderbooks', 'trades', 'chart', - // TradingView data + 'charts', + // TradingView 'udf/config', 'udf/history', 'udf/symbols', @@ -82,20 +87,20 @@ module.exports = class hollaex extends Exchange { 'get': [ 'user', 'user/balance', - 'user/trades', - 'user/orders', - 'user/orders/{order_id}', 'user/deposits', 'user/withdrawals', - 'user/withdraw/{currency}/fee', + 'user/withdrawal/fee', + 'user/trades', + 'orders', + 'orders/{order_id}', ], 'post': [ 'user/request-withdrawal', 'order', ], 'delete': [ - 'user/orders', - 'user/orders/{order_id}', + 'order/all', + 'order', ], }, }, @@ -130,7 +135,7 @@ module.exports = class hollaex extends Exchange { } async fetchMarkets (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); // // { // coins: { @@ -197,17 +202,17 @@ module.exports = class hollaex extends Exchange { 'quoteId': quoteId, 'active': active, 'precision': { - 'price': this.safeFloat (market, 'increment_price'), - 'amount': this.safeFloat (market, 'increment_size'), + 'price': this.safeNumber (market, 'increment_price'), + 'amount': this.safeNumber (market, 'increment_size'), }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_size'), - 'max': this.safeFloat (market, 'max_size'), + 'min': this.safeNumber (market, 'min_size'), + 'max': this.safeNumber (market, 'max_size'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, 'max': undefined }, }, @@ -218,7 +223,7 @@ module.exports = class hollaex extends Exchange { } async fetchCurrencies (params = {}) { - const response = await this.publicGetConstant (params); + const response = await this.publicGetConstants (params); const coins = this.safeValue (response, 'coins', {}); const keys = Object.keys (coins); const result = {}; @@ -230,8 +235,8 @@ module.exports = class hollaex extends Exchange { const code = this.safeCurrencyCode (id); const name = this.safeString (currency, 'fullname'); const active = this.safeValue (currency, 'active'); - const fee = this.safeFloat (currency, 'withdrawal_fee'); - const precision = this.safeFloat (currency, 'increment_unit'); + const fee = this.safeNumber (currency, 'withdrawal_fee'); + const precision = this.safeNumber (currency, 'increment_unit'); const withdrawalLimits = this.safeValue (currency, 'withdrawal_limits', []); result[code] = { 'id': id, @@ -244,8 +249,8 @@ module.exports = class hollaex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'min'), - 'max': this.safeFloat (currency, 'max'), + 'min': this.safeNumber (currency, 'min'), + 'max': this.safeNumber (currency, 'max'), }, 'price': { 'min': undefined, @@ -334,7 +339,7 @@ module.exports = class hollaex extends Exchange { async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); - const response = await this.publicGetTickerAll (this.extend (params)); + const response = await this.publicGetTickers (this.extend (params)); // // { // "bch-usdt": { @@ -397,27 +402,27 @@ module.exports = class hollaex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString2 (ticker, 'time', 'timestamp')); - const close = this.safeFloat (ticker, 'close'); + const close = this.safeNumber (ticker, 'close'); const result = { 'symbol': symbol, 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': close, - 'last': this.safeFloat (ticker, 'last', close), + 'last': this.safeNumber (ticker, 'last', close), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, }; return result; @@ -475,15 +480,12 @@ module.exports = class hollaex extends Exchange { const datetime = this.safeString (trade, 'timestamp'); const timestamp = this.parse8601 (datetime); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'size'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'size'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const quote = market['quote']; @@ -568,11 +570,11 @@ module.exports = class hollaex extends Exchange { // return [ this.parse8601 (this.safeString (response, 'time')), - this.safeFloat (response, 'open'), - this.safeFloat (response, 'high'), - this.safeFloat (response, 'low'), - this.safeFloat (response, 'close'), - this.safeFloat (response, 'volume'), + this.safeNumber (response, 'open'), + this.safeNumber (response, 'high'), + this.safeNumber (response, 'low'), + this.safeNumber (response, 'close'), + this.safeNumber (response, 'volume'), ]; } @@ -597,11 +599,11 @@ module.exports = class hollaex extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (response, currencyId + '_available'); - account['total'] = this.safeFloat (response, currencyId + '_balance'); + account['free'] = this.safeString (response, currencyId + '_available'); + account['total'] = this.safeString (response, currencyId + '_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOpenOrder (id, symbol = undefined, params = {}) { @@ -609,67 +611,146 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateGetUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateGetOrdersOrderId (this.extend (request, params)); // // { - // "created_at": "2018-03-23T04:14:08.663Z", - // "title": "string", - // "side": "sell", - // "type": "limit", - // "price": 0, - // "size": 0, - // "symbol": "xht-usdt", // "id": "string", - // "created_by": 1, - // "filled": 0 + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } // } // return this.parseOrder (response); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'open': true, + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchClosedOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + const request = { + 'status': 'filled', + }; + return await this.fetchOrders (symbol, since, limit, this.extend (request, params)); + } + + async fetchOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); let market = undefined; - const request = {}; + const request = { + // 'symbol': market['id'], + // 'side': 'buy', // 'sell' + // 'status': 'new', // 'filled', 'pfilled', 'canceled' + // 'open': true, + // 'limit': limit, // default 50, max 100 + // 'page': 1, + // 'order_by': 'created_at', // id, ... + // 'order': 'asc', // 'desc' + // 'start_date': this.iso8601 (since), + // 'end_date': this.iso8601 (this.milliseconds ()), + }; if (symbol !== undefined) { market = this.market (symbol); request['symbol'] = market['id']; } - const response = await this.privateGetUserOrders (this.extend (request, params)); + if (since !== undefined) { + request['start_date'] = this.iso8601 (since); + } + if (limit !== undefined) { + request['limit'] = limit; // default 50, max 100 + } + const response = await this.privateGetOrders (this.extend (request, params)); // - // [ - // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 - // } - // ] + // { + // "count": 1, + // "data": [ + // { + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // } + // } + // ] + // } // - return this.parseOrders (response, market); + const data = this.safeValue (response, 'data', []); + return this.parseOrders (data, market, since, limit); + } + + parseOrderStatus (status) { + const statuses = { + 'new': 'open', + 'pfilled': 'open', + 'filled': 'closed', + 'canceled': 'canceled', + }; + return this.safeString (statuses, status, status); } parseOrder (order, market = undefined) { // - // fetchOpenOrder, fetchOpenOrders + // createOrder, fetchOpenOrder, fetchOpenOrders // // { - // "created_at":"2020-03-03T08:02:18.639Z", - // "title":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "side":"buy", - // "type":"limit", - // "price":226.19, - // "size":0.086, - // "symbol":"eth-usdt", - // "id":"5419ff3f-9d25-4af7-bcc2-803926518d76", - // "created_by":620, - // "filled":0 + // "id": "string", + // "side": "sell", + // "symbol": "xht-usdt", + // "size": 0.1, + // "filled": 0, + // "stop": null, + // "fee": 0, + // "fee_coin": "usdt", + // "type": "limit", + // "price": 1.09, + // "status": "new", + // "created_by": 116, + // "created_at": "2021-02-17T02:32:38.910Z", + // "updated_at": "2021-02-17T02:32:38.910Z", + // "User": { + // "id": 116, + // "email": "fight@club.com", + // "username": "narrator", + // "exchange_id": 176 + // }, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, // } // const marketId = this.safeString (order, 'symbol'); @@ -678,21 +759,11 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'filled'); - let cost = undefined; - let remaining = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (price !== undefined) { - cost = filled * price; - } - } - const status = (type === 'market') ? 'closed' : 'open'; - const result = { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'filled'); + const status = this.parseOrderStatus (this.safeString (order, 'status')); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -708,40 +779,56 @@ module.exports = class hollaex extends Exchange { 'stopPrice': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, - 'cost': cost, + 'remaining': undefined, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': undefined, - }; - return result; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); - const order = { + const request = { 'symbol': market['id'], 'side': side, 'size': amount, 'type': type, + // 'stop': parseFloat (this.priceToPrecision (symbol, stopPrice)), + // 'meta': {}, // other options such as post_only }; if (type !== 'market') { - order['price'] = price; + request['price'] = price; } - const response = await this.privatePostOrder (this.extend (order, params)); + const stopPrice = this.safeFloat2 (params, 'stopPrice', 'stop'); + if (stopPrice !== undefined) { + request['stop'] = parseFloat (this.priceToPrecision (symbol, stopPrice)); + params = this.omit (params, [ 'stopPrice', 'stop' ]); + } + const response = await this.privatePostOrder (this.extend (request, params)); // // { + // "fee": 0, + // "meta": {}, // "symbol": "xht-usdt", // "side": "sell", - // "size": 1, + // "size": 0.1, // "type": "limit", - // "price": 0.1, + // "price": 1, + // "fee_structure": { + // "maker": 0.2, + // "taker": 0.2 + // }, + // "fee_coin": "usdt", // "id": "string", - // "created_by": 34, + // "created_by": 116, // "filled": 0, - // "status": "pending" + // "status": "new", + // "updated_at": "2021-02-17T03:03:19.231Z", + // "created_at": "2021-02-17T03:03:19.231Z", + // "stop": null // } // return this.parseOrder (response, market); @@ -752,7 +839,7 @@ module.exports = class hollaex extends Exchange { const request = { 'order_id': id, }; - const response = await this.privateDeleteUserOrdersOrderId (this.extend (request, params)); + const response = await this.privateDeleteOrder (this.extend (request, params)); // // { // "title": "string", @@ -777,7 +864,7 @@ module.exports = class hollaex extends Exchange { market = this.markets (symbol); request['symbol'] = market['id']; } - const response = await this.privateDeleteUserOrders (this.extend (request, params)); + const response = await this.privateDeleteOrderAll (this.extend (request, params)); // // [ // { @@ -1043,7 +1130,7 @@ module.exports = class hollaex extends Exchange { const timestamp = this.parse8601 (this.safeString (transaction, 'created_at')); const updated = this.parse8601 (this.safeString (transaction, 'updated_at')); const type = this.safeString (transaction, 'type'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let address = this.safeString (transaction, 'address'); let addressTo = undefined; const addressFrom = undefined; @@ -1073,7 +1160,7 @@ module.exports = class hollaex extends Exchange { } const fee = { 'currency': code, - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), }; return { 'info': transaction, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/huobipro.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/huobipro.js index 52dc315e8..22c1d91d5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/huobipro.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/huobipro.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, ExchangeNotAvailable, OnMaintenance, InvalidOrder, OrderNotFound, InsufficientFunds, ArgumentsRequired, BadSymbol, BadRequest, RequestTimeout, NetworkError } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -22,7 +23,9 @@ module.exports = class huobipro extends Exchange { 'hostname': 'api.huobi.pro', // api.testnet.huobi.pro 'pro': true, 'has': { + 'cancelAllOrders': true, 'cancelOrder': true, + 'cancelOrders': true, 'CORS': false, 'createOrder': true, 'fetchBalance': true, @@ -189,6 +192,7 @@ module.exports = class huobipro extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.002, @@ -252,6 +256,7 @@ module.exports = class huobipro extends Exchange { // https://en.cryptonomist.ch/blog/eidoo/the-edo-to-pnt-upgrade-what-you-need-to-know-updated/ 'PNT': 'Penta', 'SBTC': 'Super Bitcoin', + 'BIFI': 'Bitcoin File', // conflict with Beefy.Finance https://github.com/ccxt/ccxt/issues/8706 }, }); } @@ -316,8 +321,8 @@ module.exports = class huobipro extends Exchange { 'info': limits, 'limits': { 'amount': { - 'min': this.safeFloat (limits, 'limit-order-must-greater-than'), - 'max': this.safeFloat (limits, 'limit-order-must-less-than'), + 'min': this.safeNumber (limits, 'limit-order-must-greater-than'), + 'max': this.safeNumber (limits, 'limit-order-must-less-than'), }, }, }; @@ -351,9 +356,9 @@ module.exports = class huobipro extends Exchange { }; const maker = (base === 'OMG') ? 0 : 0.2 / 100; const taker = (base === 'OMG') ? 0 : 0.2 / 100; - const minAmount = this.safeFloat (market, 'min-order-amt', Math.pow (10, -precision['amount'])); - const maxAmount = this.safeFloat (market, 'max-order-amt'); - const minCost = this.safeFloat (market, 'min-order-value', 0); + const minAmount = this.safeNumber (market, 'min-order-amt', Math.pow (10, -precision['amount'])); + const maxAmount = this.safeNumber (market, 'max-order-amt'); + const minCost = this.safeNumber (market, 'min-order-value', 0); const state = this.safeString (market, 'state'); const active = (state === 'online'); result.push ({ @@ -432,24 +437,24 @@ module.exports = class huobipro extends Exchange { let askVolume = undefined; if ('bid' in ticker) { if (Array.isArray (ticker['bid'])) { - bid = this.safeFloat (ticker['bid'], 0); - bidVolume = this.safeFloat (ticker['bid'], 1); + bid = this.safeNumber (ticker['bid'], 0); + bidVolume = this.safeNumber (ticker['bid'], 1); } else { - bid = this.safeFloat (ticker, 'bid'); + bid = this.safeNumber (ticker, 'bid'); bidVolume = this.safeValue (ticker, 'bidSize'); } } if ('ask' in ticker) { if (Array.isArray (ticker['ask'])) { - ask = this.safeFloat (ticker['ask'], 0); - askVolume = this.safeFloat (ticker['ask'], 1); + ask = this.safeNumber (ticker['ask'], 0); + askVolume = this.safeNumber (ticker['ask'], 1); } else { - ask = this.safeFloat (ticker, 'ask'); + ask = this.safeNumber (ticker, 'ask'); askVolume = this.safeValue (ticker, 'askSize'); } } - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; let percentage = undefined; let average = undefined; @@ -460,15 +465,15 @@ module.exports = class huobipro extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'amount'); - const quoteVolume = this.safeFloat (ticker, 'vol'); + const baseVolume = this.safeNumber (ticker, 'amount'); + const quoteVolume = this.safeNumber (ticker, 'vol'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': bid, 'bidVolume': bidVolume, 'ask': ask, @@ -557,7 +562,7 @@ module.exports = class huobipro extends Exchange { // } // const ticker = this.parseTicker (response['tick'], market); - const timestamp = this.safeValue (response, 'ts'); + const timestamp = this.safeInteger (response, 'ts'); ticker['timestamp'] = timestamp; ticker['datetime'] = this.iso8601 (timestamp); return ticker; @@ -626,21 +631,18 @@ module.exports = class huobipro extends Exchange { type = typeParts[1]; } const takerOrMaker = this.safeString (trade, 'role'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'filled-amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'filled-amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - let feeCost = this.safeFloat (trade, 'filled-fees'); + let feeCost = this.safeNumber (trade, 'filled-fees'); let feeCurrency = undefined; if (market !== undefined) { feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'fee-currency')); } - const filledPoints = this.safeFloat (trade, 'filled-points'); + const filledPoints = this.safeNumber (trade, 'filled-points'); if (filledPoints !== undefined) { if ((feeCost === undefined) || (feeCost === 0.0)) { feeCost = filledPoints; @@ -754,11 +756,11 @@ module.exports = class huobipro extends Exchange { // return [ this.safeTimestamp (ohlcv, 'id'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'amount'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'amount'), ]; } @@ -855,11 +857,11 @@ module.exports = class huobipro extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'deposit-min-amount'), + 'min': this.safeNumber (currency, 'deposit-min-amount'), 'max': Math.pow (10, precision), }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdraw-min-amount'), + 'min': this.safeNumber (currency, 'withdraw-min-amount'), 'max': Math.pow (10, precision), }, }, @@ -890,14 +892,14 @@ module.exports = class huobipro extends Exchange { account = this.account (); } if (balance['type'] === 'trade') { - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); } if (balance['type'] === 'frozen') { - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); } result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrdersByStates (states, symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1072,28 +1074,14 @@ module.exports = class huobipro extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeInteger (order, 'created-at'); - let amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount - if ((type === 'market') && (side === 'buy')) { - amount = (status === 'closed') ? filled : undefined; - } - let price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber2 (order, 'filled-amount', 'field-amount'); // typo in their API, filled amount + let price = this.safeNumber (order, 'price'); if (price === 0.0) { price = undefined; } - const cost = this.safeFloat2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - // if cost is defined and filled is not zero - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - const feeCost = this.safeFloat2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees + const cost = this.safeNumber2 (order, 'filled-cash-amount', 'field-cash-amount'); // same typo + const feeCost = this.safeNumber2 (order, 'filled-fees', 'field-fees'); // typo in their API, filled fees let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -1105,7 +1093,7 @@ module.exports = class huobipro extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -1119,15 +1107,15 @@ module.exports = class huobipro extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1201,26 +1189,82 @@ module.exports = class huobipro extends Exchange { }); } - currencyToPrecision (currency, fee) { - return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); + async cancelOrders (ids, symbol = undefined, params = {}) { + await this.loadMarkets (); + const clientOrderIds = this.safeValue2 (params, 'clientOrderIds', 'client-order-ids'); + params = this.omit (params, [ 'clientOrderIds', 'client-order-ids' ]); + const request = {}; + if (clientOrderIds === undefined) { + request['order-ids'] = ids; + } else { + request['client-order-ids'] = clientOrderIds; + } + const response = await this.privatePostOrderOrdersBatchcancel (this.extend (request, params)); + // + // { + // "status": "ok", + // "data": { + // "success": [ + // "5983466" + // ], + // "failed": [ + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "first" + // }, + // { + // "err-msg": "Incorrect order state", + // "order-state": 7, + // "order-id": "", + // "err-code": "order-orderstate-error", + // "client-order-id": "second" + // }, + // { + // "err-msg": "The record is not found.", + // "order-id": "", + // "err-code": "base-not-found", + // "client-order-id": "third" + // } + // ] + // } + // } + // + return response; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let key = 'quote'; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.currencyToPrecision (market[key], cost)), + async cancelAllOrders (symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + // 'account-id' string false NA The account id used for this cancel Refer to GET /v1/account/accounts + // 'symbol': market['id'], // a list of comma-separated symbols, all symbols by default + // 'types' 'string', buy-market, sell-market, buy-limit, sell-limit, buy-ioc, sell-ioc, buy-stop-limit, sell-stop-limit, buy-limit-fok, sell-limit-fok, buy-stop-limit-fok, sell-stop-limit-fok + // 'side': 'buy', // or 'sell' + // 'size': 100, // the number of orders to cancel 1-100 }; + let market = undefined; + if (symbol !== undefined) { + market = this.market (symbol); + request['symbol'] = market['id']; + } + const response = await this.privatePostOrderOrdersBatchCancelOpenOrders (this.extend (request, params)); + // + // { + // code: 200, + // data: { + // "success-count": 2, + // "failed-count": 0, + // "next-id": 5454600 + // } + // } + // + return response; + } + + currencyToPrecision (currency, fee) { + return this.decimalToPrecision (fee, 0, this.currencies[currency]['precision']); } parseDepositAddress (depositAddress, currency = undefined) { @@ -1362,7 +1406,7 @@ module.exports = class huobipro extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); const tag = this.safeString (transaction, 'address-tag'); - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { feeCost = Math.abs (feeCost); } @@ -1375,7 +1419,7 @@ module.exports = class huobipro extends Exchange { 'address': this.safeString (transaction, 'address'), 'tag': tag, 'type': type, - 'amount': this.safeFloat (transaction, 'amount'), + 'amount': this.safeNumber (transaction, 'amount'), 'currency': code, 'status': status, 'updated': updated, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ice3x.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ice3x.js deleted file mode 100644 index f228076d1..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ice3x.js +++ /dev/null @@ -1,495 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); -const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); - -// --------------------------------------------------------------------------- - -module.exports = class ice3x extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'ice3x', - 'name': 'ICE3X', - 'countries': [ 'ZA' ], // South Africa - 'rateLimit': 1000, - 'version': 'v1', - 'has': { - 'cancelOrder': true, - 'createOrder': true, - 'fetchBalance': true, - 'fetchCurrencies': true, - 'fetchDepositAddress': true, - 'fetchMarkets': true, - 'fetchMyTrades': true, - 'fetchOpenOrders': true, - 'fetchOrder': true, - 'fetchOrderBook': true, - 'fetchTicker': true, - 'fetchTickers': true, - 'fetchTrades': true, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/51840849/87460809-1dd06c00-c616-11ea-98ad-7d5e1cb7fcdd.jpg', - 'api': 'https://ice3x.com/api', - 'www': 'https://ice3x.com', // 'https://ice3x.co.za', - 'doc': 'https://ice3x.co.za/ice-cubed-bitcoin-exchange-api-documentation-1-june-2017', - 'fees': [ - 'https://help.ice3.com/support/solutions/articles/11000033293-trading-fees', - 'https://help.ice3.com/support/solutions/articles/11000033288-fees-explained', - 'https://help.ice3.com/support/solutions/articles/11000008131-what-are-your-fiat-deposit-and-withdrawal-fees-', - 'https://help.ice3.com/support/solutions/articles/11000033289-deposit-fees', - ], - 'referral': 'https://ice3x.com?ref=14341802', - }, - 'api': { - 'public': { - 'get': [ - 'currency/list', - 'currency/info', - 'pair/list', - 'pair/info', - 'stats/marketdepthfull', - 'stats/marketdepthbtcav', - 'stats/marketdepth', - 'orderbook/info', - 'trade/list', - 'trade/info', - ], - }, - 'private': { - 'post': [ - 'balance/list', - 'balance/info', - 'order/new', - 'order/cancel', - 'order/list', - 'order/info', - 'trade/list', - 'trade/info', - 'transaction/list', - 'transaction/info', - 'invoice/list', - 'invoice/info', - 'invoice/pdf', - ], - }, - }, - 'fees': { - 'trading': { - 'maker': 0.005, - 'taker': 0.005, - }, - }, - 'precision': { - 'amount': 8, - 'price': 8, - }, - }); - } - - async fetchCurrencies (params = {}) { - const response = await this.publicGetCurrencyList (params); - const currencies = response['response']['entities']; - const precision = this.precision['amount']; - const result = {}; - for (let i = 0; i < currencies.length; i++) { - const currency = currencies[i]; - const id = this.safeString (currency, 'currency_id'); - const currencyId = this.safeString (currency, 'iso'); - const code = this.safeCurrencyCode (currencyId); - result[code] = { - 'id': id, - 'code': code, - 'name': currency['name'], - 'active': true, - 'precision': precision, - 'limits': { - 'amount': { - 'min': undefined, - 'max': Math.pow (10, precision), - }, - 'price': { - 'min': Math.pow (10, -precision), - 'max': Math.pow (10, precision), - }, - 'cost': { - 'min': undefined, - 'max': undefined, - }, - }, - 'info': currency, - 'fee': undefined, - }; - } - return result; - } - - async fetchMarkets (params = {}) { - if (this.currencies_by_id === undefined) { - this.currencies = await this.fetchCurrencies (); - this.currencies_by_id = this.indexBy (this.currencies, 'id'); - } - const response = await this.publicGetPairList (params); - const markets = this.safeValue (response['response'], 'entities'); - const result = []; - for (let i = 0; i < markets.length; i++) { - const market = markets[i]; - const id = this.safeString (market, 'pair_id'); - const baseId = this.safeString (market, 'currency_id_from'); - const quoteId = this.safeString (market, 'currency_id_to'); - const baseCurrency = this.currencies_by_id[baseId]; - const quoteCurrency = this.currencies_by_id[quoteId]; - const base = baseCurrency['code']; - const quote = quoteCurrency['code']; - const symbol = base + '/' + quote; - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'active': undefined, - 'info': market, - 'precision': this.precision, - 'limits': this.limits, - }); - } - return result; - } - - parseTicker (ticker, market = undefined) { - const timestamp = this.milliseconds (); - const symbol = market['symbol']; - const last = this.safeFloat (ticker, 'last_price'); - return { - 'symbol': symbol, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max'), - 'low': this.safeFloat (ticker, 'min'), - 'bid': this.safeFloat (ticker, 'max_bid'), - 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'min_ask'), - 'askVolume': undefined, - 'vwap': undefined, - 'open': undefined, - 'close': last, - 'last': last, - 'previousClose': undefined, - 'change': undefined, - 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'vol'), - 'info': ticker, - }; - } - - async fetchTicker (symbol, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetStatsMarketdepthfull (this.extend (request, params)); - const ticker = this.safeValue (response['response'], 'entity'); - return this.parseTicker (ticker, market); - } - - async fetchTickers (symbols = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetStatsMarketdepthfull (params); - const tickers = this.safeValue (response['response'], 'entities'); - const result = {}; - for (let i = 0; i < tickers.length; i++) { - const ticker = tickers[i]; - const marketId = this.safeString (ticker, 'pair_id'); - const market = this.safeValue (this.marketsById, marketId); - if (market !== undefined) { - const symbol = market['symbol']; - result[symbol] = this.parseTicker (ticker, market); - } - } - return this.filterByArray (result, 'symbol', symbols); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'pair_id': this.marketId (symbol), - }; - if (limit !== undefined) { - const type = this.safeString (params, 'type'); - if ((type !== 'ask') && (type !== 'bid')) { - // eslint-disable-next-line quotes - throw new ArgumentsRequired (this.id + " fetchOrderBook() requires an exchange-specific extra 'type' param ('bid' or 'ask') when used with a limit"); - } else { - request['items_per_page'] = limit; - } - } - const response = await this.publicGetOrderbookInfo (this.extend (request, params)); - const orderbook = this.safeValue (response['response'], 'entities'); - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'price', 'amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.safeTimestamp (trade, 'created'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - 'currency': market['quote'], - }; - } - const type = 'limit'; - const side = this.safeString (trade, 'type'); - const id = this.safeString (trade, 'trade_id'); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - return { - 'id': id, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': type, - 'side': side, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': fee, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - const response = await this.publicGetTradeList (this.extend (request, params)); - const trades = this.safeValue (response['response'], 'entities'); - return this.parseTrades (trades, market, since, limit); - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privatePostBalanceList (params); - const result = { 'info': response }; - const balances = this.safeValue (response['response'], 'entities', []); - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - // currency ids are numeric strings - const currencyId = this.safeString (balance, 'currency_id'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - result[code] = account; - } - return this.parseBalance (result); - } - - parseOrder (order, market = undefined) { - const pairId = this.safeInteger (order, 'pair_id'); - let symbol = undefined; - if (pairId && !market && (pairId in this.marketsById)) { - market = this.marketsById[pairId]; - symbol = market['symbol']; - } - const timestamp = this.safeTimestamp (order, 'created'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - let status = this.safeInteger (order, 'active'); - let remaining = this.safeFloat (order, 'remaining'); - let filled = undefined; - if (status === 1) { - status = 'open'; - } else { - status = 'closed'; - remaining = 0; - filled = amount; - } - let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); - if (feeCost !== undefined) { - fee = { - 'cost': feeCost, - }; - if (market !== undefined) { - fee['currency'] = market['quote']; - } - } - return { - 'id': this.safeString (order, 'order_id'), - 'clientOrderId': undefined, - 'datetime': this.iso8601 (timestamp), - 'timestamp': timestamp, - 'lastTradeTimestamp': undefined, - 'status': status, - 'symbol': symbol, - 'type': 'limit', - 'timeInForce': undefined, - 'postOnly': undefined, - 'side': this.safeString (order, 'type'), - 'price': price, - 'stopPrice': undefined, - 'cost': undefined, - 'amount': amount, - 'filled': filled, - 'remaining': remaining, - 'trades': undefined, - 'fee': fee, - 'info': order, - 'average': undefined, - }; - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - 'type': side, - 'amount': amount, - 'price': price, - }; - const response = await this.privatePostOrderNew (this.extend (request, params)); - const order = this.parseOrder ({ - 'order_id': response['response']['entity']['order_id'], - 'created': this.seconds (), - 'active': 1, - 'type': side, - 'price': price, - 'volume': amount, - 'remaining': amount, - 'info': response, - }, market); - return order; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - const request = { - 'order_id': id, - }; - return await this.privatePostOrderCancel (this.extend (request, params)); - } - - async fetchOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'order _id': id, - }; - const response = await this.privatePostOrderInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const order = this.safeValue (data, 'entity'); - return this.parseOrder (order); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.privatePostOrderList (params); - const data = this.safeValue (response, 'response', {}); - const orders = this.safeValue (data, 'entities', []); - let market = undefined; - if (symbol !== undefined) { - market = this.market (symbol); - } - return this.parseOrders (orders, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'pair_id': market['id'], - }; - if (limit !== undefined) { - request['items_per_page'] = limit; - } - if (since !== undefined) { - request['date_from'] = parseInt (since / 1000); - } - const response = await this.privatePostTradeList (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const trades = this.safeValue (data, 'entities', []); - return this.parseTrades (trades, market, since, limit); - } - - async fetchDepositAddress (code, params = {}) { - await this.loadMarkets (); - const currency = this.currency (code); - const request = { - 'currency_id': currency['id'], - }; - const response = await this.privatePostBalanceInfo (this.extend (request, params)); - const data = this.safeValue (response, 'response', {}); - const balance = this.safeValue (data, 'entity', {}); - const address = this.safeString (balance, 'address'); - const status = address ? 'ok' : 'none'; - return { - 'currency': code, - 'address': address, - 'tag': undefined, - 'status': status, - 'info': response, - }; - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/' + this.version + '/' + path; - if (api === 'public') { - if (Object.keys (params).length) { - url += '?' + this.urlencode (params); - } - } else { - this.checkRequiredCredentials (); - body = this.urlencode (this.extend ({ - 'nonce': this.nonce (), - }, params)); - headers = { - 'Content-Type': 'application/x-www-form-urlencoded', - 'Key': this.apiKey, - 'Sign': this.hmac (this.encode (body), this.encode (this.secret), 'sha512'), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } - - async request (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - const response = await this.fetch2 (path, api, method, params, headers, body); - const errors = this.safeValue (response, 'errors'); - const data = this.safeValue (response, 'response'); - if (errors || !data) { - const authErrorKeys = [ 'Key', 'user_id', 'Sign' ]; - for (let i = 0; i < authErrorKeys.length; i++) { - const errorKey = authErrorKeys[i]; - const errorMessage = this.safeString (errors, errorKey); - if (!errorMessage) { - continue; - } - if (errorKey === 'user_id' && errorMessage.indexOf ('authorization') < 0) { - continue; - } - throw new AuthenticationError (errorMessage); - } - throw new ExchangeError (this.json (errors)); - } - return response; - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/idex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/idex.js index 7d52a5286..c3c14d981 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/idex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/idex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { PAD_WITH_ZERO } = require ('./base/functions/number'); const { InvalidOrder, InsufficientFunds, ExchangeError, ExchangeNotAvailable, DDoSProtection, BadRequest, NotSupported, InvalidAddress, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -241,14 +242,6 @@ module.exports = class idex extends Exchange { return this.parseTickers (response, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // { // market: 'DIL-ETH', @@ -268,16 +261,16 @@ module.exports = class idex extends Exchange { // } const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'baseVolume'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume'); + const baseVolume = this.safeNumber (ticker, 'baseVolume'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume'); const timestamp = this.safeInteger (ticker, 'time'); - const open = this.safeFloat (ticker, 'open'); - const high = this.safeFloat (ticker, 'high'); - const low = this.safeFloat (ticker, 'low'); - const close = this.safeFloat (ticker, 'close'); - const ask = this.safeFloat (ticker, 'ask'); - const bid = this.safeFloat (ticker, 'bid'); - let percentage = this.safeFloat (ticker, 'percentChange'); + const open = this.safeNumber (ticker, 'open'); + const high = this.safeNumber (ticker, 'high'); + const low = this.safeNumber (ticker, 'low'); + const close = this.safeNumber (ticker, 'close'); + const ask = this.safeNumber (ticker, 'ask'); + const bid = this.safeNumber (ticker, 'bid'); + let percentage = this.safeNumber (ticker, 'percentChange'); if (percentage !== undefined) { percentage = 1 + percentage / 100; } @@ -353,11 +346,11 @@ module.exports = class idex extends Exchange { // sequence: 3853 // } const timestamp = this.safeInteger (ohlcv, 'start'); - const open = this.safeFloat (ohlcv, 'open'); - const high = this.safeFloat (ohlcv, 'high'); - const low = this.safeFloat (ohlcv, 'low'); - const close = this.safeFloat (ohlcv, 'close'); - const volume = this.safeFloat (ohlcv, 'volume'); + const open = this.safeNumber (ohlcv, 'open'); + const high = this.safeNumber (ohlcv, 'high'); + const low = this.safeNumber (ohlcv, 'low'); + const close = this.safeNumber (ohlcv, 'close'); + const volume = this.safeNumber (ohlcv, 'volume'); return [ timestamp, open, high, low, close, volume ]; } @@ -419,9 +412,14 @@ module.exports = class idex extends Exchange { // txStatus: 'mined' // } const id = this.safeString (trade, 'fillId'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - const cost = this.safeFloat (trade, 'quoteQuantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'quoteQuantity'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const timestamp = this.safeInteger (trade, 'time'); const marketId = this.safeString (trade, 'market'); const symbol = this.safeSymbol (marketId, market, '-'); @@ -430,7 +428,7 @@ module.exports = class idex extends Exchange { const oppositeSide = (makerSide === 'buy') ? 'sell' : 'buy'; const side = this.safeString (trade, 'side', oppositeSide); const takerOrMaker = this.safeString (trade, 'liquidity', 'taker'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeAsset'); @@ -503,8 +501,8 @@ module.exports = class idex extends Exchange { const result = []; for (let i = 0; i < bookSide.length; i++) { const order = bookSide[i]; - const price = this.safeFloat (order, 0); - const amount = this.safeFloat (order, 1); + const price = this.safeNumber (order, 0); + const amount = this.safeNumber (order, 1); const orderCount = this.safeInteger (order, 2); result.push ([ price, amount, orderCount ]); } @@ -591,16 +589,13 @@ module.exports = class idex extends Exchange { const entry = response[i]; const currencyId = this.safeString (entry, 'asset'); const code = this.safeCurrencyCode (currencyId); - const total = this.safeFloat (entry, 'quantity'); - const free = this.safeFloat (entry, 'availableForTrade'); - const used = this.safeFloat (entry, 'locked'); - result[code] = { - 'free': free, - 'used': used, - 'total': total, - }; + const account = this.account (); + account['total'] = this.safeString (entry, 'quantity'); + account['free'] = this.safeString (entry, 'availableForTrade'); + account['used'] = this.safeString (entry, 'locked'); + result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -821,10 +816,10 @@ module.exports = class idex extends Exchange { const symbol = this.safeSymbol (marketId, market, '-'); const trades = this.parseTrades (fills, market); const type = this.safeString (order, 'type'); - const amount = this.safeFloat (order, 'originalQuantity'); - const filled = this.safeFloat (order, 'executedQuantity'); - const average = this.safeFloat (order, 'avgExecutionPrice'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'originalQuantity'); + const filled = this.safeNumber (order, 'executedQuantity'); + const average = this.safeNumber (order, 'avgExecutionPrice'); + const price = this.safeNumber (order, 'price'); const rawStatus = this.safeString (order, 'status'); const status = this.parseOrderStatus (rawStatus); const fee = { @@ -933,7 +928,7 @@ module.exports = class idex extends Exchange { throw new NotSupported (this.id + ' quoteOrderQuantity is not supported for ' + type + ' orders, only supported for market orders'); } amountEnum = 1; - amount = this.safeFloat (params, 'quoteOrderQuantity'); + amount = this.safeNumber (params, 'quoteOrderQuantity'); } const sideEnum = (side === 'buy') ? 0 : 1; const walletBytes = this.remove0xPrefix (this.walletAddress); @@ -1236,13 +1231,13 @@ module.exports = class idex extends Exchange { } const id = this.safeString2 (transaction, 'depositId', 'withdrawId'); const code = this.safeCurrencyCode (this.safeString (transaction, 'asset'), currency); - const amount = this.safeFloat (transaction, 'quantity'); + const amount = this.safeNumber (transaction, 'quantity'); const txid = this.safeString (transaction, 'txId'); const timestamp = this.safeInteger (transaction, 'txTime'); let fee = undefined; if ('fee' in transaction) { fee = { - 'cost': this.safeFloat (transaction, 'fee'), + 'cost': this.safeNumber (transaction, 'fee'), 'currency': 'ETH', }; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/independentreserve.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/independentreserve.js index 119a216d5..86dcb348b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/independentreserve.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/independentreserve.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -126,11 +127,11 @@ module.exports = class independentreserve extends Exchange { const currencyId = this.safeString (balance, 'CurrencyCode'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'AvailableBalance'); - account['total'] = this.safeFloat (balance, 'TotalBalance'); + account['free'] = this.safeString (balance, 'AvailableBalance'); + account['total'] = this.safeString (balance, 'TotalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -151,16 +152,16 @@ module.exports = class independentreserve extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'LastPrice'); + const last = this.safeNumber (ticker, 'LastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'DayHighestPrice'), - 'low': this.safeFloat (ticker, 'DayLowestPrice'), - 'bid': this.safeFloat (ticker, 'CurrentHighestBidPrice'), + 'high': this.safeNumber (ticker, 'DayHighestPrice'), + 'low': this.safeNumber (ticker, 'DayLowestPrice'), + 'bid': this.safeNumber (ticker, 'CurrentHighestBidPrice'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'CurrentLowestOfferPrice'), + 'ask': this.safeNumber (ticker, 'CurrentLowestOfferPrice'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -169,8 +170,8 @@ module.exports = class independentreserve extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'DayAvgPrice'), - 'baseVolume': this.safeFloat (ticker, 'DayVolumeXbtInSecondaryCurrrency'), + 'average': this.safeNumber (ticker, 'DayAvgPrice'), + 'baseVolume': this.safeNumber (ticker, 'DayVolumeXbtInSecondaryCurrrency'), 'quoteVolume': undefined, 'info': ticker, }; @@ -249,20 +250,10 @@ module.exports = class independentreserve extends Exchange { orderType = 'limit'; } const timestamp = this.parse8601 (this.safeString (order, 'CreatedTimestampUtc')); - const amount = this.safeFloat2 (order, 'VolumeOrdered', 'Volume'); - let filled = this.safeFloat (order, 'VolumeFilled'); - let remaining = this.safeFloat (order, 'Outstanding'); - if (filled === undefined) { - if ((remaining !== undefined) && (amount !== undefined)) { - filled = Math.max (0, amount - remaining); - } - } - if (remaining === undefined) { - if ((filled !== undefined) && (amount !== undefined)) { - remaining = Math.max (0, amount - filled); - } - } - const feeRate = this.safeFloat (order, 'FeePercent'); + const amount = this.safeNumber2 (order, 'VolumeOrdered', 'Volume'); + const filled = this.safeNumber (order, 'VolumeFilled'); + const remaining = this.safeNumber (order, 'Outstanding'); + const feeRate = this.safeNumber (order, 'FeePercent'); let feeCost = undefined; if (feeRate !== undefined) { feeCost = feeRate * filled; @@ -274,10 +265,10 @@ module.exports = class independentreserve extends Exchange { }; const id = this.safeString (order, 'OrderGuid'); const status = this.parseOrderStatus (this.safeString (order, 'Status')); - const cost = this.safeFloat (order, 'Value'); - const average = this.safeFloat (order, 'AvgPrice'); - const price = this.safeFloat (order, 'Price', average); - return { + const cost = this.safeNumber (order, 'Value'); + const average = this.safeNumber (order, 'AvgPrice'); + const price = this.safeNumber (order, 'Price'); + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -299,7 +290,7 @@ module.exports = class independentreserve extends Exchange { 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -387,14 +378,11 @@ module.exports = class independentreserve extends Exchange { const timestamp = this.parse8601 (trade['TradeTimestampUtc']); const id = this.safeString (trade, 'TradeGuid'); const orderId = this.safeString (trade, 'OrderGuid'); - const price = this.safeFloat2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); - const amount = this.safeFloat2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'Price', 'SecondaryCurrencyTradePrice'); + const amountString = this.safeString2 (trade, 'VolumeTraded', 'PrimaryCurrencyAmount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const baseId = this.safeString (trade, 'PrimaryCurrencyCode'); const quoteId = this.safeString (trade, 'SecondaryCurrencyCode'); let marketId = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/indodax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/indodax.js index f1cc33732..05972a887 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/indodax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/indodax.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InsufficientFunds, InvalidOrder, OrderNotFound, AuthenticationError, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,7 +165,7 @@ module.exports = class indodax extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const taker = this.safeFloat (market, 'trade_fee_percent'); + const taker = this.safeNumber (market, 'trade_fee_percent'); const isMaintenance = this.safeInteger (market, 'is_maintenance'); const active = (isMaintenance) ? false : true; const pricePrecision = this.safeInteger (market, 'price_round'); @@ -174,11 +175,11 @@ module.exports = class indodax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'trade_min_traded_currency'), + 'min': this.safeNumber (market, 'trade_min_traded_currency'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'trade_min_base_currency'), + 'min': this.safeNumber (market, 'trade_min_base_currency'), 'max': undefined, }, 'cost': { @@ -216,11 +217,11 @@ module.exports = class indodax extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (used, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (used, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -257,16 +258,16 @@ module.exports = class indodax extends Exchange { const timestamp = this.safeTimestamp (ticker, 'server_time'); const baseVolume = 'vol_' + market['baseId'].toLowerCase (); const quoteVolume = 'vol_' + market['quoteId'].toLowerCase (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -276,8 +277,8 @@ module.exports = class indodax extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, baseVolume), - 'quoteVolume': this.safeFloat (ticker, quoteVolume), + 'baseVolume': this.safeNumber (ticker, baseVolume), + 'quoteVolume': this.safeNumber (ticker, quoteVolume), 'info': ticker, }; } @@ -291,14 +292,11 @@ module.exports = class indodax extends Exchange { } const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, @@ -353,7 +351,7 @@ module.exports = class indodax extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'status', 'open')); let symbol = undefined; let cost = undefined; - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let amount = undefined; let remaining = undefined; let filled = undefined; @@ -367,18 +365,18 @@ module.exports = class indodax extends Exchange { if ((market['baseId'] === 'idr') && ('remain_rp' in order)) { baseId = 'rp'; } - cost = this.safeFloat (order, 'order_' + quoteId); + cost = this.safeNumber (order, 'order_' + quoteId); if (cost) { amount = cost / price; - const remainingCost = this.safeFloat (order, 'remain_' + quoteId); + const remainingCost = this.safeNumber (order, 'remain_' + quoteId); if (remainingCost !== undefined) { remaining = remainingCost / price; filled = amount - remaining; } } else { - amount = this.safeFloat (order, 'order_' + baseId); + amount = this.safeNumber (order, 'order_' + baseId); cost = price * amount; - remaining = this.safeFloat (order, 'remain_' + baseId); + remaining = this.safeNumber (order, 'remain_' + baseId); filled = amount - remaining; } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/itbit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/itbit.js index 552bb0de5..a46080ccc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/itbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/itbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -114,25 +115,25 @@ module.exports = class itbit extends Exchange { throw new ExchangeError (this.id + ' fetchTicker returned a bad response: ' + this.json (ticker)); } const timestamp = this.parse8601 (serverTimeUTC); - const vwap = this.safeFloat (ticker, 'vwap24h'); - const baseVolume = this.safeFloat (ticker, 'volume24h'); + const vwap = this.safeNumber (ticker, 'vwap24h'); + const baseVolume = this.safeNumber (ticker, 'volume24h'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'lastPrice'); + const last = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'openToday'), + 'open': this.safeNumber (ticker, 'openToday'), 'close': last, 'last': last, 'previousClose': undefined, @@ -179,23 +180,20 @@ module.exports = class itbit extends Exchange { const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); const side = this.safeString (trade, 'direction'); const orderId = this.safeString (trade, 'orderId'); - let feeCost = this.safeFloat (trade, 'commissionPaid'); + let feeCost = this.safeNumber (trade, 'commissionPaid'); const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - let rebatesApplied = this.safeFloat (trade, 'rebatesApplied'); + let rebatesApplied = this.safeNumber (trade, 'rebatesApplied'); if (rebatesApplied !== undefined) { rebatesApplied = -rebatesApplied; } const rebateCurrencyId = this.safeString (trade, 'rebateCurrency'); const rebateCurrency = this.safeCurrencyCode (rebateCurrencyId); - const price = this.safeFloat2 (trade, 'price', 'rate'); - const amount = this.safeFloat2 (trade, 'currency1Amount', 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'price', 'rate'); + const amountString = this.safeString2 (trade, 'currency1Amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; const marketId = this.safeString (trade, 'instrument'); if (marketId !== undefined) { @@ -317,7 +315,7 @@ module.exports = class itbit extends Exchange { 'txid': txnHash, 'type': transactionType, 'status': status, - 'amount': this.safeFloat (item, 'amount'), + 'amount': this.safeNumber (item, 'amount'), 'fee': undefined, 'info': item, }); @@ -417,11 +415,11 @@ module.exports = class itbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'availableBalance'); - account['total'] = this.safeFloat (balance, 'totalBalance'); + account['free'] = this.safeString (balance, 'availableBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchWallets (params = {}) { @@ -512,26 +510,16 @@ module.exports = class itbit extends Exchange { const type = this.safeString (order, 'type'); const symbol = this.markets_by_id[order['instrument']]['symbol']; const timestamp = this.parse8601 (order['createdTime']); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'amountFilled'); - let remaining = undefined; - let cost = undefined; + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'amountFilled'); const fee = undefined; - const price = this.safeFloat (order, 'price'); - const average = this.safeFloat (order, 'volumeWeightedAveragePrice'); - if (filled !== undefined) { - if (amount !== undefined) { - remaining = amount - filled; - } - if (average !== undefined) { - cost = filled * average; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'volumeWeightedAveragePrice'); const clientOrderId = this.safeString (order, 'clientOrderIdentifier'); const id = this.safeString (order, 'id'); const postOnlyString = this.safeString (order, 'postOnly'); const postOnly = (postOnlyString === 'True'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -546,15 +534,15 @@ module.exports = class itbit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, // 'trades': this.parseTrades (order['trades'], market), 'trades': undefined, - }; + }); } nonce () { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kraken.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kraken.js index 198ee4cf8..514ed0094 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kraken.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kraken.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { BadSymbol, ExchangeNotAvailable, ArgumentsRequired, PermissionDenied, AuthenticationError, ExchangeError, OrderNotFound, DDoSProtection, InvalidNonce, InsufficientFunds, CancelPending, InvalidOrder, InvalidAddress, RateLimitExceeded } = require ('./base/errors'); const { TRUNCATE, DECIMAL_PLACES } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -297,26 +298,38 @@ module.exports = class kraken extends Exchange { // } // } // - const keys = Object.keys (response['result']); + const markets = this.safeValue (response, 'result', {}); + const keys = Object.keys (markets); let result = []; for (let i = 0; i < keys.length; i++) { const id = keys[i]; - const market = response['result'][id]; - const baseId = market['base']; - const quoteId = market['quote']; + const market = markets[id]; + const baseId = this.safeString (market, 'base'); + const quoteId = this.safeString (market, 'quote'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const darkpool = id.indexOf ('.d') >= 0; - const symbol = darkpool ? market['altname'] : (base + '/' + quote); + const altname = this.safeString (market, 'altname'); + const symbol = darkpool ? altname : (base + '/' + quote); + const makerFees = this.safeValue (market, 'fees_maker', []); + const firstMakerFee = this.safeValue (makerFees, 0, []); + const firstMakerFeeRate = this.safeNumber (firstMakerFee, 1); let maker = undefined; - if ('fees_maker' in market) { - maker = parseFloat (market['fees_maker'][0][1]) / 100; + if (firstMakerFeeRate !== undefined) { + maker = parseFloat (firstMakerFeeRate) / 100; + } + const takerFees = this.safeValue (market, 'fees', []); + const firstTakerFee = this.safeValue (takerFees, 0, []); + const firstTakerFeeRate = this.safeNumber (firstTakerFee, 1); + let taker = undefined; + if (firstTakerFeeRate !== undefined) { + taker = parseFloat (firstTakerFeeRate) / 100; } const precision = { - 'amount': market['lot_decimals'], - 'price': market['pair_decimals'], + 'amount': this.safeInteger (market, 'lot_decimals'), + 'price': this.safeInteger (market, 'pair_decimals'), }; - const minAmount = this.safeFloat (market, 'ordermin'); + const minAmount = this.safeNumber (market, 'ordermin'); result.push ({ 'id': id, 'symbol': symbol, @@ -328,7 +341,7 @@ module.exports = class kraken extends Exchange { 'info': market, 'altname': market['altname'], 'maker': maker, - 'taker': parseFloat (market['fees'][0][1]) / 100, + 'taker': taker, 'active': true, 'precision': precision, 'limits': { @@ -451,7 +464,7 @@ module.exports = class kraken extends Exchange { await this.loadMarkets (); this.checkRequiredCredentials (); const response = await this.privatePostTradeVolume (params); - const tradedVolume = this.safeFloat (response['result'], 'volume'); + const tradedVolume = this.safeNumber (response['result'], 'volume'); const tiers = this.fees['trading']['tiers']; let taker = tiers['taker'][1]; let maker = tiers['maker'][1]; @@ -473,8 +486,8 @@ module.exports = class kraken extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - const amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + const amount = this.safeNumber (bidask, amountKey); const timestamp = this.safeInteger (bidask, 2); return [ price, amount, timestamp ]; } @@ -512,7 +525,14 @@ module.exports = class kraken extends Exchange { // } // const result = this.safeValue (response, 'result', {}); - const orderbook = this.safeValue (result, market['id']); + let orderbook = this.safeValue (result, market['id']); + // sometimes kraken returns wsname instead of market id + // https://github.com/ccxt/ccxt/issues/8662 + const marketInfo = this.safeValue (market, 'info', {}); + const wsName = this.safeValue (marketInfo, 'wsname'); + if (wsName !== undefined) { + orderbook = this.safeValue (result, wsName, orderbook); + } return this.parseOrderBook (orderbook); } @@ -540,7 +560,7 @@ module.exports = class kraken extends Exchange { 'ask': parseFloat (ticker['a'][0]), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'o'), + 'open': this.safeNumber (ticker, 'o'), 'close': last, 'last': last, 'previousClose': undefined, @@ -611,11 +631,11 @@ module.exports = class kraken extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 6), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 6), ]; } @@ -682,24 +702,24 @@ module.exports = class kraken extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'asset'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); } else { direction = 'in'; } - const time = this.safeFloat (item, 'time'); + const time = this.safeNumber (item, 'time'); let timestamp = undefined; if (time !== undefined) { timestamp = parseInt (time * 1000); } const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, @@ -823,9 +843,8 @@ module.exports = class kraken extends Exchange { let timestamp = undefined; let side = undefined; let type = undefined; - let price = undefined; - let amount = undefined; - let cost = undefined; + let priceString = undefined; + let amountString = undefined; let id = undefined; let orderId = undefined; let fee = undefined; @@ -834,8 +853,8 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 2); side = (trade[3] === 's') ? 'sell' : 'buy'; type = (trade[4] === 'l') ? 'limit' : 'market'; - price = this.safeFloat (trade, 0); - amount = this.safeFloat (trade, 1); + priceString = this.safeString (trade, 0); + amountString = this.safeString (trade, 1); const tradeLength = trade.length; if (tradeLength > 6) { id = this.safeString (trade, 6); // artificially added as per #1794 @@ -856,15 +875,15 @@ module.exports = class kraken extends Exchange { timestamp = this.safeTimestamp (trade, 'time'); side = this.safeString (trade, 'type'); type = this.safeString (trade, 'ordertype'); - price = this.safeFloat (trade, 'price'); - amount = this.safeFloat (trade, 'vol'); + priceString = this.safeString (trade, 'price'); + amountString = this.safeString (trade, 'vol'); if ('fee' in trade) { let currency = undefined; if (market !== undefined) { currency = market['quote']; } fee = { - 'cost': this.safeFloat (trade, 'fee'), + 'cost': this.safeNumber (trade, 'fee'), 'currency': currency, }; } @@ -872,11 +891,9 @@ module.exports = class kraken extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'order': orderId, @@ -951,10 +968,10 @@ module.exports = class kraken extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -983,15 +1000,15 @@ module.exports = class kraken extends Exchange { if (type === 'limit') { request['price'] = this.priceToPrecision (symbol, price); } else if ((type === 'stop-loss') || (type === 'take-profit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice', price); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice', price); if (stopPrice === undefined) { throw new ArgumentsRequired (this.id + ' createOrder() requires a price argument or a price/stopPrice parameter for a ' + type + ' order'); } else { request['price'] = this.priceToPrecision (symbol, stopPrice); } } else if ((type === 'stop-loss-limit') || (type === 'take-profit-limit')) { - const stopPrice = this.safeFloat2 (params, 'price', 'stopPrice'); - const limitPrice = this.safeFloat (params, 'price2'); + const stopPrice = this.safeNumber2 (params, 'price', 'stopPrice'); + const limitPrice = this.safeNumber (params, 'price2'); const stopPriceDefined = (stopPrice !== undefined); const limitPriceDefined = (limitPrice !== undefined); if (stopPriceDefined && limitPriceDefined) { @@ -1100,10 +1117,10 @@ module.exports = class kraken extends Exchange { if (orderDescription !== undefined) { const parts = orderDescription.split (' '); side = this.safeString (parts, 0); - amount = this.safeFloat (parts, 1); + amount = this.safeNumber (parts, 1); marketId = this.safeString (parts, 2); type = this.safeString (parts, 4); - price = this.safeFloat (parts, 5); + price = this.safeNumber (parts, 5); } side = this.safeString (description, 'type', side); type = this.safeString (description, 'ordertype', type); @@ -1117,27 +1134,23 @@ module.exports = class kraken extends Exchange { market = this.getDelistedMarketById (marketId); } const timestamp = this.safeTimestamp (order, 'opentm'); - amount = this.safeFloat (order, 'vol', amount); - const filled = this.safeFloat (order, 'vol_exec'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = amount - filled; - } + amount = this.safeNumber (order, 'vol', amount); + const filled = this.safeNumber (order, 'vol_exec'); let fee = undefined; - const cost = this.safeFloat (order, 'cost'); - price = this.safeFloat (description, 'price', price); + const cost = this.safeNumber (order, 'cost'); + price = this.safeNumber (description, 'price', price); if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (description, 'price2'); + price = this.safeNumber (description, 'price2'); } if ((price === undefined) || (price === 0.0)) { - price = this.safeFloat (order, 'price', price); + price = this.safeNumber (order, 'price', price); } - const average = this.safeFloat (order, 'price'); + const average = this.safeNumber (order, 'price'); if (market !== undefined) { symbol = market['symbol']; if ('fee' in order) { const flags = order['oflags']; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); fee = { 'cost': feeCost, 'rate': undefined, @@ -1161,8 +1174,8 @@ module.exports = class kraken extends Exchange { if (rawTrades !== undefined) { trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id }); } - const stopPrice = this.safeFloat (order, 'stopprice'); - return { + const stopPrice = this.safeNumber (order, 'stopprice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -1181,10 +1194,10 @@ module.exports = class kraken extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -1534,10 +1547,10 @@ module.exports = class kraken extends Exchange { const currencyId = this.safeString (transaction, 'asset'); const code = this.safeCurrencyCode (currencyId, currency); const address = this.safeString (transaction, 'info'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const type = this.safeString (transaction, 'type'); // injected from the outside - let feeCost = this.safeFloat (transaction, 'fee'); + let feeCost = this.safeNumber (transaction, 'fee'); if (feeCost === undefined) { if (type === 'deposit') { feeCost = 0; @@ -1714,7 +1727,7 @@ module.exports = class kraken extends Exchange { throw new ExchangeError (this.id + " withdraw() requires a 'key' parameter (withdrawal key name, as set up on your account)"); } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const request = { // 'txid': 'comma delimited list of transaction ids to restrict output to', diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kucoin.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kucoin.js index bcb058989..0b5aca5af 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kucoin.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kucoin.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, InvalidNonce, NotSupported, BadRequest, AuthenticationError, BadSymbol, RateLimitExceeded, PermissionDenied } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -45,6 +46,7 @@ module.exports = class kucoin extends Exchange { 'fetchTrades': true, 'fetchWithdrawals': true, 'withdraw': true, + 'transfer': true, }, 'urls': { 'logo': 'https://user-images.githubusercontent.com/51840849/87295558-132aaf80-c50e-11ea-9801-a2fb0c57c799.jpg', @@ -52,6 +54,7 @@ module.exports = class kucoin extends Exchange { 'api': { 'public': 'https://openapi-v2.kucoin.com', 'private': 'https://openapi-v2.kucoin.com', + 'futuresPrivate': 'https://api-futures.kucoin.com', }, 'test': { 'public': 'https://openapi-sandbox.kucoin.com', @@ -160,6 +163,15 @@ module.exports = class kucoin extends Exchange { 'stop-order/cancel', ], }, + 'futuresPrivate': { + 'get': [ + 'account-overview', + 'positions', + ], + 'post': [ + 'transfer-out', + ], + }, }, 'timeframes': { '1m': '1min', @@ -184,6 +196,7 @@ module.exports = class kucoin extends Exchange { 'order_not_exist_or_not_allow_to_cancel': InvalidOrder, // {"code":"400100","msg":"order_not_exist_or_not_allow_to_cancel"} 'Order size below the minimum requirement.': InvalidOrder, // {"code":"400100","msg":"Order size below the minimum requirement."} 'The withdrawal amount is below the minimum requirement.': ExchangeError, // {"code":"400100","msg":"The withdrawal amount is below the minimum requirement."} + 'Unsuccessful! Exceeded the max. funds out-transfer limit': InsufficientFunds, // {"code":"200000","msg":"Unsuccessful! Exceeded the max. funds out-transfer limit"} '400': BadRequest, '401': AuthenticationError, '403': NotSupported, @@ -240,9 +253,7 @@ module.exports = class kucoin extends Exchange { 'version': 'v1', 'symbolSeparator': '-', 'fetchMyTradesMethod': 'private_get_fills', - 'fetchBalance': { - 'type': 'trade', // or 'main' - }, + 'fetchBalance': 'trade', // endpoint versions 'versions': { 'public': { @@ -262,6 +273,25 @@ module.exports = class kucoin extends Exchange { 'accounts/sub-transfer': 'v2', }, }, + 'futuresPrivate': { + 'GET': { + 'account-overview': 'v1', + 'positions': 'v1', + }, + 'POST': { + 'transfer-out': 'v2', + }, + }, + }, + 'accountsByType': { + 'trade': 'trade', + 'trading': 'trade', + 'margin': 'margin', + 'main': 'main', + 'futures': 'contract', + 'contract': 'contract', + 'pool': 'pool', + 'pool-x': 'pool', }, }, }); @@ -342,11 +372,11 @@ module.exports = class kucoin extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const active = this.safeValue (market, 'enableTrading'); - const baseMaxSize = this.safeFloat (market, 'baseMaxSize'); - const baseMinSize = this.safeFloat (market, 'baseMinSize'); - const quoteMaxSize = this.safeFloat (market, 'quoteMaxSize'); - const quoteMinSize = this.safeFloat (market, 'quoteMinSize'); - // const quoteIncrement = this.safeFloat (market, 'quoteIncrement'); + const baseMaxSize = this.safeNumber (market, 'baseMaxSize'); + const baseMinSize = this.safeNumber (market, 'baseMinSize'); + const quoteMaxSize = this.safeNumber (market, 'quoteMaxSize'); + const quoteMinSize = this.safeNumber (market, 'quoteMinSize'); + // const quoteIncrement = this.safeNumber (market, 'quoteIncrement'); const precision = { 'amount': this.precisionFromString (this.safeString (market, 'baseIncrement')), 'price': this.precisionFromString (this.safeString (market, 'priceIncrement')), @@ -357,7 +387,7 @@ module.exports = class kucoin extends Exchange { 'max': baseMaxSize, }, 'price': { - 'min': this.safeFloat (market, 'priceIncrement'), + 'min': this.safeNumber (market, 'priceIncrement'), 'max': quoteMaxSize / baseMinSize, }, 'cost': { @@ -408,7 +438,7 @@ module.exports = class kucoin extends Exchange { const precision = this.safeInteger (entry, 'precision'); const isWithdrawEnabled = this.safeValue (entry, 'isWithdrawEnabled', false); const isDepositEnabled = this.safeValue (entry, 'isDepositEnabled', false); - const fee = this.safeFloat (entry, 'withdrawalMinFee'); + const fee = this.safeNumber (entry, 'withdrawalMinFee'); const active = (isWithdrawEnabled && isDepositEnabled); result[code] = { 'id': id, @@ -475,7 +505,7 @@ module.exports = class kucoin extends Exchange { const response = await this.privateGetWithdrawalsQuotas (this.extend (request, params)); const data = response['data']; const withdrawFees = {}; - withdrawFees[code] = this.safeFloat (data, 'withdrawMinFee'); + withdrawFees[code] = this.safeNumber (data, 'withdrawMinFee'); return { 'info': response, 'withdraw': withdrawFees, @@ -522,35 +552,35 @@ module.exports = class kucoin extends Exchange { // "mark": 0 // } // - let percentage = this.safeFloat (ticker, 'changeRate'); + let percentage = this.safeNumber (ticker, 'changeRate'); if (percentage !== undefined) { percentage = percentage * 100; } - const last = this.safeFloat2 (ticker, 'last', 'lastTradedPrice'); + const last = this.safeNumber2 (ticker, 'last', 'lastTradedPrice'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '-'); - const baseVolume = this.safeFloat (ticker, 'vol'); - const quoteVolume = this.safeFloat (ticker, 'volValue'); + const baseVolume = this.safeNumber (ticker, 'vol'); + const quoteVolume = this.safeNumber (ticker, 'volValue'); const vwap = this.vwap (baseVolume, quoteVolume); const timestamp = this.safeInteger2 (ticker, 'time', 'datetime'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, - 'change': this.safeFloat (ticker, 'changePrice'), + 'change': this.safeNumber (ticker, 'changePrice'), 'percentage': percentage, - 'average': this.safeFloat (ticker, 'averagePrice'), + 'average': this.safeNumber (ticker, 'averagePrice'), 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, 'info': ticker, @@ -634,11 +664,11 @@ module.exports = class kucoin extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 5), ]; } @@ -836,16 +866,18 @@ module.exports = class kucoin extends Exchange { // 'marginMode': 'cross', // cross (cross mode) and isolated (isolated mode), set to cross by default, the isolated mode will be released soon, stay tuned // 'autoBorrow': false, // The system will first borrow you funds at the optimal interest rate and then place an order for you }; - if (type !== 'market') { - request['price'] = this.priceToPrecision (symbol, price); - request['size'] = this.amountToPrecision (symbol, amount); - } else { - if (this.safeValue (params, 'quoteAmount')) { - // used to create market order by quote amount - https://github.com/ccxt/ccxt/issues/4876 - request['funds'] = this.amountToPrecision (symbol, amount); + const quoteAmount = this.safeNumber2 (params, 'cost', 'funds'); + if (type === 'market') { + if (quoteAmount !== undefined) { + params = this.omit (params, [ 'cost', 'funds' ]); + // kucoin uses base precision even for quote values + request['funds'] = this.amountToPrecision (symbol, quoteAmount); } else { request['size'] = this.amountToPrecision (symbol, amount); } + } else { + request['price'] = this.priceToPrecision (symbol, price); + request['size'] = this.amountToPrecision (symbol, amount); } const response = await this.privatePostOrders (this.extend (request, params)); // @@ -879,8 +911,10 @@ module.exports = class kucoin extends Exchange { 'fee': undefined, 'trades': undefined, }; - if (!this.safeValue (params, 'quoteAmount')) { + if (quoteAmount === undefined) { order['amount'] = amount; + } else { + order['cost'] = quoteAmount; } return order; } @@ -1056,15 +1090,18 @@ module.exports = class kucoin extends Exchange { const type = this.safeString (order, 'type'); const timestamp = this.safeInteger (order, 'createdAt'); const datetime = this.iso8601 (timestamp); - let price = this.safeFloat (order, 'price'); + let price = this.safeNumber (order, 'price'); + if (price === 0.0) { + // market orders + price = undefined; + } const side = this.safeString (order, 'side'); const feeCurrencyId = this.safeString (order, 'feeCurrency'); const feeCurrency = this.safeCurrencyCode (feeCurrencyId); - const feeCost = this.safeFloat (order, 'fee'); - const amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat (order, 'dealSize'); - const cost = this.safeFloat (order, 'dealFunds'); - const remaining = amount - filled; + const feeCost = this.safeNumber (order, 'fee'); + const amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber (order, 'dealSize'); + const cost = this.safeNumber (order, 'dealFunds'); // bool const isActive = this.safeValue (order, 'isActive', false); const cancelExist = this.safeValue (order, 'cancelExist', false); @@ -1074,20 +1111,11 @@ module.exports = class kucoin extends Exchange { 'currency': feeCurrency, 'cost': feeCost, }; - if (type === 'market') { - if (price === 0.0) { - if ((cost !== undefined) && (filled !== undefined)) { - if ((cost > 0) && (filled > 0)) { - price = cost / filled; - } - } - } - } const clientOrderId = this.safeString (order, 'clientOid'); const timeInForce = this.safeString (order, 'timeInForce'); - const stopPrice = this.safeFloat (order, 'stopPrice'); + const stopPrice = this.safeNumber (order, 'stopPrice'); const postOnly = this.safeValue (order, 'postOnly'); - return { + return this.safeOrder ({ 'id': orderId, 'clientOrderId': clientOrderId, 'symbol': symbol, @@ -1100,7 +1128,7 @@ module.exports = class kucoin extends Exchange { 'stopPrice': stopPrice, 'cost': cost, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'timestamp': timestamp, 'datetime': datetime, 'fee': fee, @@ -1109,7 +1137,7 @@ module.exports = class kucoin extends Exchange { 'lastTradeTimestamp': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -1310,7 +1338,6 @@ module.exports = class kucoin extends Exchange { const id = this.safeString2 (trade, 'tradeId', 'id'); const orderId = this.safeString (trade, 'orderId'); const takerOrMaker = this.safeString (trade, 'liquidity'); - const amount = this.safeFloat2 (trade, 'size', 'amount'); let timestamp = this.safeInteger (trade, 'time'); if (timestamp !== undefined) { timestamp = parseInt (timestamp / 1000000); @@ -1321,10 +1348,13 @@ module.exports = class kucoin extends Exchange { timestamp = timestamp * 1000; } } - const price = this.safeFloat2 (trade, 'price', 'dealPrice'); + const priceString = this.safeString2 (trade, 'price', 'dealPrice'); + const amountString = this.safeString2 (trade, 'size', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const side = this.safeString (trade, 'side'); let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'feeCurrency'); let feeCurrency = this.safeCurrencyCode (feeCurrencyId); @@ -1336,20 +1366,16 @@ module.exports = class kucoin extends Exchange { fee = { 'cost': feeCost, 'currency': feeCurrency, - 'rate': this.safeFloat (trade, 'feeRate'), + 'rate': this.safeNumber (trade, 'feeRate'), }; } let type = this.safeString (trade, 'type'); if (type === 'match') { type = undefined; } - let cost = this.safeFloat2 (trade, 'funds', 'dealValue'); + let cost = this.safeNumber2 (trade, 'funds', 'dealValue'); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } return { 'info': trade, @@ -1445,7 +1471,7 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); let address = this.safeString (transaction, 'address'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let txid = this.safeString (transaction, 'walletTxId'); if (txid !== undefined) { const txidParts = txid.split ('@'); @@ -1463,7 +1489,7 @@ module.exports = class kucoin extends Exchange { const rawStatus = this.safeString (transaction, 'status'); const status = this.parseTransactionStatus (rawStatus); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { let rate = undefined; if (amount !== undefined) { @@ -1644,45 +1670,180 @@ module.exports = class kucoin extends Exchange { async fetchBalance (params = {}) { await this.loadMarkets (); - let type = undefined; - const request = {}; - if ('type' in params) { - type = params['type']; - if (type !== undefined) { - request['type'] = type; - } - params = this.omit (params, 'type'); + const defaultType = this.safeString2 (this.options, 'fetchBalance', 'defaultType', 'trade'); + const requestedType = this.safeString (params, 'type', defaultType); + const accountsByType = this.safeValue (this.options, 'accountsByType'); + const type = this.safeString (accountsByType, requestedType); + if (type === undefined) { + const keys = Object.keys (accountsByType); + throw new ExchangeError (this.id + ' type must be one of ' + keys.join (', ')); + } + params = this.omit (params, 'type'); + if (type === 'contract') { + // futures api requires a futures apiKey + // only fetches one balance at a time + // by default it will only fetch the BTC balance of the futures account + // you can send 'currency' in params to fetch other currencies + // fetchBalance ({ 'type': 'futures', 'currency': 'USDT' }) + const response = await this.futuresPrivateGetAccountOverview (params); + // + // { + // code: '200000', + // data: { + // accountEquity: 0.00005, + // unrealisedPNL: 0, + // marginBalance: 0.00005, + // positionMargin: 0, + // orderMargin: 0, + // frozenFunds: 0, + // availableBalance: 0.00005, + // currency: 'XBT' + // } + // } + // + const data = this.safeValue (response, 'data'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (data, 'availableBalance'); + account['total'] = this.safeString (data, 'accountEquity'); + const result = { 'info': response }; + result[code] = account; + return this.parseBalance (result, false); } else { - const options = this.safeValue (this.options, 'fetchBalance', {}); - type = this.safeString (options, 'type', 'trade'); - } - const response = await this.privateGetAccounts (this.extend (request, params)); - // - // { - // "code":"200000", - // "data":[ - // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, - // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, - // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, - // ] - // } - // - const data = this.safeValue (response, 'data', []); - const result = { 'info': response }; - for (let i = 0; i < data.length; i++) { - const balance = data[i]; - const balanceType = this.safeString (balance, 'type'); - if (balanceType === type) { - const currencyId = this.safeString (balance, 'currency'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'holds'); - result[code] = account; + const request = { + 'type': type, + }; + const response = await this.privateGetAccounts (this.extend (request, params)); + // + // { + // "code":"200000", + // "data":[ + // {"balance":"0.00009788","available":"0.00009788","holds":"0","currency":"BTC","id":"5c6a4fd399a1d81c4f9cc4d0","type":"trade"}, + // {"balance":"3.41060034","available":"3.41060034","holds":"0","currency":"SOUL","id":"5c6a4d5d99a1d8182d37046d","type":"trade"}, + // {"balance":"0.01562641","available":"0.01562641","holds":"0","currency":"NEO","id":"5c6a4f1199a1d8165a99edb1","type":"trade"}, + // ] + // } + // + const data = this.safeValue (response, 'data', []); + const result = { 'info': response }; + for (let i = 0; i < data.length; i++) { + const balance = data[i]; + const balanceType = this.safeString (balance, 'type'); + if (balanceType === type) { + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['total'] = this.safeString (balance, 'balance'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'holds'); + result[code] = account; + } } + return this.parseBalance (result, false); + } + } + + async transfer (code, amount, fromAccount, toAccount, params = {}) { + await this.loadMarkets (); + const currency = this.currency (code); + const requestedAmount = this.currencyToPrecision (code, amount); + const accountsById = this.safeValue (this.options, 'accountsByType', {}); + const fromId = this.safeString (accountsById, fromAccount); + if (fromId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' fromAccount must be one of ' + keys.join (', ')); + } + const toId = this.safeString (accountsById, toAccount); + if (toId === undefined) { + const keys = Object.keys (accountsById); + throw new ExchangeError (this.id + ' toAccount must be one of ' + keys.join (', ')); + } + if (fromId === 'contract') { + if (toId !== 'main') { + throw new ExchangeError (this.id + ' only supports transferring from futures account to main account'); + } + const request = { + 'currency': currency['id'], + 'amount': requestedAmount, + }; + if (!('bizNo' in params)) { + // it doesn't like more than 24 characters + request['bizNo'] = this.uuid22 (); + } + const response = await this.futuresPrivatePostTransferOut (this.extend (request, params)); + // + // { + // code: '200000', + // data: { + // applyId: '605a87217dff1500063d485d', + // bizNo: 'bcd6e5e1291f4905af84dc', + // payAccountType: 'CONTRACT', + // payTag: 'DEFAULT', + // remark: '', + // recAccountType: 'MAIN', + // recTag: 'DEFAULT', + // recRemark: '', + // recSystem: 'KUCOIN', + // status: 'PROCESSING', + // currency: 'XBT', + // amount: '0.00001', + // fee: '0', + // sn: '573688685663948', + // reason: '', + // createdAt: 1616545569000, + // updatedAt: 1616545569000 + // } + // } + // + const data = this.safeValue (response, 'data'); + const timestamp = this.safeInteger (data, 'createdAt'); + const id = this.safeString (data, 'applyId'); + const currencyId = this.safeString (data, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const amount = this.safeNumber (data, 'amount'); + const rawStatus = this.safeString (data, 'status'); + let status = undefined; + if (rawStatus === 'PROCESSING') { + status = 'pending'; + } + return { + 'info': response, + 'currency': code, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'amount': amount, + 'fromAccount': fromId, + 'toAccount': toId, + 'id': id, + 'status': status, + }; + } else { + const request = { + 'currency': currency['id'], + 'from': fromId, + 'to': toId, + 'amount': requestedAmount, + }; + if (!('clientOid' in params)) { + request['clientOid'] = this.uuid (); + } + const response = await this.privatePostAccountsInnerTransfer (this.extend (request, params)); + // { code: '200000', data: { orderId: '605a6211e657f00006ad0ad6' } } + const data = this.safeValue (response, 'data'); + const id = this.safeString (data, 'orderId'); + return { + 'info': response, + 'id': id, + 'timestamp': undefined, + 'datetime': undefined, + 'currency': code, + 'amount': requestedAmount, + 'fromAccount': fromId, + 'toAccount': toId, + 'status': undefined, + }; } - return this.parseBalance (result); } async fetchLedger (code = undefined, since = undefined, limit = undefined, params = {}) { @@ -1770,11 +1931,11 @@ module.exports = class kucoin extends Exchange { const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'code': code, }; - const amount = this.safeFloat (item, 'amount'); - const after = this.safeFloat (item, 'balance'); + const amount = this.safeNumber (item, 'amount'); + const after = this.safeNumber (item, 'balance'); const direction = this.safeString (item, 'direction'); let before = undefined; if (after !== undefined && amount !== undefined) { @@ -1824,6 +1985,94 @@ module.exports = class kucoin extends Exchange { return this.safeString (types, type, type); } + async fetchPositions (symbols = undefined, params = {}) { + const response = await this.futuresPrivateGetPositions (params); + // + // { + // code: '200000', + // data: [ + // { + // id: '605a9772a229ab0006408258', + // symbol: 'XBTUSDTM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746099, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54371.92, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'USDT', + // isInverse: false + // }, + // { + // id: '605a9772026ac900066550df', + // symbol: 'XBTUSDM', + // autoDeposit: false, + // maintMarginReq: 0.005, + // riskLimit: 200, + // realLeverage: 0, + // crossMode: false, + // delevPercentage: 0, + // currentTimestamp: 1616549746110, + // currentQty: 0, + // currentCost: 0, + // currentComm: 0, + // unrealisedCost: 0, + // realisedGrossCost: 0, + // realisedCost: 0, + // isOpen: false, + // markPrice: 54354.76, + // markValue: 0, + // posCost: 0, + // posCross: 0, + // posInit: 0, + // posComm: 0, + // posLoss: 0, + // posMargin: 0, + // posMaint: 0, + // maintMargin: 0, + // realisedGrossPnl: 0, + // realisedPnl: 0, + // unrealisedPnl: 0, + // unrealisedPnlPcnt: 0, + // unrealisedRoePcnt: 0, + // avgEntryPrice: 0, + // liquidationPrice: 0, + // bankruptPrice: 0, + // settleCurrency: 'XBT', + // isInverse: true + // } + // ] + // } + // + return this.safeValue (response, 'data', response); + } + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { // // the v2 URL is https://openapi-v2.kucoin.com/api/v1/endpoint @@ -1840,16 +2089,16 @@ module.exports = class kucoin extends Exchange { let endpart = ''; headers = (headers !== undefined) ? headers : {}; if (Object.keys (query).length) { - if (method !== 'GET') { + if ((method === 'GET') || (method === 'DELETE')) { + endpoint += '?' + this.urlencode (query); + } else { body = this.json (query); endpart = body; headers['Content-Type'] = 'application/json'; - } else { - endpoint += '?' + this.urlencode (query); } } const url = this.urls['api'][api] + endpoint; - if (api === 'private') { + if ((api === 'private') || (api === 'futuresPrivate')) { this.checkRequiredCredentials (); const timestamp = this.nonce ().toString (); headers = this.extend ({ @@ -1892,8 +2141,8 @@ module.exports = class kucoin extends Exchange { // { code: '200000', data: { ... }} // const errorCode = this.safeString (response, 'code'); - const message = this.safeString (response, 'msg'); - this.throwExactlyMatchedException (this.exceptions['exact'], message, message); - this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, message); + const message = this.safeString (response, 'msg', ''); + this.throwExactlyMatchedException (this.exceptions['exact'], message, this.id + ' ' + message); + this.throwExactlyMatchedException (this.exceptions['exact'], errorCode, this.id + ' ' + message); } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kuna.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kuna.js index e652171d1..0067e406f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kuna.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/kuna.js @@ -2,12 +2,13 @@ // --------------------------------------------------------------------------- -const acx = require ('./acx.js'); -const { ArgumentsRequired } = require ('./base/errors'); +const Exchange = require ('./base/Exchange'); +const { ArgumentsRequired, InsufficientFunds, OrderNotFound } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- -module.exports = class kuna extends acx { +module.exports = class kuna extends Exchange { describe () { return this.deepExtend (super.describe (), { 'id': 'kuna', @@ -17,14 +18,24 @@ module.exports = class kuna extends acx { 'version': 'v2', 'has': { 'CORS': false, - 'fetchTickers': true, + 'cancelOrder': true, + 'createOrder': true, + 'fetchBalance': true, + 'fetchMarkets': true, + 'fetchMyTrades': true, 'fetchOHLCV': 'emulated', 'fetchOpenOrders': true, - 'fetchMyTrades': true, + 'fetchOrder': true, + 'fetchOrderBook': true, + 'fetchTicker': true, + 'fetchTickers': true, + 'fetchTime': true, + 'fetchTrades': true, 'withdraw': false, }, 'timeframes': undefined, 'urls': { + 'extension': '.json', 'referral': 'https://kuna.io?r=kunaid-gvfihe8az7o4', 'logo': 'https://user-images.githubusercontent.com/51840849/87153927-f0578b80-c2c0-11ea-84b6-74612568e9e1.jpg', 'api': 'https://kuna.io', @@ -32,8 +43,47 @@ module.exports = class kuna extends acx { 'doc': 'https://kuna.io/documents/api', 'fees': 'https://kuna.io/documents/api', }, + 'api': { + 'public': { + 'get': [ + 'depth', // Get depth or specified market Both asks and bids are sorted from highest price to lowest. + 'k_with_pending_trades', // Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator + 'k', // Get OHLC(k line) of specific market + 'markets', // Get all available markets + 'order_book', // Get the order book of specified market + 'order_book/{market}', + 'tickers', // Get ticker of all markets + 'tickers/{market}', // Get ticker of specific market + 'timestamp', // Get server current time, in seconds since Unix epoch + 'trades', // Get recent trades on market, each trade is included only once Trades are sorted in reverse creation order. + 'trades/{market}', + ], + }, + 'private': { + 'get': [ + 'members/me', // Get your profile and accounts info + 'deposits', // Get your deposits history + 'deposit', // Get details of specific deposit + 'deposit_address', // Where to deposit The address field could be empty when a new address is generating (e.g. for bitcoin), you should try again later in that case. + 'orders', // Get your orders, results is paginated + 'order', // Get information of specified order + 'trades/my', // Get your executed trades Trades are sorted in reverse creation order. + 'withdraws', // Get your cryptocurrency withdraws + 'withdraw', // Get your cryptocurrency withdraw + ], + 'post': [ + 'orders', // Create a Sell/Buy order + 'orders/multi', // Create multiple sell/buy orders + 'orders/clear', // Cancel all my orders + 'order/delete', // Cancel an order + 'withdraw', // Create a withdraw + ], + }, + }, 'fees': { 'trading': { + 'tierBased': false, + 'percentage': true, 'taker': 0.25 / 100, 'maker': 0.25 / 100, }, @@ -56,9 +106,24 @@ module.exports = class kuna extends acx { }, }, }, + 'commonCurrencies': { + 'PLA': 'Plair', + }, + 'exceptions': { + '2002': InsufficientFunds, + '2003': OrderNotFound, + }, }); } + async fetchTime (params = {}) { + const response = await this.publicGetTimestamp (params); + // + // 1594911427 + // + return response * 1000; + } + async fetchMarkets (params = {}) { const quotes = [ 'btc', 'eth', 'eurs', 'rub', 'uah', 'usd', 'usdt', 'gol' ]; const pricePrecisions = { @@ -114,24 +179,100 @@ module.exports = class kuna extends acx { return markets; } - async fetchL3OrderBook (symbol, limit = undefined, params = {}) { - return await this.fetchOrderBook (symbol, limit, params); - } - - async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); - } + async fetchOrderBook (symbol, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); const request = { 'market': market['id'], }; - const response = await this.privateGetOrders (this.extend (request, params)); - // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder - // with order cache + fetchOpenOrders - // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX - return this.parseOrders (response, market, since, limit); + if (limit !== undefined) { + request['limit'] = limit; // default = 300 + } + const orderbook = await this.publicGetDepth (this.extend (request, params)); + const timestamp = this.safeTimestamp (orderbook, 'timestamp'); + return this.parseOrderBook (orderbook, timestamp); + } + + parseTicker (ticker, market = undefined) { + const timestamp = this.safeTimestamp (ticker, 'at'); + ticker = ticker['ticker']; + let symbol = undefined; + if (market) { + symbol = market['symbol']; + } + const last = this.safeNumber (ticker, 'last'); + return { + 'symbol': symbol, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'bidVolume': undefined, + 'ask': this.safeNumber (ticker, 'sell'), + 'askVolume': undefined, + 'vwap': undefined, + 'open': this.safeNumber (ticker, 'open'), + 'close': last, + 'last': last, + 'previousClose': undefined, + 'change': undefined, + 'percentage': undefined, + 'average': undefined, + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': undefined, + 'info': ticker, + }; + } + + async fetchTickers (symbols = undefined, params = {}) { + await this.loadMarkets (); + const response = await this.publicGetTickers (params); + const ids = Object.keys (response); + const result = {}; + for (let i = 0; i < ids.length; i++) { + const id = ids[i]; + let market = undefined; + let symbol = id; + if (id in this.markets_by_id) { + market = this.markets_by_id[id]; + symbol = market['symbol']; + } else { + let base = id.slice (0, 3); + let quote = id.slice (3, 6); + base = base.toUpperCase (); + quote = quote.toUpperCase (); + base = this.safeCurrencyCode (base); + quote = this.safeCurrencyCode (quote); + symbol = base + '/' + quote; + } + result[symbol] = this.parseTicker (response[id], market); + } + return this.filterByArray (result, 'symbol', symbols); + } + + async fetchTicker (symbol, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTickersMarket (this.extend (request, params)); + return this.parseTicker (response, market); + } + + async fetchL3OrderBook (symbol, limit = undefined, params = {}) { + return await this.fetchOrderBook (symbol, limit, params); + } + + async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.publicGetTrades (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); } parseTrade (trade, market = undefined) { @@ -148,9 +289,14 @@ module.exports = class kuna extends acx { }; side = this.safeString (sideMap, side, side); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const orderId = this.safeString (trade, 'order_id'); const id = this.safeString (trade, 'id'); return { @@ -170,29 +316,6 @@ module.exports = class kuna extends acx { }; } - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.publicGetTrades (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - - async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { - if (symbol === undefined) { - throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); - } - await this.loadMarkets (); - const market = this.market (symbol); - const request = { - 'market': market['id'], - }; - const response = await this.privateGetTradesMy (this.extend (request, params)); - return this.parseTrades (response, market, since, limit); - } - async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const trades = await this.fetchTrades (symbol, since, limit, params); @@ -211,4 +334,198 @@ module.exports = class kuna extends acx { } return result; } + + async fetchBalance (params = {}) { + await this.loadMarkets (); + const response = await this.privateGetMembersMe (params); + const balances = this.safeValue (response, 'accounts'); + const result = { 'info': balances }; + for (let i = 0; i < balances.length; i++) { + const balance = balances[i]; + const currencyId = this.safeString (balance, 'currency'); + const code = this.safeCurrencyCode (currencyId); + const account = this.account (); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); + result[code] = account; + } + return this.parseBalance (result, false); + } + + async createOrder (symbol, type, side, amount, price = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'market': this.marketId (symbol), + 'side': side, + 'volume': amount.toString (), + 'ord_type': type, + }; + if (type === 'limit') { + request['price'] = price.toString (); + } + const response = await this.privatePostOrders (this.extend (request, params)); + const marketId = this.safeValue (response, 'market'); + const market = this.safeValue (this.markets_by_id, marketId); + return this.parseOrder (response, market); + } + + async cancelOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': id, + }; + const response = await this.privatePostOrderDelete (this.extend (request, params)); + const order = this.parseOrder (response); + const status = order['status']; + if (status === 'closed' || status === 'canceled') { + throw new OrderNotFound (this.id + ' ' + this.json (order)); + } + return order; + } + + parseOrderStatus (status) { + const statuses = { + 'done': 'closed', + 'wait': 'open', + 'cancel': 'canceled', + }; + return this.safeString (statuses, status, status); + } + + parseOrder (order, market = undefined) { + const marketId = this.safeString (order, 'market'); + const symbol = this.safeSymbol (marketId, market); + const timestamp = this.parse8601 (this.safeString (order, 'created_at')); + const status = this.parseOrderStatus (this.safeString (order, 'state')); + const type = this.safeString (order, 'type'); + const side = this.safeString (order, 'side'); + const id = this.safeString (order, 'id'); + return this.safeOrder ({ + 'id': id, + 'clientOrderId': undefined, + 'timestamp': timestamp, + 'datetime': this.iso8601 (timestamp), + 'lastTradeTimestamp': undefined, + 'status': status, + 'symbol': symbol, + 'type': type, + 'timeInForce': undefined, + 'postOnly': undefined, + 'side': side, + 'price': this.safeNumber (order, 'price'), + 'stopPrice': undefined, + 'amount': this.safeNumber (order, 'volume'), + 'filled': this.safeNumber (order, 'executed_volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'trades': undefined, + 'fee': undefined, + 'info': order, + 'cost': undefined, + 'average': undefined, + }); + } + + async fetchOrder (id, symbol = undefined, params = {}) { + await this.loadMarkets (); + const request = { + 'id': parseInt (id), + }; + const response = await this.privateGetOrder (this.extend (request, params)); + return this.parseOrder (response); + } + + async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetOrders (this.extend (request, params)); + // todo emulation of fetchClosedOrders, fetchOrders, fetchOrder + // with order cache + fetchOpenOrders + // as in BTC-e, Liqui, Yobit, DSX, Tidex, WEX + return this.parseOrders (response, market, since, limit); + } + + async fetchMyTrades (symbol = undefined, since = undefined, limit = undefined, params = {}) { + if (symbol === undefined) { + throw new ArgumentsRequired (this.id + ' fetchMyTrades() requires a symbol argument'); + } + await this.loadMarkets (); + const market = this.market (symbol); + const request = { + 'market': market['id'], + }; + const response = await this.privateGetTradesMy (this.extend (request, params)); + return this.parseTrades (response, market, since, limit); + } + + nonce () { + return this.milliseconds (); + } + + encodeParams (params) { + if ('orders' in params) { + const orders = params['orders']; + let query = this.urlencode (this.keysort (this.omit (params, 'orders'))); + for (let i = 0; i < orders.length; i++) { + const order = orders[i]; + const keys = Object.keys (order); + for (let k = 0; k < keys.length; k++) { + const key = keys[k]; + const value = order[key]; + query += '&orders%5B%5D%5B' + key + '%5D=' + value.toString (); + } + } + return query; + } + return this.urlencode (this.keysort (params)); + } + + sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { + let request = '/api/' + this.version + '/' + this.implodeParams (path, params); + if ('extension' in this.urls) { + request += this.urls['extension']; + } + const query = this.omit (params, this.extractParams (path)); + let url = this.urls['api'] + request; + if (api === 'public') { + if (Object.keys (query).length) { + url += '?' + this.urlencode (query); + } + } else { + this.checkRequiredCredentials (); + const nonce = this.nonce ().toString (); + const query = this.encodeParams (this.extend ({ + 'access_key': this.apiKey, + 'tonce': nonce, + }, params)); + const auth = method + '|' + request + '|' + query; + const signed = this.hmac (this.encode (auth), this.encode (this.secret)); + const suffix = query + '&signature=' + signed; + if (method === 'GET') { + url += '?' + suffix; + } else { + body = suffix; + headers = { 'Content-Type': 'application/x-www-form-urlencoded' }; + } + } + return { 'url': url, 'method': method, 'body': body, 'headers': headers }; + } + + handleErrors (code, reason, url, method, headers, body, response, requestHeaders, requestBody) { + if (response === undefined) { + return; + } + if (code === 400) { + const error = this.safeValue (response, 'error'); + const errorCode = this.safeString (error, 'code'); + const feedback = this.id + ' ' + this.json (response); + this.throwExactlyMatchedException (this.exceptions, errorCode, feedback); + // fallback to default error handler + } + } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lakebtc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lakebtc.js index 8acd8cc41..991e6ff86 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lakebtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lakebtc.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, BadSymbol, InvalidOrder, InsufficientFunds } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -112,10 +113,10 @@ module.exports = class lakebtc extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balances, currencyId); + account['total'] = this.safeString (balances, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -133,16 +134,16 @@ module.exports = class lakebtc extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -152,7 +153,7 @@ module.exports = class lakebtc extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -183,14 +184,11 @@ module.exports = class lakebtc extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/latoken.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/latoken.js index 45cb5951d..ecc53a8c6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/latoken.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/latoken.js @@ -4,7 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, DDoSProtection, BadRequest, AuthenticationError } = require ('./base/errors'); -const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -85,6 +85,7 @@ module.exports = class latoken extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'maker': 0.1 / 100, @@ -169,7 +170,7 @@ module.exports = class latoken extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minQty'), + 'min': this.safeNumber (market, 'minQty'), 'max': undefined, }, 'price': { @@ -219,7 +220,7 @@ module.exports = class latoken extends Exchange { const numericId = this.safeInteger (currency, 'currencyId'); const code = this.safeCurrencyCode (id); const precision = this.safeInteger (currency, 'precission'); - const fee = this.safeFloat (currency, 'fee'); + const fee = this.safeNumber (currency, 'fee'); const active = undefined; result[code] = { 'id': id, @@ -253,27 +254,6 @@ module.exports = class latoken extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = amount * rate; - let precision = market['precision']['price']; - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - precision = market['precision']['amount']; - } - cost = this.decimalToPrecision (cost, ROUND, precision, this.precisionMode); - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (cost), - }; - } - async fetchBalance (params = {}) { await this.loadMarkets (); const response = await this.privateGetAccountBalances (params); @@ -297,17 +277,15 @@ module.exports = class latoken extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); - const frozen = this.safeFloat (balance, 'frozen'); - const pending = this.safeFloat (balance, 'pending'); - const used = this.sum (frozen, pending); - const account = { - 'free': this.safeFloat (balance, 'available'), - 'used': used, - 'total': this.safeFloat (balance, 'amount'), - }; + const frozen = this.safeString (balance, 'frozen'); + const pending = this.safeString (balance, 'pending'); + const account = this.account (); + account['used'] = Precise.stringAdd (frozen, pending); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -352,20 +330,20 @@ module.exports = class latoken extends Exchange { // const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const open = this.safeFloat (ticker, 'open'); - const close = this.safeFloat (ticker, 'close'); + const open = this.safeNumber (ticker, 'open'); + const close = this.safeNumber (ticker, 'close'); let change = undefined; if (open !== undefined && close !== undefined) { change = close - open; } - const percentage = this.safeFloat (ticker, 'priceChange'); + const percentage = this.safeNumber (ticker, 'priceChange'); const timestamp = this.nonce (); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'low': this.safeFloat (ticker, 'low'), - 'high': this.safeFloat (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -379,7 +357,7 @@ module.exports = class latoken extends Exchange { 'percentage': percentage, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -463,22 +441,19 @@ module.exports = class latoken extends Exchange { timestamp *= 1000; } } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'orderId'); - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -613,29 +588,17 @@ module.exports = class latoken extends Exchange { const symbol = this.safeSymbol (marketId, market); const side = this.safeString (order, 'side'); const type = this.safeString (order, 'orderType'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - const filled = this.safeFloat (order, 'executedAmount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); + const filled = this.safeNumber (order, 'executedAmount'); const status = this.parseOrderStatus (this.safeString (order, 'orderStatus')); - let cost = undefined; - if (filled !== undefined) { - if (price !== undefined) { - cost = filled * price; - } - } const timeFilled = this.safeTimestamp (order, 'timeFilled'); let lastTradeTimestamp = undefined; if ((timeFilled !== undefined) && (timeFilled > 0)) { lastTradeTimestamp = timeFilled; } const clientOrderId = this.safeString (order, 'cliOrdId'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -650,14 +613,14 @@ module.exports = class latoken extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, 'average': undefined, - 'remaining': remaining, + 'remaining': undefined, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lbank.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lbank.js index 9b39a0236..e9e4658dc 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lbank.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lbank.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, DDoSProtection, AuthenticationError, InvalidOrder, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -201,8 +202,8 @@ module.exports = class lbank extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const info = ticker; ticker = info['ticker']; - const last = this.safeFloat (ticker, 'latest'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'latest'); + const percentage = this.safeNumber (ticker, 'change'); let open = undefined; if (percentage !== undefined) { const relativeChange = this.sum (1, percentage / 100); @@ -223,8 +224,8 @@ module.exports = class lbank extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -237,8 +238,8 @@ module.exports = class lbank extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'vol'), - 'quoteVolume': this.safeFloat (ticker, 'turnover'), + 'baseVolume': this.safeNumber (ticker, 'vol'), + 'quoteVolume': this.safeNumber (ticker, 'turnover'), 'info': info, }; } @@ -288,17 +289,15 @@ module.exports = class lbank extends Exchange { symbol = market['symbol']; } const timestamp = this.safeInteger (trade, 'date_ms'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = parseFloat (this.costToPrecision (symbol, price * amount)); - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'tid'); const type = undefined; - const side = this.safeString (trade, 'type'); + let side = this.safeString (trade, 'type'); + side = side.replace ('_market', ''); return { 'id': id, 'info': this.safeValue (trade, 'info', trade), @@ -346,11 +345,11 @@ module.exports = class lbank extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -415,12 +414,12 @@ module.exports = class lbank extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['used'] = this.safeFloat (freeze, currencyId); - account['total'] = this.safeFloat (asset, currencyId); + account['free'] = this.safeString (free, currencyId); + account['used'] = this.safeString (freeze, currencyId); + account['total'] = this.safeString (asset, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -448,35 +447,20 @@ module.exports = class lbank extends Exchange { // "status":2 // } // - let symbol = undefined; - const responseMarket = this.safeValue (this.marketsById, order['symbol']); - if (responseMarket !== undefined) { - symbol = responseMarket['symbol']; - } else if (market !== undefined) { - symbol = market['symbol']; - } + const marketId = this.safeString (order, 'symbol'); + const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeInteger (order, 'create_time'); // Limit Order Request Returns: Order Price // Market Order Returns: cny amount of market order - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount', 0.0); - const filled = this.safeFloat (order, 'deal_amount', 0.0); - const av_price = this.safeFloat (order, 'avg_price'); - let cost = undefined; - if (av_price !== undefined) { - cost = filled * av_price; - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount', 0.0); + const filled = this.safeNumber (order, 'deal_amount', 0.0); + const average = this.safeNumber (order, 'avg_price'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const id = this.safeString (order, 'order_id'); const type = this.safeString (order, 'order_type'); const side = this.safeString (order, 'type'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -490,15 +474,15 @@ module.exports = class lbank extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': undefined, 'info': this.safeValue (order, 'info', order), - 'average': undefined, - }; + 'average': average, + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/liquid.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/liquid.js index 732eda853..0365ef102 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/liquid.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/liquid.js @@ -4,7 +4,8 @@ const Exchange = require ('./base/Exchange'); const { TICK_SIZE } = require ('./base/functions/number'); -const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported } = require ('./base/errors'); +const { ExchangeError, ArgumentsRequired, InvalidNonce, OrderNotFound, InvalidOrder, InsufficientFunds, AuthenticationError, DDoSProtection, NotSupported, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -108,7 +109,7 @@ module.exports = class liquid extends Exchange { 'trading': { 'tierBased': true, 'percentage': true, - 'taker': 0.0015, + 'taker': 0.0030, 'maker': 0.0000, 'tiers': { 'perpetual': { @@ -127,48 +128,52 @@ module.exports = class liquid extends Exchange { [ 300000000, -0.00025 ], ], 'taker': [ - [ 0, 0.000600 ], - [ 25000, 0.000575 ], - [ 50000, 0.000550 ], - [ 100000, 0.000525 ], - [ 1000000, 0.000500 ], - [ 10000000, 0.000475 ], - [ 25000000, 0.000450 ], - [ 50000000, 0.000425 ], - [ 75000000, 0.000400 ], - [ 100000000, 0.000375 ], - [ 200000000, 0.000350 ], - [ 300000000, 0.000325 ], + [ 0, 0.00120 ], + [ 25000, 0.00115 ], + [ 50000, 0.00110 ], + [ 100000, 0.00105 ], + [ 1000000, 0.00100 ], + [ 10000000, 0.00095 ], + [ 25000000, 0.00090 ], + [ 50000000, 0.00085 ], + [ 75000000, 0.00080 ], + [ 100000000, 0.00075 ], + [ 200000000, 0.00070 ], + [ 300000000, 0.00065 ], ], }, 'spot': { 'taker': [ - [ 0, 0.0015 ], - [ 10000, 0.0015 ], - [ 20000, 0.0014 ], - [ 50000, 0.0013 ], - [ 100000, 0.0010 ], - [ 1000000, 0.0008 ], - [ 5000000, 0.0006 ], - [ 10000000, 0.0005 ], - [ 25000000, 0.0005 ], - [ 50000000, 0.00045 ], - [ 100000000, 0.0004 ], - [ 200000000, 0.0003 ], + [ 0, 0.003 ], + [ 10000, 0.0029 ], + [ 20000, 0.0028 ], + [ 50000, 0.0026 ], + [ 100000, 0.0020 ], + [ 1000000, 0.0016 ], + [ 5000000, 0.0012 ], + [ 10000000, 0.0010 ], + [ 25000000, 0.0009 ], + [ 50000000, 0.0008 ], + [ 100000000, 0.0007 ], + [ 200000000, 0.0006 ], + [ 500000000, 0.0004 ], + [ 1000000000, 0.0003 ], ], 'maker': [ [ 0, 0.0000 ], - [ 10000, 0.0015 ], - [ 20000, 0.1400 ], - [ 50000, 0.1300 ], - [ 100000, 0.0800 ], - [ 1000000, 0.0004 ], - [ 5000000, 0.00035 ], - [ 10000000, 0.00025 ], + [ 10000, 0.0020 ], + [ 20000, 0.0019 ], + [ 50000, 0.0018 ], + [ 100000, 0.0016 ], + [ 1000000, 0.0008 ], + [ 5000000, 0.0007 ], + [ 10000000, 0.0005 ], [ 25000000, 0.0000 ], [ 50000000, 0.0000 ], [ 100000000, 0.0000 ], [ 200000000, 0.0000 ], + [ 500000000, 0.0000 ], + [ 1000000000, 0.0000 ], ], }, }, @@ -187,6 +192,7 @@ module.exports = class liquid extends Exchange { 'less_than_order_size': InvalidOrder, 'price_too_high': InvalidOrder, 'price_too_small': InvalidOrder, // {"errors":{"order":["price_too_small"]}} + 'product_disabled': BadSymbol, // {"errors":{"order":["product_disabled"]}} }, 'commonCurrencies': { 'WIN': 'WCOIN', @@ -236,7 +242,7 @@ module.exports = class liquid extends Exchange { 'info': currency, 'name': code, 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': decimalPrecision, 'limits': { 'amount': { @@ -252,7 +258,7 @@ module.exports = class liquid extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal'), + 'min': this.safeNumber (currency, 'minimum_withdrawal'), 'max': undefined, }, }, @@ -377,19 +383,19 @@ module.exports = class liquid extends Exchange { let maker = this.fees['trading']['maker']; let taker = this.fees['trading']['taker']; if (type === 'swap') { - maker = this.safeFloat (market, 'maker_fee', this.fees['trading']['maker']); - taker = this.safeFloat (market, 'taker_fee', this.fees['trading']['taker']); + maker = this.safeNumber (market, 'maker_fee', this.fees['trading']['maker']); + taker = this.safeNumber (market, 'taker_fee', this.fees['trading']['taker']); } const disabled = this.safeValue (market, 'disabled', false); const active = !disabled; const baseCurrency = this.safeValue (currenciesByCode, base); const precision = { 'amount': 0.00000001, - 'price': this.safeFloat (market, 'tick_size'), + 'price': this.safeNumber (market, 'tick_size'), }; let minAmount = undefined; if (baseCurrency !== undefined) { - minAmount = this.safeFloat (baseCurrency['info'], 'minimum_order_quantity'); + minAmount = this.safeNumber (baseCurrency['info'], 'minimum_order_quantity'); } const limits = { 'amount': { @@ -471,8 +477,8 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } for (let i = 0; i < fiat.length; i++) { @@ -480,11 +486,11 @@ module.exports = class liquid extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'reserved_balance'); + account['total'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'reserved_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -503,7 +509,7 @@ module.exports = class liquid extends Exchange { if (ticker['last_traded_price']) { const length = ticker['last_traded_price'].length; if (length > 0) { - last = this.safeFloat (ticker, 'last_traded_price'); + last = this.safeNumber (ticker, 'last_traded_price'); } } } @@ -528,7 +534,7 @@ module.exports = class liquid extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.safeFloat (ticker, 'last_price_24h'); + const open = this.safeNumber (ticker, 'last_price_24h'); if (open !== undefined && last !== undefined) { change = last - open; average = this.sum (last, open) / 2; @@ -540,11 +546,11 @@ module.exports = class liquid extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_market_ask'), - 'low': this.safeFloat (ticker, 'low_market_bid'), - 'bid': this.safeFloat (ticker, 'market_bid'), + 'high': this.safeNumber (ticker, 'high_market_ask'), + 'low': this.safeNumber (ticker, 'low_market_bid'), + 'bid': this.safeNumber (ticker, 'market_bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'market_ask'), + 'ask': this.safeNumber (ticker, 'market_ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -554,7 +560,7 @@ module.exports = class liquid extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'volume_24h'), 'quoteVolume': undefined, 'info': ticker, }; @@ -600,14 +606,11 @@ module.exports = class liquid extends Exchange { if (mySide !== undefined) { takerOrMaker = (takerSide === mySide) ? 'taker' : 'maker'; } - let cost = undefined; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); let symbol = undefined; if (market !== undefined) { @@ -810,9 +813,9 @@ module.exports = class liquid extends Exchange { const marketId = this.safeString (order, 'product_id'); market = this.safeValue (this.markets_by_id, marketId); const status = this.parseOrderStatus (this.safeString (order, 'status')); - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'filled_quantity'); - const price = this.safeFloat (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + let filled = this.safeNumber (order, 'filled_quantity'); + const price = this.safeNumber (order, 'price'); let symbol = undefined; let feeCurrency = undefined; if (market !== undefined) { @@ -822,7 +825,7 @@ module.exports = class liquid extends Exchange { const type = this.safeString (order, 'order_type'); let tradeCost = 0; let tradeFilled = 0; - let average = this.safeFloat (order, 'average_price'); + let average = this.safeNumber (order, 'average_price'); const trades = this.parseTrades (this.safeValue (order, 'executions', []), market, undefined, undefined, { 'order': orderId, 'type': type, @@ -879,7 +882,7 @@ module.exports = class liquid extends Exchange { 'trades': trades, 'fee': { 'currency': feeCurrency, - 'cost': this.safeFloat (order, 'order_fee'), + 'cost': this.safeNumber (order, 'order_fee'), }, 'info': order, }; @@ -1034,7 +1037,7 @@ module.exports = class liquid extends Exchange { const updated = this.safeTimestamp (transaction, 'updated_at'); const type = 'withdrawal'; const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); return { 'info': transaction, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/luno.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/luno.js index 2bbec0ec1..ad5568218 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/luno.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/luno.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -79,6 +80,10 @@ module.exports = class luno extends Exchange { 'quotes/{id}', 'withdrawals', 'withdrawals/{id}', + 'transfers', + // GET /api/exchange/2/listorders + // GET /api/exchange/2/orders/{id} + // GET /api/exchange/3/order ], 'post': [ 'accounts', @@ -153,12 +158,12 @@ module.exports = class luno extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_volume'), - 'max': this.safeFloat (market, 'max_volume'), + 'min': this.safeNumber (market, 'min_volume'), + 'max': this.safeNumber (market, 'max_volume'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { 'min': undefined, @@ -209,20 +214,22 @@ module.exports = class luno extends Exchange { const wallet = wallets[i]; const currencyId = this.safeString (wallet, 'asset'); const code = this.safeCurrencyCode (currencyId); - const reserved = this.safeFloat (wallet, 'reserved'); - const unconfirmed = this.safeFloat (wallet, 'unconfirmed'); - const balance = this.safeFloat (wallet, 'balance'); + const reserved = this.safeString (wallet, 'reserved'); + const unconfirmed = this.safeString (wallet, 'unconfirmed'); + const balance = this.safeString (wallet, 'balance'); + const reservedUnconfirmed = Precise.stringAdd (reserved, unconfirmed); + const balanceUnconfirmed = Precise.stringAdd (balance, unconfirmed); if (code in result) { - result[code]['used'] = this.sum (result[code]['used'], reserved, unconfirmed); - result[code]['total'] = this.sum (result[code]['total'], balance, unconfirmed); + result[code]['used'] = Precise.stringAdd (result[code]['used'], reservedUnconfirmed); + result[code]['total'] = Precise.stringAdd (result[code]['total'], balanceUnconfirmed); } else { const account = this.account (); - account['used'] = this.sum (reserved, unconfirmed); - account['total'] = this.sum (balance, unconfirmed); + account['used'] = reservedUnconfirmed; + account['total'] = balanceUnconfirmed; result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -273,18 +280,12 @@ module.exports = class luno extends Exchange { const side = (order['type'] === 'ASK') ? 'sell' : 'buy'; const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'limit_price'); - const amount = this.safeFloat (order, 'limit_volume'); - const quoteFee = this.safeFloat (order, 'fee_counter'); - const baseFee = this.safeFloat (order, 'fee_base'); - const filled = this.safeFloat (order, 'base'); - const cost = this.safeFloat (order, 'counter'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } + const price = this.safeNumber (order, 'limit_price'); + const amount = this.safeNumber (order, 'limit_volume'); + const quoteFee = this.safeNumber (order, 'fee_counter'); + const baseFee = this.safeNumber (order, 'fee_base'); + const filled = this.safeNumber (order, 'base'); + const cost = this.safeNumber (order, 'counter'); const fee = { 'currency': undefined }; if (quoteFee) { fee['cost'] = quoteFee; @@ -298,7 +299,7 @@ module.exports = class luno extends Exchange { } } const id = this.safeString (order, 'order_id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'datetime': this.iso8601 (timestamp), @@ -315,12 +316,12 @@ module.exports = class luno extends Exchange { 'amount': amount, 'filled': filled, 'cost': cost, - 'remaining': remaining, + 'remaining': undefined, 'trades': undefined, 'fee': fee, 'info': order, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -366,16 +367,16 @@ module.exports = class luno extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last_trade'); + const last = this.safeNumber (ticker, 'last_trade'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -385,7 +386,7 @@ module.exports = class luno extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'rolling_24_hour_volume'), + 'baseVolume': this.safeNumber (ticker, 'rolling_24_hour_volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -436,8 +437,8 @@ module.exports = class luno extends Exchange { } else { side = trade['is_buy'] ? 'buy' : 'sell'; } - const feeBase = this.safeFloat (trade, 'fee_base'); - const feeCounter = this.safeFloat (trade, 'fee_counter'); + const feeBase = this.safeNumber (trade, 'fee_base'); + const feeCounter = this.safeNumber (trade, 'fee_counter'); let feeCurrency = undefined; let feeCost = undefined; if (feeBase !== undefined) { @@ -462,10 +463,10 @@ module.exports = class luno extends Exchange { 'type': undefined, 'side': side, 'takerOrMaker': takerOrMaker, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), // Does not include potential fee costs - 'cost': this.safeFloat (trade, 'counter'), + 'cost': this.safeNumber (trade, 'counter'), 'fee': { 'cost': feeCost, 'currency': feeCurrency, @@ -512,8 +513,8 @@ module.exports = class luno extends Exchange { const response = await this.privateGetFeeInfo (params); return { 'info': response, - 'maker': this.safeFloat (response, 'maker_fee'), - 'taker': this.safeFloat (response, 'taker_fee'), + 'maker': this.safeNumber (response, 'maker_fee'), + 'taker': this.safeNumber (response, 'taker_fee'), }; } @@ -647,9 +648,9 @@ module.exports = class luno extends Exchange { const timestamp = this.safeValue (entry, 'timestamp'); const currencyId = this.safeString (entry, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); - const available_delta = this.safeFloat (entry, 'available_delta'); - const balance_delta = this.safeFloat (entry, 'balance_delta'); - const after = this.safeFloat (entry, 'balance'); + const available_delta = this.safeNumber (entry, 'available_delta'); + const balance_delta = this.safeNumber (entry, 'balance_delta'); + const after = this.safeNumber (entry, 'balance'); const comment = this.safeString (entry, 'description'); let before = after; let amount = 0.0; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lykke.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lykke.js index edc0fe73a..707034d20 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lykke.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/lykke.js @@ -3,6 +3,7 @@ // --------------------------------------------------------------------------- const Exchange = require ('./base/Exchange'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -184,18 +185,16 @@ module.exports = class lykke extends Exchange { const id = this.safeString2 (trade, 'id', 'Id'); const orderId = this.safeString (trade, 'OrderId'); const timestamp = this.parse8601 (this.safeString2 (trade, 'dateTime', 'DateTime')); - const price = this.safeFloat2 (trade, 'price', 'Price'); - let amount = this.safeFloat2 (trade, 'volume', 'Amount'); + const priceString = this.safeString2 (trade, 'price', 'Price'); + let amountString = this.safeString2 (trade, 'volume', 'Amount'); let side = this.safeStringLower (trade, 'action'); if (side === undefined) { - if (amount < 0) { - side = 'sell'; - } else { - side = 'buy'; - } + side = (amountString[0] === '-') ? 'sell' : 'buy'; } - amount = Math.abs (amount); - const cost = price * amount; + amountString = (amountString[0] === '-') ? amountString.slice (1) : amountString; + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const fee = { 'cost': 0, // There are no fees for trading. https://www.lykke.com/wallet-fees-and-limits/ 'currency': market['quote'], @@ -256,11 +255,11 @@ module.exports = class lykke extends Exchange { const currencyId = this.safeString (balance, 'AssetId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Balance'); - account['used'] = this.safeFloat (balance, 'Reserved'); + account['total'] = this.safeString (balance, 'Balance'); + account['used'] = this.safeString (balance, 'Reserved'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -307,7 +306,7 @@ module.exports = class lykke extends Exchange { // } // const id = this.safeString (result, 'Id'); - price = this.safeFloat (result, 'Price'); + price = this.safeNumber (result, 'Price'); return { 'id': id, 'info': result, @@ -398,16 +397,16 @@ module.exports = class lykke extends Exchange { if (market) { symbol = market['symbol']; } - const close = this.safeFloat (ticker, 'lastPrice'); + const close = this.safeNumber (ticker, 'lastPrice'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'bid'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -418,7 +417,7 @@ module.exports = class lykke extends Exchange { 'percentage': undefined, 'average': undefined, 'baseVolume': undefined, - 'quoteVolume': this.safeFloat (ticker, 'volume24H'), + 'quoteVolume': this.safeNumber (ticker, 'volume24H'), 'info': ticker, }; } @@ -476,20 +475,18 @@ module.exports = class lykke extends Exchange { } else if (('CreatedAt' in order) && (order['CreatedAt'])) { timestamp = this.parse8601 (order['CreatedAt']); } - const price = this.safeFloat (order, 'Price'); + const price = this.safeNumber (order, 'Price'); let side = undefined; - let amount = this.safeFloat (order, 'Volume'); + let amount = this.safeNumber (order, 'Volume'); if (amount < 0) { side = 'sell'; amount = Math.abs (amount); } else { side = 'buy'; } - const remaining = Math.abs (this.safeFloat (order, 'RemainingVolume')); - const filled = amount - remaining; - const cost = filled * price; + const remaining = Math.abs (this.safeNumber (order, 'RemainingVolume')); const id = this.safeString (order, 'Id'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -503,15 +500,15 @@ module.exports = class lykke extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'amount': amount, - 'filled': filled, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -572,8 +569,8 @@ module.exports = class lykke extends Exchange { } parseBidAsk (bidask, priceKey = 0, amountKey = 1) { - const price = this.safeFloat (bidask, priceKey); - let amount = this.safeFloat (bidask, amountKey); + const price = this.safeNumber (bidask, priceKey); + let amount = this.safeNumber (bidask, amountKey); if (amount < 0) { amount = -amount; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mercado.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mercado.js index a2fd9593e..2746e14b8 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mercado.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mercado.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -160,7 +161,7 @@ module.exports = class mercado extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, baseId), + 'min': this.safeNumber (amountLimits, baseId), 'max': undefined, }, 'price': { @@ -196,16 +197,16 @@ module.exports = class mercado extends Exchange { const response = await this.publicGetCoinTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'ticker', {}); const timestamp = this.safeTimestamp (ticker, 'date'); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -215,7 +216,7 @@ module.exports = class mercado extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -230,15 +231,12 @@ module.exports = class mercado extends Exchange { const id = this.safeString2 (trade, 'tid', 'operation_id'); const type = undefined; const side = this.safeString (trade, 'type'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } - const feeCost = this.safeFloat (trade, 'fee_rate'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const feeCost = this.safeNumber (trade, 'fee_rate'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -295,12 +293,12 @@ module.exports = class mercado extends Exchange { if (currencyId in balances) { const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['total'] = this.safeFloat (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -407,32 +405,31 @@ module.exports = class mercado extends Exchange { // } // const id = this.safeString (order, 'order_id'); + const order_type = this.safeString (order, 'order_type'); let side = undefined; if ('order_type' in order) { - side = (order['order_type'] === 1) ? 'buy' : 'sell'; + side = (order_type === '1') ? 'buy' : 'sell'; } const status = this.parseOrderStatus (this.safeString (order, 'status')); const marketId = this.safeString (order, 'coin_pair'); market = this.safeMarket (marketId, market); const timestamp = this.safeTimestamp (order, 'created_timestamp'); const fee = { - 'cost': this.safeFloat (order, 'fee'), + 'cost': this.safeNumber (order, 'fee'), 'currency': market['quote'], }; - const price = this.safeFloat (order, 'limit_price'); - // price = this.safeFloat (order, 'executed_price_avg', price); - const average = this.safeFloat (order, 'executed_price_avg'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'executed_quantity'); - const remaining = amount - filled; - const cost = filled * average; + const price = this.safeNumber (order, 'limit_price'); + // price = this.safeNumber (order, 'executed_price_avg', price); + const average = this.safeNumber (order, 'executed_price_avg'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const lastTradeTimestamp = this.safeTimestamp (order, 'updated_timestamp'); const rawTrades = this.safeValue (order, 'operations', []); const trades = this.parseTrades (rawTrades, market, undefined, undefined, { 'side': side, 'order': id, }); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -446,15 +443,15 @@ module.exports = class mercado extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'average': average, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': trades, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { @@ -512,11 +509,11 @@ module.exports = class mercado extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeTimestamp (ohlcv, 'timestamp'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mixcoins.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mixcoins.js index 85138f138..11bbf93b6 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mixcoins.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/mixcoins.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -72,11 +73,11 @@ module.exports = class mixcoins extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (balances, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'avail'); - account['used'] = this.safeFloat (balance, 'lock'); + account['free'] = this.safeString (balance, 'avail'); + account['used'] = this.safeString (balance, 'lock'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -96,16 +97,16 @@ module.exports = class mixcoins extends Exchange { const response = await this.publicGetTicker (this.extend (request, params)); const ticker = this.safeValue (response, 'result'); const timestamp = this.milliseconds (); - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -115,7 +116,7 @@ module.exports = class mixcoins extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -128,14 +129,11 @@ module.exports = class mixcoins extends Exchange { symbol = market['symbol']; } const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'id': id, 'info': trade, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ndax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ndax.js index 0367c2695..37e8b2760 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ndax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ndax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -244,7 +245,7 @@ module.exports = class ndax extends Exchange { const name = this.safeString (currency, 'ProductFullName'); const type = this.safeString (currency, 'ProductType'); const code = this.safeCurrencyCode (this.safeString (currency, 'Product')); - const precision = this.safeFloat (currency, 'TickSize'); + const precision = this.safeNumber (currency, 'TickSize'); const isDisabled = this.safeValue (currency, 'IsDisabled'); const active = !isDisabled; result[code] = { @@ -325,8 +326,8 @@ module.exports = class ndax extends Exchange { const quote = this.safeCurrencyCode (this.safeString (market, 'Product2Symbol')); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'QuantityIncrement'), - 'price': this.safeFloat (market, 'PriceIncrement'), + 'amount': this.safeNumber (market, 'QuantityIncrement'), + 'price': this.safeNumber (market, 'PriceIncrement'), }; const sessionStatus = this.safeString (market, 'SessionStatus'); const isDisable = this.safeValue (market, 'IsDisable'); @@ -344,11 +345,11 @@ module.exports = class ndax extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'MinimumQuantity'), + 'min': this.safeNumber (market, 'MinimumQuantity'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'MinimumPrice'), + 'min': this.safeNumber (market, 'MinimumPrice'), 'max': undefined, }, 'cost': { @@ -469,27 +470,27 @@ module.exports = class ndax extends Exchange { const timestamp = this.safeInteger (ticker, 'TimeStamp'); const marketId = this.safeString (ticker, 'InstrumentId'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'LastTradedPx'); - const percentage = this.safeFloat (ticker, 'Rolling24HrPxChangePercent'); - const change = this.safeFloat (ticker, 'Rolling24HrPxChange'); - const open = this.safeFloat (ticker, 'SessionOpen'); + const last = this.safeNumber (ticker, 'LastTradedPx'); + const percentage = this.safeNumber (ticker, 'Rolling24HrPxChangePercent'); + const change = this.safeNumber (ticker, 'Rolling24HrPxChange'); + const open = this.safeNumber (ticker, 'SessionOpen'); let average = undefined; if ((last !== undefined) && (change !== undefined)) { average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'Rolling24HrVolume'); - const quoteVolume = this.safeFloat (ticker, 'Rolling24HrNotional'); + const baseVolume = this.safeNumber (ticker, 'Rolling24HrVolume'); + const quoteVolume = this.safeNumber (ticker, 'Rolling24HrNotional'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'SessionHigh'), - 'low': this.safeFloat (ticker, 'SessionLow'), - 'bid': this.safeFloat (ticker, 'BestBid'), - 'bidVolume': undefined, // this.safeFloat (ticker, 'BidQty'), always shows 0 - 'ask': this.safeFloat (ticker, 'BestOffer'), - 'askVolume': undefined, // this.safeFloat (ticker, 'AskQty'), always shows 0 + 'high': this.safeNumber (ticker, 'SessionHigh'), + 'low': this.safeNumber (ticker, 'SessionLow'), + 'bid': this.safeNumber (ticker, 'BestBid'), + 'bidVolume': undefined, // this.safeNumber (ticker, 'BidQty'), always shows 0 + 'ask': this.safeNumber (ticker, 'BestOffer'), + 'askVolume': undefined, // this.safeNumber (ticker, 'AskQty'), always shows 0 'vwap': vwap, 'open': open, 'close': last, @@ -562,11 +563,11 @@ module.exports = class ndax extends Exchange { // return [ this.safeInteger (ohlcv, 0), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -714,8 +715,8 @@ module.exports = class ndax extends Exchange { // "OMSId":1 // } // - let price = undefined; - let amount = undefined; + let priceString = undefined; + let amountString = undefined; let cost = undefined; let timestamp = undefined; let id = undefined; @@ -726,11 +727,8 @@ module.exports = class ndax extends Exchange { let fee = undefined; let type = undefined; if (Array.isArray (trade)) { - price = this.safeFloat (trade, 3); - amount = this.safeFloat (trade, 2); - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + priceString = this.safeString (trade, 3); + amountString = this.safeString (trade, 2); timestamp = this.safeInteger (trade, 6); id = this.safeString (trade, 0); marketId = this.safeInteger (trade, 1); @@ -742,13 +740,13 @@ module.exports = class ndax extends Exchange { id = this.safeString (trade, 'TradeId'); orderId = this.safeString2 (trade, 'OrderId', 'OrigOrderId'); marketId = this.safeString2 (trade, 'InstrumentId', 'Instrument'); - price = this.safeFloat (trade, 'Price'); - amount = this.safeFloat (trade, 'Quantity'); - cost = this.safeFloat2 (trade, 'Value', 'GrossValueExecuted'); + priceString = this.safeString (trade, 'Price'); + amountString = this.safeString (trade, 'Quantity'); + cost = this.safeNumber2 (trade, 'Value', 'GrossValueExecuted'); takerOrMaker = this.safeStringLower (trade, 'MakerTaker'); side = this.safeStringLower (trade, 'Side'); type = this.safeStringLower (trade, 'OrderType'); - const feeCost = this.safeFloat (trade, 'Fee'); + const feeCost = this.safeNumber (trade, 'Fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'FeeProductId'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -758,6 +756,11 @@ module.exports = class ndax extends Exchange { }; } } + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const symbol = this.safeSymbol (marketId, market); return { 'info': trade, @@ -872,11 +875,11 @@ module.exports = class ndax extends Exchange { const currencyId = this.safeString (balance, 'ProductId'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'Amount'); - account['used'] = this.safeFloat (balance, 'Hold'); + account['total'] = this.safeString (balance, 'Amount'); + account['used'] = this.safeString (balance, 'Hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseLedgerEntryType (type) { @@ -922,8 +925,8 @@ module.exports = class ndax extends Exchange { const type = this.parseLedgerEntryType (this.safeString (item, 'ReferenceType')); const currencyId = this.safeString (item, 'ProductId'); const code = this.safeCurrencyCode (currencyId, currency); - const credit = this.safeFloat (item, 'CR'); - const debit = this.safeFloat (item, 'DR'); + const credit = this.safeNumber (item, 'CR'); + const debit = this.safeNumber (item, 'DR'); let amount = undefined; let direction = undefined; if (credit > 0) { @@ -935,7 +938,7 @@ module.exports = class ndax extends Exchange { } const timestamp = this.safeInteger (item, 'TimeStamp'); let before = undefined; - const after = this.safeFloat (item, 'Balance'); + const after = this.safeNumber (item, 'Balance'); if (direction === 'out') { before = this.sum (after, amount); } else if (direction === 'in') { @@ -1083,36 +1086,26 @@ module.exports = class ndax extends Exchange { // const id = this.safeString2 (order, 'ReplacementOrderId', 'OrderId'); const timestamp = this.safeInteger (order, 'ReceiveTime'); - let lastTradeTimestamp = undefined; + const lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); const marketId = this.safeString (order, 'Instrument'); const symbol = this.safeSymbol (marketId, market); const side = this.safeStringLower (order, 'Side'); const type = this.safeStringLower (order, 'OrderType'); const clientOrderId = this.safeString2 (order, 'ReplacementClOrdId', 'ClientOrderId'); - let price = this.safeFloat (order, 'Price', 0.0); + let price = this.safeNumber (order, 'Price', 0.0); price = (price > 0.0) ? price : undefined; - const amount = this.safeFloat (order, 'OrigQuantity'); - const filled = this.safeFloat (order, 'QuantityExecuted'); - const cost = this.safeFloat (order, 'GrossValueExecuted'); - let remaining = undefined; - let average = undefined; - if (filled !== undefined) { - if (amount !== undefined) { - remaining = Math.max (0, amount - filled); - } - if (filled > 0) { - lastTradeTimestamp = this.safeInteger (order, 'LastUpdatedTime'); - average = this.safeFloat (order, 'AvgPrice', 0.0); - average = (average > 0) ? average : undefined; - } - } - let stopPrice = this.safeFloat (order, 'StopPrice', 0.0); + const amount = this.safeNumber (order, 'OrigQuantity'); + const filled = this.safeNumber (order, 'QuantityExecuted'); + const cost = this.safeNumber (order, 'GrossValueExecuted'); + let average = this.safeNumber (order, 'AvgPrice', 0.0); + average = (average > 0) ? average : undefined; + let stopPrice = this.safeNumber (order, 'StopPrice', 0.0); stopPrice = (stopPrice > 0.0) ? stopPrice : undefined; const timeInForce = undefined; const status = this.parseOrderStatus (this.safeString (order, 'OrderState')); const fee = undefined; const trades = undefined; - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -1131,10 +1124,10 @@ module.exports = class ndax extends Exchange { 'amount': amount, 'filled': filled, 'average': average, - 'remaining': remaining, + 'remaining': undefined, 'fee': fee, 'trades': trades, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1932,8 +1925,8 @@ module.exports = class ndax extends Exchange { } const addressTo = address; const status = this.parseTransactionStatusByType (this.safeString (transaction, 'TicketStatus'), type); - const amount = this.safeFloat (transaction, 'Amount'); - const feeCost = this.safeFloat (transaction, 'FeeAmount'); + const amount = this.safeNumber (transaction, 'Amount'); + const feeCost = this.safeNumber (transaction, 'FeeAmount'); let fee = undefined; if (feeCost !== undefined) { fee = { 'currency': code, 'cost': feeCost }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/novadax.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/novadax.js index dfc6569d2..76f763414 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/novadax.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/novadax.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, PermissionDenied, BadRequest, CancelPending, OrderNotFound, InsufficientFunds, RateLimitExceeded, InvalidOrder, AccountSuspended, BadSymbol, OnMaintenance } = require ('./base/errors'); const { TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -197,7 +198,7 @@ module.exports = class novadax extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'minOrderAmount'), + 'min': this.safeNumber (market, 'minOrderAmount'), 'max': undefined, }, 'price': { @@ -205,7 +206,7 @@ module.exports = class novadax extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minOrderValue'), + 'min': this.safeNumber (market, 'minOrderValue'), 'max': undefined, }, }; @@ -247,8 +248,8 @@ module.exports = class novadax extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const open = this.safeFloat (ticker, 'open24h'); - const last = this.safeFloat (ticker, 'lastPrice'); + const open = this.safeNumber (ticker, 'open24h'); + const last = this.safeNumber (ticker, 'lastPrice'); let percentage = undefined; let change = undefined; let average = undefined; @@ -257,18 +258,18 @@ module.exports = class novadax extends Exchange { percentage = change / open * 100; average = this.sum (last, open) / 2; } - const baseVolume = this.safeFloat (ticker, 'baseVolume24h'); - const quoteVolume = this.safeFloat (ticker, 'quoteVolume24h'); + const baseVolume = this.safeNumber (ticker, 'baseVolume24h'); + const quoteVolume = this.safeNumber (ticker, 'quoteVolume24h'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24h'), - 'low': this.safeFloat (ticker, 'low24h'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high24h'), + 'low': this.safeNumber (ticker, 'low24h'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -424,11 +425,13 @@ module.exports = class novadax extends Exchange { const orderId = this.safeString (trade, 'orderId'); const timestamp = this.safeInteger (trade, 'timestamp'); const side = this.safeStringLower (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = this.safeFloat (trade, 'volume'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - cost = amount * price; + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'volume'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); @@ -440,7 +443,7 @@ module.exports = class novadax extends Exchange { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); fee = { - 'cost': this.safeFloat (parts, 0), + 'cost': this.safeNumber (parts, 0), 'currency': feeCurrencyCode, }; } @@ -548,11 +551,11 @@ module.exports = class novadax extends Exchange { const volumeField = this.safeString (options, 'volume', 'amount'); // or vol return [ this.safeTimestamp (ohlcv, 'score'), - this.safeFloat (ohlcv, 'openPrice'), - this.safeFloat (ohlcv, 'highPrice'), - this.safeFloat (ohlcv, 'lowPrice'), - this.safeFloat (ohlcv, 'closePrice'), - this.safeFloat (ohlcv, volumeField), + this.safeNumber (ohlcv, 'openPrice'), + this.safeNumber (ohlcv, 'highPrice'), + this.safeNumber (ohlcv, 'lowPrice'), + this.safeNumber (ohlcv, 'closePrice'), + this.safeNumber (ohlcv, volumeField), ]; } @@ -580,12 +583,12 @@ module.exports = class novadax extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'available'); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); + account['total'] = this.safeString (balance, 'available'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'hold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -608,7 +611,7 @@ module.exports = class novadax extends Exchange { if (uppercaseSide === 'SELL') { request['amount'] = this.amountToPrecision (symbol, amount); } else if (uppercaseSide === 'BUY') { - let value = this.safeFloat (params, 'value'); + let value = this.safeNumber (params, 'value'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -838,21 +841,17 @@ module.exports = class novadax extends Exchange { // } // const id = this.safeString (order, 'id'); - const amount = this.safeFloat (order, 'amount'); - const price = this.safeFloat (order, 'price'); - const cost = this.safeFloat (order, 'filledValue'); + const amount = this.safeNumber (order, 'amount'); + const price = this.safeNumber (order, 'price'); + const cost = this.safeNumber (order, 'filledValue'); const type = this.safeStringLower (order, 'type'); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeInteger (order, 'timestamp'); - const average = this.safeFloat (order, 'averagePrice'); - const filled = this.safeFloat (order, 'filledAmount'); - let remaining = undefined; - if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (0, amount - filled); - } + const average = this.safeNumber (order, 'averagePrice'); + const filled = this.safeNumber (order, 'filledAmount'); let fee = undefined; - const feeCost = this.safeFloat (order, 'filledFee'); + const feeCost = this.safeNumber (order, 'filledFee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -861,7 +860,7 @@ module.exports = class novadax extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'info': order, @@ -879,11 +878,11 @@ module.exports = class novadax extends Exchange { 'cost': cost, 'average': average, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } async withdraw (code, amount, address, tag = undefined, params = {}) { @@ -1046,7 +1045,7 @@ module.exports = class novadax extends Exchange { } else if (type === 'COIN_OUT') { type = 'withdraw'; } - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'addressTag'); const txid = this.safeString (transaction, 'txHash'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/oceanex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/oceanex.js index 28cb8e857..6073f75d5 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/oceanex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/oceanex.js @@ -147,10 +147,10 @@ module.exports = class oceanex extends Exchange { 'active': true, 'info': market, 'precision': { - 'amount': this.safeValue (market, 'amount_precision'), - 'price': this.safeValue (market, 'price_precision'), - 'base': this.safeValue (market, 'ask_precision'), - 'quote': this.safeValue (market, 'bid_precision'), + 'amount': this.safeInteger (market, 'amount_precision'), + 'price': this.safeInteger (market, 'price_precision'), + 'base': this.safeInteger (market, 'ask_precision'), + 'quote': this.safeInteger (market, 'bid_precision'), }, 'limits': { 'amount': { @@ -162,7 +162,7 @@ module.exports = class oceanex extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeValue (market, 'minimum_trading_amount'), + 'min': this.safeNumber (market, 'minimum_trading_amount'), 'max': undefined, }, }, @@ -256,21 +256,21 @@ module.exports = class oceanex extends Exchange { 'symbol': market['symbol'], 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, - 'close': this.safeFloat (ticker, 'last'), - 'last': this.safeFloat (ticker, 'last'), + 'close': this.safeNumber (ticker, 'last'), + 'last': this.safeNumber (ticker, 'last'), 'previousClose': undefined, 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume'), 'quoteVolume': undefined, 'info': ticker, }; @@ -395,8 +395,8 @@ module.exports = class oceanex extends Exchange { 'type': 'limit', 'takerOrMaker': undefined, 'side': side, - 'price': this.safeFloat (trade, 'price'), - 'amount': this.safeFloat (trade, 'volume'), + 'price': this.safeNumber (trade, 'price'), + 'amount': this.safeNumber (trade, 'volume'), 'cost': undefined, 'fee': undefined, }; @@ -423,8 +423,8 @@ module.exports = class oceanex extends Exchange { result[symbol] = { 'info': group, 'symbol': symbol, - 'maker': this.safeFloat (maker, 'value'), - 'taker': this.safeFloat (taker, 'value'), + 'maker': this.safeNumber (maker, 'value'), + 'taker': this.safeNumber (taker, 'value'), }; } return result; @@ -446,11 +446,11 @@ module.exports = class oceanex extends Exchange { const currencyId = this.safeValue (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -558,12 +558,12 @@ module.exports = class oceanex extends Exchange { // const status = this.parseOrderStatus (this.safeValue (order, 'state')); const marketId = this.safeString2 (order, 'market', 'market_id'); - const symbol = this.safeSymbol (marketId); + const symbol = this.safeSymbol (marketId, market); let timestamp = this.safeTimestamp (order, 'created_on'); if (timestamp === undefined) { timestamp = this.parse8601 (this.safeString (order, 'created_at')); } - return { + return this.safeOrder ({ 'info': order, 'id': this.safeString (order, 'id'), 'clientOrderId': undefined, @@ -575,17 +575,17 @@ module.exports = class oceanex extends Exchange { 'timeInForce': undefined, 'postOnly': undefined, 'side': this.safeValue (order, 'side'), - 'price': this.safeFloat (order, 'price'), + 'price': this.safeNumber (order, 'price'), 'stopPrice': undefined, - 'average': this.safeFloat (order, 'avg_price'), - 'amount': this.safeFloat (order, 'volume'), - 'remaining': this.safeFloat (order, 'remaining_volume'), - 'filled': this.safeFloat (order, 'executed_volume'), + 'average': this.safeNumber (order, 'avg_price'), + 'amount': this.safeNumber (order, 'volume'), + 'remaining': this.safeNumber (order, 'remaining_volume'), + 'filled': this.safeNumber (order, 'executed_volume'), 'status': status, 'cost': undefined, 'trades': undefined, 'fee': undefined, - }; + }); } parseOrderStatus (status) { @@ -678,7 +678,7 @@ module.exports = class oceanex extends Exchange { const feedback = this.id + ' ' + body; this.throwExactlyMatchedException (this.exceptions['codes'], errorCode, feedback); this.throwExactlyMatchedException (this.exceptions['exact'], message, feedback); - throw new ExchangeError (response); + throw new ExchangeError (feedback); } } }; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/okex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/okex.js index b9b09c4e0..02d686c17 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/okex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/okex.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, OnMaintenance, ArgumentsRequired, BadRequest, AccountSuspended, InvalidAddress, PermissionDenied, DDoSProtection, InsufficientFunds, InvalidNonce, CancelPending, InvalidOrder, OrderNotFound, AuthenticationError, RequestTimeout, NotSupported, BadSymbol, RateLimitExceeded } = require ('./base/errors'); const { TICK_SIZE, TRUNCATE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -798,7 +799,7 @@ module.exports = class okex extends Exchange { let option = false; let baseId = this.safeString (market, 'base_currency'); let quoteId = this.safeString (market, 'quote_currency'); - const contractVal = this.safeFloat (market, 'contract_val'); + const contractVal = this.safeNumber (market, 'contract_val'); if (contractVal !== undefined) { if ('option_type' in market) { marketType = 'option'; @@ -824,12 +825,12 @@ module.exports = class okex extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = spot ? (base + '/' + quote) : id; - const lotSize = this.safeFloat2 (market, 'lot_size', 'trade_increment'); + const lotSize = this.safeNumber2 (market, 'lot_size', 'trade_increment'); const precision = { - 'amount': this.safeFloat (market, 'size_increment', lotSize), - 'price': this.safeFloat (market, 'tick_size'), + 'amount': this.safeNumber (market, 'size_increment', lotSize), + 'price': this.safeNumber (market, 'tick_size'), }; - const minAmount = this.safeFloat2 (market, 'min_size', 'base_min_size'); + const minAmount = this.safeNumber2 (market, 'min_size', 'base_min_size'); const active = true; const fees = this.safeValue2 (this.fees, marketType, 'trading', {}); return this.extend (fees, { @@ -1004,7 +1005,7 @@ module.exports = class okex extends Exchange { 'price': { 'min': undefined, 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdrawal'), + 'min': this.safeNumber (currency, 'min_withdrawal'), 'max': undefined, }, }, @@ -1079,18 +1080,18 @@ module.exports = class okex extends Exchange { if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open_24h'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open_24h'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_24h'), - 'low': this.safeFloat (ticker, 'low_24h'), - 'bid': this.safeFloat (ticker, 'best_bid'), - 'bidVolume': this.safeFloat (ticker, 'best_bid_size'), - 'ask': this.safeFloat (ticker, 'best_ask'), - 'askVolume': this.safeFloat (ticker, 'best_ask_size'), + 'high': this.safeNumber (ticker, 'high_24h'), + 'low': this.safeNumber (ticker, 'low_24h'), + 'bid': this.safeNumber (ticker, 'best_bid'), + 'bidVolume': this.safeNumber (ticker, 'best_bid_size'), + 'ask': this.safeNumber (ticker, 'best_ask'), + 'askVolume': this.safeNumber (ticker, 'best_ask_size'), 'vwap': undefined, 'open': open, 'close': last, @@ -1099,8 +1100,8 @@ module.exports = class okex extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'base_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'quote_volume_24h'), + 'baseVolume': this.safeNumber (ticker, 'base_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'quote_volume_24h'), 'info': ticker, }; } @@ -1237,9 +1238,12 @@ module.exports = class okex extends Exchange { quote = market['quote']; } const timestamp = this.parse8601 (this.safeString2 (trade, 'timestamp', 'created_at')); - const price = this.safeFloat (trade, 'price'); - let amount = this.safeFloat2 (trade, 'size', 'qty'); - amount = this.safeFloat (trade, 'order_qty', amount); + const priceString = this.safeString (trade, 'price'); + let amountString = this.safeString2 (trade, 'size', 'qty'); + amountString = this.safeString (trade, 'order_qty', amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let takerOrMaker = this.safeString2 (trade, 'exec_type', 'liquidity'); if (takerOrMaker === 'M') { takerOrMaker = 'maker'; @@ -1247,13 +1251,7 @@ module.exports = class okex extends Exchange { takerOrMaker = 'taker'; } const side = this.safeString (trade, 'side'); - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = (side === 'buy') ? base : quote; @@ -1362,22 +1360,22 @@ module.exports = class okex extends Exchange { } return [ timestamp, // timestamp - this.safeFloat (ohlcv, 1), // Open - this.safeFloat (ohlcv, 2), // High - this.safeFloat (ohlcv, 3), // Low - this.safeFloat (ohlcv, 4), // Close - // this.safeFloat (ohlcv, 5), // Quote Volume - // this.safeFloat (ohlcv, 6), // Base Volume - this.safeFloat (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets + this.safeNumber (ohlcv, 1), // Open + this.safeNumber (ohlcv, 2), // High + this.safeNumber (ohlcv, 3), // Low + this.safeNumber (ohlcv, 4), // Close + // this.safeNumber (ohlcv, 5), // Quote Volume + // this.safeNumber (ohlcv, 6), // Base Volume + this.safeNumber (ohlcv, volumeIndex), // Volume, okex will return base volume in the 7th element for future markets ]; } else { return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), // Open - this.safeFloat (ohlcv, 'high'), // High - this.safeFloat (ohlcv, 'low'), // Low - this.safeFloat (ohlcv, 'close'), // Close - this.safeFloat (ohlcv, 'volume'), // Base Volume + this.safeNumber (ohlcv, 'open'), // Open + this.safeNumber (ohlcv, 'high'), // High + this.safeNumber (ohlcv, 'low'), // Low + this.safeNumber (ohlcv, 'close'), // Close + this.safeNumber (ohlcv, 'volume'), // Base Volume ]; } } @@ -1523,9 +1521,9 @@ module.exports = class okex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'hold'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeNumber (balance, 'balance'); + account['used'] = this.safeNumber (balance, 'hold'); + account['free'] = this.safeNumber (balance, 'available'); result[code] = account; } return this.parseBalance (result); @@ -1595,9 +1593,9 @@ module.exports = class okex extends Exchange { const currencyId = parts[1]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (marketBalance, 'balance'); - account['used'] = this.safeFloat (marketBalance, 'hold'); - account['free'] = this.safeFloat (marketBalance, 'available'); + account['total'] = this.safeNumber (marketBalance, 'balance'); + account['used'] = this.safeNumber (marketBalance, 'hold'); + account['free'] = this.safeNumber (marketBalance, 'available'); accounts[code] = account; } else { throw new NotSupported (this.id + ' margin balance response format has changed!'); @@ -1650,29 +1648,29 @@ module.exports = class okex extends Exchange { const code = this.safeCurrencyCode (id); const balance = this.safeValue (info, id, {}); const account = this.account (); - const totalAvailBalance = this.safeFloat (balance, 'total_avail_balance'); + const totalAvailBalance = this.safeNumber (balance, 'total_avail_balance'); if (this.safeString (balance, 'margin_mode') === 'fixed') { const contracts = this.safeValue (balance, 'contracts', []); let free = totalAvailBalance; for (let i = 0; i < contracts.length; i++) { const contract = contracts[i]; - const fixedBalance = this.safeFloat (contract, 'fixed_balance'); - const realizedPnl = this.safeFloat (contract, 'realized_pnl'); - const marginFrozen = this.safeFloat (contract, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (contract, 'margin_for_unfilled'); + const fixedBalance = this.safeNumber (contract, 'fixed_balance'); + const realizedPnl = this.safeNumber (contract, 'realized_pnl'); + const marginFrozen = this.safeNumber (contract, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (contract, 'margin_for_unfilled'); const margin = this.sum (fixedBalance, realizedPnl) - marginFrozen - marginForUnfilled; free = this.sum (free, margin); } account['free'] = free; } else { - const realizedPnl = this.safeFloat (balance, 'realized_pnl'); - const unrealizedPnl = this.safeFloat (balance, 'unrealized_pnl'); - const marginFrozen = this.safeFloat (balance, 'margin_frozen'); - const marginForUnfilled = this.safeFloat (balance, 'margin_for_unfilled'); + const realizedPnl = this.safeNumber (balance, 'realized_pnl'); + const unrealizedPnl = this.safeNumber (balance, 'unrealized_pnl'); + const marginFrozen = this.safeNumber (balance, 'margin_frozen'); + const marginForUnfilled = this.safeNumber (balance, 'margin_for_unfilled'); account['free'] = this.sum (totalAvailBalance, realizedPnl, unrealizedPnl) - marginFrozen - marginForUnfilled; } // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); + account['total'] = this.safeNumber (balance, 'equity'); result[code] = account; } return this.parseBalance (result); @@ -1710,8 +1708,8 @@ module.exports = class okex extends Exchange { } const account = this.account (); // it may be incorrect to use total, free and used for swap accounts - account['total'] = this.safeFloat (balance, 'equity'); - account['free'] = this.safeFloat (balance, 'total_avail_balance'); + account['total'] = this.safeNumber (balance, 'equity'); + account['free'] = this.safeNumber (balance, 'total_avail_balance'); result[symbol] = account; } return this.parseBalance (result); @@ -1915,7 +1913,7 @@ module.exports = class okex extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let notional = this.safeFloat (params, 'notional'); + let notional = this.safeNumber (params, 'notional'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -2125,8 +2123,8 @@ module.exports = class okex extends Exchange { symbol = market['symbol']; } } - let amount = this.safeFloat (order, 'size'); - const filled = this.safeFloat2 (order, 'filled_size', 'filled_qty'); + let amount = this.safeNumber (order, 'size'); + const filled = this.safeNumber2 (order, 'filled_size', 'filled_qty'); let remaining = undefined; if (amount !== undefined) { if (filled !== undefined) { @@ -2137,9 +2135,9 @@ module.exports = class okex extends Exchange { if (type === 'market') { remaining = 0; } - let cost = this.safeFloat2 (order, 'filled_notional', 'funds'); - const price = this.safeFloat (order, 'price'); - let average = this.safeFloat (order, 'price_avg'); + let cost = this.safeNumber2 (order, 'filled_notional', 'funds'); + const price = this.safeNumber (order, 'price'); + let average = this.safeNumber (order, 'price_avg'); if (cost === undefined) { if (filled !== undefined && average !== undefined) { cost = average * filled; @@ -2150,7 +2148,7 @@ module.exports = class okex extends Exchange { } } const status = this.parseOrderStatus (this.safeString (order, 'state')); - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); let fee = undefined; if (feeCost !== undefined) { const feeCurrency = undefined; @@ -2163,7 +2161,7 @@ module.exports = class okex extends Exchange { if ((clientOrderId !== undefined) && (clientOrderId.length < 1)) { clientOrderId = undefined; // fix empty clientOrderId string } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); return { 'info': order, 'id': id, @@ -2407,16 +2405,6 @@ module.exports = class okex extends Exchange { return await this.fetchOrdersByState ('7', symbol, since, limit, params); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - parseDepositAddress (depositAddress, currency = undefined) { // // { @@ -2444,7 +2432,8 @@ module.exports = class okex extends Exchange { async fetchDepositAddress (code, params = {}) { await this.loadMarkets (); - const currency = this.currency (code); + const parts = code.split ('-'); + const currency = this.currency (parts[0]); const request = { 'currency': currency['id'], }; @@ -2457,8 +2446,8 @@ module.exports = class okex extends Exchange { // } // ] // - const addresses = this.parseDepositAddresses (response); - const address = this.safeValue (addresses, code); + const addressesByCode = this.parseDepositAddresses (response); + const address = this.safeValue (addressesByCode, code); if (address === undefined) { throw new InvalidAddress (this.id + ' fetchDepositAddress cannot return nonexistent addresses, you should create withdrawal addresses with the exchange website first'); } @@ -2633,7 +2622,7 @@ module.exports = class okex extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const txid = this.safeString (transaction, 'txid'); const timestamp = this.parse8601 (this.safeString (transaction, 'timestamp')); @@ -2696,19 +2685,19 @@ module.exports = class okex extends Exchange { let feeCurrencyId = undefined; if (receivedCurrencyId === quoteId) { side = this.safeString (otherTrade, 'side'); - amount = this.safeFloat (otherTrade, 'size'); - cost = this.safeFloat (userTrade, 'size'); + amount = this.safeNumber (otherTrade, 'size'); + cost = this.safeNumber (userTrade, 'size'); feeCurrencyId = this.safeString (otherTrade, 'currency'); } else { side = this.safeString (userTrade, 'side'); - amount = this.safeFloat (userTrade, 'size'); - cost = this.safeFloat (otherTrade, 'size'); + amount = this.safeNumber (userTrade, 'size'); + cost = this.safeNumber (otherTrade, 'size'); feeCurrencyId = this.safeString (userTrade, 'currency'); } const id = this.safeString (userTrade, 'trade_id'); - const price = this.safeFloat (userTrade, 'price'); - const feeCostFirst = this.safeFloat (otherTrade, 'fee'); - const feeCostSecond = this.safeFloat (userTrade, 'fee'); + const price = this.safeNumber (userTrade, 'price'); + const feeCostFirst = this.safeNumber (otherTrade, 'fee'); + const feeCostSecond = this.safeNumber (userTrade, 'fee'); const feeCurrencyCodeFirst = this.safeCurrencyCode (this.safeString (otherTrade, 'currency')); const feeCurrencyCodeSecond = this.safeCurrencyCode (this.safeString (userTrade, 'currency')); let fee = undefined; @@ -3140,7 +3129,7 @@ module.exports = class okex extends Exchange { return response; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); let method = undefined; const defaultType = this.safeString2 (this.options, 'fetchPositions', 'defaultType'); @@ -3522,14 +3511,14 @@ module.exports = class okex extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'type')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - const amount = this.safeFloat (item, 'amount'); + const amount = this.safeNumber (item, 'amount'); const timestamp = this.parse8601 (this.safeString (item, 'timestamp')); const fee = { - 'cost': this.safeFloat (item, 'fee'), + 'cost': this.safeNumber (item, 'fee'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; const marketId = this.safeString (item, 'instrument_id'); let symbol = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/paymium.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/paymium.js index 1af0c5355..2d0d8418c 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/paymium.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/paymium.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -96,12 +97,12 @@ module.exports = class paymium extends Exchange { if (free in response) { const account = this.account (); const used = 'locked_' + currencyId; - account['free'] = this.safeFloat (response, free); - account['used'] = this.safeFloat (response, used); + account['free'] = this.safeString (response, free); + account['used'] = this.safeString (response, used); result[code] = account; } } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -120,30 +121,30 @@ module.exports = class paymium extends Exchange { }; const ticker = await this.publicGetDataCurrencyTicker (this.extend (request, params)); const timestamp = this.safeTimestamp (ticker, 'at'); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'price'); + const last = this.safeNumber (ticker, 'price'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'variation'), + 'percentage': this.safeNumber (ticker, 'variation'), 'average': undefined, 'baseVolume': baseVolume, 'quoteVolume': quoteVolume, @@ -159,15 +160,12 @@ module.exports = class paymium extends Exchange { symbol = market['symbol']; } const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); + const priceString = this.safeString (trade, 'price'); const amountField = 'traded_' + market['base'].toLowerCase (); - const amount = this.safeFloat (trade, amountField); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const amountString = this.safeString (trade, amountField); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); return { 'info': trade, 'id': id, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/phemex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/phemex.js index b1c294ab2..ae494da41 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/phemex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/phemex.js @@ -305,13 +305,13 @@ module.exports = class phemex extends Exchange { }); } - parseSafeFloat (value = undefined) { + parseSafeNumber (value = undefined) { if (value === undefined) { return value; } value = value.replace (',', ''); const parts = value.split (' '); - return this.safeFloat (parts, 0); + return this.safeNumber (parts, 0); } parseSwapMarket (market) { @@ -335,7 +335,9 @@ module.exports = class phemex extends Exchange { // "minPriceEp":5000, // "maxPriceEp":10000000000, // "maxOrderQty":1000000, - // "type":"Perpetual" + // "type":"Perpetual", + // "status":"Listed", + // "tipOrderQty":1000000, // "steps":"50", // "riskLimits":[ // {"limit":100,"initialMargin":"1.0%","initialMarginEr":1000000,"maintenanceMargin":"0.5%","maintenanceMarginEr":500000}, @@ -360,7 +362,7 @@ module.exports = class phemex extends Exchange { // } // const id = this.safeString (market, 'symbol'); - const baseId = this.safeString (market, 'baseCurrency', 'contractUnderlyingAssets'); + const baseId = this.safeString2 (market, 'baseCurrency', 'contractUnderlyingAssets'); const quoteId = this.safeString (market, 'quoteCurrency'); const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); @@ -377,16 +379,16 @@ module.exports = class phemex extends Exchange { } const linear = !inverse; const precision = { - 'amount': this.safeFloat (market, 'lotSize'), - 'price': this.safeFloat (market, 'tickSize'), + 'amount': this.safeNumber (market, 'lotSize'), + 'price': this.safeNumber (market, 'tickSize'), }; const priceScale = this.safeInteger (market, 'priceScale'); const ratioScale = this.safeInteger (market, 'ratioScale'); const valueScale = this.safeInteger (market, 'valueScale'); - const minPriceEp = this.safeFloat (market, 'minPriceEp'); - const maxPriceEp = this.safeFloat (market, 'maxPriceEp'); - const makerFeeRateEr = this.safeFloat (market, 'makerFeeRateEr'); - const takerFeeRateEr = this.safeFloat (market, 'takerFeeRateEr'); + const minPriceEp = this.safeNumber (market, 'minPriceEp'); + const maxPriceEp = this.safeNumber (market, 'maxPriceEp'); + const makerFeeRateEr = this.safeNumber (market, 'makerFeeRateEr'); + const takerFeeRateEr = this.safeNumber (market, 'takerFeeRateEr'); if (makerFeeRateEr !== undefined) { maker = this.fromEn (makerFeeRateEr, ratioScale, 0.00000001); } @@ -404,10 +406,11 @@ module.exports = class phemex extends Exchange { }, 'cost': { 'min': undefined, - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderQty')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderQty')), }, }; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -456,7 +459,9 @@ module.exports = class phemex extends Exchange { // "defaultMakerFee":"0.001", // "defaultMakerFeeEr":100000, // "baseQtyPrecision":6, - // "quoteQtyPrecision":2 + // "quoteQtyPrecision":2, + // "status":"Listed", + // "tipOrderQty":20 // } // const type = this.safeStringLower (market, 'type'); @@ -467,30 +472,31 @@ module.exports = class phemex extends Exchange { const inverse = undefined; const spot = true; const swap = false; - const taker = this.safeFloat (market, 'defaultTakerFee'); - const maker = this.safeFloat (market, 'defaultMakerFee'); + const taker = this.safeNumber (market, 'defaultTakerFee'); + const maker = this.safeNumber (market, 'defaultMakerFee'); const precision = { - 'amount': this.parseSafeFloat (this.safeString (market, 'baseTickSize')), - 'price': this.parseSafeFloat (this.safeString (market, 'quoteTickSize')), + 'amount': this.parseSafeNumber (this.safeString (market, 'baseTickSize')), + 'price': this.parseSafeNumber (this.safeString (market, 'quoteTickSize')), }; const limits = { 'amount': { 'min': precision['amount'], - 'max': this.parseSafeFloat (this.safeString (market, 'maxBaseOrderSize')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxBaseOrderSize')), }, 'price': { 'min': precision['price'], 'max': undefined, }, 'cost': { - 'min': this.parseSafeFloat (this.safeString (market, 'minOrderValue')), - 'max': this.parseSafeFloat (this.safeString (market, 'maxOrderValue')), + 'min': this.parseSafeNumber (this.safeString (market, 'minOrderValue')), + 'max': this.parseSafeNumber (this.safeString (market, 'maxOrderValue')), }, }; const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const active = undefined; + const status = this.safeString (market, 'status'); + const active = status === 'Listed'; return { 'id': id, 'symbol': symbol, @@ -680,8 +686,8 @@ module.exports = class phemex extends Exchange { const name = this.safeString (currency, 'name'); const code = this.safeCurrencyCode (id); const valueScale = this.safeInteger (currency, 'valueScale'); - const minValueEv = this.safeFloat (currency, 'minValueEv'); - const maxValueEv = this.safeFloat (currency, 'maxValueEv'); + const minValueEv = this.safeNumber (currency, 'minValueEv'); + const maxValueEv = this.safeNumber (currency, 'maxValueEv'); let minAmount = undefined; let maxAmount = undefined; let precision = undefined; @@ -731,12 +737,12 @@ module.exports = class phemex extends Exchange { if (market === undefined) { throw new ArgumentsRequired (this.id + ' parseBidAsk() requires a market argument'); } - let amount = this.safeFloat (bidask, amountKey); + let amount = this.safeNumber (bidask, amountKey); if (market['spot']) { amount = this.fromEv (amount, market); } return [ - this.fromEp (this.safeFloat (bidask, priceKey), market), + this.fromEp (this.safeNumber (bidask, priceKey), market), amount, ]; } @@ -870,16 +876,16 @@ module.exports = class phemex extends Exchange { // let baseVolume = undefined; if ((market !== undefined) && market['spot']) { - baseVolume = this.fromEv (this.safeFloat (ohlcv, 7), market); + baseVolume = this.fromEv (this.safeNumber (ohlcv, 7), market); } else { baseVolume = this.safeInteger (ohlcv, 7); } return [ this.safeTimestamp (ohlcv, 0), - this.fromEp (this.safeFloat (ohlcv, 3), market), - this.fromEp (this.safeFloat (ohlcv, 4), market), - this.fromEp (this.safeFloat (ohlcv, 5), market), - this.fromEp (this.safeFloat (ohlcv, 6), market), + this.fromEp (this.safeNumber (ohlcv, 3), market), + this.fromEp (this.safeNumber (ohlcv, 4), market), + this.fromEp (this.safeNumber (ohlcv, 5), market), + this.fromEp (this.safeNumber (ohlcv, 6), market), baseVolume, ]; } @@ -972,11 +978,11 @@ module.exports = class phemex extends Exchange { const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.safeIntegerProduct (ticker, 'timestamp', 0.000001); - const last = this.fromEp (this.safeFloat (ticker, 'lastEp'), market); - const quoteVolume = this.fromEp (this.safeFloat (ticker, 'turnoverEv'), market); - let baseVolume = this.safeFloat (ticker, 'volume'); + const last = this.fromEp (this.safeNumber (ticker, 'lastEp'), market); + const quoteVolume = this.fromEp (this.safeNumber (ticker, 'turnoverEv'), market); + let baseVolume = this.safeNumber (ticker, 'volume'); if (baseVolume === undefined) { - baseVolume = this.fromEv (this.safeFloat (ticker, 'volumeEv')); + baseVolume = this.fromEv (this.safeNumber (ticker, 'volumeEv')); } let vwap = undefined; if ((market !== undefined) && (market['spot'])) { @@ -985,7 +991,7 @@ module.exports = class phemex extends Exchange { let change = undefined; let percentage = undefined; let average = undefined; - const open = this.fromEp (this.safeFloat (ticker, 'openEp'), market); + const open = this.fromEp (this.safeNumber (ticker, 'openEp'), market); if ((open !== undefined) && (last !== undefined)) { change = last - open; if (open > 0) { @@ -997,11 +1003,11 @@ module.exports = class phemex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.fromEp (this.safeFloat (ticker, 'highEp'), market), - 'low': this.fromEp (this.safeFloat (ticker, 'lowEp'), market), - 'bid': this.fromEp (this.safeFloat (ticker, 'bidEp'), market), + 'high': this.fromEp (this.safeNumber (ticker, 'highEp'), market), + 'low': this.fromEp (this.safeNumber (ticker, 'lowEp'), market), + 'bid': this.fromEp (this.safeNumber (ticker, 'bidEp'), market), 'bidVolume': undefined, - 'ask': this.fromEp (this.safeFloat (ticker, 'askEp'), market), + 'ask': this.fromEp (this.safeNumber (ticker, 'askEp'), market), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -1192,8 +1198,8 @@ module.exports = class phemex extends Exchange { id = this.safeString (trade, tradeLength - 4); } side = this.safeStringLower (trade, tradeLength - 3); - price = this.fromEp (this.safeFloat (trade, tradeLength - 2), market); - amount = this.fromEv (this.safeFloat (trade, tradeLength - 1), market); + price = this.fromEp (this.safeNumber (trade, tradeLength - 2), market); + amount = this.fromEv (this.safeNumber (trade, tradeLength - 1), market); if (market['spot']) { if ((price !== undefined) && (amount !== undefined)) { cost = price * amount; @@ -1209,14 +1215,14 @@ module.exports = class phemex extends Exchange { if (execStatus === 'MakerFill') { takerOrMaker = 'maker'; } - price = this.fromEp (this.safeFloat (trade, 'execPriceEp'), market); - amount = this.fromEv (this.safeFloat (trade, 'execBaseQtyEv'), market); - amount = this.safeFloat (trade, 'execQty', amount); - cost = this.fromEv (this.safeFloat2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); - const feeCost = this.fromEv (this.safeFloat (trade, 'execFeeEv'), market); + price = this.fromEp (this.safeNumber (trade, 'execPriceEp'), market); + amount = this.fromEv (this.safeNumber (trade, 'execBaseQtyEv'), market); + amount = this.safeNumber (trade, 'execQty', amount); + cost = this.fromEv (this.safeNumber2 (trade, 'execQuoteQtyEv', 'execValueEv'), market); + const feeCost = this.fromEv (this.safeNumber (trade, 'execFeeEv'), market); if (feeCost !== undefined) { let feeRate = undefined; - let feeRateEr = this.safeFloat (trade, 'feeRateEr'); + let feeRateEr = this.safeNumber (trade, 'feeRateEr'); if (feeRateEr < 0) { feeRateEr = Math.abs (feeRateEr); feeRate = this.fromEr (feeRateEr, market); @@ -1292,9 +1298,9 @@ module.exports = class phemex extends Exchange { const currency = this.safeValue (this.currencies, code, {}); const scale = this.safeInteger (currency, 'valueScale', 8); const account = this.account (); - const balanceEv = this.safeFloat (balance, 'balanceEv'); - const lockedTradingBalanceEv = this.safeFloat (balance, 'lockedTradingBalanceEv'); - const lockedWithdrawEv = this.safeFloat (balance, 'lockedWithdrawEv'); + const balanceEv = this.safeNumber (balance, 'balanceEv'); + const lockedTradingBalanceEv = this.safeNumber (balance, 'lockedTradingBalanceEv'); + const lockedWithdrawEv = this.safeNumber (balance, 'lockedWithdrawEv'); const total = this.fromEn (balanceEv, scale, scale, DECIMAL_PLACES); const lockedTradingBalance = this.fromEn (lockedTradingBalanceEv, scale, scale, DECIMAL_PLACES); const lockedWithdraw = this.fromEn (lockedWithdrawEv, scale, scale, DECIMAL_PLACES); @@ -1388,8 +1394,8 @@ module.exports = class phemex extends Exchange { const code = this.safeCurrencyCode (currencyId); const currency = this.currency (code); const account = this.account (); - const accountBalanceEv = this.safeFloat (balance, 'accountBalanceEv'); - const totalUsedBalanceEv = this.safeFloat (balance, 'totalUsedBalanceEv'); + const accountBalanceEv = this.safeNumber (balance, 'accountBalanceEv'); + const totalUsedBalanceEv = this.safeNumber (balance, 'totalUsedBalanceEv'); const valueScale = this.safeInteger (currency, 'valueScale', 8); account['total'] = this.fromEn (accountBalanceEv, valueScale, valueScale, DECIMAL_PLACES); account['used'] = this.fromEn (totalUsedBalanceEv, valueScale, valueScale, DECIMAL_PLACES); @@ -1621,21 +1627,21 @@ module.exports = class phemex extends Exchange { } const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - let price = this.fromEp (this.safeFloat (order, 'priceEp'), market); + let price = this.fromEp (this.safeNumber (order, 'priceEp'), market); if (price === 0) { price = undefined; } - const amount = this.fromEv (this.safeFloat (order, 'baseQtyEv'), market); - const remaining = this.fromEv (this.safeFloat (order, 'leavesBaseQtyEv'), market); - let filled = this.fromEv (this.safeFloat (order, 'cumBaseQtyEv'), market); - const cost = this.fromEv (this.safeFloat (order, 'quoteQtyEv'), market); - const average = this.fromEp (this.safeFloat (order, 'avgPriceEp'), market); + const amount = this.fromEv (this.safeNumber (order, 'baseQtyEv'), market); + const remaining = this.fromEv (this.safeNumber (order, 'leavesBaseQtyEv'), market); + let filled = this.fromEv (this.safeNumber (order, 'cumBaseQtyEv'), market); + const cost = this.fromEv (this.safeNumber (order, 'quoteQtyEv'), market); + const average = this.fromEp (this.safeNumber (order, 'avgPriceEp'), market); const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'ordType')); const timestamp = this.safeIntegerProduct2 (order, 'actionTimeNs', 'createTimeNs', 0.000001); let fee = undefined; - const feeCost = this.fromEv (this.safeFloat (order, 'cumFeeEv'), market); + const feeCost = this.fromEv (this.safeNumber (order, 'cumFeeEv'), market); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1648,7 +1654,7 @@ module.exports = class phemex extends Exchange { } } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.fromEp (this.safeFloat (order, 'stopPxEp', market)); + const stopPrice = this.fromEp (this.safeNumber (order, 'stopPxEp', market)); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -1721,18 +1727,18 @@ module.exports = class phemex extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const side = this.safeStringLower (order, 'side'); const type = this.parseOrderType (this.safeString (order, 'orderType')); - const price = this.fromEp (this.safeFloat (order, 'priceEp'), market); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); + const price = this.fromEp (this.safeNumber (order, 'priceEp'), market); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); const timestamp = this.safeIntegerProduct (order, 'actionTimeNs', 0.000001); - const cost = this.safeFloat (order, 'cumValue'); + const cost = this.safeNumber (order, 'cumValue'); let lastTradeTimestamp = this.safeIntegerProduct (order, 'transactTimeNs', 0.000001); if (lastTradeTimestamp === 0) { lastTradeTimestamp = undefined; } const timeInForce = this.parseTimeInForce (this.safeString (order, 'timeInForce')); - const stopPrice = this.safeFloat (order, 'stopPx'); + const stopPrice = this.safeNumber (order, 'stopPx'); const postOnly = (timeInForce === 'PO'); return { 'info': order, @@ -1807,7 +1813,7 @@ module.exports = class phemex extends Exchange { } request['qtyType'] = qtyType; if (qtyType === 'ByQuote') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); params = this.omit (params, 'cost'); if (this.options['createOrderByQuoteRequiresPrice']) { if (price !== undefined) { @@ -1827,7 +1833,7 @@ module.exports = class phemex extends Exchange { if (type === 'Limit') { request['priceEp'] = this.toEp (price, market); } - const stopPrice = this.safeFloat2 (params, 'stopPx', 'stopPrice'); + const stopPrice = this.safeNumber2 (params, 'stopPx', 'stopPrice'); if (stopPrice !== undefined) { request['stopPxEp'] = this.toEp (stopPrice, market); } @@ -2335,7 +2341,7 @@ module.exports = class phemex extends Exchange { const code = currency['code']; const timestamp = this.safeInteger2 (transaction, 'createdAt', 'submitedAt'); let type = this.safeStringLower (transaction, 'type'); - const feeCost = this.fromEn (this.safeFloat (transaction, 'feeEv'), currency['valueScale'], currency['precision']); + const feeCost = this.fromEn (this.safeNumber (transaction, 'feeEv'), currency['valueScale'], currency['precision']); let fee = undefined; if (feeCost !== undefined) { type = 'withdrawal'; @@ -2345,7 +2351,7 @@ module.exports = class phemex extends Exchange { }; } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const amount = this.fromEn (this.safeFloat (transaction, 'amountEv'), currency['valueScale'], currency['precision']); + const amount = this.fromEn (this.safeNumber (transaction, 'amountEv'), currency['valueScale'], currency['precision']); return { 'info': transaction, 'id': id, @@ -2367,7 +2373,7 @@ module.exports = class phemex extends Exchange { }; } - async fetchPositions (symbols = undefined, since = undefined, limit = undefined, params = {}) { + async fetchPositions (symbols = undefined, params = {}) { await this.loadMarkets (); const code = this.safeString (params, 'code'); const request = {}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/poloniex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/poloniex.js index 30eee15c9..fbb6447ad 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/poloniex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/poloniex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, RequestTimeout, AuthenticationError, PermissionDenied, DDoSProtection, InsufficientFunds, OrderNotFound, InvalidOrder, AccountSuspended, CancelPending, InvalidNonce, OnMaintenance, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -113,6 +114,7 @@ module.exports = class poloniex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', // starting from Jan 8 2020 'maker': 0.0009, 'taker': 0.0009, @@ -207,24 +209,6 @@ module.exports = class poloniex extends Exchange { }); } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': parseFloat (this.feeToPrecision (symbol, cost)), - }; - } - parseOHLCV (ohlcv, market = undefined) { // // { @@ -240,11 +224,11 @@ module.exports = class poloniex extends Exchange { // return [ this.safeTimestamp (ohlcv, 'date'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'quoteVolume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'quoteVolume'), ]; } @@ -337,11 +321,11 @@ module.exports = class poloniex extends Exchange { const balance = this.safeValue (response, currencyId, {}); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onOrders'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchTradingFees (params = {}) { @@ -359,8 +343,8 @@ module.exports = class poloniex extends Exchange { // return { 'info': fees, - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), 'withdraw': {}, 'deposit': {}, }; @@ -418,8 +402,8 @@ module.exports = class poloniex extends Exchange { let open = undefined; let change = undefined; let average = undefined; - const last = this.safeFloat (ticker, 'last'); - const relativeChange = this.safeFloat (ticker, 'percentChange'); + const last = this.safeNumber (ticker, 'last'); + const relativeChange = this.safeNumber (ticker, 'percentChange'); if (relativeChange !== -1) { open = last / this.sum (1, relativeChange); change = last - open; @@ -429,11 +413,11 @@ module.exports = class poloniex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high24hr'), - 'low': this.safeFloat (ticker, 'low24hr'), - 'bid': this.safeFloat (ticker, 'highestBid'), + 'high': this.safeNumber (ticker, 'high24hr'), + 'low': this.safeNumber (ticker, 'low24hr'), + 'bid': this.safeNumber (ticker, 'highestBid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'lowestAsk'), + 'ask': this.safeNumber (ticker, 'lowestAsk'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -443,8 +427,8 @@ module.exports = class poloniex extends Exchange { 'change': change, 'percentage': relativeChange * 100, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'quoteVolume'), - 'quoteVolume': this.safeFloat (ticker, 'baseVolume'), + 'baseVolume': this.safeNumber (ticker, 'quoteVolume'), + 'quoteVolume': this.safeNumber (ticker, 'baseVolume'), 'info': ticker, }; } @@ -485,7 +469,7 @@ module.exports = class poloniex extends Exchange { const code = this.safeCurrencyCode (id); const active = (currency['delisted'] === 0) && !currency['disabled']; const numericId = this.safeInteger (currency, 'id'); - const fee = this.safeFloat (currency, 'txFee'); + const fee = this.safeNumber (currency, 'txFee'); result[code] = { 'id': id, 'numericId': numericId, @@ -576,13 +560,18 @@ module.exports = class poloniex extends Exchange { } const side = this.safeString (trade, 'type'); let fee = undefined; - const price = this.safeFloat (trade, 'rate'); - const cost = this.safeFloat (trade, 'total'); - const amount = this.safeFloat (trade, 'amount'); + const priceString = this.safeString (trade, 'rate'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'total'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } const feeDisplay = this.safeString (trade, 'feeDisplay'); if (feeDisplay !== undefined) { const parts = feeDisplay.split (' '); - const feeCost = this.safeFloat (parts, 0); + const feeCost = this.safeNumber (parts, 0); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (parts, 1); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -601,7 +590,7 @@ module.exports = class poloniex extends Exchange { } } let takerOrMaker = undefined; - const takerAdjustment = this.safeFloat (trade, 'takerAdjustment'); + const takerAdjustment = this.safeNumber (trade, 'takerAdjustment'); if (takerAdjustment !== undefined) { takerOrMaker = 'taker'; } @@ -847,9 +836,9 @@ module.exports = class poloniex extends Exchange { if (resultingTrades !== undefined) { trades = this.parseTrades (resultingTrades, market); } - const price = this.safeFloat2 (order, 'price', 'rate'); - let remaining = this.safeFloat (order, 'amount'); - let amount = this.safeFloat (order, 'startingAmount'); + const price = this.safeNumber2 (order, 'price', 'rate'); + let remaining = this.safeNumber (order, 'amount'); + let amount = this.safeNumber (order, 'startingAmount'); let filled = undefined; let cost = 0; if (amount !== undefined) { @@ -899,7 +888,7 @@ module.exports = class poloniex extends Exchange { } const id = this.safeString (order, 'orderNumber'); let fee = undefined; - const feeCost = this.safeFloat (order, 'fee'); + const feeCost = this.safeNumber (order, 'fee'); if (feeCost !== undefined) { let feeCurrencyCode = undefined; if (market !== undefined) { @@ -1396,11 +1385,11 @@ module.exports = class poloniex extends Exchange { const defaultType = ('withdrawalNumber' in transaction) ? 'withdrawal' : 'deposit'; const type = this.safeString (transaction, 'type', defaultType); const id = this.safeString2 (transaction, 'withdrawalNumber', 'depositNumber'); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'paymentID'); // according to https://poloniex.com/fees/ - const feeCost = this.safeFloat (transaction, 'fee', 0); + const feeCost = this.safeNumber (transaction, 'fee', 0); if (type === 'withdrawal') { // poloniex withdrawal amount includes the fee amount = amount - feeCost; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/probit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/probit.js index 522045f2c..2b551ca0a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/probit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/probit.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ExchangeNotAvailable, BadResponse, BadRequest, InvalidOrder, InsufficientFunds, AuthenticationError, ArgumentsRequired, InvalidAddress, RateLimitExceeded, DDoSProtection, BadSymbol } = require ('./base/errors'); const { TRUNCATE, TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -140,9 +141,11 @@ module.exports = class probit extends Exchange { }, }, 'commonCurrencies': { + 'AUTO': 'Cube', 'BTCBEAR': 'BEAR', 'BTCBULL': 'BULL', 'CBC': 'CryptoBharatCoin', + 'EPS': 'Epanus', // conflict with EPS Ellipsis https://github.com/ccxt/ccxt/issues/8909 'HBC': 'Hybrid Bank Cash', 'UNI': 'UNICORN Token', }, @@ -191,11 +194,11 @@ module.exports = class probit extends Exchange { const costPrecision = this.safeInteger (market, 'cost_precision'); const precision = { 'amount': 1 / Math.pow (10, amountPrecision), - 'price': this.safeFloat (market, 'price_increment'), + 'price': this.safeNumber (market, 'price_increment'), 'cost': 1 / Math.pow (10, costPrecision), }; - const takerFeeRate = this.safeFloat (market, 'taker_fee_rate'); - const makerFeeRate = this.safeFloat (market, 'maker_fee_rate'); + const takerFeeRate = this.safeNumber (market, 'taker_fee_rate'); + const makerFeeRate = this.safeNumber (market, 'maker_fee_rate'); result.push ({ 'id': id, 'info': market, @@ -210,16 +213,16 @@ module.exports = class probit extends Exchange { 'maker': makerFeeRate / 100, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_quantity'), - 'max': this.safeFloat (market, 'max_quantity'), + 'min': this.safeNumber (market, 'min_quantity'), + 'max': this.safeNumber (market, 'max_quantity'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_cost'), - 'max': this.safeFloat (market, 'max_cost'), + 'min': this.safeNumber (market, 'min_cost'), + 'max': this.safeNumber (market, 'max_cost'), }, }, }); @@ -306,7 +309,7 @@ module.exports = class probit extends Exchange { // [ { 'amount': '0.015', 'priority': 1, 'currency_id': 'ETH' }, {} ] for (let j = 0; j < withdrawalFees.length; j++) { const withdrawalFee = withdrawalFees[j]; - const amount = this.safeFloat (withdrawalFee, 'amount'); + const amount = this.safeNumber (withdrawalFee, 'amount'); const priority = this.safeInteger (withdrawalFee, 'priority'); if ((amount !== undefined) && (priority !== undefined)) { fees.push (withdrawalFee); @@ -314,7 +317,7 @@ module.exports = class probit extends Exchange { } const withdrawalFeesByPriority = this.sortBy (fees, 'priority'); const withdrawalFee = this.safeValue (withdrawalFeesByPriority, 0, {}); - const fee = this.safeFloat (withdrawalFee, 'amount'); + const fee = this.safeNumber (withdrawalFee, 'amount'); result[code] = { 'id': id, 'code': code, @@ -337,11 +340,11 @@ module.exports = class probit extends Exchange { 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (platform, 'min_deposit_amount'), + 'min': this.safeNumber (platform, 'min_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (platform, 'min_withdrawal_amount'), + 'min': this.safeNumber (platform, 'min_withdrawal_amount'), 'max': undefined, }, }, @@ -371,11 +374,11 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (balance, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'total'); - account['free'] = this.safeFloat (balance, 'available'); + account['total'] = this.safeString (balance, 'total'); + account['free'] = this.safeString (balance, 'available'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -427,14 +430,6 @@ module.exports = class probit extends Exchange { return this.parseTickers (data, symbols); } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - async fetchTicker (symbol, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -482,8 +477,8 @@ module.exports = class probit extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'time')); const marketId = this.safeString (ticker, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); - const close = this.safeFloat (ticker, 'last'); - const change = this.safeFloat (ticker, 'change'); + const close = this.safeNumber (ticker, 'last'); + const change = this.safeNumber (ticker, 'change'); let percentage = undefined; let open = undefined; if (change !== undefined) { @@ -492,15 +487,15 @@ module.exports = class probit extends Exchange { percentage = (change / open) * 100; } } - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, @@ -642,16 +637,13 @@ module.exports = class probit extends Exchange { marketId = this.safeString (trade, 'market_id', marketId); const symbol = this.safeSymbol (marketId, market, '-'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const orderId = this.safeString (trade, 'order_id'); - const feeCost = this.safeFloat (trade, 'fee_amount'); + const feeCost = this.safeNumber (trade, 'fee_amount'); let fee = undefined; if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'fee_currency_id'); @@ -795,11 +787,11 @@ module.exports = class probit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'start_time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'base_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'base_volume'), ]; } @@ -898,37 +890,24 @@ module.exports = class probit extends Exchange { const marketId = this.safeString (order, 'market_id'); const symbol = this.safeSymbol (marketId, market, '-'); const timestamp = this.parse8601 (this.safeString (order, 'time')); - let price = this.safeFloat (order, 'limit_price'); - const filled = this.safeFloat (order, 'filled_quantity'); - let remaining = this.safeFloat (order, 'open_quantity'); - const canceledAmount = this.safeFloat (order, 'cancelled_quantity'); + let price = this.safeNumber (order, 'limit_price'); + const filled = this.safeNumber (order, 'filled_quantity'); + let remaining = this.safeNumber (order, 'open_quantity'); + const canceledAmount = this.safeNumber (order, 'cancelled_quantity'); if (canceledAmount !== undefined) { remaining = this.sum (remaining, canceledAmount); } - const amount = this.safeFloat (order, 'quantity', this.sum (filled, remaining)); - let cost = this.safeFloat2 (order, 'filled_cost', 'cost'); + const amount = this.safeNumber (order, 'quantity', this.sum (filled, remaining)); + const cost = this.safeNumber2 (order, 'filled_cost', 'cost'); if (type === 'market') { price = undefined; } - let average = undefined; - if (filled !== undefined) { - if (cost === undefined) { - if (price !== undefined) { - cost = price * filled; - } - } - if (cost !== undefined) { - if (filled > 0) { - average = cost / filled; - } - } - } let clientOrderId = this.safeString (order, 'client_order_id'); if (clientOrderId === '') { clientOrderId = undefined; } const timeInForce = this.safeStringUpper (order, 'time_in_force'); - return { + return this.safeOrder ({ 'id': id, 'info': order, 'clientOrderId': clientOrderId, @@ -945,11 +924,11 @@ module.exports = class probit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'average': average, + 'average': undefined, 'cost': cost, 'fee': undefined, 'trades': undefined, - }; + }); } costToPrecision (symbol, cost) { @@ -979,7 +958,7 @@ module.exports = class probit extends Exchange { } else if (type === 'market') { // for market buy it requires the amount of quote currency to spend if (side === 'buy') { - let cost = this.safeFloat (params, 'cost'); + let cost = this.safeNumber (params, 'cost'); const createMarketBuyOrderRequiresPrice = this.safeValue (this.options, 'createMarketBuyOrderRequiresPrice', true); if (createMarketBuyOrderRequiresPrice) { if (price !== undefined) { @@ -1104,16 +1083,6 @@ module.exports = class probit extends Exchange { return this.parseDepositAddresses (data); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async withdraw (code, amount, address, tag = undefined, params = {}) { // In order to use this method // you need to allow API withdrawal from the API Settings Page, and @@ -1144,7 +1113,7 @@ module.exports = class probit extends Exchange { parseTransaction (transaction, currency = undefined) { const id = this.safeString (transaction, 'id'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = this.safeString (transaction, 'address'); const tag = this.safeString (transaction, 'destination_tag'); const txid = this.safeString (transaction, 'hash'); @@ -1153,7 +1122,7 @@ module.exports = class probit extends Exchange { const currencyId = this.safeString (transaction, 'currency_id'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); let fee = undefined; if (feeCost !== undefined && feeCost !== 0) { fee = { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/qtrade.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/qtrade.js index aa66545bf..d77b576c4 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/qtrade.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/qtrade.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InvalidOrder, InsufficientFunds, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -179,11 +180,11 @@ module.exports = class qtrade extends Exchange { 'quote': quote, 'active': active, 'precision': precision, - 'taker': this.safeFloat (market, 'taker_fee'), - 'maker': this.safeFloat (market, 'maker_fee'), + 'taker': this.safeNumber (market, 'taker_fee'), + 'maker': this.safeNumber (market, 'maker_fee'), 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_buy_value'), + 'min': this.safeNumber (market, 'minimum_buy_value'), 'max': undefined, }, 'price': { @@ -264,12 +265,12 @@ module.exports = class qtrade extends Exchange { 'info': currency, 'type': type, 'name': name, - 'fee': this.safeFloat (config, 'withdraw_fee'), + 'fee': this.safeNumber (config, 'withdraw_fee'), 'precision': this.safeInteger (currency, 'precision'), 'active': active, 'limits': { 'amount': { - 'min': this.safeFloat (currency, 'minimum_order'), + 'min': this.safeNumber (currency, 'minimum_order'), 'max': undefined, }, 'price': { @@ -304,11 +305,11 @@ module.exports = class qtrade extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'time')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'market_volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'market_volume'), ]; } @@ -370,8 +371,8 @@ module.exports = class qtrade extends Exchange { const result = []; for (let j = 0; j < prices.length; j++) { const priceAsString = prices[j]; - const price = this.safeFloat (prices, j); - const amount = this.safeFloat (bidasks, priceAsString); + const price = this.safeNumber (prices, j); + const amount = this.safeNumber (bidasks, priceAsString); result.push ([ price, amount ]); } orderbook[side] = result; @@ -403,12 +404,12 @@ module.exports = class qtrade extends Exchange { const marketId = this.safeString (ticker, 'id_hr'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeIntegerProduct (ticker, 'last_change', 0.001); - const previous = this.safeFloat (ticker, 'day_open'); - const last = this.safeFloat (ticker, 'last'); - const day_change = this.safeFloat (ticker, 'day_change'); + const previous = this.safeNumber (ticker, 'day_open'); + const last = this.safeNumber (ticker, 'last'); + const day_change = this.safeNumber (ticker, 'day_change'); let percentage = undefined; let change = undefined; - let average = this.safeFloat (ticker, 'day_avg_price'); + let average = this.safeNumber (ticker, 'day_avg_price'); if (day_change !== undefined) { percentage = day_change * 100; if (previous !== undefined) { @@ -418,18 +419,18 @@ module.exports = class qtrade extends Exchange { if ((average === undefined) && (last !== undefined) && (previous !== undefined)) { average = this.sum (last, previous) / 2; } - const baseVolume = this.safeFloat (ticker, 'day_volume_market'); - const quoteVolume = this.safeFloat (ticker, 'day_volume_base'); + const baseVolume = this.safeNumber (ticker, 'day_volume_market'); + const quoteVolume = this.safeNumber (ticker, 'day_volume_base'); const vwap = this.vwap (baseVolume, quoteVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'day_high'), - 'low': this.safeFloat (ticker, 'day_low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'day_high'), + 'low': this.safeNumber (ticker, 'day_low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': previous, @@ -637,16 +638,16 @@ module.exports = class qtrade extends Exchange { const side = this.safeString (trade, 'side'); const marketId = this.safeString (trade, 'market_string'); const symbol = this.safeSymbol (marketId, market, '_'); - let cost = this.safeFloat2 (trade, 'base_volume', 'base_amount'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'market_amount', 'amount'); - if ((cost === undefined) && (amount !== undefined) && (price !== undefined)) { - if (price !== undefined) { - cost = price * amount; - } + let cost = this.safeNumber2 (trade, 'base_volume', 'base_amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'market_amount', 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'base_fee'); + const feeCost = this.safeNumber (trade, 'base_fee'); if (feeCost !== undefined) { const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; fee = { @@ -703,7 +704,7 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['free'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'balance'); account['used'] = 0; result[code] = account; } @@ -713,10 +714,10 @@ module.exports = class qtrade extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = (code in result) ? result[code] : this.account (); - account['used'] = this.safeFloat (balance, 'balance'); + account['used'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -845,10 +846,9 @@ module.exports = class qtrade extends Exchange { side = this.safeString (parts, 0); orderType = this.safeString (parts, 1); } - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'market_amount'); - let remaining = this.safeFloat (order, 'market_amount_remaining'); - let filled = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'market_amount'); + const remaining = this.safeNumber (order, 'market_amount_remaining'); const open = this.safeValue (order, 'open', false); const closeReason = this.safeString (order, 'close_reason'); let status = undefined; @@ -860,58 +860,21 @@ module.exports = class qtrade extends Exchange { status = 'closed'; } const marketId = this.safeString (order, 'market_string'); - const symbol = this.safeSymbol (marketId, market, '_'); + market = this.safeMarket (marketId, market, '_'); + const symbol = market['symbol']; const rawTrades = this.safeValue (order, 'trades', []); const parsedTrades = this.parseTrades (rawTrades, market, undefined, undefined, { 'order': id, 'side': side, 'type': orderType, }); - const numTrades = parsedTrades.length; - let lastTradeTimestamp = undefined; - let feeCost = undefined; - let cost = undefined; - if (numTrades > 0) { - feeCost = 0; - cost = 0; - filled = 0; - remaining = amount; - for (let i = 0; i < parsedTrades.length; i++) { - const trade = parsedTrades[i]; - feeCost = this.sum (trade['fee']['cost'], feeCost); - lastTradeTimestamp = this.safeInteger (trade, 'timestamp'); - cost = this.sum (trade['cost'], cost); - filled = this.sum (trade['amount'], filled); - remaining = Math.max (0, remaining - trade['amount']); - } - } - let fee = undefined; - if (feeCost !== undefined) { - const feeCurrencyCode = (market === undefined) ? undefined : market['quote']; - fee = { - 'currency': feeCurrencyCode, - 'cost': feeCost, - }; - } - if ((amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - let average = undefined; - if (filled !== undefined) { - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': orderType, 'timeInForce': undefined, @@ -919,15 +882,16 @@ module.exports = class qtrade extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, - 'fee': fee, - 'cost': cost, + 'fee': undefined, + 'fees': undefined, + 'cost': undefined, 'trades': parsedTrades, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -1396,7 +1360,7 @@ module.exports = class qtrade extends Exchange { const tagTo = tag; const cancelRequested = this.safeValue (transaction, 'cancel_requested'); const type = (cancelRequested === undefined) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); let status = this.parseTransactionStatus (this.safeString (transaction, 'status')); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/rightbtc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/rightbtc.js index d22048303..c1cc6bc9b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/rightbtc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/rightbtc.js @@ -185,8 +185,8 @@ module.exports = class rightbtc extends Exchange { return result; } - divideSafeFloat (x, key, divisor) { - const value = this.safeFloat (x, key); + divideSafeNumber (x, key, divisor) { + const value = this.safeNumber (x, key); if (value !== undefined) { return value / divisor; } @@ -196,12 +196,12 @@ module.exports = class rightbtc extends Exchange { parseTicker (ticker, market = undefined) { const symbol = market['symbol']; const timestamp = this.safeInteger (ticker, 'date'); - const last = this.divideSafeFloat (ticker, 'last', 1e8); - const high = this.divideSafeFloat (ticker, 'high', 1e8); - const low = this.divideSafeFloat (ticker, 'low', 1e8); - const bid = this.divideSafeFloat (ticker, 'buy', 1e8); - const ask = this.divideSafeFloat (ticker, 'sell', 1e8); - const baseVolume = this.divideSafeFloat (ticker, 'vol24h', 1e8); + const last = this.divideSafeNumber (ticker, 'last', 1e8); + const high = this.divideSafeNumber (ticker, 'high', 1e8); + const low = this.divideSafeNumber (ticker, 'low', 1e8); + const bid = this.divideSafeNumber (ticker, 'buy', 1e8); + const ask = this.divideSafeNumber (ticker, 'sell', 1e8); + const baseVolume = this.divideSafeNumber (ticker, 'vol24h', 1e8); return { 'symbol': symbol, 'timestamp': timestamp, @@ -305,9 +305,9 @@ module.exports = class rightbtc extends Exchange { let id = this.safeString (trade, 'tid'); id = this.safeString (trade, 'trade_id', id); const orderId = this.safeString (trade, 'order_id'); - const price = this.divideSafeFloat (trade, 'price', 1e8); - let amount = this.safeFloat (trade, 'amount'); - amount = this.safeFloat (trade, 'quantity', amount); + const price = this.divideSafeNumber (trade, 'price', 1e8); + let amount = this.safeNumber (trade, 'amount'); + amount = this.safeNumber (trade, 'quantity', amount); if (amount !== undefined) { amount = amount / 1e8; } @@ -404,8 +404,8 @@ module.exports = class rightbtc extends Exchange { const code = this.safeCurrencyCode (currencyId); const account = this.account (); // https://github.com/ccxt/ccxt/issues/3873 - account['free'] = this.divideSafeFloat (balance, 'balance', 1e8); - account['used'] = this.divideSafeFloat (balance, 'frozen', 1e8); + account['free'] = this.divideSafeNumber (balance, 'balance', 1e8); + account['used'] = this.divideSafeNumber (balance, 'frozen', 1e8); result[code] = account; } return this.parseBalance (result); @@ -494,30 +494,18 @@ module.exports = class rightbtc extends Exchange { } else if ('transactTime' in order) { timestamp = order['transactTime']; } - let price = this.safeFloat2 (order, 'limit', 'price'); + let price = this.safeNumber2 (order, 'limit', 'price'); if (price !== undefined) { price = price / 1e8; } - const amount = this.divideSafeFloat (order, 'quantity', 1e8); - let filled = this.divideSafeFloat (order, 'filled_quantity', 1e8); - let remaining = this.divideSafeFloat (order, 'rest', 1e8); - const cost = this.divideSafeFloat (order, 'cost', 1e8); + const amount = this.divideSafeNumber (order, 'quantity', 1e8); + const filled = this.divideSafeNumber (order, 'filled_quantity', 1e8); + const remaining = this.divideSafeNumber (order, 'rest', 1e8); + const cost = this.divideSafeNumber (order, 'cost', 1e8); // lines 483-494 should be generalized into a base class method - if (amount !== undefined) { - if (remaining === undefined) { - if (filled !== undefined) { - remaining = Math.max (0, amount - filled); - } - } - if (filled === undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - } - } - } const type = 'limit'; const side = this.safeStringLower (order, 'side'); - const feeCost = this.divideSafeFloat (order, 'min_fee', 1e8); + const feeCost = this.divideSafeNumber (order, 'min_fee', 1e8); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -525,13 +513,13 @@ module.exports = class rightbtc extends Exchange { feeCurrency = market['quote']; } fee = { - 'rate': this.safeFloat (order, 'fee'), + 'rate': this.safeNumber (order, 'fee'), 'cost': feeCost, 'currency': feeCurrency, }; } const trades = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -553,7 +541,7 @@ module.exports = class rightbtc extends Exchange { 'fee': fee, 'trades': trades, 'average': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ripio.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ripio.js index b3a30607e..8155014d3 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ripio.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/ripio.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { AuthenticationError, ExchangeError, BadSymbol, BadRequest, InvalidOrder, ArgumentsRequired, OrderNotFound, InsufficientFunds, DDoSProtection } = require ('./base/errors'); const { TICK_SIZE } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -149,12 +150,12 @@ module.exports = class ripio extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': this.safeFloat (market, 'min_amount'), - 'price': this.safeFloat (market, 'price_tick'), + 'amount': this.safeNumber (market, 'min_amount'), + 'price': this.safeNumber (market, 'price_tick'), }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), + 'min': this.safeNumber (market, 'min_amount'), 'max': undefined, }, 'price': { @@ -162,15 +163,15 @@ module.exports = class ripio extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'min_value'), + 'min': this.safeNumber (market, 'min_value'), 'max': undefined, }, }; const active = this.safeValue (market, 'enabled', true); const fees = this.safeValue (market, 'fees', []); const firstFee = this.safeValue (fees, 0, {}); - const maker = this.safeFloat (firstFee, 'maker_fee', 0.0); - const taker = this.safeFloat (firstFee, 'taker_fee', 0.0); + const maker = this.safeNumber (firstFee, 'maker_fee', 0.0); + const taker = this.safeNumber (firstFee, 'taker_fee', 0.0); result.push ({ 'id': id, 'symbol': symbol, @@ -277,18 +278,18 @@ module.exports = class ripio extends Exchange { const timestamp = this.parse8601 (this.safeString (ticker, 'created_at')); const marketId = this.safeString (ticker, 'pair'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'last_price'); - const average = this.safeFloat (ticker, 'avg'); + const last = this.safeNumber (ticker, 'last_price'); + const average = this.safeNumber (ticker, 'avg'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), - 'bidVolume': this.safeFloat (ticker, 'bid_volume'), - 'ask': this.safeFloat (ticker, 'ask'), - 'askVolume': this.safeFloat (ticker, 'ask_volume'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), + 'bidVolume': this.safeNumber (ticker, 'bid_volume'), + 'ask': this.safeNumber (ticker, 'ask'), + 'askVolume': this.safeNumber (ticker, 'ask_volume'), 'vwap': undefined, 'open': undefined, 'close': last, @@ -430,15 +431,14 @@ module.exports = class ripio extends Exchange { if (side !== undefined) { side = side.toLowerCase (); } - const price = this.safeFloat2 (trade, 'price', 'match_price'); - const amount = this.safeFloat2 (trade, 'amount', 'exchanged'); - let cost = undefined; - if ((amount !== undefined) && (price !== undefined)) { - cost = amount * price; - } + const priceString = this.safeString2 (trade, 'price', 'match_price'); + const amountString = this.safeString2 (trade, 'amount', 'exchanged'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'pair'); market = this.safeMarket (marketId, market); - const feeCost = this.safeFloat (trade, takerOrMaker + '_fee'); + const feeCost = this.safeNumber (trade, takerOrMaker + '_fee'); const orderId = this.safeString (trade, takerOrMaker); let fee = undefined; if (feeCost !== undefined) { @@ -512,11 +512,11 @@ module.exports = class ripio extends Exchange { const currencyId = this.safeString (balance, 'symbol'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -775,16 +775,16 @@ module.exports = class ripio extends Exchange { // } // const id = this.safeString (order, 'order_id'); - const amount = this.safeFloat (order, 'amount'); - let cost = this.safeFloat (order, 'notional'); + const amount = this.safeNumber (order, 'amount'); + let cost = this.safeNumber (order, 'notional'); const type = this.safeStringLower (order, 'order_type'); const priceField = (type === 'market') ? 'fill_price' : 'limit_price'; - const price = this.safeFloat (order, priceField); + const price = this.safeNumber (order, priceField); const side = this.safeStringLower (order, 'side'); const status = this.parseOrderStatus (this.safeString (order, 'status')); const timestamp = this.safeTimestamp (order, 'created_at'); let average = this.safeValue (order, 'fill_price'); - let filled = this.safeFloat (order, 'filled'); + let filled = this.safeNumber (order, 'filled'); let remaining = undefined; const fills = this.safeValue (order, 'fills'); let trades = undefined; @@ -819,7 +819,7 @@ module.exports = class ripio extends Exchange { } const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const stopPrice = this.safeFloat (order, 'stop_price'); + const stopPrice = this.safeNumber (order, 'stop_price'); return { 'id': id, 'clientOrderId': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/southxchange.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/southxchange.js index d2bdd8cec..96ca247a0 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/southxchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/southxchange.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -114,14 +115,14 @@ module.exports = class southxchange extends Exchange { const balance = response[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const deposited = this.safeFloat (balance, 'Deposited'); - const unconfirmed = this.safeFloat (balance, 'Unconfirmed'); + const deposited = this.safeString (balance, 'Deposited'); + const unconfirmed = this.safeString (balance, 'Unconfirmed'); const account = this.account (); - account['free'] = this.safeFloat (balance, 'Available'); - account['total'] = this.sum (deposited, unconfirmed); + account['free'] = this.safeString (balance, 'Available'); + account['total'] = Precise.stringAdd (deposited, unconfirmed); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -139,16 +140,16 @@ module.exports = class southxchange extends Exchange { if (market) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'Last'); + const last = this.safeNumber (ticker, 'Last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), 'high': undefined, 'low': undefined, - 'bid': this.safeFloat (ticker, 'Bid'), + 'bid': this.safeNumber (ticker, 'Bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'Ask'), + 'ask': this.safeNumber (ticker, 'Ask'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -156,9 +157,9 @@ module.exports = class southxchange extends Exchange { 'last': last, 'previousClose': undefined, 'change': undefined, - 'percentage': this.safeFloat (ticker, 'Variation24Hr'), + 'percentage': this.safeNumber (ticker, 'Variation24Hr'), 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'Volume24Hr'), + 'baseVolume': this.safeNumber (ticker, 'Volume24Hr'), 'quoteVolume': undefined, 'info': ticker, }; @@ -192,14 +193,11 @@ module.exports = class southxchange extends Exchange { parseTrade (trade, market) { const timestamp = this.safeTimestamp (trade, 'At'); - const price = this.safeFloat (trade, 'Price'); - const amount = this.safeFloat (trade, 'Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'Price'); + const amountString = this.safeString (trade, 'Amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const side = this.safeString (trade, 'Type'); let symbol = undefined; if (market !== undefined) { @@ -240,21 +238,13 @@ module.exports = class southxchange extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const timestamp = undefined; - const price = this.safeFloat (order, 'LimitPrice'); - const amount = this.safeFloat (order, 'OriginalAmount'); - const remaining = this.safeFloat (order, 'Amount'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - cost = price * amount; - if (remaining !== undefined) { - filled = amount - remaining; - } - } + const price = this.safeNumber (order, 'LimitPrice'); + const amount = this.safeNumber (order, 'OriginalAmount'); + const remaining = this.safeNumber (order, 'Amount'); const type = 'limit'; const side = this.safeStringLower (order, 'Type'); const id = this.safeString (order, 'Code'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -269,15 +259,14 @@ module.exports = class southxchange extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, - 'filled': filled, + 'cost': undefined, + 'filled': undefined, 'remaining': remaining, 'status': status, 'fee': undefined, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { @@ -410,8 +399,8 @@ module.exports = class southxchange extends Exchange { const type = this.safeString (item, 'Type'); const ledgerEntryType = this.parseLedgerEntryType (type); const code = this.safeCurrencyCode (this.safeString (item, 'CurrencyCode'), currency); - let amount = this.safeFloat (item, 'Amount'); - const after = this.safeFloat (item, 'TotalBalance'); + let amount = this.safeNumber (item, 'Amount'); + const after = this.safeNumber (item, 'TotalBalance'); let before = undefined; if (amount !== undefined) { if (after !== undefined) { @@ -582,7 +571,7 @@ module.exports = class southxchange extends Exchange { // } // const id = this.safeString (transaction, 'MovementId'); - const amount = this.safeFloat (transaction, 'Amount'); + const amount = this.safeNumber (transaction, 'Amount'); const address = this.safeString (transaction, 'Address'); const addressTo = address; const addressFrom = undefined; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/stex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/stex.js index af2e256f3..f4979c48a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/stex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/stex.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ArgumentsRequired, AuthenticationError, ExchangeError, InsufficientFunds, OrderNotFound, PermissionDenied, BadRequest, DDoSProtection } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -186,6 +187,7 @@ module.exports = class stex extends Exchange { 'BITSW': 'BITS', 'BHD': 'Bithold', 'BTH': 'Bithereum', + 'MPH': 'Chasyr Token', 'SBTC': 'SBTCT', // SiamBitcoin }, 'options': { @@ -249,7 +251,7 @@ module.exports = class stex extends Exchange { // differentiated fees for each particular method const code = this.safeCurrencyCode (this.safeString (currency, 'code')); const precision = this.safeInteger (currency, 'precision'); - const fee = this.safeFloat (currency, 'withdrawal_fee_const'); // todo: redesign + const fee = this.safeNumber (currency, 'withdrawal_fee_const'); // todo: redesign const active = this.safeValue (currency, 'active', true); result[code] = { 'id': id, @@ -266,11 +268,11 @@ module.exports = class stex extends Exchange { 'price': { 'min': Math.pow (10, -precision), 'max': undefined }, 'cost': { 'min': undefined, 'max': undefined }, 'deposit': { - 'min': this.safeFloat (currency, 'minimum_deposit_amount'), + 'min': this.safeNumber (currency, 'minimum_deposit_amount'), 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minimum_withdrawal_amount'), + 'min': this.safeNumber (currency, 'minimum_withdrawal_amount'), 'max': undefined, }, }, @@ -331,11 +333,11 @@ module.exports = class stex extends Exchange { 'price': this.safeInteger (market, 'market_precision'), }; const active = this.safeValue (market, 'active'); - const minBuyPrice = this.safeFloat (market, 'min_buy_price'); - const minSellPrice = this.safeFloat (market, 'min_sell_price'); + const minBuyPrice = this.safeNumber (market, 'min_buy_price'); + const minSellPrice = this.safeNumber (market, 'min_sell_price'); const minPrice = Math.max (minBuyPrice, minSellPrice); - const buyFee = this.safeFloat (market, 'buy_fee_percent') / 100; - const sellFee = this.safeFloat (market, 'sell_fee_percent') / 100; + const buyFee = this.safeNumber (market, 'buy_fee_percent') / 100; + const sellFee = this.safeNumber (market, 'sell_fee_percent') / 100; const fee = Math.max (buyFee, sellFee); result.push ({ 'id': id, @@ -354,7 +356,7 @@ module.exports = class stex extends Exchange { 'precision': precision, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'min_order_amount'), + 'min': this.safeNumber (market, 'min_order_amount'), 'max': undefined, }, 'price': { 'min': minPrice, 'max': undefined }, @@ -518,8 +520,8 @@ module.exports = class stex extends Exchange { const timestamp = this.safeInteger (ticker, 'timestamp'); const marketId = this.safeString2 (ticker, 'id', 'symbol'); const symbol = this.safeSymbol (marketId, market, '_'); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let percentage = undefined; if (last !== undefined) { @@ -532,11 +534,11 @@ module.exports = class stex extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -546,20 +548,12 @@ module.exports = class stex extends Exchange { 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volumeQuote'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volumeQuote'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } - parseTickers (tickers, symbols = undefined) { - const result = []; - for (let i = 0; i < tickers.length; i++) { - result.push (this.parseTicker (tickers[i])); - } - return this.filterByArray (result, 'symbol', symbols); - } - async fetchTickers (symbols = undefined, params = {}) { await this.loadMarkets (); const response = await this.publicGetTicker (params); @@ -625,11 +619,11 @@ module.exports = class stex extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -704,12 +698,11 @@ module.exports = class stex extends Exchange { // const id = this.safeString (trade, 'id'); const timestamp = this.safeTimestamp (trade, 'timestamp'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let symbol = undefined; if ((symbol === undefined) && (market !== undefined)) { symbol = market['symbol']; @@ -822,11 +815,11 @@ module.exports = class stex extends Exchange { const balance = balances[i]; const code = this.safeCurrencyCode (this.safeString (balance, 'currency_id')); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'frozen_balance'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'frozen_balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOrderStatus (status) { @@ -885,9 +878,9 @@ module.exports = class stex extends Exchange { const marketId = this.safeString2 (order, 'currency_pair_id', 'currency_pair_name'); const symbol = this.safeSymbol (marketId, market, '_'); const timestamp = this.safeTimestamp (order, 'timestamp'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'initial_amount'); - const filled = this.safeFloat (order, 'processed_amount'); + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'initial_amount'); + const filled = this.safeNumber (order, 'processed_amount'); let remaining = undefined; let cost = undefined; if (filled !== undefined) { @@ -917,7 +910,7 @@ module.exports = class stex extends Exchange { 'order': id, }); } - const stopPrice = this.safeFloat (order, 'trigger_price'); + const stopPrice = this.safeNumber (order, 'trigger_price'); const result = { 'info': order, 'id': id, @@ -948,7 +941,7 @@ module.exports = class stex extends Exchange { if (numFees > 0) { result['fees'] = []; for (let i = 0; i < fees.length; i++) { - const feeCost = this.safeFloat (fees[i], 'amount'); + const feeCost = this.safeNumber (fees[i], 'amount'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (fees[i], 'currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1532,13 +1525,13 @@ module.exports = class stex extends Exchange { code = currency['code']; } const type = ('deposit_status_id' in transaction) ? 'deposit' : 'withdrawal'; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeStringLower (transaction, 'status')); const timestamp = this.safeTimestamp2 (transaction, 'timestamp', 'created_ts'); const updated = this.safeTimestamp (transaction, 'updated_ts'); const txid = this.safeString (transaction, 'txid'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (transaction, 'fee_currency_id', 'deposit_fee_currency_id'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -1774,8 +1767,8 @@ module.exports = class stex extends Exchange { for (let i = 0; i < data.length; i++) { const id = this.safeString (data[i], 'id'); const code = this.safeCurrencyCode (id); - withdrawFees[code] = this.safeFloat (data[i], 'withdrawal_fee_const'); - depositFees[code] = this.safeFloat (data[i], 'deposit_fee_const'); + withdrawFees[code] = this.safeNumber (data[i], 'withdrawal_fee_const'); + depositFees[code] = this.safeNumber (data[i], 'deposit_fee_const'); } return { 'withdraw': withdrawFees, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/Exchange/test.ticker.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/Exchange/test.ticker.js index 7d91ea0ba..201873531 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/Exchange/test.ticker.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/Exchange/test.ticker.js @@ -74,6 +74,7 @@ module.exports = (exchange, ticker, method, symbol) => { if (![ + 'bybit', 'coinmarketcap', 'xbtce', 'coss', diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/functions/test.number.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/functions/test.number.js index f2e5eedd3..23e9f7926 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/functions/test.number.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/functions/test.number.js @@ -1,6 +1,7 @@ 'use strict' const { numberToString, decimalToPrecision, ROUND, TRUNCATE, DECIMAL_PLACES, TICK_SIZE, PAD_WITH_ZERO, SIGNIFICANT_DIGITS, toWei, fromWei } = require ('../../../../ccxt'); +const Precise = require ('../../../base/Precise') const assert = require ('assert'); // ---------------------------------------------------------------------------- @@ -287,3 +288,58 @@ assert (decimalToPrecision ('1602000000000000000000', TRUNCATE, 3, SIGNIFICANT_D // throws (() => // decimalToPrecision ('0.01', TRUNCATE, -1, TICK_SIZE), // "TICK_SIZE cant be used with negative numPrecisionDigits") + +// ---------------------------------------------------------------------------- + +const w = '-1.123e-6'; +const x = '0.00000002'; +const y = '69696900000'; +const z = '0'; +const a = '1e8'; + +assert (Precise.stringMul (x, y) === '1393.938'); +assert (Precise.stringMul (y, x) === '1393.938'); +assert (Precise.stringAdd (x, y) === '69696900000.00000002'); +assert (Precise.stringAdd (y, x) === '69696900000.00000002'); +assert (Precise.stringSub (x, y) === '-69696899999.99999998'); +assert (Precise.stringSub (y, x) === '69696899999.99999998'); +assert (Precise.stringDiv (x, y, 1) === '0'); +assert (Precise.stringDiv (x, y) === '0'); +assert (Precise.stringDiv (x, y, 19) === '0.0000000000000000002'); +assert (Precise.stringDiv (x, y, 20) === '0.00000000000000000028'); +assert (Precise.stringDiv (x, y, 21) === '0.000000000000000000286'); +assert (Precise.stringDiv (x, y, 22) === '0.0000000000000000002869'); +assert (Precise.stringDiv (y, x) === '3484845000000000000'); + +assert (Precise.stringMul (x, w) === '-0.00000000000002246'); +assert (Precise.stringMul (w, x) === '-0.00000000000002246'); +assert (Precise.stringAdd (x, w) === '-0.000001103'); +assert (Precise.stringAdd (w, x) === '-0.000001103'); +assert (Precise.stringSub (x, w) === '0.000001143'); +assert (Precise.stringSub (w, x) === '-0.000001143'); +assert (Precise.stringDiv (x, w) === '-0.017809439002671415'); +assert (Precise.stringDiv (w, x) === '-56.15'); + +assert (Precise.stringMul (z, w) === '0'); +assert (Precise.stringMul (z, x) === '0'); +assert (Precise.stringMul (z, y) === '0'); +assert (Precise.stringMul (w, z) === '0'); +assert (Precise.stringMul (x, z) === '0'); +assert (Precise.stringMul (y, z) === '0'); +assert (Precise.stringAdd (z, w) === '-0.000001123'); +assert (Precise.stringAdd (z, x) === '0.00000002'); +assert (Precise.stringAdd (z, y) === '69696900000'); +assert (Precise.stringAdd (w, z) === '-0.000001123'); +assert (Precise.stringAdd (x, z) === '0.00000002'); +assert (Precise.stringAdd (y, z) === '69696900000'); + +assert (Precise.stringMul (x, a) === '2'); +assert (Precise.stringMul (a, x) === '2'); +assert (Precise.stringMul (y, a) === '6969690000000000000'); +assert (Precise.stringMul (a, y) === '6969690000000000000'); +assert (Precise.stringDiv (y, a) === '696.969'); +assert (Precise.stringDiv (y, a, -1) === '690'); +assert (Precise.stringDiv (y, a, 0) === '696'); +assert (Precise.stringDiv (y, a, 1) === '696.9'); +assert (Precise.stringDiv (y, a, 2) === '696.96'); +assert (Precise.stringDiv (a, y) === '0.001434784043479695'); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/test.base.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/test.base.js index 0eb7fcffa..6068fa10a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/test.base.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/test/base/test.base.js @@ -167,7 +167,7 @@ describe ('ccxt base code', () => { const exchange = new Exchange ({ 'id': 'mock' }) const propsSeenBefore = index ( - ["isNode", "empty", "keys", "values", "extend", "clone", "index", "ordered", "unique", "keysort", "indexBy", "groupBy", "filterBy", "sortBy", "flatten", "pluck", "omit", "sum", "deepExtend", "uuid", "unCamelCase", "capitalize", "isNumber", "isArray", "isObject", "isString", "isStringCoercible", "isDictionary", "hasProps", "prop", "asFloat", "asInteger", "safeFloat", "safeInteger", "safeValue", "safeString", "decimal", "toFixed", "truncate", "truncateToString", "precisionFromString", "stringToBinary", "stringToBase64", "base64ToBinary", "base64ToString", "binaryToString", "binaryConcat", "urlencode", "rawencode", "urlencodeBase64", "hash", "hmac", "jwt", "time", "setTimeout_safe", "sleep", "TimedOut", "timeout", "throttle", "json", "unjson", "aggregate", "is_node", "index_by", "group_by", "filter_by", "sort_by", "deep_extend", "un_camel_case", "is_number", "is_array", "is_object", "is_string", "is_string_coercible", "is_dictionary", "has_props", "as_float", "as_integer", "safe_float", "safe_integer", "safe_value", "safe_string", "to_fixed", "truncate_to_string", "precision_from_string", "string_to_binary", "string_to_base64", "utf16To_base64", "base64To_binary", "base64To_string", "binary_to_string", "binary_concat", "urlencode_base64", "set_timeout_safe", "Timed_out", "encode", "decode", "userAgents", "headers", "proxy", "origin", "iso8601", "parse8601", "milliseconds", "microseconds", "seconds", "id", "enableRateLimit", "rateLimit", "parseJsonResponse", "substituteCommonCurrencyCodes", "parseBalanceFromOpenOrders", "verbose", "debug", "journal", "userAgent", "twofa", "timeframes", "hasPublicAPI", "hasPrivateAPI", "hasCORS", "hasDeposit", "hasFetchBalance", "hasFetchClosedOrders", "hasFetchCurrencies", "hasFetchMyTrades", "hasFetchOHLCV", "hasFetchOpenOrders", "hasFetchOrder", "hasFetchOrderBook", "hasFetchOrders", "hasFetchTicker", "hasFetchTickers", "hasFetchBidsAsks", "hasFetchTrades", "hasWithdraw", "hasCreateOrder", "hasCancelOrder", "apiKey", "secret", "uid", "login", "password", "requiredCredentials", "exceptions", "balance", "orderbooks", "tickers", "fees", "orders", "trades", "currencies", "last_http_response", "last_json_response", "arrayConcat", "market_id", "market_ids", "array_concat", "implode_params", "extract_params", "fetch_balance", "fetch_free_balance", "fetch_used_balance","fetch_total_balance", "fetch_l2_order_book", "fetch_order_book", "fetch_bids_asks", "fetch_tickers", "fetch_ticker", "fetch_trades", "fetch_order", "fetch_orders", "fetch_open_orders", "fetch_closed_orders", "fetch_order_status", "fetch_markets", "load_markets", "set_markets", "parse_balance", "parse_bid_ask", "parse_bids_asks", "parse_order_book", "parse_trades", "parse_orders", "parse_ohlcv", "parse_ohlcvs", "edit_limit_buy_order", "edit_limit_sell_order", "edit_limit_order", "edit_order", "create_limit_buy_order", "create_limit_sell_order", "create_market_buy_order", "create_market_sell_order", "create_order", "calculate_fee", "common_currency_code", "price_to_precision", "amount_to_precision", "amount_to_string", "fee_to_precision", "cost_to_precision", "constructor", "getMarket", "describe", "defaults", "nonce", "encodeURIComponent", "checkRequiredCredentials", "initRestRateLimiter", "defineRestApi", "fetch", "fetch2", "request", "handleErrors", "defaultErrorHandler", "handleRestErrors", "handleRestResponse", "setMarkets", "loadMarkets", "fetchBidsAsks", "fetchTickers", "fetchOrder", "fetchOrders", "fetchOpenOrders", "fetchClosedOrders", "fetchMyTrades", "fetchCurrencies", "fetchMarkets", "fetchOrderStatus", "account", "commonCurrencyCode", "currency", "market", "marketId", "marketIds", "symbol", "extractParams", "implodeParams", "url", "parseBidAsk", "parseBidsAsks", "fetchL2OrderBook", "parseOrderBook", "parseBalance", "fetchPartialBalance", "fetchFreeBalance", "fetchUsedBalance", "fetchTotalBalance", "filterBySinceLimit", "parseTrades", "parseOrders", "filterOrdersBySymbol", "parseOHLCV", "parseOHLCVs", "editLimitBuyOrder", "editLimitSellOrder", "editLimitOrder", "editOrder", "createLimitBuyOrder", "createLimitSellOrder", "createMarketBuyOrder", "createMarketSellOrder", "costToPrecision", "priceToPrecision", "amountToPrecision", "amountToLots", "feeToPrecision", "calculateFee", "Ymd", "YmdHMS"] + ["isNode", "empty", "keys", "values", "extend", "clone", "index", "ordered", "unique", "keysort", "indexBy", "groupBy", "filterBy", "sortBy", "flatten", "pluck", "omit", "sum", "deepExtend", "uuid", "unCamelCase", "capitalize", "isNumber", "isArray", "isObject", "isString", "isStringCoercible", "isDictionary", "hasProps", "prop", "asFloat", "asInteger", "safeFloat", "safeInteger", "safeValue", "safeString", "decimal", "toFixed", "truncate", "truncateToString", "precisionFromString", "stringToBinary", "stringToBase64", "base64ToBinary", "base64ToString", "binaryToString", "binaryConcat", "urlencode", "rawencode", "urlencodeBase64", "hash", "hmac", "jwt", "time", "setTimeout_safe", "sleep", "TimedOut", "timeout", "throttle", "json", "aggregate", "is_node", "index_by", "group_by", "filter_by", "sort_by", "deep_extend", "un_camel_case", "is_number", "is_array", "is_object", "is_string", "is_string_coercible", "is_dictionary", "has_props", "as_float", "as_integer", "safe_float", "safe_integer", "safe_value", "safe_string", "to_fixed", "truncate_to_string", "precision_from_string", "string_to_binary", "string_to_base64", "utf16To_base64", "base64To_binary", "base64To_string", "binary_to_string", "binary_concat", "urlencode_base64", "set_timeout_safe", "Timed_out", "encode", "decode", "userAgents", "headers", "proxy", "origin", "iso8601", "parse8601", "milliseconds", "microseconds", "seconds", "id", "enableRateLimit", "rateLimit", "parseJsonResponse", "substituteCommonCurrencyCodes", "parseBalanceFromOpenOrders", "verbose", "debug", "journal", "userAgent", "twofa", "timeframes", "hasPublicAPI", "hasPrivateAPI", "hasCORS", "hasDeposit", "hasFetchBalance", "hasFetchClosedOrders", "hasFetchCurrencies", "hasFetchMyTrades", "hasFetchOHLCV", "hasFetchOpenOrders", "hasFetchOrder", "hasFetchOrderBook", "hasFetchOrders", "hasFetchTicker", "hasFetchTickers", "hasFetchBidsAsks", "hasFetchTrades", "hasWithdraw", "hasCreateOrder", "hasCancelOrder", "apiKey", "secret", "uid", "login", "password", "requiredCredentials", "exceptions", "balance", "orderbooks", "tickers", "fees", "orders", "trades", "currencies", "last_http_response", "last_json_response", "arrayConcat", "market_id", "market_ids", "array_concat", "implode_params", "extract_params", "fetch_balance", "fetch_free_balance", "fetch_used_balance","fetch_total_balance", "fetch_l2_order_book", "fetch_order_book", "fetch_bids_asks", "fetch_tickers", "fetch_ticker", "fetch_trades", "fetch_order", "fetch_orders", "fetch_open_orders", "fetch_closed_orders", "fetch_order_status", "fetch_markets", "load_markets", "set_markets", "parse_balance", "parse_bid_ask", "parse_bids_asks", "parse_order_book", "parse_trades", "parse_orders", "parse_ohlcv", "parse_ohlcvs", "edit_limit_buy_order", "edit_limit_sell_order", "edit_limit_order", "edit_order", "create_limit_buy_order", "create_limit_sell_order", "create_market_buy_order", "create_market_sell_order", "create_order", "calculate_fee", "common_currency_code", "price_to_precision", "amount_to_precision", "amount_to_string", "fee_to_precision", "cost_to_precision", "constructor", "getMarket", "describe", "defaults", "nonce", "encodeURIComponent", "checkRequiredCredentials", "initRestRateLimiter", "defineRestApi", "fetch", "fetch2", "request", "handleErrors", "defaultErrorHandler", "handleRestErrors", "handleRestResponse", "setMarkets", "loadMarkets", "fetchBidsAsks", "fetchTickers", "fetchOrder", "fetchOrders", "fetchOpenOrders", "fetchClosedOrders", "fetchMyTrades", "fetchCurrencies", "fetchMarkets", "fetchOrderStatus", "account", "commonCurrencyCode", "currency", "market", "marketId", "marketIds", "symbol", "extractParams", "implodeParams", "url", "parseBidAsk", "parseBidsAsks", "fetchL2OrderBook", "parseOrderBook", "parseBalance", "fetchPartialBalance", "fetchFreeBalance", "fetchUsedBalance", "fetchTotalBalance", "filterBySinceLimit", "parseTrades", "parseOrders", "filterOrdersBySymbol", "parseOHLCV", "parseOHLCVs", "editLimitBuyOrder", "editLimitSellOrder", "editLimitOrder", "editOrder", "createLimitBuyOrder", "createLimitSellOrder", "createMarketBuyOrder", "createMarketSellOrder", "costToPrecision", "priceToPrecision", "amountToPrecision", "amountToLots", "feeToPrecision", "calculateFee", "Ymd", "YmdHMS"] ) const props = index (Object.getOwnPropertyNames (exchange).concat ( diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/therock.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/therock.js index 12217e2b2..88ccb385d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/therock.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/therock.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, OrderNotFound, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -171,8 +172,8 @@ module.exports = class therock extends Exchange { const base = this.safeCurrencyCode (baseId); const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; - const buy_fee = this.safeFloat (market, 'buy_fee'); - const sell_fee = this.safeFloat (market, 'sell_fee'); + const buy_fee = this.safeNumber (market, 'buy_fee'); + const sell_fee = this.safeNumber (market, 'sell_fee'); let taker = Math.max (buy_fee, sell_fee); taker = taker / 100; const maker = taker; @@ -193,11 +194,11 @@ module.exports = class therock extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minimum_quantity_offer'), + 'min': this.safeNumber (market, 'minimum_quantity_offer'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'minimum_price_offer'), + 'min': this.safeNumber (market, 'minimum_price_offer'), 'max': undefined, }, 'cost': { @@ -221,11 +222,11 @@ module.exports = class therock extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'trading_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'trading_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -244,27 +245,27 @@ module.exports = class therock extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, - 'previousClose': this.safeFloat (ticker, 'close'), // previous day close, if any + 'previousClose': this.safeNumber (ticker, 'close'), // previous day close, if any 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume_traded'), - 'quoteVolume': this.safeFloat (ticker, 'volume'), + 'baseVolume': this.safeNumber (ticker, 'volume_traded'), + 'quoteVolume': this.safeNumber (ticker, 'volume'), 'info': ticker, }; } @@ -339,14 +340,11 @@ module.exports = class therock extends Exchange { const id = this.safeString (trade, 'id'); const orderId = this.safeString (trade, 'order_id'); const side = this.safeString (trade, 'side'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; let feeCost = undefined; const transactions = this.safeValue (trade, 'transactions', []); @@ -356,7 +354,7 @@ module.exports = class therock extends Exchange { if (feeCost === undefined) { feeCost = 0; } - feeCost = this.sum (feeCost, this.safeFloat (feeTransactions[i], 'price')); + feeCost = this.sum (feeCost, this.safeNumber (feeTransactions[i], 'price')); } if (feeCost !== undefined) { fee = { @@ -511,7 +509,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (item, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (item, 'price'); + const amount = this.safeNumber (item, 'price'); const timestamp = this.parse8601 (this.safeString (item, 'date')); const status = 'ok'; return { @@ -743,7 +741,7 @@ module.exports = class therock extends Exchange { } const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); - const amount = this.safeFloat (transaction, 'price'); + const amount = this.safeNumber (transaction, 'price'); const timestamp = this.parse8601 (this.safeString (transaction, 'date')); const status = 'ok'; // todo parse tags @@ -918,15 +916,15 @@ module.exports = class therock extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'date')); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'side'); - const amount = this.safeFloat (order, 'amount'); - const remaining = this.safeFloat (order, 'amount_unfilled'); + const amount = this.safeNumber (order, 'amount'); + const remaining = this.safeNumber (order, 'amount_unfilled'); let filled = undefined; if (amount !== undefined) { if (remaining !== undefined) { filled = amount - remaining; } } - const price = this.safeFloat (order, 'price'); + const price = this.safeNumber (order, 'price'); let trades = this.safeValue (order, 'trades'); let cost = undefined; let average = undefined; @@ -953,7 +951,7 @@ module.exports = class therock extends Exchange { cost = 0; } } - const stopPrice = this.safeFloat (order, 'conditional_price'); + const stopPrice = this.safeNumber (order, 'conditional_price'); return { 'id': id, 'clientOrderId': undefined, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidebit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidebit.js index acf65de25..05efc673a 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidebit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidebit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, InsufficientFunds, OrderNotFound, ArgumentsRequired } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -182,11 +183,11 @@ module.exports = class tidebit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -211,15 +212,15 @@ module.exports = class tidebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), - 'ask': this.safeFloat (ticker, 'sell'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), + 'ask': this.safeNumber (ticker, 'sell'), 'bidVolume': undefined, 'askVolume': undefined, 'vwap': undefined, @@ -230,7 +231,7 @@ module.exports = class tidebit extends Exchange { 'percentage': undefined, 'previousClose': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; @@ -264,9 +265,14 @@ module.exports = class tidebit extends Exchange { parseTrade (trade, market = undefined) { const timestamp = this.parse8601 (this.safeString (trade, 'created_at')); const id = this.safeString (trade, 'id'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'volume'); - const cost = this.safeFloat (trade, 'funds'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber (trade, 'funds'); + if (cost === undefined) { + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + } let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -311,11 +317,11 @@ module.exports = class tidebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), - this.safeFloat (ohlcv, 1), - this.safeFloat (ohlcv, 2), - this.safeFloat (ohlcv, 3), - this.safeFloat (ohlcv, 4), - this.safeFloat (ohlcv, 5), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), ]; } @@ -401,18 +407,12 @@ module.exports = class tidebit extends Exchange { const id = this.safeString (order, 'id'); const type = this.safeString (order, 'ord_type'); const side = this.safeString (order, 'side'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const filled = this.safeFloat (order, 'executed_volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - let cost = undefined; - if (price !== undefined) { - if (filled !== undefined) { - cost = price * filled; - } - } - const average = this.safeFloat (order, 'avg_price'); - return { + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const filled = this.safeNumber (order, 'executed_volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const average = this.safeNumber (order, 'avg_price'); + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -429,12 +429,12 @@ module.exports = class tidebit extends Exchange { 'amount': amount, 'filled': filled, 'remaining': remaining, - 'cost': cost, + 'cost': undefined, 'trades': undefined, 'fee': undefined, 'info': order, 'average': average, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidex.js index 0988a4ad1..65c0e6d9e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/tidex.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class tidex extends Exchange { describe () { @@ -83,6 +84,7 @@ module.exports = class tidex extends Exchange { }, 'fees': { 'trading': { + 'feeSide': 'get', 'tierBased': false, 'percentage': true, 'taker': 0.1 / 100, @@ -127,19 +129,48 @@ module.exports = class tidex extends Exchange { async fetchCurrencies (params = {}) { const response = await this.webGetCurrency (params); + // + // [ + // { + // "id":2, + // "symbol":"BTC", + // "type":2, + // "name":"Bitcoin", + // "amountPoint":8, + // "depositEnable":true, + // "depositMinAmount":0.0005, + // "withdrawEnable":true, + // "withdrawFee":0.0004, + // "withdrawMinAmount":0.0005, + // "settings":{ + // "Blockchain":"https://blockchair.com/bitcoin/", + // "TxUrl":"https://blockchair.com/bitcoin/transaction/{0}", + // "AddrUrl":"https://blockchair.com/bitcoin/address/{0}", + // "ConfirmationCount":3, + // "NeedMemo":false + // }, + // "visible":true, + // "isDelisted":false + // } + // ] + // const result = {}; for (let i = 0; i < response.length; i++) { const currency = response[i]; const id = this.safeString (currency, 'symbol'); - const precision = currency['amountPoint']; + const precision = this.safeInteger (currency, 'amountPoint'); const code = this.safeCurrencyCode (id); - let active = currency['visible'] === true; - const canWithdraw = currency['withdrawEnable'] === true; - const canDeposit = currency['depositEnable'] === true; + const visible = this.safeValue (currency, 'visible'); + let active = visible === true; + const withdrawEnable = this.safeValue (currency, 'withdrawEnable'); + const depositEnable = this.safeValue (currency, 'depositEnable'); + const canWithdraw = withdrawEnable === true; + const canDeposit = depositEnable === true; if (!canWithdraw || !canDeposit) { active = false; } const name = this.safeString (currency, 'name'); + const fee = this.safeNumber (currency, 'withdrawFee'); result[code] = { 'id': id, 'code': code, @@ -149,7 +180,7 @@ module.exports = class tidex extends Exchange { 'funding': { 'withdraw': { 'active': canWithdraw, - 'fee': currency['withdrawFee'], + 'fee': fee, }, 'deposit': { 'active': canDeposit, @@ -170,11 +201,11 @@ module.exports = class tidex extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'withdrawMinAmount'), + 'min': this.safeNumber (currency, 'withdrawMinAmount'), 'max': undefined, }, 'deposit': { - 'min': this.safeFloat (currency, 'depositMinAmount'), + 'min': this.safeNumber (currency, 'depositMinAmount'), 'max': undefined, }, }, @@ -184,26 +215,25 @@ module.exports = class tidex extends Exchange { return result; } - calculateFee (symbol, type, side, amount, price, takerOrMaker = 'taker', params = {}) { - const market = this.markets[symbol]; - let key = 'quote'; - const rate = market[takerOrMaker]; - let cost = parseFloat (this.costToPrecision (symbol, amount * rate)); - if (side === 'sell') { - cost *= price; - } else { - key = 'base'; - } - return { - 'type': takerOrMaker, - 'currency': market[key], - 'rate': rate, - 'cost': cost, - }; - } - async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615861869, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":3.0, + // "min_amount":0.001, + // "max_amount":1000000.0, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.1, + // }, + // }, + // } + // const markets = response['pairs']; const keys = Object.keys (markets); const result = []; @@ -220,19 +250,20 @@ module.exports = class tidex extends Exchange { }; const limits = { 'amount': { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }, 'price': { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }, 'cost': { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }, }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -241,7 +272,7 @@ module.exports = class tidex extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -262,11 +293,11 @@ module.exports = class tidex extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (funds, currencyId, {}); const account = this.account (); - account['free'] = this.safeFloat (balance, 'value'); - account['used'] = this.safeFloat (balance, 'inOrders'); + account['free'] = this.safeString (balance, 'value'); + account['used'] = this.safeString (balance, 'inOrders'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -338,16 +369,16 @@ module.exports = class tidex extends Exchange { timestamp = undefined; } } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -356,9 +387,9 @@ module.exports = class tidex extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -406,16 +437,19 @@ module.exports = class tidex extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const orderId = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const type = 'limit'; // all trades are still limit trades let takerOrMaker = undefined; let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -434,12 +468,6 @@ module.exports = class tidex extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, takerOrMaker); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': orderId, @@ -495,17 +523,18 @@ module.exports = class tidex extends Exchange { let status = 'open'; let filled = 0.0; let remaining = amount; - if ('return' in response) { - id = this.safeString (response['return'], 'order_id'); + const returnResult = this.safeValue (response, 'return'); + if (returnResult !== undefined) { + id = this.safeString (returnResult, 'order_id'); if (id === '0') { - id = this.safeString (response['return'], 'init_order_id'); + id = this.safeString (returnResult, 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (returnResult, 'received', filled); + remaining = this.safeNumber (returnResult, 'remains', amount); } const timestamp = this.milliseconds (); - return { + return this.safeOrder ({ 'id': id, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), @@ -515,7 +544,7 @@ module.exports = class tidex extends Exchange { 'type': type, 'side': side, 'price': price, - 'cost': price * filled, + 'cost': undefined, 'amount': amount, 'remaining': remaining, 'filled': filled, @@ -525,7 +554,7 @@ module.exports = class tidex extends Exchange { 'clientOrderId': undefined, 'average': undefined, 'trades': undefined, - }; + }); } async cancelOrder (id, symbol = undefined, params = {}) { @@ -554,23 +583,15 @@ module.exports = class tidex extends Exchange { const symbol = this.safeSymbol (marketId, market); let remaining = undefined; let amount = undefined; - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; + const price = this.safeNumber (order, 'rate'); if ('start_amount' in order) { - amount = this.safeFloat (order, 'start_amount'); - remaining = this.safeFloat (order, 'amount'); + amount = this.safeNumber (order, 'start_amount'); + remaining = this.safeNumber (order, 'amount'); } else { - remaining = this.safeFloat (order, 'amount'); - } - if (amount !== undefined) { - if (remaining !== undefined) { - filled = amount - remaining; - cost = price * filled; - } + remaining = this.safeNumber (order, 'amount'); } const fee = undefined; - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -584,15 +605,15 @@ module.exports = class tidex extends Exchange { 'side': this.safeString (order, 'type'), 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/timex.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/timex.js index 4c71ac4ff..227f97553 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/timex.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/timex.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, PermissionDenied, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, RateLimitExceeded, NotSupported, BadRequest, AuthenticationError } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class timex extends Exchange { describe () { @@ -450,11 +451,11 @@ module.exports = class timex extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['total'] = this.safeFloat (balance, 'totalBalance'); - account['used'] = this.safeFloat (balance, 'lockedBalance'); + account['total'] = this.safeString (balance, 'totalBalance'); + account['used'] = this.safeString (balance, 'lockedBalance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -815,7 +816,7 @@ module.exports = class timex extends Exchange { const result = this.safeValue (response, 0, {}); return { 'info': response, - 'maker': this.safeFloat (result, 'fee'), + 'maker': this.safeNumber (result, 'fee'), 'taker': undefined, }; } @@ -852,18 +853,18 @@ module.exports = class timex extends Exchange { 'amount': this.precisionFromString (this.safeString (market, 'quantityIncrement')), 'price': this.precisionFromString (this.safeString (market, 'tickSize')), }; - const amountIncrement = this.safeFloat (market, 'quantityIncrement'); - const minBase = this.safeFloat (market, 'baseMinSize'); + const amountIncrement = this.safeNumber (market, 'quantityIncrement'); + const minBase = this.safeNumber (market, 'baseMinSize'); const minAmount = Math.max (amountIncrement, minBase); - const priceIncrement = this.safeFloat (market, 'tickSize'); - const minCost = this.safeFloat (market, 'quoteMinSize'); + const priceIncrement = this.safeNumber (market, 'tickSize'); + const minCost = this.safeNumber (market, 'quoteMinSize'); const limits = { 'amount': { 'min': minAmount, 'max': undefined }, 'price': { 'min': priceIncrement, 'max': undefined }, 'cost': { 'min': Math.max (minCost, minAmount * priceIncrement), 'max': undefined }, }; - const taker = this.safeFloat (market, 'takerFee'); - const maker = this.safeFloat (market, 'makerFee'); + const taker = this.safeNumber (market, 'takerFee'); + const maker = this.safeNumber (market, 'makerFee'); return { 'id': id, 'symbol': symbol, @@ -924,7 +925,7 @@ module.exports = class timex extends Exchange { const name = this.safeString (currency, 'name'); const precision = this.safeInteger (currency, 'decimals'); const active = this.safeValue (currency, 'active'); - // const fee = this.safeFloat (currency, 'withdrawalFee'); + // const fee = this.safeNumber (currency, 'withdrawalFee'); const feeString = this.safeString (currency, 'withdrawalFee'); const tradeDecimals = this.safeInteger (currency, 'tradeDecimals'); let fee = undefined; @@ -961,14 +962,6 @@ module.exports = class timex extends Exchange { }; } - parseTickers (rawTickers, symbols = undefined) { - const tickers = []; - for (let i = 0; i < rawTickers.length; i++) { - tickers.push (this.parseTicker (rawTickers[i])); - } - return this.filterByArray (tickers, 'symbol', symbols); - } - parseTicker (ticker, market = undefined) { // // { @@ -988,8 +981,8 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (ticker, 'market'); const symbol = this.safeSymbol (marketId, market, '/'); const timestamp = this.parse8601 (this.safeString (ticker, 'timestamp')); - const last = this.safeFloat (ticker, 'last'); - const open = this.safeFloat (ticker, 'open'); + const last = this.safeNumber (ticker, 'last'); + const open = this.safeNumber (ticker, 'open'); let change = undefined; let average = undefined; if (last !== undefined && open !== undefined) { @@ -1005,11 +998,11 @@ module.exports = class timex extends Exchange { 'info': ticker, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -1019,8 +1012,8 @@ module.exports = class timex extends Exchange { 'change': change, 'percentage': percentage, 'average': average, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'volumeQuote'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'volumeQuote'), }; } @@ -1039,23 +1032,27 @@ module.exports = class timex extends Exchange { // fetchMyTrades, fetchOrder (private) // // { - // "fee": "0.3", - // "id": 100, - // "makerOrTaker": "MAKER", - // "makerOrderId": "string", - // "price": "0.017", - // "quantity": "0.3", + // "id": "7613414", + // "makerOrderId": "0x8420af060722f560098f786a2894d4358079b6ea5d14b395969ed77bc87a623a", + // "takerOrderId": "0x1235ef158a361815b54c9988b6241c85aedcbc1fe81caf8df8587d5ab0373d1a", + // "symbol": "LTCUSDT", // "side": "BUY", - // "symbol": "TIMEETH", - // "takerOrderId": "string", - // "timestamp": "2019-12-08T04:54:11.171Z" - // } + // "quantity": "0.2", + // "fee": "0.22685", + // "feeToken": "USDT", + // "price": "226.85", + // "makerOrTaker": "TAKER", + // "timestamp": "2021-04-09T15:39:45.608" + // } // const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (trade, 'timestamp')); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'quantity'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const id = this.safeString (trade, 'id'); const side = this.safeStringLower2 (trade, 'direction', 'side'); const takerOrMaker = this.safeStringLower (trade, 'makerOrTaker'); @@ -1064,18 +1061,14 @@ module.exports = class timex extends Exchange { orderId = this.safeString (trade, takerOrMaker + 'OrderId'); } let fee = undefined; - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); + const feeCurrency = this.safeCurrencyCode (this.safeString (trade, 'feeToken')); if (feeCost !== undefined) { - const feeCurrency = (market === undefined) ? undefined : market['quote']; fee = { 'cost': feeCost, 'currency': feeCurrency, }; } - let cost = undefined; - if ((price !== undefined) && (amount !== undefined)) { - cost = this.costToPrecision (symbol, amount * price); - } return { 'info': trade, 'id': id, @@ -1107,11 +1100,11 @@ module.exports = class timex extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'timestamp')), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -1142,14 +1135,12 @@ module.exports = class timex extends Exchange { const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); const timestamp = this.parse8601 (this.safeString (order, 'createdAt')); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'quantity'); - const filled = this.safeFloat (order, 'filledQuantity'); - const canceledQuantity = this.safeFloat (order, 'cancelledQuantity'); - let remaining = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'filledQuantity'); + const canceledQuantity = this.safeNumber (order, 'cancelledQuantity'); let status = undefined; if ((amount !== undefined) && (filled !== undefined)) { - remaining = Math.max (amount - filled, 0.0); if (filled >= amount) { status = 'closed'; } else if ((canceledQuantity !== undefined) && (canceledQuantity > 0)) { @@ -1158,30 +1149,19 @@ module.exports = class timex extends Exchange { status = 'open'; } } - const cost = parseFloat (this.costToPrecision (symbol, price * filled)); - const fee = undefined; - let lastTradeTimestamp = undefined; - let trades = undefined; - const rawTrades = this.safeValue (order, 'trades'); - if (rawTrades !== undefined) { - trades = this.parseTrades (rawTrades, market, undefined, undefined, { - 'order': id, - }); - } - if (trades !== undefined) { - const numTrades = trades.length; - if (numTrades > 0) { - lastTradeTimestamp = trades[numTrades - 1]['timestamp']; - } - } + const rawTrades = this.safeValue (order, 'trades', []); + const trades = this.parseTrades (rawTrades, market, undefined, undefined, { + 'order': id, + 'type': type, + }); const clientOrderId = this.safeString (order, 'clientOrderId'); - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': clientOrderId, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'lastTradeTimestamp': lastTradeTimestamp, + 'lastTradeTimestamp': undefined, 'symbol': symbol, 'type': type, 'timeInForce': undefined, @@ -1190,14 +1170,14 @@ module.exports = class timex extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, - 'fee': fee, + 'fee': undefined, 'trades': trades, - }; + }); } sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/upbit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/upbit.js index 829aa6586..890c30126 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/upbit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/upbit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest, AuthenticationError, InvalidOrder, InsufficientFunds, OrderNotFound, PermissionDenied, AddressPending } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -229,9 +230,9 @@ module.exports = class upbit extends Exchange { } else if ((locked !== undefined) && locked) { active = false; } - const maxOnetimeWithdrawal = this.safeFloat (withdrawLimits, 'onetime'); - const maxDailyWithdrawal = this.safeFloat (withdrawLimits, 'daily', maxOnetimeWithdrawal); - const remainingDailyWithdrawal = this.safeFloat (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); + const maxOnetimeWithdrawal = this.safeNumber (withdrawLimits, 'onetime'); + const maxDailyWithdrawal = this.safeNumber (withdrawLimits, 'daily', maxOnetimeWithdrawal); + const remainingDailyWithdrawal = this.safeNumber (withdrawLimits, 'remaining_daily', maxDailyWithdrawal); let maxWithdrawLimit = undefined; if (remainingDailyWithdrawal > 0) { maxWithdrawLimit = remainingDailyWithdrawal; @@ -247,11 +248,11 @@ module.exports = class upbit extends Exchange { 'code': code, 'name': code, 'active': active, - 'fee': this.safeFloat (currencyInfo, 'withdraw_fee'), + 'fee': this.safeNumber (currencyInfo, 'withdraw_fee'), 'precision': precision, 'limits': { 'withdraw': { - 'min': this.safeFloat (withdrawLimits, 'minimum'), + 'min': this.safeNumber (withdrawLimits, 'minimum'), 'max': maxWithdrawLimit, }, }, @@ -314,8 +315,8 @@ module.exports = class upbit extends Exchange { }; const state = this.safeString (marketInfo, 'state'); const active = (state === 'active'); - const bidFee = this.safeFloat (response, 'bid_fee'); - const askFee = this.safeFloat (response, 'ask_fee'); + const bidFee = this.safeNumber (response, 'bid_fee'); + const askFee = this.safeNumber (response, 'ask_fee'); const fee = Math.max (bidFee, askFee); return { 'info': response, @@ -331,7 +332,7 @@ module.exports = class upbit extends Exchange { 'taker': fee, 'limits': { 'amount': { - 'min': this.safeFloat (ask, 'min_total'), + 'min': this.safeNumber (ask, 'min_total'), 'max': undefined, }, 'price': { @@ -339,8 +340,8 @@ module.exports = class upbit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (bid, 'min_total'), - 'max': this.safeFloat (marketInfo, 'max_total'), + 'min': this.safeNumber (bid, 'min_total'), + 'max': this.safeNumber (marketInfo, 'max_total'), }, }, }; @@ -379,8 +380,8 @@ module.exports = class upbit extends Exchange { 'price': 8, }; const active = true; - const makerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); - const takerFee = this.safeFloat (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); + const makerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['maker']); + const takerFee = this.safeNumber (this.options['tradingFeesByQuoteCurrency'], quote, this.fees['trading']['taker']); result.push ({ 'id': id, 'symbol': symbol, @@ -433,11 +434,11 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'balance'); - account['used'] = this.safeFloat (balance, 'locked'); + account['free'] = this.safeString (balance, 'balance'); + account['used'] = this.safeString (balance, 'locked'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBooks (symbols = undefined, limit = undefined, params = {}) { @@ -540,30 +541,30 @@ module.exports = class upbit extends Exchange { const timestamp = this.safeInteger (ticker, 'trade_timestamp'); const marketId = this.safeString2 (ticker, 'market', 'code'); const symbol = this.safeSymbol (marketId, market, '-'); - const previous = this.safeFloat (ticker, 'prev_closing_price'); - const last = this.safeFloat (ticker, 'trade_price'); - const change = this.safeFloat (ticker, 'signed_change_price'); - const percentage = this.safeFloat (ticker, 'signed_change_rate'); + const previous = this.safeNumber (ticker, 'prev_closing_price'); + const last = this.safeNumber (ticker, 'trade_price'); + const change = this.safeNumber (ticker, 'signed_change_price'); + const percentage = this.safeNumber (ticker, 'signed_change_rate'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high_price'), - 'low': this.safeFloat (ticker, 'low_price'), + 'high': this.safeNumber (ticker, 'high_price'), + 'low': this.safeNumber (ticker, 'low_price'), 'bid': undefined, 'bidVolume': undefined, 'ask': undefined, 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'opening_price'), + 'open': this.safeNumber (ticker, 'opening_price'), 'close': last, 'last': last, 'previousClose': previous, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'acc_trade_volume_24h'), - 'quoteVolume': this.safeFloat (ticker, 'acc_trade_price_24h'), + 'baseVolume': this.safeNumber (ticker, 'acc_trade_volume_24h'), + 'quoteVolume': this.safeNumber (ticker, 'acc_trade_price_24h'), 'info': ticker, }; } @@ -670,15 +671,13 @@ module.exports = class upbit extends Exchange { } else if (askOrBid === 'bid') { side = 'buy'; } - let cost = this.safeFloat (trade, 'funds'); - const price = this.safeFloat2 (trade, 'trade_price', 'price'); - const amount = this.safeFloat2 (trade, 'trade_volume', 'volume'); + let cost = this.safeNumber (trade, 'funds'); + const priceString = this.safeString2 (trade, 'trade_price', 'price'); + const amountString = this.safeString2 (trade, 'trade_volume', 'volume'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); if (cost === undefined) { - if (amount !== undefined) { - if (price !== undefined) { - cost = price * amount; - } - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const marketId = this.safeString2 (trade, 'market', 'code'); market = this.safeMarket (marketId, market); @@ -773,11 +772,11 @@ module.exports = class upbit extends Exchange { // return [ this.parse8601 (this.safeString (ohlcv, 'candle_date_time_utc')), - this.safeFloat (ohlcv, 'opening_price'), - this.safeFloat (ohlcv, 'high_price'), - this.safeFloat (ohlcv, 'low_price'), - this.safeFloat (ohlcv, 'trade_price'), - this.safeFloat (ohlcv, 'candle_acc_trade_volume'), // base volume + this.safeNumber (ohlcv, 'opening_price'), + this.safeNumber (ohlcv, 'high_price'), + this.safeNumber (ohlcv, 'low_price'), + this.safeNumber (ohlcv, 'trade_price'), + this.safeNumber (ohlcv, 'candle_acc_trade_volume'), // base volume ]; } @@ -1046,7 +1045,7 @@ module.exports = class upbit extends Exchange { // } // const id = this.safeString (transaction, 'uuid'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const address = undefined; // not present in the data structure received from the exchange const tag = undefined; // not present in the data structure received from the exchange const txid = this.safeString (transaction, 'txid'); @@ -1059,7 +1058,7 @@ module.exports = class upbit extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId); const status = this.parseTransactionStatus (this.safeString (transaction, 'state')); - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); return { 'info': transaction, 'id': id, @@ -1144,10 +1143,10 @@ module.exports = class upbit extends Exchange { const timestamp = this.parse8601 (this.safeString (order, 'created_at')); const status = this.parseOrderStatus (this.safeString (order, 'state')); let lastTradeTimestamp = undefined; - let price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'volume'); - const remaining = this.safeFloat (order, 'remaining_volume'); - const filled = this.safeFloat (order, 'executed_volume'); + let price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'volume'); + const remaining = this.safeNumber (order, 'remaining_volume'); + const filled = this.safeNumber (order, 'executed_volume'); let cost = undefined; if (type === 'price') { type = 'market'; @@ -1156,7 +1155,7 @@ module.exports = class upbit extends Exchange { } let average = undefined; let fee = undefined; - let feeCost = this.safeFloat (order, 'paid_fee'); + let feeCost = this.safeNumber (order, 'paid_fee'); const marketId = this.safeString (order, 'market'); market = this.safeMarket (marketId, market); let trades = this.safeValue (order, 'trades', []); @@ -1179,7 +1178,7 @@ module.exports = class upbit extends Exchange { cost = this.sum (cost, trade['cost']); if (getFeesFromTrades) { const tradeFee = this.safeValue (trades[i], 'fee', {}); - const tradeFeeCost = this.safeFloat (tradeFee, 'cost'); + const tradeFeeCost = this.safeNumber (tradeFee, 'cost'); if (tradeFeeCost !== undefined) { feeCost = this.sum (feeCost, tradeFeeCost); } @@ -1321,16 +1320,6 @@ module.exports = class upbit extends Exchange { return this.parseOrder (response); } - parseDepositAddresses (addresses) { - const result = {}; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - const code = address['currency']; - result[code] = address; - } - return result; - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetDepositsCoinAddresses (params); diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vaultoro.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vaultoro.js deleted file mode 100644 index abc1ba387..000000000 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vaultoro.js +++ /dev/null @@ -1,203 +0,0 @@ -'use strict'; - -// --------------------------------------------------------------------------- - -const Exchange = require ('./base/Exchange'); - -// --------------------------------------------------------------------------- - -module.exports = class vaultoro extends Exchange { - describe () { - return this.deepExtend (super.describe (), { - 'id': 'vaultoro', - 'name': 'Vaultoro', - 'countries': [ 'CH' ], - 'rateLimit': 1000, - 'version': '1', - 'has': { - 'CORS': true, - 'fetchMarkets': true, - 'fetchOrderBook': true, - 'fetchBalance': true, - 'createOrder': true, - 'cancelOrder': true, - 'fetchTrades': true, - 'fetchTicker': false, - }, - 'urls': { - 'logo': 'https://user-images.githubusercontent.com/1294454/27766880-f205e870-5ee9-11e7-8fe2-0d5b15880752.jpg', - 'api': 'https://api.vaultoro.com', - 'www': 'https://www.vaultoro.com', - 'doc': 'https://api.vaultoro.com', - }, - 'commonCurrencies': { - 'GLD': 'Gold', - }, - 'api': { - 'public': { - 'get': [ - 'bidandask', - 'buyorders', - 'latest', - 'latesttrades', - 'markets', - 'orderbook', - 'sellorders', - 'transactions/day', - 'transactions/hour', - 'transactions/month', - ], - }, - 'private': { - 'get': [ - 'balance', - 'mytrades', - 'orders', - ], - 'post': [ - 'buy/{symbol}/{type}', - 'cancel/{id}', - 'sell/{symbol}/{type}', - 'withdraw', - ], - }, - }, - }); - } - - async fetchMarkets (params = {}) { - const result = []; - const response = await this.publicGetMarkets (params); - const market = this.safeValue (response, 'data'); - const baseId = this.safeString (market, 'MarketCurrency'); - const quoteId = this.safeString (market, 'BaseCurrency'); - const base = this.safeCurrencyCode (baseId); - const quote = this.safeCurrencyCode (quoteId); - const symbol = base + '/' + quote; - const id = this.safeString (market, 'MarketName'); - result.push ({ - 'id': id, - 'symbol': symbol, - 'base': base, - 'quote': quote, - 'baseId': baseId, - 'quoteId': quoteId, - 'info': market, - 'active': undefined, - 'precision': this.precision, - 'limits': this.limits, - }); - return result; - } - - async fetchBalance (params = {}) { - await this.loadMarkets (); - const response = await this.privateGetBalance (params); - const balances = this.safeValue (response, 'data'); - const result = { 'info': balances }; - for (let i = 0; i < balances.length; i++) { - const balance = balances[i]; - const currencyId = this.safeString (balance, 'currency_code'); - const code = this.safeCurrencyCode (currencyId); - const account = this.account (); - account['free'] = this.safeFloat (balance, 'cash'); - account['used'] = this.safeFloat (balance, 'reserved'); - result[code] = account; - } - return this.parseBalance (result); - } - - async fetchOrderBook (symbol, limit = undefined, params = {}) { - await this.loadMarkets (); - const response = await this.publicGetOrderbook (params); - const orderbook = { - 'bids': response['data'][0]['b'], - 'asks': response['data'][1]['s'], - }; - return this.parseOrderBook (orderbook, undefined, 'bids', 'asks', 'Gold_Price', 'Gold_Amount'); - } - - parseTrade (trade, market = undefined) { - const timestamp = this.parse8601 (this.safeString (trade, 'Time')); - let symbol = undefined; - if (market !== undefined) { - symbol = market['symbol']; - } - const price = this.safeFloat (trade, 'Gold_Price'); - const amount = this.safeFloat (trade, 'Gold_Amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } - return { - 'id': undefined, - 'info': trade, - 'timestamp': timestamp, - 'datetime': this.iso8601 (timestamp), - 'symbol': symbol, - 'order': undefined, - 'type': undefined, - 'side': undefined, - 'takerOrMaker': undefined, - 'price': price, - 'amount': amount, - 'cost': cost, - 'fee': undefined, - }; - } - - async fetchTrades (symbol, since = undefined, limit = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const response = await this.publicGetTransactionsDay (params); - return this.parseTrades (response, market, since, limit); - } - - async createOrder (symbol, type, side, amount, price = undefined, params = {}) { - await this.loadMarkets (); - const market = this.market (symbol); - const method = 'privatePost' + this.capitalize (side) + 'SymbolType'; - const request = { - 'symbol': market['quoteId'].toLowerCase (), - 'type': type, - 'gld': amount, - 'price': price || 1, - }; - const response = await this[method] (this.extend (request, params)); - return { - 'info': response, - 'id': response['data']['Order_ID'], - }; - } - - async cancelOrder (id, symbol = undefined, params = {}) { - await this.loadMarkets (); - const request = { - 'id': id, - }; - return await this.privatePostCancelId (this.extend (request, params)); - } - - sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) { - let url = this.urls['api'] + '/'; - if (api === 'public') { - url += path; - } else { - this.checkRequiredCredentials (); - const nonce = this.nonce (); - url += this.version + '/' + this.implodeParams (path, params); - const query = this.extend ({ - 'nonce': nonce, - 'apikey': this.apiKey, - }, this.omit (params, this.extractParams (path))); - url += '?' + this.urlencode (query); - headers = { - 'Content-Type': 'application/json', - 'X-Signature': this.hmac (this.encode (url), this.encode (this.secret)), - }; - } - return { 'url': url, 'method': method, 'body': body, 'headers': headers }; - } -}; diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vcc.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vcc.js index bd3a9602d..5b182adcb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vcc.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/vcc.js @@ -5,6 +5,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, OrderNotFound, InvalidOrder, BadRequest, AuthenticationError, RateLimitExceeded, RequestTimeout, BadSymbol, AddressPending, PermissionDenied, InsufficientFunds } = require ('./base/errors'); const { ROUND } = require ('./base/functions/number'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -196,15 +197,15 @@ module.exports = class vcc extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (amountLimits, 'min'), + 'min': this.safeNumber (amountLimits, 'min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (priceLimits, 'min'), + 'min': this.safeNumber (priceLimits, 'min'), 'max': undefined, }, 'cost': { - 'min': this.safeFloat (costLimits, 'min'), + 'min': this.safeNumber (costLimits, 'min'), 'max': undefined, }, }, @@ -251,12 +252,12 @@ module.exports = class vcc extends Exchange { 'code': code, 'name': this.safeString (currency, 'name'), 'active': active, - 'fee': this.safeFloat (currency, 'withdrawal_fee'), + 'fee': this.safeNumber (currency, 'withdrawal_fee'), 'precision': this.safeInteger (currency, 'decimal'), 'limits': { 'withdraw': { - 'min': this.safeFloat (currency, 'min_withdraw'), - 'max': this.safeFloat (currency, 'max_withdraw'), + 'min': this.safeNumber (currency, 'min_withdraw'), + 'max': this.safeNumber (currency, 'max_withdraw'), }, }, }; @@ -279,8 +280,8 @@ module.exports = class vcc extends Exchange { // return { 'info': response, - 'maker': this.safeFloat (response, 'provideLiquidityRate'), - 'taker': this.safeFloat (response, 'takeLiquidityRate'), + 'maker': this.safeNumber (response, 'provideLiquidityRate'), + 'taker': this.safeNumber (response, 'takeLiquidityRate'), }; } @@ -306,11 +307,11 @@ module.exports = class vcc extends Exchange { const code = this.safeCurrencyCode (currencyId); const balance = this.safeValue (data, currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available_balance'); - account['total'] = this.safeFloat (balance, 'balance'); + account['free'] = this.safeString (balance, 'available_balance'); + account['total'] = this.safeString (balance, 'balance'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseOHLCV (ohlcv, market = undefined) { @@ -328,11 +329,11 @@ module.exports = class vcc extends Exchange { // return [ this.safeInteger (ohlcv, 'time'), - this.safeFloat (ohlcv, 'open'), - this.safeFloat (ohlcv, 'high'), - this.safeFloat (ohlcv, 'low'), - this.safeFloat (ohlcv, 'close'), - this.safeFloat (ohlcv, 'volume'), + this.safeNumber (ohlcv, 'open'), + this.safeNumber (ohlcv, 'high'), + this.safeNumber (ohlcv, 'low'), + this.safeNumber (ohlcv, 'close'), + this.safeNumber (ohlcv, 'volume'), ]; } @@ -421,10 +422,10 @@ module.exports = class vcc extends Exchange { // } // const timestamp = this.milliseconds (); - const baseVolume = this.safeFloat (ticker, 'base_volume'); - const quoteVolume = this.safeFloat (ticker, 'quote_volume'); - const open = this.safeFloat (ticker, 'open_price'); - const last = this.safeFloat (ticker, 'last_price'); + const baseVolume = this.safeNumber (ticker, 'base_volume'); + const quoteVolume = this.safeNumber (ticker, 'quote_volume'); + const open = this.safeNumber (ticker, 'open_price'); + const last = this.safeNumber (ticker, 'last_price'); let change = undefined; let percentage = undefined; let average = undefined; @@ -441,11 +442,11 @@ module.exports = class vcc extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'max_price'), - 'low': this.safeFloat (ticker, 'min_price'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'max_price'), + 'low': this.safeNumber (ticker, 'min_price'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': open, @@ -559,17 +560,17 @@ module.exports = class vcc extends Exchange { } market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'base_volume', 'quantity'); - let cost = this.safeFloat2 (trade, 'quote_volume', 'amount'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'base_volume', 'quantity'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + let cost = this.safeNumber2 (trade, 'quote_volume', 'amount'); if (cost === undefined) { - if ((price !== undefined) && (amount !== undefined)) { - cost = price * amount; - } + cost = this.parseNumber (Precise.stringMul (priceString, amountString)); } const side = this.safeString2 (trade, 'type', 'trade_type'); const id = this.safeString2 (trade, 'trade_id', 'id'); - const feeCost = this.safeFloat (trade, 'fee'); + const feeCost = this.safeNumber (trade, 'fee'); let fee = undefined; if (feeCost !== undefined) { fee = { @@ -754,7 +755,7 @@ module.exports = class vcc extends Exchange { const currencyId = this.safeString (transaction, 'currency'); const code = this.safeCurrencyCode (currencyId, currency); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); - let amount = this.safeFloat (transaction, 'amount'); + let amount = this.safeNumber (transaction, 'amount'); if (amount !== undefined) { amount = Math.abs (amount); } @@ -762,7 +763,7 @@ module.exports = class vcc extends Exchange { const txid = this.safeString (transaction, 'transaction_id'); const tag = this.safeString (transaction, 'destination_tag'); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fee'); + const feeCost = this.safeNumber (transaction, 'fee'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -1007,46 +1008,27 @@ module.exports = class vcc extends Exchange { const marketId = baseId + '_' + quoteId; market = this.safeMarket (marketId, market, '_'); const symbol = market['symbol']; - const amount = this.safeFloat (order, 'quantity'); - let filled = this.safeFloat (order, 'executed_quantity'); + const amount = this.safeNumber (order, 'quantity'); + const filled = this.safeNumber (order, 'executed_quantity'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - let cost = this.safeFloat (order, 'ceiling'); + const cost = this.safeNumber (order, 'ceiling'); const id = this.safeString (order, 'id'); - let average = undefined; - let price = this.safeFloat (order, 'price'); - // in case of market order - if (!price) { - price = this.safeFloat (order, 'executed_price'); - average = price; - } - let remaining = this.safeFloat (order, 'remaining'); - if ((filled === undefined) && (amount !== undefined) && (remaining !== undefined)) { - filled = Math.max (0, amount - remaining); - } - if (filled !== undefined) { - if ((amount !== undefined) && (remaining === undefined)) { - remaining = Math.max (0, amount - filled); - } - if ((price !== undefined) && (cost === undefined)) { - cost = filled * price; - } - if ((average === undefined) && (cost !== undefined) && (filled > 0)) { - average = cost / filled; - } - } + const price = this.safeNumber (order, 'price'); + const average = this.safeNumber (order, 'executed_price'); + const remaining = this.safeNumber (order, 'remaining'); const type = this.safeString (order, 'type'); const side = this.safeString (order, 'trade_type'); const fee = { 'currency': market['quote'], - 'cost': this.safeFloat (order, 'fee'), - 'rate': this.safeFloat (order, 'fee_rate'), + 'cost': this.safeNumber (order, 'fee'), + 'rate': this.safeNumber (order, 'fee_rate'), }; let lastTradeTimestamp = undefined; if (updated !== created) { lastTradeTimestamp = updated; } - const stopPrice = this.safeFloat (order, 'stopPrice'); - return { + const stopPrice = this.safeNumber (order, 'stopPrice'); + return this.safeOrder ({ 'id': id, 'clientOrderId': id, 'timestamp': created, @@ -1068,7 +1050,7 @@ module.exports = class vcc extends Exchange { 'fee': fee, 'trades': undefined, 'info': order, - }; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/wavesexchange.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/wavesexchange.js index 139780062..bd422c073 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/wavesexchange.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/wavesexchange.js @@ -565,13 +565,13 @@ module.exports = class wavesexchange extends Exchange { symbol = market['symbol']; } const data = this.safeValue (ticker, 'data', {}); - const last = this.safeFloat (data, 'lastPrice'); - const low = this.safeFloat (data, 'low'); - const high = this.safeFloat (data, 'high'); - const vwap = this.safeFloat (data, 'weightedAveragePrice'); - const baseVolume = this.safeFloat (data, 'volume'); - const quoteVolume = this.safeFloat (data, 'quoteVolume'); - const open = this.safeValue (data, 'firstPrice'); + const last = this.safeNumber (data, 'lastPrice'); + const low = this.safeNumber (data, 'low'); + const high = this.safeNumber (data, 'high'); + const vwap = this.safeNumber (data, 'weightedAveragePrice'); + const baseVolume = this.safeNumber (data, 'volume'); + const quoteVolume = this.safeNumber (data, 'quoteVolume'); + const open = this.safeNumber (data, 'firstPrice'); let change = undefined; let average = undefined; let percentage = undefined; @@ -725,11 +725,11 @@ module.exports = class wavesexchange extends Exchange { const data = this.safeValue (ohlcv, 'data', {}); return [ this.parse8601 (this.safeString (data, 'time')), - this.safeFloat (data, 'open'), - this.safeFloat (data, 'high'), - this.safeFloat (data, 'low'), - this.safeFloat (data, 'close'), - this.safeFloat (data, 'volume', 0), + this.safeNumber (data, 'open'), + this.safeNumber (data, 'high'), + this.safeNumber (data, 'low'), + this.safeNumber (data, 'close'), + this.safeNumber (data, 'volume', 0), ]; } @@ -944,7 +944,7 @@ module.exports = class wavesexchange extends Exchange { } if (matcherFee === undefined) { const wavesPrecision = this.safeInteger (this.options, 'wavesPrecision', 8); - const rate = this.safeFloat (rates, matcherFeeAssetId); + const rate = this.safeNumber (rates, matcherFeeAssetId); const code = this.safeCurrencyCode (matcherFeeAssetId); const currency = this.currency (code); const newPrecison = Math.pow (10, wavesPrecision - currency['precision']); @@ -1354,7 +1354,7 @@ module.exports = class wavesexchange extends Exchange { const issueTransaction = this.safeValue (entry, 'issueTransaction'); const decimals = this.safeInteger (issueTransaction, 'decimals'); const currencyId = this.safeString (entry, 'assetId'); - const balance = this.safeFloat (entry, 'balance'); + const balance = this.safeNumber (entry, 'balance'); let code = undefined; if (currencyId in this.currencies_by_id) { code = this.safeCurrencyCode (currencyId); @@ -1384,7 +1384,7 @@ module.exports = class wavesexchange extends Exchange { if (!(code in result)) { result[code] = this.account (); } - const amount = this.safeFloat (reservedBalance, currencyId); + const amount = this.safeNumber (reservedBalance, currencyId); result[code]['used'] = this.currencyFromPrecision (code, amount); } const wavesRequest = { @@ -1397,7 +1397,7 @@ module.exports = class wavesexchange extends Exchange { // "balance": 909085978 // } result['WAVES'] = this.safeValue (result, 'WAVES', {}); - result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeFloat (wavesTotal, 'balance')); + result['WAVES']['total'] = this.currencyFromPrecision ('WAVES', this.safeNumber (wavesTotal, 'balance')); const codes = Object.keys (result); for (let i = 0; i < codes.length; i++) { const code = codes[i]; @@ -1489,8 +1489,8 @@ module.exports = class wavesexchange extends Exchange { const datetime = this.safeString (data, 'timestamp'); const timestamp = this.parse8601 (datetime); const id = this.safeString (data, 'id'); - const price = this.safeFloat (data, 'price'); - const amount = this.safeFloat (data, 'amount'); + const price = this.safeNumber (data, 'price'); + const amount = this.safeNumber (data, 'amount'); const order1 = this.safeValue (data, 'order1'); const order2 = this.safeValue (data, 'order2'); let order = undefined; @@ -1514,7 +1514,7 @@ module.exports = class wavesexchange extends Exchange { cost = price * amount; } const fee = { - 'cost': this.safeFloat (data, 'fee'), + 'cost': this.safeNumber (data, 'fee'), 'currency': this.safeCurrencyCode (this.safeString (order, 'matcherFeeAssetId', 'WAVES')), }; return { @@ -1596,7 +1596,7 @@ module.exports = class wavesexchange extends Exchange { const withdrawAddress = await this.privateGetWithdrawAddressesCurrencyAddress (withdrawAddressRequest); const currency = this.safeValue (withdrawAddress, 'currency'); const allowedAmount = this.safeValue (currency, 'allowed_amount'); - const minimum = this.safeFloat (allowedAmount, 'min'); + const minimum = this.safeNumber (allowedAmount, 'min'); if (amount <= minimum) { throw new BadRequest (this.id + ' ' + code + ' withdraw failed, amount ' + amount.toString () + ' must be greater than the minimum allowed amount of ' + minimum.toString ()); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/whitebit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/whitebit.js index 9e4418141..769cd5b8b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/whitebit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/whitebit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeNotAvailable, ExchangeError, DDoSProtection, BadSymbol } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -164,7 +165,7 @@ module.exports = class whitebit extends Exchange { }, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'minAmount'), + 'min': this.safeNumber (market, 'minAmount'), 'max': undefined, }, 'price': { @@ -172,7 +173,7 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'cost': { - 'min': this.safeFloat (market, 'minTotal'), + 'min': this.safeNumber (market, 'minTotal'), 'max': undefined, }, }, @@ -237,8 +238,8 @@ module.exports = class whitebit extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (currency, 'minWithdrawal'), - 'max': this.safeFloat (currency, 'maxWithdrawal'), + 'min': this.safeNumber (currency, 'minWithdrawal'), + 'max': this.safeNumber (currency, 'maxWithdrawal'), }, }, }; @@ -250,8 +251,8 @@ module.exports = class whitebit extends Exchange { const response = await this.publicV2GetFee (params); const fees = this.safeValue (response, 'result'); return { - 'maker': this.safeFloat (fees, 'makerFee'), - 'taker': this.safeFloat (fees, 'takerFee'), + 'maker': this.safeNumber (fees, 'makerFee'), + 'taker': this.safeNumber (fees, 'takerFee'), }; } @@ -321,8 +322,8 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); - const percentage = this.safeFloat (ticker, 'change'); + const last = this.safeNumber (ticker, 'last'); + const percentage = this.safeNumber (ticker, 'change'); let change = undefined; if (percentage !== undefined) { change = this.numberToString (percentage * 0.01); @@ -331,22 +332,22 @@ module.exports = class whitebit extends Exchange { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, - 'open': this.safeFloat (ticker, 'open'), + 'open': this.safeNumber (ticker, 'open'), 'close': last, 'last': last, 'previousClose': undefined, 'change': change, 'percentage': percentage, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'volume'), - 'quoteVolume': this.safeFloat (ticker, 'deal'), + 'baseVolume': this.safeNumber (ticker, 'volume'), + 'quoteVolume': this.safeNumber (ticker, 'deal'), 'info': ticker, }; } @@ -514,8 +515,11 @@ module.exports = class whitebit extends Exchange { } else { timestamp = parseInt (timestamp * 1000); } - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat2 (trade, 'amount', 'volume'); + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString2 (trade, 'amount', 'volume'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const id = this.safeString2 (trade, 'id', 'tradeId'); let side = this.safeString (trade, 'type'); if (side === undefined) { @@ -526,10 +530,6 @@ module.exports = class whitebit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - let cost = undefined; - if (amount !== undefined && price !== undefined) { - cost = amount * price; - } return { 'info': trade, 'timestamp': timestamp, @@ -599,11 +599,11 @@ module.exports = class whitebit extends Exchange { // return [ this.safeTimestamp (ohlcv, 0), // timestamp - this.safeFloat (ohlcv, 1), // open - this.safeFloat (ohlcv, 3), // high - this.safeFloat (ohlcv, 4), // low - this.safeFloat (ohlcv, 2), // close - this.safeFloat (ohlcv, 5), // volume + this.safeNumber (ohlcv, 1), // open + this.safeNumber (ohlcv, 3), // high + this.safeNumber (ohlcv, 4), // low + this.safeNumber (ohlcv, 2), // close + this.safeNumber (ohlcv, 5), // volume ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xbtce.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xbtce.js index e0d137f67..c8cabae42 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xbtce.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xbtce.js @@ -152,14 +152,13 @@ module.exports = class xbtce extends Exchange { const balance = balances[i]; const currencyId = this.safeString (balance, 'Currency'); const code = this.safeCurrencyCode (currencyId); - const account = { - 'free': this.safeFloat (balance, 'FreeAmount'), - 'used': this.safeFloat (balance, 'LockedAmount'), - 'total': this.safeFloat (balance, 'Amount'), - }; + const account = this.account (); + account['free'] = this.safeString (balance, 'FreeAmount'); + account['used'] = this.safeString (balance, 'LockedAmount'); + account['total'] = this.safeString (balance, 'Amount'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchOrderBook (symbol, limit = undefined, params = {}) { @@ -271,11 +270,11 @@ module.exports = class xbtce extends Exchange { parseOHLCV (ohlcv, market = undefined) { return [ this.safeInteger (ohlcv, 'Timestamp'), - this.safeFloat (ohlcv, 'Open'), - this.safeFloat (ohlcv, 'High'), - this.safeFloat (ohlcv, 'Low'), - this.safeFloat (ohlcv, 'Close'), - this.safeFloat (ohlcv, 'Volume'), + this.safeNumber (ohlcv, 'Open'), + this.safeNumber (ohlcv, 'High'), + this.safeNumber (ohlcv, 'Low'), + this.safeNumber (ohlcv, 'Close'), + this.safeNumber (ohlcv, 'Volume'), ]; } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xena.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xena.js index 2facd429b..e55a5332b 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xena.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/xena.js @@ -2,6 +2,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, BadRequest, InsufficientFunds, InvalidAddress, BadSymbol, InvalidOrder } = require ('./base/errors'); +const Precise = require ('./base/Precise'); module.exports = class xena extends Exchange { describe () { @@ -277,8 +278,8 @@ module.exports = class xena extends Exchange { 'price': pricePrecision, 'amount': 0, }; - const maxCost = this.safeFloat (market, 'maxOrderQty'); - const minCost = this.safeFloat (market, 'minOrderQuantity'); + const maxCost = this.safeNumber (market, 'maxOrderQty'); + const minCost = this.safeNumber (market, 'minOrderQuantity'); const limits = { 'amount': { 'min': undefined, @@ -363,7 +364,7 @@ module.exports = class xena extends Exchange { 'info': currency, 'name': name, 'active': active, - 'fee': this.safeFloat (withdraw, 'commission'), + 'fee': this.safeNumber (withdraw, 'commission'), 'precision': precision, 'limits': { 'amount': { @@ -379,7 +380,7 @@ module.exports = class xena extends Exchange { 'max': undefined, }, 'withdraw': { - 'min': this.safeFloat (withdraw, 'minAmount'), + 'min': this.safeNumber (withdraw, 'minAmount'), 'max': undefined, }, }, @@ -407,8 +408,8 @@ module.exports = class xena extends Exchange { const timestamp = this.milliseconds (); const marketId = this.safeString (ticker, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const last = this.safeFloat (ticker, 'lastPx'); - const open = this.safeFloat (ticker, 'firstPx'); + const last = this.safeNumber (ticker, 'lastPx'); + const open = this.safeNumber (ticker, 'firstPx'); let percentage = undefined; let change = undefined; let average = undefined; @@ -419,18 +420,18 @@ module.exports = class xena extends Exchange { percentage = change / open * 100; } } - const buyVolume = this.safeFloat (ticker, 'buyVolume'); - const sellVolume = this.safeFloat (ticker, 'sellVolume'); + const buyVolume = this.safeNumber (ticker, 'buyVolume'); + const sellVolume = this.safeNumber (ticker, 'sellVolume'); const baseVolume = this.sum (buyVolume, sellVolume); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'highPx'), - 'low': this.safeFloat (ticker, 'lowPx'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'highPx'), + 'low': this.safeNumber (ticker, 'lowPx'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': undefined, 'open': open, @@ -607,11 +608,11 @@ module.exports = class xena extends Exchange { const currencyId = this.safeString (balance, 'currency'); const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'onHold'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'onHold'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseTrade (trade, market = undefined) { @@ -665,20 +666,17 @@ module.exports = class xena extends Exchange { const orderId = this.safeString (trade, 'orderId'); const marketId = this.safeString (trade, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat2 (trade, 'lastPx', 'mdEntryPx'); - const amount = this.safeFloat2 (trade, 'lastQty', 'mdEntrySize'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString2 (trade, 'lastPx', 'mdEntryPx'); + const amountString = this.safeString2 (trade, 'lastQty', 'mdEntrySize'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); - const feeRate = this.safeFloat (trade, 'commRate'); + const feeRate = this.safeNumber (trade, 'commRate'); fee = { 'cost': feeCost, 'rate': feeRate, @@ -793,15 +791,15 @@ module.exports = class xena extends Exchange { // const transactTime = this.safeInteger (ohlcv, 'transactTime'); const timestamp = parseInt (transactTime / 1000000); - const buyVolume = this.safeFloat (ohlcv, 'buyVolume'); - const sellVolume = this.safeFloat (ohlcv, 'sellVolume'); + const buyVolume = this.safeNumber (ohlcv, 'buyVolume'); + const sellVolume = this.safeNumber (ohlcv, 'sellVolume'); const volume = this.sum (buyVolume, sellVolume); return [ timestamp, - this.safeFloat (ohlcv, 'firstPx'), - this.safeFloat (ohlcv, 'highPx'), - this.safeFloat (ohlcv, 'lowPx'), - this.safeFloat (ohlcv, 'lastPx'), + this.safeNumber (ohlcv, 'firstPx'), + this.safeNumber (ohlcv, 'highPx'), + this.safeNumber (ohlcv, 'lowPx'), + this.safeNumber (ohlcv, 'lastPx'), volume, ]; } @@ -926,11 +924,10 @@ module.exports = class xena extends Exchange { const status = this.parseOrderStatus (this.safeString (order, 'ordStatus')); const marketId = this.safeString (order, 'symbol'); const symbol = this.safeSymbol (marketId, market); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'orderQty'); - const filled = this.safeFloat (order, 'cumQty'); - const remaining = this.safeFloat (order, 'leavesQty'); - let cost = undefined; + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'orderQty'); + const filled = this.safeNumber (order, 'cumQty'); + const remaining = this.safeNumber (order, 'leavesQty'); let side = this.safeStringLower (order, 'side'); if (side === '1') { side = 'buy'; @@ -947,12 +944,7 @@ module.exports = class xena extends Exchange { } else if (type === '4') { type = 'stop-limit'; } - if (cost === undefined) { - if ((price !== undefined) && (filled !== undefined)) { - cost = price * filled; - } - } - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': clientOrderId, 'info': order, @@ -967,14 +959,14 @@ module.exports = class xena extends Exchange { 'price': price, 'stopPrice': undefined, 'amount': amount, - 'cost': cost, + 'cost': undefined, 'average': undefined, 'filled': filled, 'remaining': remaining, 'status': status, 'fee': undefined, 'trades': undefined, - }; + }); } async createOrder (symbol, type, side, amount, price = undefined, params = {}) { @@ -1027,7 +1019,7 @@ module.exports = class xena extends Exchange { request['price'] = this.priceToPrecision (symbol, price); } if ((type === 'stop') || (type === 'stop-limit')) { - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx === undefined) { throw new InvalidOrder (this.id + ' createOrder() requires a stopPx param for order type ' + type); } @@ -1106,12 +1098,12 @@ module.exports = class xena extends Exchange { if (price !== undefined) { request['price'] = this.priceToPrecision (symbol, price); } - const stopPx = this.safeFloat (params, 'stopPx'); + const stopPx = this.safeNumber (params, 'stopPx'); if (stopPx !== undefined) { request['stopPx'] = this.priceToPrecision (symbol, stopPx); params = this.omit (params, 'stopPx'); } - const capPrice = this.safeFloat (params, 'capPrice'); + const capPrice = this.safeNumber (params, 'capPrice'); if (capPrice !== undefined) { request['capPrice'] = this.priceToPrecision (symbol, capPrice); params = this.omit (params, 'capPrice'); @@ -1466,7 +1458,7 @@ module.exports = class xena extends Exchange { const address = this.safeString (transaction, 'address'); const addressFrom = undefined; const addressTo = address; - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); const fee = undefined; return { @@ -1563,7 +1555,7 @@ module.exports = class xena extends Exchange { const referenceAccount = undefined; const type = this.parseLedgerEntryType (this.safeString (item, 'kind')); const code = this.safeCurrencyCode (this.safeString (item, 'currency'), currency); - let amount = this.safeFloat (item, 'amount'); + let amount = this.safeNumber (item, 'amount'); if (amount < 0) { direction = 'out'; amount = Math.abs (amount); @@ -1575,11 +1567,11 @@ module.exports = class xena extends Exchange { timestamp = parseInt (timestamp / 1000000); } const fee = { - 'cost': this.safeFloat (item, 'commission'), + 'cost': this.safeNumber (item, 'commission'), 'currency': code, }; const before = undefined; - const after = this.safeFloat (item, 'balance'); + const after = this.safeNumber (item, 'balance'); const status = 'ok'; return { 'info': item, diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/yobit.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/yobit.js index 0ab100f68..82d86ea71 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/yobit.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/yobit.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, ArgumentsRequired, ExchangeNotAvailable, InvalidNonce, InsufficientFunds, OrderNotFound, DDoSProtection, InvalidOrder, AuthenticationError, RateLimitExceeded } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -138,6 +139,7 @@ module.exports = class yobit extends Exchange { 'NAV': 'NavajoCoin', 'NBT': 'NiceBytes', 'OMG': 'OMGame', + 'ONX': 'Onix', 'PAC': '$PAC', 'PLAY': 'PlayCoin', 'PIVX': 'Darknet', @@ -236,15 +238,33 @@ module.exports = class yobit extends Exchange { const currencyId = currencyIds[i]; const code = this.safeCurrencyCode (currencyId); const account = this.account (); - account['free'] = this.safeFloat (free, currencyId); - account['total'] = this.safeFloat (total, currencyId); + account['free'] = this.safeString (free, currencyId); + account['total'] = this.safeString (total, currencyId); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } async fetchMarkets (params = {}) { const response = await this.publicGetInfo (params); + // + // { + // "server_time":1615856752, + // "pairs":{ + // "ltc_btc":{ + // "decimal_places":8, + // "min_price":0.00000001, + // "max_price":10000, + // "min_amount":0.0001, + // "min_total":0.0001, + // "hidden":0, + // "fee":0.2, + // "fee_buyer":0.2, + // "fee_seller":0.2 + // }, + // }, + // } + // const markets = this.safeValue (response, 'pairs'); const keys = Object.keys (markets); const result = []; @@ -262,15 +282,15 @@ module.exports = class yobit extends Exchange { 'price': this.safeInteger (market, 'decimal_places'), }; const amountLimits = { - 'min': this.safeFloat (market, 'min_amount'), - 'max': this.safeFloat (market, 'max_amount'), + 'min': this.safeNumber (market, 'min_amount'), + 'max': this.safeNumber (market, 'max_amount'), }; const priceLimits = { - 'min': this.safeFloat (market, 'min_price'), - 'max': this.safeFloat (market, 'max_price'), + 'min': this.safeNumber (market, 'min_price'), + 'max': this.safeNumber (market, 'max_price'), }; const costLimits = { - 'min': this.safeFloat (market, 'min_total'), + 'min': this.safeNumber (market, 'min_total'), }; const limits = { 'amount': amountLimits, @@ -279,6 +299,7 @@ module.exports = class yobit extends Exchange { }; const hidden = this.safeInteger (market, 'hidden'); const active = (hidden === 0); + const takerFee = this.safeNumber (market, 'fee'); result.push ({ 'id': id, 'symbol': symbol, @@ -287,7 +308,7 @@ module.exports = class yobit extends Exchange { 'baseId': baseId, 'quoteId': quoteId, 'active': active, - 'taker': market['fee'] / 100, + 'taker': takerFee / 100, 'precision': precision, 'limits': limits, 'info': market, @@ -363,16 +384,16 @@ module.exports = class yobit extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -381,9 +402,9 @@ module.exports = class yobit extends Exchange { 'previousClose': undefined, 'change': undefined, 'percentage': undefined, - 'average': this.safeFloat (ticker, 'avg'), - 'baseVolume': this.safeFloat (ticker, 'vol_cur'), - 'quoteVolume': this.safeFloat (ticker, 'vol'), + 'average': this.safeNumber (ticker, 'avg'), + 'baseVolume': this.safeNumber (ticker, 'vol_cur'), + 'quoteVolume': this.safeNumber (ticker, 'vol'), 'info': ticker, }; } @@ -432,15 +453,18 @@ module.exports = class yobit extends Exchange { } else if (side === 'bid') { side = 'buy'; } - const price = this.safeFloat2 (trade, 'rate', 'price'); + const priceString = this.safeString2 (trade, 'rate', 'price'); const id = this.safeString2 (trade, 'trade_id', 'tid'); const order = this.safeString (trade, 'order_id'); const marketId = this.safeString (trade, 'pair'); const symbol = this.safeSymbol (marketId, market); - const amount = this.safeFloat (trade, 'amount'); + const amountString = this.safeString (trade, 'amount'); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); const type = 'limit'; // all trades are still limit trades let fee = undefined; - const feeCost = this.safeFloat (trade, 'commission'); + const feeCost = this.safeNumber (trade, 'commission'); if (feeCost !== undefined) { const feeCurrencyId = this.safeString (trade, 'commissionCurrency'); const feeCurrencyCode = this.safeCurrencyCode (feeCurrencyId); @@ -455,12 +479,6 @@ module.exports = class yobit extends Exchange { fee = this.calculateFee (symbol, type, side, amount, price, 'taker'); } } - let cost = undefined; - if (amount !== undefined) { - if (price !== undefined) { - cost = amount * price; - } - } return { 'id': id, 'order': order, @@ -522,8 +540,8 @@ module.exports = class yobit extends Exchange { id = this.safeString (response['return'], 'init_order_id'); status = 'closed'; } - filled = this.safeFloat (response['return'], 'received', 0.0); - remaining = this.safeFloat (response['return'], 'remains', amount); + filled = this.safeNumber (response['return'], 'received', 0.0); + remaining = this.safeNumber (response['return'], 'remains', amount); } const timestamp = this.milliseconds (); return { @@ -573,21 +591,13 @@ module.exports = class yobit extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp_created'); const marketId = this.safeString (order, 'pair'); const symbol = this.safeSymbol (marketId, market); - const remaining = this.safeFloat (order, 'amount'); - const amount = this.safeFloat (order, 'start_amount'); - const price = this.safeFloat (order, 'rate'); - let filled = undefined; - let cost = undefined; - if (amount !== undefined) { - if (remaining !== undefined) { - filled = Math.max (0, amount - remaining); - cost = price * filled; - } - } + const remaining = this.safeNumber (order, 'amount'); + const amount = this.safeNumber (order, 'start_amount'); + const price = this.safeNumber (order, 'rate'); const fee = undefined; const type = 'limit'; const side = this.safeString (order, 'type'); - const result = { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -601,16 +611,15 @@ module.exports = class yobit extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'remaining': remaining, - 'filled': filled, + 'filled': undefined, 'status': status, 'fee': fee, 'average': undefined, 'trades': undefined, - }; - return result; + }); } async fetchOrder (id, symbol = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zaif.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zaif.js index 2c6454a05..a94f9dddb 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zaif.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zaif.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { ExchangeError, BadRequest } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -127,6 +128,27 @@ module.exports = class zaif extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetCurrencyPairsAll (params); + // + // [ + // { + // "aux_unit_point": 0, + // "item_japanese": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3", + // "aux_unit_step": 5.0, + // "description": "\u30d3\u30c3\u30c8\u30b3\u30a4\u30f3\u30fb\u65e5\u672c\u5186\u306e\u53d6\u5f15\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059", + // "item_unit_min": 0.001, + // "event_number": 0, + // "currency_pair": "btc_jpy", + // "is_token": false, + // "aux_unit_min": 5.0, + // "aux_japanese": "\u65e5\u672c\u5186", + // "id": 1, + // "item_unit_step": 0.0001, + // "name": "BTC/JPY", + // "seq": 0, + // "title": "BTC/JPY" + // } + // ] + // const result = []; for (let i = 0; i < markets.length; i++) { const market = markets[i]; @@ -137,8 +159,8 @@ module.exports = class zaif extends Exchange { const quote = this.safeCurrencyCode (quoteId); const symbol = base + '/' + quote; const precision = { - 'amount': -Math.log10 (market['item_unit_step']), - 'price': market['aux_unit_point'], + 'amount': -Math.log10 (this.safeNumber (market, 'item_unit_step')), + 'price': this.safeInteger (market, 'aux_unit_point'), }; const fees = this.safeValue (this.options['fees'], symbol, this.fees['trading']); const taker = fees['taker']; @@ -156,11 +178,11 @@ module.exports = class zaif extends Exchange { 'maker': maker, 'limits': { 'amount': { - 'min': this.safeFloat (market, 'item_unit_min'), + 'min': this.safeNumber (market, 'item_unit_min'), 'max': undefined, }, 'price': { - 'min': this.safeFloat (market, 'aux_unit_min'), + 'min': this.safeNumber (market, 'aux_unit_min'), 'max': undefined, }, 'cost': { @@ -192,7 +214,7 @@ module.exports = class zaif extends Exchange { }; if ('deposit' in balances) { if (currencyId in balances['deposit']) { - account['total'] = this.safeFloat (balances['deposit'], currencyId); + account['total'] = this.safeNumber (balances['deposit'], currencyId); account['used'] = account['total'] - account['free']; } } @@ -217,22 +239,22 @@ module.exports = class zaif extends Exchange { }; const ticker = await this.publicGetTickerPair (this.extend (request, params)); const timestamp = this.milliseconds (); - const vwap = this.safeFloat (ticker, 'vwap'); - const baseVolume = this.safeFloat (ticker, 'volume'); + const vwap = this.safeNumber (ticker, 'vwap'); + const baseVolume = this.safeNumber (ticker, 'volume'); let quoteVolume = undefined; if (baseVolume !== undefined && vwap !== undefined) { quoteVolume = baseVolume * vwap; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'bid'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'bid'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'ask'), + 'ask': this.safeNumber (ticker, 'ask'), 'askVolume': undefined, 'vwap': vwap, 'open': undefined, @@ -253,14 +275,11 @@ module.exports = class zaif extends Exchange { side = (side === 'bid') ? 'buy' : 'sell'; const timestamp = this.safeTimestamp (trade, 'date'); const id = this.safeString2 (trade, 'id', 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = amount * price; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (Precise.stringMul (priceString, amountString)); const marketId = this.safeString (trade, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); return { @@ -338,16 +357,10 @@ module.exports = class zaif extends Exchange { const timestamp = this.safeTimestamp (order, 'timestamp'); const marketId = this.safeString (order, 'currency_pair'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const amount = this.safeFloat (order, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const price = this.safeNumber (order, 'price'); + const amount = this.safeNumber (order, 'amount'); const id = this.safeString (order, 'id'); - return { + return this.safeOrder ({ 'id': id, 'clientOrderId': undefined, 'timestamp': timestamp, @@ -361,7 +374,7 @@ module.exports = class zaif extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'cost': cost, + 'cost': undefined, 'amount': amount, 'filled': undefined, 'remaining': undefined, @@ -369,7 +382,7 @@ module.exports = class zaif extends Exchange { 'fee': undefined, 'info': order, 'average': undefined, - }; + }); } async fetchOpenOrders (symbol = undefined, since = undefined, limit = undefined, params = {}) { diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zb.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zb.js index 1f8f61cdf..29bea651d 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zb.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/js/zb.js @@ -4,6 +4,7 @@ const Exchange = require ('./base/Exchange'); const { BadRequest, ExchangeError, ArgumentsRequired, AuthenticationError, InsufficientFunds, OrderNotFound, ExchangeNotAvailable, DDoSProtection, InvalidOrder, InvalidAddress } = require ('./base/errors'); +const Precise = require ('./base/Precise'); // --------------------------------------------------------------------------- @@ -89,8 +90,8 @@ module.exports = class zb extends Exchange { 'urls': { 'logo': 'https://user-images.githubusercontent.com/1294454/32859187-cd5214f0-ca5e-11e7-967d-96568e2e2bd1.jpg', 'api': { - 'public': 'http://api.zb.cn/data', // no https for public API - 'private': 'https://trade.zb.cn/api', + 'public': 'https://api.zb.today/data', + 'private': 'https://trade.zb.today/api', }, 'www': 'https://www.zb.com', 'doc': 'https://www.zb.com/i/developer', @@ -205,6 +206,16 @@ module.exports = class zb extends Exchange { async fetchMarkets (params = {}) { const markets = await this.publicGetMarkets (params); + // + // { + // "zb_qc":{ + // "amountScale":2, + // "minAmount":0.01, + // "minSize":5, + // "priceScale":4, + // }, + // } + // const keys = Object.keys (markets); const result = []; for (let i = 0; i < keys.length; i++) { @@ -268,11 +279,11 @@ module.exports = class zb extends Exchange { const account = this.account (); const currencyId = this.safeString (balance, 'key'); const code = this.safeCurrencyCode (currencyId); - account['free'] = this.safeFloat (balance, 'available'); - account['used'] = this.safeFloat (balance, 'freez'); + account['free'] = this.safeString (balance, 'available'); + account['used'] = this.safeString (balance, 'freez'); result[code] = account; } - return this.parseBalance (result); + return this.parseBalance (result, false); } parseDepositAddress (depositAddress, currency = undefined) { @@ -321,18 +332,6 @@ module.exports = class zb extends Exchange { }; } - parseDepositAddresses (addresses, codes = undefined) { - let result = []; - for (let i = 0; i < addresses.length; i++) { - const address = this.parseDepositAddress (addresses[i]); - result.push (address); - } - if (codes) { - result = this.filterByArray (result, 'currency', codes); - } - return this.indexBy (result, 'currency'); - } - async fetchDepositAddresses (codes = undefined, params = {}) { await this.loadMarkets (); const response = await this.privateGetGetPayinAddress (params); @@ -439,16 +438,16 @@ module.exports = class zb extends Exchange { if (market !== undefined) { symbol = market['symbol']; } - const last = this.safeFloat (ticker, 'last'); + const last = this.safeNumber (ticker, 'last'); return { 'symbol': symbol, 'timestamp': timestamp, 'datetime': this.iso8601 (timestamp), - 'high': this.safeFloat (ticker, 'high'), - 'low': this.safeFloat (ticker, 'low'), - 'bid': this.safeFloat (ticker, 'buy'), + 'high': this.safeNumber (ticker, 'high'), + 'low': this.safeNumber (ticker, 'low'), + 'bid': this.safeNumber (ticker, 'buy'), 'bidVolume': undefined, - 'ask': this.safeFloat (ticker, 'sell'), + 'ask': this.safeNumber (ticker, 'sell'), 'askVolume': undefined, 'vwap': undefined, 'open': undefined, @@ -458,12 +457,23 @@ module.exports = class zb extends Exchange { 'change': undefined, 'percentage': undefined, 'average': undefined, - 'baseVolume': this.safeFloat (ticker, 'vol'), + 'baseVolume': this.safeNumber (ticker, 'vol'), 'quoteVolume': undefined, 'info': ticker, }; } + parseOHLCV (ohlcv, market = undefined) { + return [ + this.safeInteger (ohlcv, 0), + this.safeNumber (ohlcv, 1), + this.safeNumber (ohlcv, 2), + this.safeNumber (ohlcv, 3), + this.safeNumber (ohlcv, 4), + this.safeNumber (ohlcv, 5), + ]; + } + async fetchOHLCV (symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) { await this.loadMarkets (); const market = this.market (symbol); @@ -488,14 +498,12 @@ module.exports = class zb extends Exchange { let side = this.safeString (trade, 'trade_type'); side = (side === 'bid') ? 'buy' : 'sell'; const id = this.safeString (trade, 'tid'); - const price = this.safeFloat (trade, 'price'); - const amount = this.safeFloat (trade, 'amount'); - let cost = undefined; - if (price !== undefined) { - if (amount !== undefined) { - cost = price * amount; - } - } + const priceString = this.safeString (trade, 'price'); + const amountString = this.safeString (trade, 'amount'); + const costString = Precise.stringMul (priceString, amountString); + const price = this.parseNumber (priceString); + const amount = this.parseNumber (amountString); + const cost = this.parseNumber (costString); let symbol = undefined; if (market !== undefined) { symbol = market['symbol']; @@ -674,23 +682,13 @@ module.exports = class zb extends Exchange { const timestamp = this.safeInteger (order, 'trade_date'); const marketId = this.safeString (order, 'currency'); const symbol = this.safeSymbol (marketId, market, '_'); - const price = this.safeFloat (order, 'price'); - const filled = this.safeFloat (order, 'trade_amount'); - const amount = this.safeFloat (order, 'total_amount'); - let remaining = undefined; - if (amount !== undefined) { - if (filled !== undefined) { - remaining = amount - filled; - } - } - const cost = this.safeFloat (order, 'trade_money'); - let average = undefined; + const price = this.safeNumber (order, 'price'); + const filled = this.safeNumber (order, 'trade_amount'); + const amount = this.safeNumber (order, 'total_amount'); + const cost = this.safeNumber (order, 'trade_money'); const status = this.parseOrderStatus (this.safeString (order, 'status')); - if ((cost !== undefined) && (filled !== undefined) && (filled > 0)) { - average = cost / filled; - } const id = this.safeString (order, 'id'); - const feeCost = this.safeFloat (order, 'fees'); + const feeCost = this.safeNumber (order, 'fees'); let fee = undefined; if (feeCost !== undefined) { let feeCurrency = undefined; @@ -705,7 +703,7 @@ module.exports = class zb extends Exchange { 'currency': feeCurrency, }; } - return { + return this.safeOrder ({ 'info': order, 'id': id, 'clientOrderId': undefined, @@ -719,15 +717,15 @@ module.exports = class zb extends Exchange { 'side': side, 'price': price, 'stopPrice': undefined, - 'average': average, + 'average': undefined, 'cost': cost, 'amount': amount, 'filled': filled, - 'remaining': remaining, + 'remaining': undefined, 'status': status, 'fee': fee, 'trades': undefined, - }; + }); } parseOrderStatus (status) { @@ -790,7 +788,7 @@ module.exports = class zb extends Exchange { // const id = this.safeString (transaction, 'id'); const txid = this.safeString (transaction, 'hash'); - const amount = this.safeFloat (transaction, 'amount'); + const amount = this.safeNumber (transaction, 'amount'); let timestamp = this.parse8601 (this.safeString (transaction, 'submit_time')); timestamp = this.safeInteger (transaction, 'submitTime', timestamp); let address = this.safeString2 (transaction, 'toAddress', 'address'); @@ -810,7 +808,7 @@ module.exports = class zb extends Exchange { } const status = this.parseTransactionStatus (this.safeString (transaction, 'status')); let fee = undefined; - const feeCost = this.safeFloat (transaction, 'fees'); + const feeCost = this.safeNumber (transaction, 'fees'); if (feeCost !== undefined) { fee = { 'cost': feeCost, @@ -843,7 +841,7 @@ module.exports = class zb extends Exchange { if (password === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires exchange.password or a safePwd parameter'); } - const fees = this.safeFloat (params, 'fees'); + const fees = this.safeNumber (params, 'fees'); if (fees === undefined) { throw new ArgumentsRequired (this.id + ' withdraw() requires a fees parameter'); } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/package.json b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/package.json index 1521ec10e..fa1f929a7 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/package.json +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/node_modules/ccxt/package.json @@ -1,27 +1,27 @@ { - "_from": "ccxt@1.42.77", - "_id": "ccxt@1.42.77", + "_from": "ccxt@1.47.49", + "_id": "ccxt@1.47.49", "_inBundle": false, - "_integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==", + "_integrity": "sha512-aGjOGKX/wfStwD24dH7FweP2ktdbZBjhgLxkipFVaewnjsftyiuzCCikMS7IvSRON/aAMG0oqKUdVHL382BFMA==", "_location": "/ccxt", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "ccxt@1.42.77", + "raw": "ccxt@1.47.49", "name": "ccxt", "escapedName": "ccxt", - "rawSpec": "1.42.77", + "rawSpec": "1.47.49", "saveSpec": null, - "fetchSpec": "1.42.77" + "fetchSpec": "1.47.49" }, "_requiredBy": [ "#USER", "/" ], - "_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz", - "_shasum": "8ab5f8e7190854e163da6d4fcf44530794d0a21c", - "_spec": "ccxt@1.42.77", + "_resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.47.49.tgz", + "_shasum": "ef9c41b5573b85d3b83cf1292d0aa891c4d5b6bc", + "_spec": "ccxt@1.47.49", "_where": "C:\\Superalgos\\Projects\\Superalgos\\TS\\Bot-Modules\\Trading-Bot\\Low-Frequency-Trading\\APIs", "author": { "name": "Igor Kroitor", @@ -543,7 +543,9 @@ "equos.io", "EQUOS", "ndax.io", - "NDAX" + "NDAX", + "ascendex.com", + "AscendEX" ], "license": "MIT", "main": "./ccxt.js", @@ -587,5 +589,5 @@ }, "types": "./ccxt.d.ts", "unpkg": "dist/ccxt.browser.js", - "version": "1.42.77" + "version": "1.47.49" } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/package-lock.json b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/package-lock.json index 976144cc2..cd3bb8d9e 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/package-lock.json +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/package-lock.json @@ -3,9 +3,9 @@ "lockfileVersion": 1, "dependencies": { "ccxt": { - "version": "1.42.77", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.42.77.tgz", - "integrity": "sha512-vPaw8G3hr9iq1iJ59EHuA6iqjufgK6dNC7MjT3qV8YQbpEJoD2ynoFwfl1hbuvlyKlFjiOa3gHwhRV64UacBDQ==" + "version": "1.47.49", + "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.47.49.tgz", + "integrity": "sha512-aGjOGKX/wfStwD24dH7FweP2ktdbZBjhgLxkipFVaewnjsftyiuzCCikMS7IvSRON/aAMG0oqKUdVHL382BFMA==" } } } diff --git a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js index 94393fcd9..c3b50a007 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js +++ b/Projects/Superalgos/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js @@ -641,10 +641,13 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) { let order = await exchangeAPIModuleObject.getOrder(tradingSystemOrder, tradingEngineOrder) + let message + let docs + if (order === undefined) { - const message = 'Order Status Not Sync With Exchange' - let docs = { + message = 'Order Status Not Sync With Exchange' + docs = { project: 'Superalgos', category: 'Topic', type: 'TS LF Trading Bot Warning - ' + message, @@ -661,6 +664,59 @@ exports.newSuperalgosBotModulesTradingOrders = function (processIndex) { return false } + if (order === null) { + /* + Some exchanges, like Coinbase Pro, deletes orders after being cancelled, and when we request information + about them, it returns null. We will interprate this as ORDER NOT FOUND. + */ + message = 'Order Not Found at the Exchange' + docs = { + project: 'Superalgos', + category: 'Topic', + type: 'TS LF Trading Bot Warning - ' + message, + placeholder: {} + } + + tradingSystem.addWarning( + [ + [tradingSystemOrder.id, tradingEngineOrder.id], + message, + docs + ] + ) + + /* Close this Order */ + tradingEngineOrder.status.value = 'Closed' + /* + We must be carefull here not to overide an already defined exitType. It can happen + for instance that the order was cancellerd from the but veryfing the cancellation + was not possible because of a connection to the exchange problem. In that case + the exit type was defined but the order was kept open until the verification could be done. + */ + if (tradingEngineOrder.exitType.value === tradingEngineOrder.exitType.config.initialValue) { + tradingEngineOrder.exitType.value = 'Not Found at the Exchange' + } + /* Initialize this */ + tradingEngine.tradingCurrent.tradingEpisode.distanceToTradingEvent.closeOrder.value = 1 + + await updateEndsWithCycle(tradingEngineOrder) + + let message = "Order Closed" + let docs = { + project: 'Superalgos', + category: 'Topic', + type: 'TS LF Trading Bot Info - ' + message, + placeholder: {} + } + contextInfo = { + exitType: tradingEngineOrder.exitType.value + } + TS.projects.superalgos.utilities.docsFunctions.buildPlaceholder(docs, undefined, undefined, undefined, undefined, undefined, contextInfo) + + tradingSystem.addInfo([tradingSystemOrder.id, message, docs]) + return true + } + const AT_EXCHANGE_STATUS = { OPEN: 'open', CLOSED: 'closed',