From 6e2481a4b61a9370ef4e68f4044f9c32df771778 Mon Sep 17 00:00:00 2001 From: Prithviraj8 Date: Wed, 14 Dec 2022 13:01:46 +0530 Subject: [PATCH 1/5] add historical data --- scripts/Uniswap ETH-USDC Pool Swaps.csv | 101 ++++++++++++++++++++++++ scripts/Uniswap: ETH-USDC Pool Data.csv | 2 + scripts/signups_graph.py | 31 ++++++++ scripts/uniswap_historical_data.py | 101 ++++++++++++++++++++++++ 4 files changed, 235 insertions(+) create mode 100644 scripts/Uniswap ETH-USDC Pool Swaps.csv create mode 100644 scripts/Uniswap: ETH-USDC Pool Data.csv create mode 100644 scripts/signups_graph.py create mode 100644 scripts/uniswap_historical_data.py diff --git a/scripts/Uniswap ETH-USDC Pool Swaps.csv b/scripts/Uniswap ETH-USDC Pool Swaps.csv new file mode 100644 index 0000000..116d50f --- /dev/null +++ b/scripts/Uniswap ETH-USDC Pool Swaps.csv @@ -0,0 +1,101 @@ +,id,amountIn,amountInUSD,amountOut,amountOutUSD,timestamp,tokenIn,tokenOut +0,0x000034b19989093db01dab53cfdd68095df98894d1adea77e448dfb552095ef1-5,1478046135,1478.046135,1297103585614120489,1476.578315091771810754929749923415,1668987359,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +1,0x000109542b1fb2ef41094b1dcae49295bf6b67a359e3b7ba610555716c6d037a-2,124393481348542253740,147320.4138447047494083206833736018,147317476747,147317.476747,1669249007,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +2,0x00013508b3b56cf1613dc373b3ccf6fcafcd3f3c7b0860ae0574a9242d3c1504-88,389696273086551948,495.2751709179147683802682530179515,494151202,494.151202,1670086019,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +3,0x00024c60710fc0384d19877412a2c32d0e9bbf91bf1aa460ce71c3c8cb677fce-35,1790341195202309670,2245.472695963413720236948665845606,2250217200,2250.2172,1668417695,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +4,0x000295323120fc3e18f834bac8f2273ea078a1ed5cb3d319686add753553ae51-201,1137229071610171485,1501.625283348017482460174393642247,1500000000,1500,1670992451,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +5,0x0003126decf8b23dd624a5887fdf38ab955870bbdf7e8b31a7819a73e3d56cb4-135,1011075000000000000,1227.064967051691519853785195301846,1227497302,1227.497302,1668604391,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +6,0x00037cbcf8a1d38a7277f8e4dab3ed5e9ca29959bb13534d14581df2b3615a7b-215,5000000000,5000,4568903685867950012,4987.090647107708438915514655430467,1669121279,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +7,0x000388e7c7e5a5483fc1cc0b06a1f47f4696162becc4e31c7e4f1f7bd44eda6d-32,54821367652710738152,70561.78919821249295587817540921597,70692889520,70692.88952,1669864859,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +8,0x0003f86092a7496dafcf859edcd4013898d83106496bde3cbff58b690ecd4fe6-60,1970599275149658514,2318.376399461934350900527385242463,2317696024,2317.696024,1669655975,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +9,0x0004167242a562b2863db4ebd1f2785b9cddfbedfd6d81fb32bc8d0f07d5004a-214,6401495,6.401495,5393759277803882,6.389058294254219581811281717498997,1669373243,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +10,0x0004220c39f28a4bac8676cf54b1ca4b11a9baaff2ac90554167fcd095b5b370-53,817285625000000000,991.6592322535656731615887690330034,991224433,991.224433,1669582331,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +11,0x0004762e470db297b3f03b8f381fb1a2b1e2402781dbf6f05a5e18e8b0f3637d-172,100000000,100,78642597524776254,99.70859894718863499435120395202008,1670729795,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +12,0x00047d119b0fe5c194a152651284159dcbaf95164311d551f7f8bf4b067c9b55-119,145054547335,145054.547335,119821830852204860421,145231.3480732831214505859797147423,1668625247,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +13,0x0004e192535cec3a60af282022675ff0c2d3468622bf104909456e9c29ac034e-151,500000000,500,394545357882383759,498.5264199317388328343087378078006,1670635631,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +14,0x0004f746ba615d9a3df22196318142df5fa491ee9a90ed3098755b6e1a17f701-90,2000000000000000,2.463534886048492764939430353695576,2464984,2.464984,1670428643,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +15,0x0005b49f728da5c96717db6486d42c8b5351a16da719ed33319e3df3984749b5-2,67486844518,67486.844518,53444624962446430990,67622.18629755595054419742444168192,1670266823,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +16,0x0005cf567355979722d13b4a478fce9e0e4c1a8e1bf7cc4f62dc2e26ecd6f408-42,77838087386,77838.087386,63930141526521634778,77878.06567515199294818956125639041,1668922871,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +17,0x0005d800acf20c11921e167929bf89cffa93d4eefc9aaea71141280e49347534-22,2000000000,2000,1493146436193730042,1998.714377895442770217706746197551,1670939375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +18,0x0005e611811e9a0460476ab96e70582cc18fbff6b2e8bac8d2b6e186fd0a0be3-108,3000000000,3000,2361988642172534605,3001.379178785878219610871998859185,1670711375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +19,0x000607cc9b1170897fa53e2180f3869bafb01ddd918bf53cbe7d48eaaab1b7a7-72,7440097925086047395,8176.633145337944314306709869293087,8185666632,8185.666632,1669068167,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +20,0x0006181b51e4375d4904a8f6b864771b3d6f86f56218f8c590bf019fbcf2b071-187,388096393419025026,500.9144025080792978033335991935964,500000000,500,1670204507,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +21,0x00064665b6709a136a1a3eca9355153da033f50d77b2ec8f2e6ed4b971f674f4-351,990000000,990,783594442820526316,987.324576873590902845704747990882,1670261435,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +22,0x000690c8b385c9043eb36b8c338e32ec33ce03c10510de9579560e67193484c0-224,2544182551,2544.182551,2000000000000000000,2539.063668419619177449659903962748,1670073563,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +23,0x00070ee89a307945fa7729baa77bd84e9be8d9b18e46fe024ae3b83753548f4f-214,45300000000,45300,35511651508703748185,45178.27338399168430155128191996259,1669917419,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +24,0x00071755c1829f6009766383c27d531c654db6540ad91273e29fceac9c3bf81e-104,702515498477883100,852.5765966949496092385262389774738,854021771,854.021771,1669589579,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +25,0x00074e7856cec06964ed7e9e49ff0cee6749f98155e7776250d7da08207b2269-154,139000000000000000,177.7472365005762227623917226610236,177671873,177.671873,1670183963,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +26,0x0007c4a6748fbea2ba5f5075cea09a5405ef29268a058b974d68db33e26ccdbf-158,45442658,45.442658,37362710102650478,45.53036940777862799086296852570061,1669722515,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +27,0x000825d07190c273d8f39958291f012fabdbb5577309ac3fe043660ebc52fafe-93,228000000,228,172388892384274449,227.5897629261585089900564120965985,1671001391,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +28,0x00085069cd9ffec5e1f68ede86e20f8ea65c2ae7fa174fde1936db89cb8e078d-124,67320512286749998838,81773.57110781521689917846143607704,81746708429,81746.708429,1669548707,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +29,0x0008898332c996efce2135d5348846d0fcc4f3044204f108af39b3c19474ca3a-3,82811796991847364,99.96749693339951536658744491661348,100000000,100,1668875795,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +30,0x0008a0b7ef18ed49c539afc722e56c6fa0f0b2542be8baf1e2861354ad1b5e12-120,268837509,268.837509,240906796625060269,269.1687662485863878018567463640699,1669026455,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +31,0x0008b22f4f663e68e82192b06667813565f5d816148138ecc6fb7ed82d278555-85,2129728344019114732,2668.482123569571411980323395411168,2675643390,2675.64339,1668428819,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +32,0x000902e2e3d4f15e19a2d8a37c0b34bc9c6d7e4badee9556d7cbc11826143834-124,100000000,100,85191005348792565,100.0963313100343029559637904342475,1668978743,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +33,0x00092dc8a2bf0674d8e7797aab234a3b85f0b16a419aeb9e0ecf0d4c7178c8e4-180,152777605,152.777605,137284657287873814,153.1049090539555513682649217970112,1668997415,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +34,0x0009780b1d8832d4b3a05d66f5fb7002c897dc6ca388fb02a5c74ba1ae6470bc-147,4583736768746747300,5810.803676058068573256963843048245,5819064603,5819.064603,1669772879,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +35,0x0009901381c036baea27766f20c7b6aac9a4d229332cca6f71455081b1366b2c-165,10000000000000000000,11059.58199585079205593154609428095,11045782254,11045.782254,1669065383,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +36,0x0009a49bb36b4de21cdec10d6e8641677c69716749550b7b60e72dbb3c18f37a-232,6925825532,6925.825532,6354060709438919559,6928.839426761290640345460770525418,1669061171,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +37,0x0009c0ba8c08573bfcc61bff399028eb0bef8353a223a99e799c53263eee5132-206,87447456014375132,107.092654885082252611527530180462,107185780,107.18578,1670401295,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +38,0x0009ec2fa114966d9b3edb379f2597f13e0a46ae1654ce13d6fc7878c5a62ada-236,31333107943935781,37.66532096071870977652515595281959,37633804,37.633804,1668626351,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +39,0x0009ec819a74b4185662b04f6704e447fc3037a5c9a0b156db98937272d02612-239,1129580236,1129.580236,884570228461818042,1130.417217407118878694008264316261,1670689643,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +40,0x000a23a3e98df8c07549b7f8c222516b87a61a23e9a7163499243cb398d2035c-196,54265776504,54265.776504,40485968856449676884,54326.20537612968461225289413945937,1670941763,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +41,0x000a25a3b08a5e24baae101861573ea59f2aca70e15f93d13121cdfda10a79d0-6,7869309102889643019,9566.584642772533228669881049871249,9550687900,9550.6879,1668623483,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +42,0x000a2bf9bd2ee10c7801303d18148f8c5407f4610a4fe8bd7b5fb07e485c723b-121,99125000,99.125,84651418070043447,99.03451596541396836627247763058085,1669666007,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +43,0x000a684b44737cf1acd9371bc983ec44a404d87f48fabca7e89942c3e870783e-44,27350344568191546677,33240.64948953481851412664657399509,33143028360,33143.02836,1669715279,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +44,0x000a89fda78c8f5845caeb427707ad4fc91d61c15975f619bb2aaf8915656cda-167,10000000000,10000,7957409655479135576,9999.109402209031235002048623382547,1668576023,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +45,0x000aa2fcaa342432ff29b0f61b8ea6d8c745510f7da9833626dde4d7849d4857-11,1500000000,1500,1182827926964382184,1501.629906584126250801855413062794,1669800167,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +46,0x000abd2753811a34690102f00c0c7cdd59e61800e8399687b0d42355ecc4d60f-237,993156174759624577,1219.886541015505299052005703942452,1217944149,1217.944149,1670462459,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +47,0x000b0ac93173166df7d2d4de94b38eaf2780efc979c4c29df0d1821ba1a85505-173,6668158022,6668.158022,5761256241679568638,6681.304960695632393728037470608761,1668945695,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +48,0x000b37ee2ac2b68f6e7e30fdf00c61df399bfdc06e443fd9dbea4a32ae5a370f-98,3202169151,3202.169151,2742903108918189617,3208.055088524700354664652880173338,1669662743,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +49,0x000b45f4febd23c9a2925fc8fc37c9963004176240b705f98fd9a5f6052b29e7-2,62605920412,62605.920412,50000000000000000000,62588.99326313726189811356882286315,1668434015,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +50,0x000b8e4eae56dd42299645a621a0097f960f9f05cc85272bd3ee33d2696ab6d7-353,11700000000000000000,15082.28346043442768534247794052628,15059709297,15059.709297,1669838471,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +51,0x000b999f1375e194eaa5152bf4d4b8845b008c93def8449273c671577a01c29d-266,687164958,687.164958,580046858940971036,686.9551553836815145934704817638601,1669247999,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +52,0x000b9bb56e7978607284323c2615cba22cf2d4a353dcc64df5c449922863410c-126,3535346914,3535.346914,3041412752754335499,3539.28872216746250858777803334761,1669599455,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +53,0x000c3836e3a2df4376a32ff44c56083b533abad730cd146e51270e0ab2f6cf08-8,450882262988230807,555.2773404599807705863999197849959,556034529,556.034529,1668446027,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +54,0x000c9edcd8ff8f7feec27921f501f10464b28313e651b661027f466978282d5d-417,150000000,150,117100591073844210,149.8023591944646388042077757695854,1670002919,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +55,0x000cc846c4602eecfc0efc7f0125dfc5c5c9efc9763a2e14c5e195aea880bf73-153,117808794991173302,150.5153514500488001235795203310101,150228813,150.228813,1668431987,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +56,0x000cd89ef1c023489aec226bccd6fb7c7d7771bb56a41bc08145894fbc3aae77-211,802157762987866885,902.4806412632238390991728378309284,900000000,900,1669151699,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +57,0x000d2f929ad6b2ea2655b332f36c1bab7188b7dd4d622c451019f80569f64925-8,87254976746373802924,104461.2209480090457008913318584241,104129116753,104129.116753,1668690719,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +58,0x000d4d4bec2733a5c7bcf5b7f1f691182e12a05f2d5dcb0932727353cc4f0ab7-33,221657941080,221657.94108,189335471985985574114,220425.9601023615653465398878708739,1669599983,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +59,0x000d89e165456257fdf017295aae0a063001adc1e6620ef84000f8c4356be4a7-2,221186270193399988224,266858.8080617627670272936454727703,266187416608,266187.416608,1669734323,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +60,0x000d8e5680165bf604347e8815e2f60a5d9c98e9069228749307080d1a18516e-96,489722102,489.722102,377821614661595811,489.7597181657740029697560266812508,1670235779,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +61,0x000dbae30551139bb78a4b98a1c803cfc5b1f9c57341cdc82675ce1bb3a23701-160,100000000000000000,126.5243129921480351784745360172717,126468495,126.468495,1668529523,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +62,0x000e007687c10375cbf9c78a5274972a93dab80e909f0c6909e2cb2953a56f7f-31,5500000000000000000,7027.246500126307297950827907814847,7005200863,7005.200863,1669770335,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +63,0x000eaf2897b7632720d06e751c460deef645c2949eddeb7e8b0ff133adb4ef8c-128,540356828420055709,677.6083679364369407590902660987313,678714873,678.714873,1670328311,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +64,0x000f14dcf174b6790da1346cebd4460c8f3f10305d89c02d7c036f08310cacfc-108,228094655,228.094655,185174582305186625,227.7905249066587186213436339303054,1668594491,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +65,0x000f5626300f0750d40c415ffb5319dab8f11cf9382c7185c34babbbeedbedb6-172,101652458,101.652458,87150260424868370,101.8421160125417030480059430090612,1669647419,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +66,0x001040ea10eedbf195c3e9988bb95c7109e87d7d96dcd0906119273fe928d068-173,23000000000000000000,30788.1767384040163376148840199038,30762373882,30762.373882,1670939507,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +67,0x0010a07b7c62b059bde59c295bf7ebd09e659c658c5188deb94574a75319cd9f-139,80000000000000000,99.58997994935005326387592895327608,99637545,99.637545,1670835083,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +68,0x0010b699f97ea378a15167caa3e4e8070b313ba118f0dd72606b44f7666f8350-235,597203256,597.203256,500000000000000000,596.2660536738925758971493451728535,1668696947,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +69,0x0010dd1dbac464fd4ed4ede750d1b1e4fb158e9f7e6026e73f27e54a5ff8cfa5-69,1750000000000000000,2089.601298743384860498322075605391,2089022275,2089.022275,1669305263,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +70,0x0010f8f919531f9daa4efc721941fc580c13c42b95b00dc9abc87e06bbef2697-36,442781958277,442781.958277,370569755838053934921,441219.7821704383950129858842076921,1668614087,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +71,0x001175d295e10249b1640d054e053af5a9a5bcef08c011d8794fa1e5e2ce6bdf-62,786700674450090592,999.6541937387814849412899987617145,1000000000,1000,1670707715,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +72,0x00121c8a984a71690a93c490bbaef5411add5426bfeb1fdd69ae6269230f7d1b-161,34072253428,34072.253428,31107982801544335415,33965.97228210157587422971946157141,1669121543,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +73,0x001265c2257e256b443713aff5022659f03b9ba08febe5c4d759f0acd51c0482-351,161964750,161.96475,134192084775607378,161.9915767886102394535360302164904,1668879899,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +74,0x0012917541bb034476239c7ffbb000616759770495d1bf91e335d9ad51105320-27,127450144274908757375,163985.2250711530765749779309840744,163463834599,163463.834599,1670048267,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +75,0x0012ad233c8d4cf38198bb5c640472d205e9da9fa18299c89f9fcc477f3d9c07-9,102149639164,102149.639164,81379782168142732278,101896.237151900339483203814101855,1670875595,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +76,0x0012b032df97c36ef32607e9b3d263b03115a68a100891bb835ae2725a3ed6f2-26,50787677789816421008,62657.7113730068030538294663300701,62586678315,62586.678315,1670459735,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +77,0x0012c310765d694981ed0aa40b6846bca0a5808ad0d398eb77fb700f2001f9a3-3,173186388,173.186388,136622098968674253,172.7443847887911814620570371101012,1669808939,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +78,0x0012c354eaf8edd4d2a6009674b9f91377ed113b950441575516615a3fec24a3-148,1378357748731678842,1681.258038689653328284891096921859,1676865176,1676.865176,1668914243,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +79,0x00138ea17bd330402363b3252d0c9b7dd893b5ed34f7e7c919770be94825ccf1-2,168052000000,168052,143965636224748615781,167893.8890881633508467271685834583,1669231907,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +80,0x0014a538a76197d5c536100b4a6c52c16a87af5283fbee0b714858747f8aaa50-25,63997310942,63997.310942,53183946836339303127,63796.8459323684798932939451968641,1668659591,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +81,0x0014a84e893dbf1d8193adec6aa76386af504813b8e990220ee82ea23990b057-207,2000000000,2000,1641922405233304959,1993.640900350500869230657732975156,1668620759,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +82,0x0014d7c9387f1528db92c962607db231a0eb808998173af53650eec1292d5aa4-47,146286098699,146286.098699,125371201071187266249,145939.9291728625466382775074083112,1669599899,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +83,0x00150b5e805660507d84711d32cf543b1116f68f2b6fa6a0eb8cbcc1e5af84ef-197,100000000,100,79537633692585247,99.71530439422134962750911011122191,1670274563,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +84,0x0015e71bcc7b5fbd63ea510d1c60343c0a19a3376e187e57a9621f5f0770cdb4-16,88148000000,88148,69087960209172972637,88009.98790712475759844056308570797,1669834115,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +85,0x0015eaf66faa1acb169d9c642abf998510b76c59f493346599f3de7d9a146743-60,500000000,500,385570084899493365,499.7767468188205352665785344849472,1670239655,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +86,0x0016191988c376ba039da0662c8ee0c57d3bb86a4e1690a6bf6cef1f74271df2-82,1011663561,1011.663561,833634224945509249,1012.939185479613504907922107504041,1668458987,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +87,0x001656a38a19043974d745eaa2dcf67470191b1e948e73cd74d5822795c7278d-83,457957500,457.9575,356706798367087471,457.816837379571089771993924789184,1670927195,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +88,0x00168edd933bf9e5d35bf6ee876be61e85e5a60fb34fa313ece8f84d4b570661-60,9200000000000000000,11658.20239861051633754561834888595,11633717910,11633.71791,1670797679,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +89,0x0016b868c9d71c2d30bcf3cba0dac01ba0c11e8d36950aa8a0840d85e2f80ebe-12,90000000000000000,114.3019300381844645737136539136624,114503394,114.503394,1670735639,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +90,0x0016eafe88732712823fcd5fb06f3332f0e0e998c1f083af41faf961fdfd5700-72,5130615637,5130.615637,4000000000000000000,5125.460865596803003337015874313644,1669895627,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +91,0x0016f40c21c019565d6cb709bfa4c3bb51db7a24f96c7c3032903f0ba15f68cf-195,274691190,274.69119,220521542851804911,274.5217003876373706347494922217498,1670833439,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +92,0x0017041ec60d690371e94d89a359c880ebfaf06be1526c82e7d09144f886c53f-15,94501582361,94501.582361,74364927802113063576,94459.86676913179806107167442815025,1670372927,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +93,0x0017325941aa39405b16edefe957f948d06e92256d5daf51a45688afa61d7d24-141,300000000,300,233553202981922484,300.2968135859144996724471181171974,1670582039,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +94,0x0017365db4b32af9ae489381216edc37f71549eb25398b2c86a9ea1f3b31fe51-113,1608879518,1608.879518,1268611335373476330,1608.373107450809429350277100394909,1670613683,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +95,0x001848cbde097eb69a11298e0aa202f0dae69cf0ddc23173a85f9bae130b44e0-31,285463996001386370482,319246.4143789552760494236889770393,318581113685,318581.113685,1669124183,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +96,0x00190c5ae20013c5398983e68a66eb1920a6b9c8fbc1b57a35874e5f50dc1056-2,68804418803,68804.418803,59244783242288670360,68762.13741266891496172661068982674,1669174463,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +97,0x001915b3a91dfbaad2724a43962883fc775ffd3910e50ebe367909c7098b3f6f-146,67825326563021070,85.7756676874583562905877384000105,85713786,85.713786,1670639939,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +98,0x0019d2cce8667b56bc0d471f98007a479197b7c70866f2f42088339208ff1b32-157,2180230404539721659,2786.177861187842370831727056731085,2782134766,2782.134766,1670689199,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +99,0x0019ee344636db8fc546efb0173025b3546cd1836ef2fec50aabba53e415ee41-115,555934947212639472,602.8231358122314493283779813467397,603005278,603.005278,1669113215,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" diff --git a/scripts/Uniswap: ETH-USDC Pool Data.csv b/scripts/Uniswap: ETH-USDC Pool Data.csv new file mode 100644 index 0000000..8009e4c --- /dev/null +++ b/scripts/Uniswap: ETH-USDC Pool Data.csv @@ -0,0 +1,2 @@ +,timestamp,cumulativeProtocolSideRevenueUSD,cumulativeSupplySideRevenueUSD,cumulativeTotalRevenueUSD,cumulativeVolumeUSD,fees,name +0,,0,157252292.1265826042557284213258822,157252292.1265826042557284213258822,314504584253.1652085114568426515811,"[{'id': 'lp-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_LP_FEE', 'feePercentage': '0.05'}, {'id': 'protocol-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_PROTOCOL_FEE', 'feePercentage': '0'}, {'id': 'trading-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_TRADING_FEE', 'feePercentage': '0.05'}]",Uniswap V3 USD Coin/Wrapped Ether 0.05% diff --git a/scripts/signups_graph.py b/scripts/signups_graph.py new file mode 100644 index 0000000..ab9c250 --- /dev/null +++ b/scripts/signups_graph.py @@ -0,0 +1,31 @@ +import pandas as pd +import matplotlib.pyplot as plt +import numpy as np + +df = pd.read_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/v4.csv') +print(df) + +signup_dates = df["Signup date"].values.tolist() +# signup_dates +wallets = df["Crypo wallet address"].values.tolist() +# wallets + +xpoints = np.array(signup_dates) +ypoints = np.array(wallets) + +plt.ylim(0, 200) +plt.xlim(0, 100) + +plt.ylabel("Wallets") +plt.xlabel("Signup Dates") + +plt.plot(xpoints, ypoints) +# plt.vlines( +# x=70, +# ymin=0, +# ymax=200, +# colors="red", +# label='Signups and Wallets', +# ) +# plt.legend() +plt.show() \ No newline at end of file diff --git a/scripts/uniswap_historical_data.py b/scripts/uniswap_historical_data.py new file mode 100644 index 0000000..7eaa44a --- /dev/null +++ b/scripts/uniswap_historical_data.py @@ -0,0 +1,101 @@ +from gql import gql, Client +from gql.transport.requests import RequestsHTTPTransport +from pprint import pprint +import pandas as pd + +class UniswapHistoricalData(object): + def __init__(self): + self.aave_sub_graph_url = ( + "https://gateway.thegraph.com/api/884fed2091150d4d643b1415d340cfba/subgraphs/id/ELUcwgpm14LKPLrBRuVvPvNKHQ9HvwmtKgKSH6123cr7" + ) + + def fetch_sub_graph_query(self, liquidity_pool_id): + sub_graph_query = """ + { + liquidityPools(where: {id: "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"}) { + name + fees { + id + feeType + feePercentage + } + symbol + totalValueLockedUSD + cumulativeVolumeUSD + cumulativeTotalRevenueUSD + cumulativeSupplySideRevenueUSD + cumulativeProtocolSideRevenueUSD + swaps(where: {timestamp_gt: "1668408932"}) { + id + amountIn + amountInUSD + amountOut + amountOutUSD + tokenIn { + name + symbol + } + tokenOut { + name + symbol + } + timestamp + } + } + } + """ + return sub_graph_query + + def fetch_data(self, pool_id): + graph = self.fetch_sub_graph_query(pool_id) + query = gql(graph) + transport = RequestsHTTPTransport( + url=self.aave_sub_graph_url, + verify=True, + retries=3, + ) + client = Client(transport=transport) + + response_dict = client.execute(query) + return response_dict + + def create_csv(self, data): + pprint(data) + # Uncomment this to get pool data without swaps of that pool. + historical_data = pd.DataFrame( + data['liquidityPools'], + columns=[ + "timestamp", + "cumulativeProtocolSideRevenueUSD", + "cumulativeSupplySideRevenueUSD", + "cumulativeTotalRevenueUSD", + "cumulativeVolumeUSD", + "fees", + "name", + ], + ) + historical_data.to_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Uniswap: {} Pool Data.csv'.format('ETH-USDC')) + + # Uncomment this to get swaps data of a certain Pool + historical_swaps_data = pd.DataFrame( + data['liquidityPools'][0]['swaps'], + columns=[ + "id", + "amountIn", + "amountInUSD", + "amountOut", + "amountOutUSD", + "timestamp", + "tokenIn", + "tokenOut", + ], + ) + historical_swaps_data.to_csv( + '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Uniswap {} Pool Swaps.csv'.format( + 'ETH-USDC')) + + +if __name__ == "__main__": + a = UniswapHistoricalData() + data = a.fetch_data(["0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640"]) + a.create_csv(data) From 97617dcb005e96043ee7262da6937f0dbe6b6853 Mon Sep 17 00:00:00 2001 From: Prithviraj8 Date: Wed, 21 Dec 2022 10:33:30 +0530 Subject: [PATCH 2/5] add deribit orderbook code --- components/black_scholes_options_pricing.py | 27 +- scripts/Derbit_asks.csv | 221 ++++++++++++ scripts/Derbit_bids.csv | 351 ++++++++++++++++++++ scripts/deribit_order_book.py | 34 ++ scripts/options.py | 171 ++++++---- 5 files changed, 739 insertions(+), 65 deletions(-) create mode 100644 scripts/Derbit_asks.csv create mode 100644 scripts/Derbit_bids.csv create mode 100644 scripts/deribit_order_book.py diff --git a/components/black_scholes_options_pricing.py b/components/black_scholes_options_pricing.py index a3c1fe1..e5d4ab8 100644 --- a/components/black_scholes_options_pricing.py +++ b/components/black_scholes_options_pricing.py @@ -6,12 +6,12 @@ class BlackScholesOptionPricing(object): def __init__( - self, - current_asset_price=None, - strike_price=None, - option_expiration=1, - risk_free_rate=0.1, - sigma=0.3, + self, + current_asset_price=None, + strike_price=None, + option_expiration=1, + risk_free_rate=0.1, + sigma=0.3, ): self.current_asset_price = current_asset_price self.strike_price = strike_price @@ -21,14 +21,23 @@ def __init__( def get_put_option_price(self): d1 = ( - np.log(self.current_asset_price / self.strike_price) - + (self.risk_free_rate + self.sigma**2 / 2) * self.option_expiration - ) / (self.sigma * np.sqrt(self.option_expiration)) + np.log(self.current_asset_price / self.strike_price) + + (self.risk_free_rate + self.sigma ** 2 / 2) * self.option_expiration + ) / (self.sigma * np.sqrt(self.option_expiration)) d2 = d1 - self.sigma * np.sqrt(self.option_expiration) return self.strike_price * np.exp( -self.risk_free_rate * self.option_expiration ) * CDF(-d2) - self.current_asset_price * CDF(-d1) + def get_call_option_price(self): + d1 = ( + np.log(self.current_asset_price / self.strike_price) + + (self.risk_free_rate + self.sigma ** 2 / 2) * self.option_expiration + ) / (self.sigma * np.sqrt(self.option_expiration)) + d2 = d1 - self.sigma * np.sqrt(self.option_expiration) + + return (self.current_asset_price * CDF(d1)) - (self.strike_price * np.exp((-self.risk_free_rate) * self.option_expiration) * CDF(d2)) + if __name__ == "__main__": current_asset_price = 2938.53 diff --git a/scripts/Derbit_asks.csv b/scripts/Derbit_asks.csv new file mode 100644 index 0000000..cb463ba --- /dev/null +++ b/scripts/Derbit_asks.csv @@ -0,0 +1,221 @@ +,price,amount +0,1210.55,1491.0 +1,1210.75,1833.0 +2,1210.8,1270.0 +3,1210.85,4823.0 +4,1210.9,4664.0 +5,1210.95,16999.0 +6,1211.0,18603.0 +7,1211.05,27832.0 +8,1211.15,47662.0 +9,1211.2,1708.0 +10,1211.9,155.0 +11,1212.2,1000.0 +12,1212.65,1100.0 +13,1216.95,2000.0 +14,1225.45,2070.0 +15,1500.0,52500.0 +16,1609.1,123.0 +17,1873.05,9000.0 +18,2222.0,333.0 +19,2400.0,10000.0 +20,2885.0,47436.0 +21,3889.65,100.0 +22,4000.0,1000.0 +23,4186.2,4215.0 +24,5000.0,11000.0 +25,5555.0,1.0 +26,7180.4,1.0 +27,9999.95,1.0 +28,18285.0,30000.0 +29,38500.0,40.0 +0,1210.75,12181.0 +1,1210.8,1612.0 +2,1210.85,4823.0 +3,1210.9,7092.0 +4,1210.95,4500.0 +5,1211.0,16067.0 +6,1211.05,27995.0 +7,1211.1,22571.0 +8,1211.15,46913.0 +9,1211.2,110010.0 +10,1211.9,155.0 +11,1212.2,1000.0 +12,1212.65,1100.0 +13,1216.95,2000.0 +14,1225.45,2070.0 +15,1500.0,52500.0 +16,1609.1,123.0 +17,1816.15,1.0 +18,1873.05,9000.0 +19,2222.0,333.0 +20,2400.0,10000.0 +21,2885.0,47436.0 +22,3889.65,100.0 +23,4000.0,1000.0 +24,4186.2,4215.0 +25,5000.0,11000.0 +26,5555.0,1.0 +27,7180.4,1.0 +28,9999.95,1.0 +29,18285.0,30000.0 +30,38500.0,40.0 +0,1208.65,1430.0 +1,1208.8,2500.0 +2,1208.85,6046.0 +3,1208.9,4500.0 +4,1208.95,14151.0 +5,1209.0,4651.0 +6,1209.05,14967.0 +7,1209.1,4954.0 +8,1209.15,58964.0 +9,1209.2,100089.0 +10,1210.75,100.0 +11,1211.9,155.0 +12,1212.2,1000.0 +13,1212.65,1000.0 +14,1216.95,2000.0 +15,1225.45,2070.0 +16,1500.0,52500.0 +17,1609.1,123.0 +18,1813.0,1.0 +19,1873.05,9000.0 +20,2222.0,333.0 +21,2400.0,10000.0 +22,2885.0,47436.0 +23,3889.65,100.0 +24,4000.0,1000.0 +25,4186.2,4215.0 +26,5000.0,11000.0 +27,5555.0,1.0 +28,7180.4,1.0 +29,9999.95,1.0 +30,18285.0,30000.0 +31,38500.0,40.0 +0,1208.65,1430.0 +1,1208.8,2500.0 +2,1208.85,6046.0 +3,1208.9,4500.0 +4,1208.95,14050.0 +5,1209.0,5985.0 +6,1209.05,17424.0 +7,1209.1,4954.0 +8,1209.15,56433.0 +9,1209.2,100089.0 +10,1210.75,100.0 +11,1211.9,155.0 +12,1212.2,1000.0 +13,1212.65,1000.0 +14,1216.95,2000.0 +15,1225.45,2070.0 +16,1500.0,52500.0 +17,1609.1,123.0 +18,1873.05,9000.0 +19,2222.0,333.0 +20,2400.0,10000.0 +21,2885.0,47436.0 +22,3889.65,100.0 +23,4000.0,1000.0 +24,4186.2,4215.0 +25,5000.0,11000.0 +26,5555.0,1.0 +27,7180.4,1.0 +28,9999.95,1.0 +29,18285.0,30000.0 +30,38500.0,40.0 +0,1208.65,1430.0 +1,1208.8,2500.0 +2,1208.85,6046.0 +3,1208.9,4500.0 +4,1208.95,14050.0 +5,1209.0,5985.0 +6,1209.05,17424.0 +7,1209.1,4954.0 +8,1209.15,56433.0 +9,1209.2,100089.0 +10,1210.75,100.0 +11,1211.9,155.0 +12,1212.2,1000.0 +13,1212.65,1000.0 +14,1216.95,2000.0 +15,1225.45,2070.0 +16,1500.0,52500.0 +17,1609.1,123.0 +18,1813.0,1.0 +19,1873.05,9000.0 +20,2222.0,333.0 +21,2400.0,10000.0 +22,2885.0,47436.0 +23,3889.65,100.0 +24,4000.0,1000.0 +25,4186.2,4215.0 +26,5000.0,11000.0 +27,5555.0,1.0 +28,7180.4,1.0 +29,9999.95,1.0 +30,18285.0,30000.0 +31,38500.0,40.0 +0,1208.65,1430.0 +1,1208.8,2500.0 +2,1208.85,6046.0 +3,1208.9,4500.0 +4,1208.95,14050.0 +5,1209.0,5985.0 +6,1209.05,17424.0 +7,1209.1,4954.0 +8,1209.15,56433.0 +9,1209.2,100089.0 +10,1210.75,100.0 +11,1211.9,155.0 +12,1212.2,1000.0 +13,1212.65,1000.0 +14,1216.95,2000.0 +15,1225.45,2070.0 +16,1500.0,52500.0 +17,1609.1,123.0 +18,1813.0,1.0 +19,1873.05,9000.0 +20,2222.0,333.0 +21,2400.0,10000.0 +22,2885.0,47436.0 +23,3889.65,100.0 +24,4000.0,1000.0 +25,4186.2,4215.0 +26,5000.0,11000.0 +27,5555.0,1.0 +28,7180.4,1.0 +29,9999.95,1.0 +30,18285.0,30000.0 +31,38500.0,40.0 +0,1208.7,1.0 +1,1208.75,3000.0 +2,1208.85,3708.0 +3,1208.95,5150.0 +4,1209.0,15013.0 +5,1209.05,5890.0 +6,1209.1,7408.0 +7,1209.15,100352.0 +8,1209.2,62044.0 +9,1209.25,111488.0 +10,1210.75,100.0 +11,1211.9,155.0 +12,1212.2,1000.0 +13,1212.65,1000.0 +14,1216.95,2000.0 +15,1225.45,2070.0 +16,1500.0,52500.0 +17,1609.1,123.0 +18,1813.05,1.0 +19,1873.05,9000.0 +20,2222.0,333.0 +21,2400.0,10000.0 +22,2885.0,47436.0 +23,3889.65,100.0 +24,4000.0,1000.0 +25,4186.2,4215.0 +26,5000.0,11000.0 +27,5555.0,1.0 +28,7180.4,1.0 +29,9999.95,1.0 +30,18285.0,30000.0 +31,38500.0,40.0 diff --git a/scripts/Derbit_bids.csv b/scripts/Derbit_bids.csv new file mode 100644 index 0000000..4df0e13 --- /dev/null +++ b/scripts/Derbit_bids.csv @@ -0,0 +1,351 @@ +,price,amount +0,1210.5,27412.0 +1,1210.45,1670.0 +2,1210.4,2410.0 +3,1210.3,7445.0 +4,1210.25,10705.0 +5,1210.2,4558.0 +6,1210.15,4500.0 +7,1210.1,20340.0 +8,1210.05,5108.0 +9,1210.0,59052.0 +10,1208.3,155.0 +11,1204.7,155.0 +12,1203.45,2000.0 +13,1203.4,930.0 +14,1201.1,155.0 +15,1195.6,2070.0 +16,1189.05,155.0 +17,1168.15,155.0 +18,1132.5,155.0 +19,1061.2,153.0 +20,1034.7,154.0 +21,1000.0,52500.0 +22,995.1,154.0 +23,982.1,26.0 +24,915.85,154.0 +25,900.0,4510.0 +26,800.0,26400.0 +27,751.95,3521.0 +28,750.8,386.0 +29,701.0,45.0 +30,691.0,49.0 +31,681.0,53.0 +32,671.0,56.0 +33,661.0,59.0 +34,651.0,61.0 +35,641.0,61.0 +36,631.0,62.0 +37,623.45,915.0 +38,621.0,62.0 +39,611.0,60.0 +40,605.25,1.0 +41,603.9,6257.0 +42,601.0,58.0 +43,600.0,2500.0 +44,591.0,55.0 +45,581.0,52.0 +46,571.0,47.0 +47,561.0,43.0 +48,551.0,37.0 +49,541.0,32.0 +0,1210.7,199.0 +1,1210.5,9139.0 +2,1210.45,7000.0 +3,1210.4,7440.0 +4,1210.3,5440.0 +5,1210.25,13166.0 +6,1210.2,5001.0 +7,1210.15,5963.0 +8,1210.1,72486.0 +9,1210.05,22704.0 +10,1208.3,155.0 +11,1204.7,155.0 +12,1203.45,2000.0 +13,1203.4,930.0 +14,1201.1,155.0 +15,1195.6,2070.0 +16,1189.05,155.0 +17,1168.15,155.0 +18,1132.5,155.0 +19,1061.2,153.0 +20,1034.7,154.0 +21,1000.0,52500.0 +22,995.1,154.0 +23,982.1,26.0 +24,915.85,154.0 +25,900.0,4510.0 +26,800.0,26400.0 +27,751.95,3521.0 +28,750.8,386.0 +29,701.0,45.0 +30,691.0,49.0 +31,681.0,53.0 +32,671.0,56.0 +33,661.0,59.0 +34,651.0,61.0 +35,641.0,61.0 +36,631.0,62.0 +37,623.45,915.0 +38,621.0,62.0 +39,611.0,60.0 +40,605.35,1.0 +41,603.9,6257.0 +42,601.0,58.0 +43,600.0,2500.0 +44,591.0,55.0 +45,581.0,52.0 +46,571.0,47.0 +47,561.0,43.0 +48,551.0,37.0 +49,541.0,32.0 +0,1208.55,16955.0 +1,1208.5,4882.0 +2,1208.45,4689.0 +3,1208.4,11924.0 +4,1208.35,9378.0 +5,1208.3,4973.0 +6,1208.25,6025.0 +7,1208.2,45914.0 +8,1208.15,1134.0 +9,1208.1,67258.0 +10,1204.7,155.0 +11,1203.45,2000.0 +12,1203.4,930.0 +13,1201.1,155.0 +14,1195.6,2070.0 +15,1189.05,155.0 +16,1168.15,155.0 +17,1132.5,155.0 +18,1061.2,153.0 +19,1034.7,154.0 +20,1000.0,52500.0 +21,995.1,154.0 +22,982.1,26.0 +23,915.85,154.0 +24,900.0,4510.0 +25,800.0,26400.0 +26,751.95,3521.0 +27,750.8,386.0 +28,701.0,45.0 +29,691.0,49.0 +30,681.0,53.0 +31,671.0,56.0 +32,661.0,59.0 +33,651.0,61.0 +34,641.0,61.0 +35,631.0,62.0 +36,623.45,915.0 +37,621.0,62.0 +38,611.0,60.0 +39,604.25,1.0 +40,603.9,6257.0 +41,601.0,58.0 +42,600.0,2500.0 +43,591.0,55.0 +44,581.0,52.0 +45,571.0,47.0 +46,561.0,43.0 +47,551.0,37.0 +48,541.0,32.0 +49,531.0,27.0 +0,1208.55,16956.0 +1,1208.5,4882.0 +2,1208.45,4689.0 +3,1208.4,14002.0 +4,1208.35,4876.0 +5,1208.3,4973.0 +6,1208.25,8449.0 +7,1208.2,45914.0 +8,1208.15,1134.0 +9,1208.1,67258.0 +10,1204.7,155.0 +11,1203.45,2000.0 +12,1203.4,930.0 +13,1201.1,155.0 +14,1195.6,2070.0 +15,1189.05,155.0 +16,1168.15,155.0 +17,1132.5,155.0 +18,1061.2,153.0 +19,1034.7,154.0 +20,1000.0,52500.0 +21,995.1,154.0 +22,982.1,26.0 +23,915.85,154.0 +24,900.0,4510.0 +25,800.0,26400.0 +26,751.95,3521.0 +27,750.8,386.0 +28,701.0,45.0 +29,691.0,49.0 +30,681.0,53.0 +31,671.0,56.0 +32,661.0,59.0 +33,651.0,61.0 +34,641.0,61.0 +35,631.0,62.0 +36,623.45,915.0 +37,621.0,62.0 +38,611.0,60.0 +39,604.25,1.0 +40,603.9,6257.0 +41,601.0,58.0 +42,600.0,2500.0 +43,591.0,55.0 +44,581.0,52.0 +45,571.0,47.0 +46,561.0,43.0 +47,551.0,37.0 +48,541.0,32.0 +49,531.0,27.0 +0,1208.55,16956.0 +1,1208.5,4882.0 +2,1208.45,4689.0 +3,1208.4,14002.0 +4,1208.35,4876.0 +5,1208.3,4973.0 +6,1208.25,8449.0 +7,1208.2,45914.0 +8,1208.15,1134.0 +9,1208.1,67258.0 +10,1204.7,155.0 +11,1203.45,2000.0 +12,1203.4,930.0 +13,1201.1,155.0 +14,1195.6,2070.0 +15,1189.05,155.0 +16,1168.15,155.0 +17,1132.5,155.0 +18,1061.2,153.0 +19,1034.7,154.0 +20,1000.0,52500.0 +21,995.1,154.0 +22,982.1,26.0 +23,915.85,154.0 +24,900.0,4510.0 +25,800.0,26400.0 +26,751.95,3521.0 +27,750.8,386.0 +28,701.0,45.0 +29,691.0,49.0 +30,681.0,53.0 +31,671.0,56.0 +32,661.0,59.0 +33,651.0,61.0 +34,641.0,61.0 +35,631.0,62.0 +36,623.45,915.0 +37,621.0,62.0 +38,611.0,60.0 +39,604.25,1.0 +40,603.9,6257.0 +41,601.0,58.0 +42,600.0,2500.0 +43,591.0,55.0 +44,581.0,52.0 +45,571.0,47.0 +46,561.0,43.0 +47,551.0,37.0 +48,541.0,32.0 +49,531.0,27.0 +0,1208.55,16956.0 +1,1208.5,4882.0 +2,1208.45,4689.0 +3,1208.4,14002.0 +4,1208.35,4876.0 +5,1208.3,4973.0 +6,1208.25,8449.0 +7,1208.2,45914.0 +8,1208.15,1134.0 +9,1208.1,67258.0 +10,1204.7,155.0 +11,1203.45,2000.0 +12,1203.4,930.0 +13,1201.1,155.0 +14,1195.6,2070.0 +15,1189.05,155.0 +16,1168.15,155.0 +17,1132.5,155.0 +18,1061.2,153.0 +19,1034.7,154.0 +20,1000.0,52500.0 +21,995.1,154.0 +22,982.1,26.0 +23,915.85,154.0 +24,900.0,4510.0 +25,800.0,26400.0 +26,751.95,3521.0 +27,750.8,386.0 +28,701.0,45.0 +29,691.0,49.0 +30,681.0,53.0 +31,671.0,56.0 +32,661.0,59.0 +33,651.0,61.0 +34,641.0,61.0 +35,631.0,62.0 +36,623.45,915.0 +37,621.0,62.0 +38,611.0,60.0 +39,604.25,1.0 +40,603.9,6257.0 +41,601.0,58.0 +42,600.0,2500.0 +43,591.0,55.0 +44,581.0,52.0 +45,571.0,47.0 +46,561.0,43.0 +47,551.0,37.0 +48,541.0,32.0 +49,531.0,27.0 +0,1208.65,25175.0 +1,1208.5,5804.0 +2,1208.45,7600.0 +3,1208.4,9692.0 +4,1208.35,4600.0 +5,1208.3,5101.0 +6,1208.25,6161.0 +7,1208.2,79140.0 +8,1208.15,29600.0 +9,1208.1,1208.0 +10,1204.7,155.0 +11,1203.45,2000.0 +12,1203.4,930.0 +13,1201.1,155.0 +14,1195.6,2070.0 +15,1189.05,155.0 +16,1168.15,155.0 +17,1132.5,155.0 +18,1061.2,153.0 +19,1034.7,154.0 +20,1000.0,52500.0 +21,995.1,154.0 +22,982.1,26.0 +23,915.85,154.0 +24,900.0,4510.0 +25,800.0,26400.0 +26,751.95,3521.0 +27,750.8,386.0 +28,701.0,45.0 +29,691.0,49.0 +30,681.0,53.0 +31,671.0,56.0 +32,661.0,59.0 +33,651.0,61.0 +34,641.0,61.0 +35,631.0,62.0 +36,623.45,915.0 +37,621.0,62.0 +38,611.0,60.0 +39,604.35,1.0 +40,603.9,6257.0 +41,601.0,58.0 +42,600.0,2500.0 +43,591.0,55.0 +44,581.0,52.0 +45,571.0,47.0 +46,561.0,43.0 +47,551.0,37.0 +48,541.0,32.0 +49,531.0,27.0 diff --git a/scripts/deribit_order_book.py b/scripts/deribit_order_book.py new file mode 100644 index 0000000..f079303 --- /dev/null +++ b/scripts/deribit_order_book.py @@ -0,0 +1,34 @@ +import pandas as pd +import requests + + +class Deribit(object): + url = "https://test.deribit.com/api/v2/public/" + + def get_order_book(self): + url = self.url + "get_order_book" + resp = requests.get(url, params={'depth': 50, 'instrument_name': 'ETH-PERPETUAL'}) + print(resp.json()) + return resp.json()['result'] + + def create_csv(self, data): + df_bids = pd.DataFrame( + data=data['bids'], + columns=['price', + 'amount'] + ) + + df_asks = pd.DataFrame( + data=data['asks'], + columns=['price', + 'amount'] + ) + + df_bids.to_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Derbit_bids.csv') + df_asks.to_csv( + '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Derbit_asks.csv') + +if __name__ == '__main__': + d = Deribit() + order_book = d.get_order_book() + d.create_csv(order_book) \ No newline at end of file diff --git a/scripts/options.py b/scripts/options.py index b822ab9..df825c9 100644 --- a/scripts/options.py +++ b/scripts/options.py @@ -6,6 +6,66 @@ from components import BlackScholesOptionPricing +class IronFlyOptions(object): + spot = 1000 + + def compute_option_prices(self, puts=1, calls=1, put_strikes=[], call_strikes=[]): + + put_prices = [] + for i in range(0, puts): + black_scholes_put = BlackScholesOptionPricing( + current_asset_price=self.spot, + strike_price=put_strikes[i], + risk_free_rate=0.1, + option_expiration=7, + sigma=0.3, + ) + black_scholes_put_option_price = black_scholes_put.get_put_option_price() + put_prices.append(black_scholes_put_option_price) + + call_prices = [] + for i in range(0, calls): + black_scholes_call = BlackScholesOptionPricing( + current_asset_price=self.spot, + strike_price=call_strikes[i], + risk_free_rate=0.1, + option_expiration=7, + sigma=0.3, + ) + black_scholes_call_option_price = black_scholes_call.get_call_option_price() + call_prices.append(black_scholes_call_option_price) + + return put_prices, call_prices + + def payoffs(self, call_prices, put_prices, sell_calls=0, sell_puts=0, buy_calls=0, buy_puts=0): + profit = 0 + + if sell_calls > 0: + for i in range(0, sell_calls): + profit += call_prices[i] + if buy_calls > 0: + for i in range(0, buy_calls): + profit -= call_prices[i] + + if sell_puts > 0: + for i in range(0, sell_puts): + profit += put_prices[i] + if buy_puts > 0: + for i in range(0, buy_puts): + profit -= put_prices[i] + + print('Profit: ', profit) + + + +if __name__ == '__main__': + iron_fly = IronFlyOptions() + put_prices, call_prices = iron_fly.compute_option_prices(puts=2, calls=3, put_strikes=[850, 900], + call_strikes=[1250, 1350, 1450]) + print(put_prices, call_prices) + iron_fly.payoffs(call_prices=call_prices, put_prices=put_prices, sell_calls=1, sell_puts=1, buy_calls=2, buy_puts=1) + + class Options(object): TOKENS = ["ETH", "BTC"] PRICE_DIFF_TO_OPTION_PRICE_RATIO = { @@ -19,16 +79,16 @@ class Options(object): } def __init__( - self, - token, - current_asset_price, - asset_vol, - price_floor, - underlying_asset_price=None, - option_market_price=None, - strike_price=None, - current_reserve=60000, - optimal_utilization_ratio=0.7, + self, + token, + current_asset_price, + asset_vol, + price_floor, + underlying_asset_price=None, + option_market_price=None, + strike_price=None, + current_reserve=60000, + optimal_utilization_ratio=0.7, ): self.optimal_utilization_ratio = optimal_utilization_ratio self.current_reserve = current_reserve @@ -66,11 +126,11 @@ def plot_graph(self): plt.show() def get_total_funding_fee( - self, - option_market_price, - period, - strike_price=None, - underlying_asset_price=None, + self, + option_market_price, + period, + strike_price=None, + underlying_asset_price=None, ): """ @params: @@ -113,7 +173,7 @@ def get_total_funding_fee( return funding_fee_object def get_total_funding_fee_with_dynamic_strike_price( - self, period, max_asset_price=None, min_asset_price=None + self, period, max_asset_price=None, min_asset_price=None ): """ To compute a total funding fee based on the volatility of an asset, this function immitates a rise of 10% and @@ -171,11 +231,11 @@ def _get_payoff(self, strike_price, current_asset_price): return payoff def update_funding_fee( - self, - current_funding_fee, - all_open_options_price, - current_reserve, - total_reserve_drop_ratio, + self, + current_funding_fee, + all_open_options_price, + current_reserve, + total_reserve_drop_ratio, ): """ Updating the funding fee of a user for their hedged asset by @@ -223,19 +283,19 @@ def update_funding_fee( ) # R Slope 2 - Interest rate applied on funding fee when total_reserve is above optimal utilization if ( - utilization_ratio < self.optimal_utilization_ratio + utilization_ratio < self.optimal_utilization_ratio ): # Read more about this on cruize docs section: funding-rate updated_funding_fee += ( - utilization_ratio / self.optimal_utilization_ratio - ) * interest_rate_below_optimal + utilization_ratio / self.optimal_utilization_ratio + ) * interest_rate_below_optimal else: updated_funding_fee += interest_rate_below_optimal + ( ( - ( - (utilization_ratio - self.optimal_utilization_ratio) - / (1 - self.optimal_utilization_ratio) - ) - * interest_rate_above_optimal + ( + (utilization_ratio - self.optimal_utilization_ratio) + / (1 - self.optimal_utilization_ratio) + ) + * interest_rate_above_optimal ) ) @@ -256,30 +316,29 @@ def _get_utilization_ratio(self, all_open_options_price, total_reserve): def _get_total_reserve(self, all_open_options_price, current_reserve): return all_open_options_price + current_reserve - -if __name__ == "__main__": - from pprint import pprint - - op = Options( - token="ETH", - current_asset_price=2938.53, - underlying_asset_price=10000, - asset_vol=1, - option_market_price=1, - strike_price=None, - price_floor=0.85, - optimal_utilization_ratio=0.7, - ) - funding_fees_object = op.get_total_funding_fee_with_dynamic_strike_price(period=7) - print("current_funding_fee:") - pprint(funding_fees_object) - current_reserve = 80000 - total_reserve = current_reserve + funding_fees_object["all_open_options_price"] - updated_funding_fee = op.update_funding_fee( - current_funding_fee=funding_fees_object["funding_fee"], - all_open_options_price=funding_fees_object["all_open_options_price"], - current_reserve=current_reserve, - total_reserve_drop_ratio=0.1, - ) - print("updated_funding_fee: ", updated_funding_fee) - op.plot_graph() +# if __name__ == "__main__": +# from pprint import pprint +# +# op = Options( +# token="ETH", +# current_asset_price=2938.53, +# underlying_asset_price=10000, +# asset_vol=1, +# option_market_price=1, +# strike_price=None, +# price_floor=0.85, +# optimal_utilization_ratio=0.7, +# ) +# funding_fees_object = op.get_total_funding_fee_with_dynamic_strike_price(period=7) +# print("current_funding_fee:") +# pprint(funding_fees_object) +# current_reserve = 80000 +# total_reserve = current_reserve + funding_fees_object["all_open_options_price"] +# updated_funding_fee = op.update_funding_fee( +# current_funding_fee=funding_fees_object["funding_fee"], +# all_open_options_price=funding_fees_object["all_open_options_price"], +# current_reserve=current_reserve, +# total_reserve_drop_ratio=0.1, +# ) +# print("updated_funding_fee: ", updated_funding_fee) +# op.plot_graph() From c0b7ba2e9998c633a6ede79542412dfd0803473c Mon Sep 17 00:00:00 2001 From: Prithviraj8 Date: Thu, 22 Dec 2022 17:28:11 +0530 Subject: [PATCH 3/5] add tardis historical data collection for deribit --- scripts/deribit_order_book.py | 90 ++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 2 deletions(-) diff --git a/scripts/deribit_order_book.py b/scripts/deribit_order_book.py index f079303..6a8cf80 100644 --- a/scripts/deribit_order_book.py +++ b/scripts/deribit_order_book.py @@ -1,5 +1,8 @@ import pandas as pd import requests +import asyncio +from tardis_client import TardisClient, Channel +from tardis_dev import datasets, get_exchange_details class Deribit(object): @@ -7,7 +10,7 @@ class Deribit(object): def get_order_book(self): url = self.url + "get_order_book" - resp = requests.get(url, params={'depth': 50, 'instrument_name': 'ETH-PERPETUAL'}) + resp = requests.get(url, params={'depth': 50, 'instrument_name': 'ETH-26JUL19'}) print(resp.json()) return resp.json()['result'] @@ -28,7 +31,90 @@ def create_csv(self, data): df_asks.to_csv( '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Derbit_asks.csv') + # def deribit_hist(self): + # # # pip install tardis-client + # # import asyncio + # # from tardis_client import TardisClient, Channel + # # tardis_client = TardisClient(api_key="YOUR_API_KEY") + # # + # # async def replay(): + # # # replay method returns Async Generator + # # messages = tardis_client.replay( + # # exchange="deribit", + # # from_date="2019-07-01", + # # to_date="2019-07-02", + # # filters=[Channel(name="book", symbols=["OPTIONS"])] + # # ) + # # + # # # messages as provided by Deribit real-time stream + # # async for local_timestamp, message in messages: + # # print(message) + # # + # # asyncio.run(replay()) + # + # # pip install tardis-client + # # import asyncio + # # from tardis_client import TardisClient, Channel + # # tardis_client = TardisClient(api_key="YOUR_API_KEY") + # # + # # async def replay(): + # # # replay method returns Async Generator + # # messages = tardis_client.replay( + # # exchange="okex-options", + # # from_date="2020-02-01", + # # to_date="2020-02-02", + # # filters=[Channel(name="option/trade", symbols=[])] + # # ) + # # + # # # messages as provided by OKEx real-time stream + # # async for local_timestamp, message in messages: + # # print(message) + # # + # # asyncio.run(replay()) + # + # # requires Python >=3.6 + # # pip install tardis-dev + # + # import logging + # + # # optionally enable debug logs + # # logging.basicConfig(level=logging.DEBUG) + # + # exchange = 'deribit' + # exchange_details = get_exchange_details(exchange) + # + # # iterate over and download all data for every symbol + # for symbol in exchange_details["datasets"]["symbols"]: + # # alternatively specify datatypes explicitly ['trades', 'incremental_book_L2', 'quotes'] etc + # # see available options https://docs.tardis.dev/downloadable-csv-files#data-types + # data_types = symbol["dataTypes"] + # symbol_id = symbol["id"] + # from_date = symbol["availableSince"] + # to_date = symbol["availableTo"] + # + # print('symbol:: ', symbol_id) + # # skip groupped symbols + # if symbol_id in ['PERPETUALS', 'SPOT', 'FUTURES']: + # continue + # + # print(f"Downloading {exchange} {data_types} for {symbol_id} from {from_date} to {to_date}") + # + # # each CSV dataset format is documented at https://docs.tardis.dev/downloadable-csv-files#data-types + # # see https://docs.tardis.dev/downloadable-csv-files#download-via-client-libraries for full options docs + # datasets.download( + # exchange=exchange, + # data_types=data_types, + # from_date=from_date, + # to_date=to_date, + # symbols=[symbol_id], + # # TODO set your API key here + # api_key="YOUR_API_KEY", + # # path where CSV data will be downloaded into + # download_dir="./datasets", + # ) + if __name__ == '__main__': d = Deribit() order_book = d.get_order_book() - d.create_csv(order_book) \ No newline at end of file + d.create_csv(order_book) + # d.deribit_hist() \ No newline at end of file From 7111e25a7f8525ef2a69807b003328559eaea6f9 Mon Sep 17 00:00:00 2001 From: Prithviraj8 Date: Thu, 22 Dec 2022 19:28:12 +0530 Subject: [PATCH 4/5] add tardis historical data collection for deribit --- scripts/BTC_Derbit_asks.csv | 339 ++++++++++++++++++++++++++++++++ scripts/BTC_Derbit_bids.csv | 279 +++++++++++++++++++++++++++ scripts/Derbit_asks.csv | 221 --------------------- scripts/Derbit_bids.csv | 351 ---------------------------------- scripts/ETH_Derbit_asks.csv | 27 +++ scripts/ETH_Derbit_bids.csv | 13 ++ scripts/deribit_order_book.py | 235 ++++++++++++----------- 7 files changed, 786 insertions(+), 679 deletions(-) create mode 100644 scripts/BTC_Derbit_asks.csv create mode 100644 scripts/BTC_Derbit_bids.csv delete mode 100644 scripts/Derbit_asks.csv delete mode 100644 scripts/Derbit_bids.csv create mode 100644 scripts/ETH_Derbit_asks.csv create mode 100644 scripts/ETH_Derbit_bids.csv diff --git a/scripts/BTC_Derbit_asks.csv b/scripts/BTC_Derbit_asks.csv new file mode 100644 index 0000000..4e81476 --- /dev/null +++ b/scripts/BTC_Derbit_asks.csv @@ -0,0 +1,339 @@ +0,0.1195,2.0 +1,0.1205,4.0 +2,0.1215,4.0 +0,0.061,2.0 +1,0.0615,2.0 +2,0.062,2.0 +3,0.0625,2.0 +4,0.063,2.0 +0,0.0015,40.9 +1,0.002,265.4 +0,0.0005,482.8 +0,0.0005,451.8 +0,0.0005,422.1 +0,0.107,1300.0 +0,0.0485,300.0 +1,0.049,200.0 +2,0.0495,300.0 +3,0.0505,100.0 +0,0.034,280.2 +1,0.0345,280.2 +2,0.035,194.4 +3,0.036,97.2 +0,0.02,283.2 +1,0.0205,94.4 +2,0.021,377.6 +3,0.022,94.4 +4,0.054,6.0 +5,0.0545,6.1 +6,0.055,12.1 +0,0.0085,0.1 +1,0.009,2.2 +2,0.0095,47.4 +3,0.01,38.2 +0,0.003,9.6 +1,0.0035,188.2 +2,0.057,1.0 +0,0.0015,220.4 +0,0.001,699.4 +0,0.0005,57.9 +0,0.0005,435.5 +0,0.0005,697.7 +0,0.407,84.9 +1,0.4075,178.1 +2,0.408,38.2 +0,0.1705,21.1 +1,0.171,68.7 +2,0.1715,202.1 +3,0.1725,6.0 +4,0.173,34.3 +0,0.113,105.5 +1,0.1135,56.3 +2,0.114,88.8 +3,0.1145,59.8 +4,0.115,6.0 +5,0.1155,33.5 +0,0.0555,47.8 +1,0.056,46.2 +2,0.0575,58.0 +3,0.058,117.9 +4,0.0585,28.0 +0,0.03,83.7 +1,0.0305,41.1 +2,0.031,19.8 +3,0.0315,47.8 +0,0.014,48.9 +1,0.0145,61.9 +2,0.0165,0.1 +3,0.017,0.1 +0,0.006,6.6 +1,0.0065,119.3 +0,0.003,257.5 +1,0.0035,436.6 +2,0.0045,6.1 +0,0.0015,15.6 +1,0.002,554.7 +0,0.0015,864.0 +0,0.001,700.3 +1,0.1,0.2 +2,0.24,1.4 +0,0.0005,252.8 +1,0.09,0.1 +2,0.28,5.7 +3,0.29,10.0 +0,0.0005,824.1 +1,0.0905,0.9 +0,0.0005,759.1 +0,0.0005,750.0 +0,0.0005,746.1 +1,0.05,1.6 +0,0.0005,852.6 +0,0.0005,696.7 +0,0.0005,630.4 +0,0.0005,629.1 +0,0.0005,626.5 +0,0.0005,883.9 +0,0.0005,622.6 +0,0.0005,674.6 +0,0.0005,622.6 +0,0.0005,622.6 +0,0.0005,622.6 +0,0.1,2.0 +0,0.1265,4.0 +1,0.127,2.0 +2,0.1275,6.0 +3,0.129,2.0 +4,0.1295,4.0 +0,0.063,15.0 +1,0.0635,110.8 +2,0.064,16.6 +0,0.026,70.3 +1,0.0265,26.1 +2,0.027,59.7 +0,0.0085,95.8 +1,0.009,79.7 +0,0.0035,212.9 +1,0.004,68.6 +2,0.0045,84.3 +0,0.002,243.3 +0,0.0715,64.8 +1,0.072,50.9 +0,0.035,8.0 +1,0.0355,34.3 +0,0.0155,195.1 +1,0.016,217.2 +0,0.004,164.4 +1,0.0045,532.2 +2,0.005,90.1 +0,0.42,4.0 +1,0.4205,10.0 +2,0.421,6.0 +3,0.4215,4.0 +0,0.3045,6.0 +1,0.305,6.0 +2,0.306,6.0 +3,0.3065,2.0 +4,0.307,4.0 +0,0.248,2.0 +1,0.2485,6.0 +2,0.249,6.0 +3,0.2495,4.0 +4,0.25,6.0 +5,0.2505,2.0 +0,0.1845,10.0 +1,0.185,42.0 +2,0.1855,61.0 +3,0.186,1.0 +4,0.285,1.0 +0,0.131,33.8 +1,0.1315,84.7 +2,0.132,72.4 +3,0.133,28.1 +0,0.087,58.4 +1,0.0875,107.9 +2,0.088,16.4 +0,0.053,132.2 +1,0.0535,66.6 +2,0.054,106.2 +0,0.03,30.5 +1,0.0305,248.1 +2,0.031,96.5 +0,0.017,0.3 +1,0.0175,196.8 +2,0.018,85.0 +0,0.01,67.5 +1,0.0105,65.9 +2,0.011,148.1 +0,0.0065,197.1 +0,0.005,117.9 +1,0.0055,389.8 +0,0.004,395.8 +1,0.0045,439.8 +0,0.003,195.9 +0,0.0025,64.2 +0,0.002,1.3 +1,0.2215,1.0 +0,0.0015,75.0 +1,0.002,724.9 +0,0.0015,1024.8 +0,0.001,888.1 +0,0.0005,60.2 +1,0.001,784.4 +0,0.4265,4.0 +1,0.427,4.0 +2,0.4275,4.0 +3,0.428,4.0 +4,0.4285,8.0 +0,0.3155,4.0 +1,0.316,4.0 +2,0.3165,6.0 +3,0.317,4.0 +4,0.3175,6.0 +0,0.263,8.0 +1,0.2635,4.0 +2,0.264,4.0 +3,0.2645,4.0 +4,0.265,4.0 +0,0.2115,30.0 +1,0.212,27.0 +2,0.2125,28.0 +3,0.213,12.0 +0,0.1555,99.4 +1,0.156,18.4 +2,0.1565,23.4 +3,0.158,30.6 +4,0.1585,25.6 +5,0.1605,37.0 +0,0.1155,38.8 +1,0.116,67.6 +2,0.1165,51.2 +0,0.083,72.9 +1,0.0835,135.3 +2,0.084,36.3 +0,0.058,24.6 +1,0.0585,89.5 +2,0.059,143.6 +0,0.04,18.9 +1,0.0405,179.6 +2,0.041,33.4 +0,0.028,80.8 +1,0.0285,53.8 +0,0.02,38.0 +1,0.0205,91.7 +0,0.015,130.3 +0,0.0095,154.2 +1,0.01,157.5 +0,0.004,11.7 +1,0.0045,5.2 +0,0.003,643.2 +1,0.0035,767.9 +0,0.426,20.6 +1,0.4265,49.5 +2,0.427,98.3 +3,0.4275,9.0 +4,0.428,51.5 +5,0.4285,9.0 +6,0.429,28.7 +7,0.928,2.1 +0,0.2245,20.9 +1,0.225,42.4 +2,0.2255,46.2 +3,0.226,97.2 +4,0.2265,44.2 +5,0.227,31.0 +6,0.2295,17.0 +0,0.1825,10.0 +1,0.183,18.2 +2,0.1835,82.6 +3,0.184,45.8 +4,0.1845,69.6 +5,0.185,41.6 +0,0.146,102.3 +1,0.1465,15.4 +2,0.147,72.7 +3,0.1585,0.1 +0,0.089,41.1 +1,0.0895,141.0 +2,0.09,97.7 +0,0.0535,99.4 +1,0.054,43.0 +0,0.033,11.6 +1,0.0335,143.6 +2,0.034,12.4 +0,0.022,5.7 +1,0.0225,98.2 +0,0.019,96.7 +0,0.0165,141.2 +0,0.0125,11.0 +1,0.013,353.8 +0,0.0105,54.8 +1,0.011,505.8 +0,0.0075,1204.4 +0,0.005,212.8 +1,0.0055,178.2 +0,0.004,338.7 +1,0.0045,401.2 +0,0.003,146.3 +0,0.0025,232.8 +0,0.002,229.8 +0,0.001,704.4 +1,0.0015,67.2 +2,0.15,20.7 +0,0.0005,180.0 +1,0.001,43.4 +0,0.0005,180.0 +1,0.001,45.2 +0,0.4475,82.1 +1,0.448,28.2 +2,0.4485,14.2 +3,0.449,15.8 +4,0.4495,10.0 +5,0.45,19.3 +0,0.2715,26.5 +1,0.272,122.6 +2,0.2725,40.0 +3,0.273,20.7 +4,0.2735,22.8 +0,0.2355,18.5 +1,0.236,124.5 +2,0.2365,19.2 +3,0.237,20.5 +4,0.2375,21.8 +5,0.238,28.9 +0,0.202,5.0 +1,0.2035,55.0 +2,0.204,83.5 +3,0.2045,19.8 +4,0.205,19.0 +5,0.222,0.1 +0,0.1495,18.9 +1,0.15,16.8 +2,0.1505,122.3 +0,0.11,8.0 +1,0.1105,49.6 +2,0.111,97.6 +3,0.51,10.0 +0,0.082,29.7 +1,0.0825,40.0 +0,0.0625,29.9 +1,0.063,70.2 +2,0.0635,53.0 +0,0.055,29.0 +1,0.0555,25.8 +2,0.056,96.1 +0,0.049,27.8 +1,0.0495,105.8 +0,0.0395,31.4 +1,0.04,79.8 +0,0.033,79.0 +1,0.0335,19.0 +0,0.0225,43.2 +1,0.023,87.8 +0,0.017,8.0 +1,0.0175,116.1 +2,0.018,81.9 +0,0.0115,90.5 +0,0.0085,137.3 +1,0.009,260.2 +0,0.004,406.4 +1,0.0045,151.0 diff --git a/scripts/BTC_Derbit_bids.csv b/scripts/BTC_Derbit_bids.csv new file mode 100644 index 0000000..9965880 --- /dev/null +++ b/scripts/BTC_Derbit_bids.csv @@ -0,0 +1,279 @@ +0,0.1065,10.7 +0,0.047,10.7 +0,0.001,47.9 +1,0.0005,394.0 +0,0.166,1.3 +0,0.1065,2400.0 +0,0.0765,1.3 +0,0.0465,1.3 +0,0.032,35.5 +0,0.017,115.8 +0,0.008,130.8 +1,0.0075,79.3 +0,0.0025,32.7 +1,0.002,218.1 +0,0.0005,296.0 +0,0.0005,40.8 +0,0.4035,218.1 +0,0.165,312.2 +0,0.1055,312.7 +1,0.053,4.0 +0,0.0525,13.3 +1,0.052,33.9 +2,0.0505,13.6 +3,0.05,15.6 +4,0.0495,46.7 +5,0.049,39.0 +6,0.047,0.1 +7,0.0005,1.1 +0,0.0295,31.1 +1,0.029,76.2 +2,0.0285,41.4 +3,0.028,66.4 +0,0.0135,24.2 +1,0.013,96.8 +2,0.0125,72.5 +3,0.012,89.2 +0,0.0055,60.5 +1,0.005,30.0 +2,0.0045,73.2 +0,0.0025,47.9 +1,0.002,345.5 +2,0.0005,3.3 +0,0.001,75.2 +1,0.0005,960.0 +0,0.0005,368.4 +0,0.0005,877.8 +0,0.1045,24.0 +0,0.0615,9.1 +1,0.061,29.4 +2,0.0605,21.2 +3,0.06,42.3 +4,0.0595,16.7 +0,0.0255,20.2 +1,0.025,23.2 +2,0.0245,6.5 +3,0.024,119.2 +0,0.008,31.1 +1,0.0075,552.2 +2,0.007,124.8 +0,0.0025,644.7 +1,0.002,256.8 +2,0.0005,5.0 +0,0.001,346.0 +1,0.0005,259.8 +0,0.0695,9.1 +1,0.069,31.4 +2,0.0685,47.8 +3,0.068,34.4 +0,0.0345,81.8 +1,0.034,147.2 +2,0.0335,83.2 +0,0.015,54.0 +1,0.0145,100.1 +2,0.014,105.4 +3,0.0135,113.0 +0,0.0035,85.8 +1,0.003,205.5 +2,0.0025,104.7 +0,0.401,24.0 +0,0.281,25.0 +0,0.221,26.0 +0,0.166,6.0 +1,0.1655,4.0 +2,0.165,4.0 +3,0.1645,8.0 +4,0.164,4.0 +5,0.1285,1.0 +0,0.116,19.0 +1,0.1155,15.0 +2,0.115,8.0 +3,0.1145,14.0 +4,0.114,7.0 +5,0.1135,16.0 +6,0.1095,8.1 +7,0.107,0.1 +0,0.086,25.2 +1,0.0855,65.3 +2,0.085,27.3 +3,0.0845,21.1 +0,0.0525,0.8 +1,0.052,67.8 +2,0.0515,121.2 +3,0.051,206.1 +4,0.0505,0.1 +5,0.048,1.0 +6,0.0415,1.0 +7,0.017,1.0 +0,0.0295,30.2 +1,0.029,100.0 +2,0.0285,13.2 +0,0.0165,7.7 +1,0.016,287.5 +2,0.0155,105.7 +0,0.0095,10.9 +1,0.009,556.3 +2,0.0085,240.6 +0,0.0055,851.5 +0,0.0045,295.9 +1,0.004,264.5 +0,0.0025,862.4 +0,0.002,663.7 +0,0.0015,774.4 +0,0.001,908.1 +0,0.0005,903.5 +0,0.0005,1422.9 +0,0.0005,100.0 +0,0.401,24.0 +0,0.2875,6.0 +1,0.287,2.0 +2,0.2865,8.0 +3,0.286,2.0 +4,0.2855,4.0 +5,0.285,2.0 +6,0.281,1.0 +0,0.2345,6.0 +1,0.234,4.0 +2,0.2335,6.0 +3,0.233,4.0 +4,0.2325,4.0 +5,0.221,1.0 +0,0.1885,9.0 +1,0.188,18.0 +2,0.187,8.0 +3,0.1865,20.0 +4,0.1855,20.0 +5,0.184,31.0 +6,0.1835,9.0 +0,0.152,25.2 +1,0.1515,80.0 +2,0.151,60.8 +3,0.1505,81.8 +0,0.1145,35.0 +1,0.114,120.3 +2,0.1135,124.0 +0,0.082,145.3 +1,0.0815,101.7 +2,0.081,171.1 +0,0.057,98.3 +1,0.0565,115.9 +0,0.0395,1.2 +1,0.039,57.2 +2,0.0385,137.1 +0,0.0275,9.0 +1,0.027,27.6 +2,0.0265,222.2 +3,0.026,76.9 +0,0.019,334.7 +1,0.0185,380.8 +0,0.014,185.0 +1,0.0135,460.7 +0,0.0085,524.3 +1,0.008,329.0 +0,0.0035,481.3 +1,0.003,160.2 +0,0.0025,213.5 +1,0.002,341.6 +0,0.4205,44.1 +1,0.42,15.6 +2,0.4195,93.9 +3,0.419,27.5 +4,0.0005,1.0 +0,0.221,20.2 +1,0.2205,32.7 +2,0.22,132.5 +3,0.2195,56.3 +0,0.18,18.2 +1,0.179,83.9 +2,0.1785,95.5 +3,0.178,46.1 +4,0.1775,22.8 +5,0.0005,1.0 +0,0.1445,15.7 +1,0.144,23.4 +2,0.1435,102.9 +3,0.143,98.0 +4,0.131,0.1 +5,0.0005,1.0 +0,0.0885,2.3 +1,0.088,20.4 +2,0.0875,32.6 +0,0.052,93.1 +1,0.0515,33.0 +2,0.01,2.0 +0,0.0325,2.1 +1,0.032,164.7 +0,0.0215,123.9 +1,0.021,310.9 +2,0.0205,33.5 +0,0.018,290.0 +1,0.0175,72.7 +2,0.0125,10.0 +3,0.0025,10.0 +0,0.015,310.5 +0,0.0115,190.8 +0,0.0095,84.8 +0,0.0065,1271.2 +1,0.006,2033.4 +0,0.0045,59.2 +1,0.004,108.0 +0,0.0025,351.5 +0,0.002,107.2 +1,0.0015,435.1 +0,0.002,3.9 +1,0.0015,46.2 +2,0.001,213.7 +0,0.001,86.6 +0,0.441,14.0 +1,0.4405,14.0 +2,0.44,34.9 +3,0.4395,69.1 +4,0.439,65.6 +5,0.4385,17.7 +0,0.2655,22.2 +1,0.265,64.3 +2,0.2645,69.5 +3,0.264,68.3 +4,0.2635,53.1 +5,0.263,28.7 +0,0.2305,19.5 +1,0.23,20.9 +2,0.2295,43.9 +3,0.229,111.8 +4,0.2285,41.9 +5,0.2275,26.4 +6,0.227,18.0 +0,0.1995,24.6 +1,0.199,125.5 +2,0.182,0.1 +0,0.147,30.0 +1,0.1465,110.0 +2,0.146,131.7 +3,0.1,24.2 +0,0.1075,0.1 +1,0.107,127.4 +2,0.1065,33.7 +0,0.079,230.1 +1,0.0785,26.7 +0,0.0605,8.0 +1,0.06,212.1 +2,0.0595,96.2 +0,0.053,54.0 +1,0.0525,256.5 +2,0.0005,0.3 +0,0.047,52.0 +1,0.0465,266.4 +0,0.038,48.0 +1,0.0375,272.4 +0,0.031,154.5 +1,0.0305,109.5 +0,0.0215,76.2 +1,0.0205,396.4 +0,0.016,57.0 +1,0.0155,162.5 +0,0.0095,246.7 +0,0.0065,179.2 +1,0.0005,2.1 +0,0.0025,9.4 +1,0.002,321.3 +2,0.001,2.0 diff --git a/scripts/Derbit_asks.csv b/scripts/Derbit_asks.csv deleted file mode 100644 index cb463ba..0000000 --- a/scripts/Derbit_asks.csv +++ /dev/null @@ -1,221 +0,0 @@ -,price,amount -0,1210.55,1491.0 -1,1210.75,1833.0 -2,1210.8,1270.0 -3,1210.85,4823.0 -4,1210.9,4664.0 -5,1210.95,16999.0 -6,1211.0,18603.0 -7,1211.05,27832.0 -8,1211.15,47662.0 -9,1211.2,1708.0 -10,1211.9,155.0 -11,1212.2,1000.0 -12,1212.65,1100.0 -13,1216.95,2000.0 -14,1225.45,2070.0 -15,1500.0,52500.0 -16,1609.1,123.0 -17,1873.05,9000.0 -18,2222.0,333.0 -19,2400.0,10000.0 -20,2885.0,47436.0 -21,3889.65,100.0 -22,4000.0,1000.0 -23,4186.2,4215.0 -24,5000.0,11000.0 -25,5555.0,1.0 -26,7180.4,1.0 -27,9999.95,1.0 -28,18285.0,30000.0 -29,38500.0,40.0 -0,1210.75,12181.0 -1,1210.8,1612.0 -2,1210.85,4823.0 -3,1210.9,7092.0 -4,1210.95,4500.0 -5,1211.0,16067.0 -6,1211.05,27995.0 -7,1211.1,22571.0 -8,1211.15,46913.0 -9,1211.2,110010.0 -10,1211.9,155.0 -11,1212.2,1000.0 -12,1212.65,1100.0 -13,1216.95,2000.0 -14,1225.45,2070.0 -15,1500.0,52500.0 -16,1609.1,123.0 -17,1816.15,1.0 -18,1873.05,9000.0 -19,2222.0,333.0 -20,2400.0,10000.0 -21,2885.0,47436.0 -22,3889.65,100.0 -23,4000.0,1000.0 -24,4186.2,4215.0 -25,5000.0,11000.0 -26,5555.0,1.0 -27,7180.4,1.0 -28,9999.95,1.0 -29,18285.0,30000.0 -30,38500.0,40.0 -0,1208.65,1430.0 -1,1208.8,2500.0 -2,1208.85,6046.0 -3,1208.9,4500.0 -4,1208.95,14151.0 -5,1209.0,4651.0 -6,1209.05,14967.0 -7,1209.1,4954.0 -8,1209.15,58964.0 -9,1209.2,100089.0 -10,1210.75,100.0 -11,1211.9,155.0 -12,1212.2,1000.0 -13,1212.65,1000.0 -14,1216.95,2000.0 -15,1225.45,2070.0 -16,1500.0,52500.0 -17,1609.1,123.0 -18,1813.0,1.0 -19,1873.05,9000.0 -20,2222.0,333.0 -21,2400.0,10000.0 -22,2885.0,47436.0 -23,3889.65,100.0 -24,4000.0,1000.0 -25,4186.2,4215.0 -26,5000.0,11000.0 -27,5555.0,1.0 -28,7180.4,1.0 -29,9999.95,1.0 -30,18285.0,30000.0 -31,38500.0,40.0 -0,1208.65,1430.0 -1,1208.8,2500.0 -2,1208.85,6046.0 -3,1208.9,4500.0 -4,1208.95,14050.0 -5,1209.0,5985.0 -6,1209.05,17424.0 -7,1209.1,4954.0 -8,1209.15,56433.0 -9,1209.2,100089.0 -10,1210.75,100.0 -11,1211.9,155.0 -12,1212.2,1000.0 -13,1212.65,1000.0 -14,1216.95,2000.0 -15,1225.45,2070.0 -16,1500.0,52500.0 -17,1609.1,123.0 -18,1873.05,9000.0 -19,2222.0,333.0 -20,2400.0,10000.0 -21,2885.0,47436.0 -22,3889.65,100.0 -23,4000.0,1000.0 -24,4186.2,4215.0 -25,5000.0,11000.0 -26,5555.0,1.0 -27,7180.4,1.0 -28,9999.95,1.0 -29,18285.0,30000.0 -30,38500.0,40.0 -0,1208.65,1430.0 -1,1208.8,2500.0 -2,1208.85,6046.0 -3,1208.9,4500.0 -4,1208.95,14050.0 -5,1209.0,5985.0 -6,1209.05,17424.0 -7,1209.1,4954.0 -8,1209.15,56433.0 -9,1209.2,100089.0 -10,1210.75,100.0 -11,1211.9,155.0 -12,1212.2,1000.0 -13,1212.65,1000.0 -14,1216.95,2000.0 -15,1225.45,2070.0 -16,1500.0,52500.0 -17,1609.1,123.0 -18,1813.0,1.0 -19,1873.05,9000.0 -20,2222.0,333.0 -21,2400.0,10000.0 -22,2885.0,47436.0 -23,3889.65,100.0 -24,4000.0,1000.0 -25,4186.2,4215.0 -26,5000.0,11000.0 -27,5555.0,1.0 -28,7180.4,1.0 -29,9999.95,1.0 -30,18285.0,30000.0 -31,38500.0,40.0 -0,1208.65,1430.0 -1,1208.8,2500.0 -2,1208.85,6046.0 -3,1208.9,4500.0 -4,1208.95,14050.0 -5,1209.0,5985.0 -6,1209.05,17424.0 -7,1209.1,4954.0 -8,1209.15,56433.0 -9,1209.2,100089.0 -10,1210.75,100.0 -11,1211.9,155.0 -12,1212.2,1000.0 -13,1212.65,1000.0 -14,1216.95,2000.0 -15,1225.45,2070.0 -16,1500.0,52500.0 -17,1609.1,123.0 -18,1813.0,1.0 -19,1873.05,9000.0 -20,2222.0,333.0 -21,2400.0,10000.0 -22,2885.0,47436.0 -23,3889.65,100.0 -24,4000.0,1000.0 -25,4186.2,4215.0 -26,5000.0,11000.0 -27,5555.0,1.0 -28,7180.4,1.0 -29,9999.95,1.0 -30,18285.0,30000.0 -31,38500.0,40.0 -0,1208.7,1.0 -1,1208.75,3000.0 -2,1208.85,3708.0 -3,1208.95,5150.0 -4,1209.0,15013.0 -5,1209.05,5890.0 -6,1209.1,7408.0 -7,1209.15,100352.0 -8,1209.2,62044.0 -9,1209.25,111488.0 -10,1210.75,100.0 -11,1211.9,155.0 -12,1212.2,1000.0 -13,1212.65,1000.0 -14,1216.95,2000.0 -15,1225.45,2070.0 -16,1500.0,52500.0 -17,1609.1,123.0 -18,1813.05,1.0 -19,1873.05,9000.0 -20,2222.0,333.0 -21,2400.0,10000.0 -22,2885.0,47436.0 -23,3889.65,100.0 -24,4000.0,1000.0 -25,4186.2,4215.0 -26,5000.0,11000.0 -27,5555.0,1.0 -28,7180.4,1.0 -29,9999.95,1.0 -30,18285.0,30000.0 -31,38500.0,40.0 diff --git a/scripts/Derbit_bids.csv b/scripts/Derbit_bids.csv deleted file mode 100644 index 4df0e13..0000000 --- a/scripts/Derbit_bids.csv +++ /dev/null @@ -1,351 +0,0 @@ -,price,amount -0,1210.5,27412.0 -1,1210.45,1670.0 -2,1210.4,2410.0 -3,1210.3,7445.0 -4,1210.25,10705.0 -5,1210.2,4558.0 -6,1210.15,4500.0 -7,1210.1,20340.0 -8,1210.05,5108.0 -9,1210.0,59052.0 -10,1208.3,155.0 -11,1204.7,155.0 -12,1203.45,2000.0 -13,1203.4,930.0 -14,1201.1,155.0 -15,1195.6,2070.0 -16,1189.05,155.0 -17,1168.15,155.0 -18,1132.5,155.0 -19,1061.2,153.0 -20,1034.7,154.0 -21,1000.0,52500.0 -22,995.1,154.0 -23,982.1,26.0 -24,915.85,154.0 -25,900.0,4510.0 -26,800.0,26400.0 -27,751.95,3521.0 -28,750.8,386.0 -29,701.0,45.0 -30,691.0,49.0 -31,681.0,53.0 -32,671.0,56.0 -33,661.0,59.0 -34,651.0,61.0 -35,641.0,61.0 -36,631.0,62.0 -37,623.45,915.0 -38,621.0,62.0 -39,611.0,60.0 -40,605.25,1.0 -41,603.9,6257.0 -42,601.0,58.0 -43,600.0,2500.0 -44,591.0,55.0 -45,581.0,52.0 -46,571.0,47.0 -47,561.0,43.0 -48,551.0,37.0 -49,541.0,32.0 -0,1210.7,199.0 -1,1210.5,9139.0 -2,1210.45,7000.0 -3,1210.4,7440.0 -4,1210.3,5440.0 -5,1210.25,13166.0 -6,1210.2,5001.0 -7,1210.15,5963.0 -8,1210.1,72486.0 -9,1210.05,22704.0 -10,1208.3,155.0 -11,1204.7,155.0 -12,1203.45,2000.0 -13,1203.4,930.0 -14,1201.1,155.0 -15,1195.6,2070.0 -16,1189.05,155.0 -17,1168.15,155.0 -18,1132.5,155.0 -19,1061.2,153.0 -20,1034.7,154.0 -21,1000.0,52500.0 -22,995.1,154.0 -23,982.1,26.0 -24,915.85,154.0 -25,900.0,4510.0 -26,800.0,26400.0 -27,751.95,3521.0 -28,750.8,386.0 -29,701.0,45.0 -30,691.0,49.0 -31,681.0,53.0 -32,671.0,56.0 -33,661.0,59.0 -34,651.0,61.0 -35,641.0,61.0 -36,631.0,62.0 -37,623.45,915.0 -38,621.0,62.0 -39,611.0,60.0 -40,605.35,1.0 -41,603.9,6257.0 -42,601.0,58.0 -43,600.0,2500.0 -44,591.0,55.0 -45,581.0,52.0 -46,571.0,47.0 -47,561.0,43.0 -48,551.0,37.0 -49,541.0,32.0 -0,1208.55,16955.0 -1,1208.5,4882.0 -2,1208.45,4689.0 -3,1208.4,11924.0 -4,1208.35,9378.0 -5,1208.3,4973.0 -6,1208.25,6025.0 -7,1208.2,45914.0 -8,1208.15,1134.0 -9,1208.1,67258.0 -10,1204.7,155.0 -11,1203.45,2000.0 -12,1203.4,930.0 -13,1201.1,155.0 -14,1195.6,2070.0 -15,1189.05,155.0 -16,1168.15,155.0 -17,1132.5,155.0 -18,1061.2,153.0 -19,1034.7,154.0 -20,1000.0,52500.0 -21,995.1,154.0 -22,982.1,26.0 -23,915.85,154.0 -24,900.0,4510.0 -25,800.0,26400.0 -26,751.95,3521.0 -27,750.8,386.0 -28,701.0,45.0 -29,691.0,49.0 -30,681.0,53.0 -31,671.0,56.0 -32,661.0,59.0 -33,651.0,61.0 -34,641.0,61.0 -35,631.0,62.0 -36,623.45,915.0 -37,621.0,62.0 -38,611.0,60.0 -39,604.25,1.0 -40,603.9,6257.0 -41,601.0,58.0 -42,600.0,2500.0 -43,591.0,55.0 -44,581.0,52.0 -45,571.0,47.0 -46,561.0,43.0 -47,551.0,37.0 -48,541.0,32.0 -49,531.0,27.0 -0,1208.55,16956.0 -1,1208.5,4882.0 -2,1208.45,4689.0 -3,1208.4,14002.0 -4,1208.35,4876.0 -5,1208.3,4973.0 -6,1208.25,8449.0 -7,1208.2,45914.0 -8,1208.15,1134.0 -9,1208.1,67258.0 -10,1204.7,155.0 -11,1203.45,2000.0 -12,1203.4,930.0 -13,1201.1,155.0 -14,1195.6,2070.0 -15,1189.05,155.0 -16,1168.15,155.0 -17,1132.5,155.0 -18,1061.2,153.0 -19,1034.7,154.0 -20,1000.0,52500.0 -21,995.1,154.0 -22,982.1,26.0 -23,915.85,154.0 -24,900.0,4510.0 -25,800.0,26400.0 -26,751.95,3521.0 -27,750.8,386.0 -28,701.0,45.0 -29,691.0,49.0 -30,681.0,53.0 -31,671.0,56.0 -32,661.0,59.0 -33,651.0,61.0 -34,641.0,61.0 -35,631.0,62.0 -36,623.45,915.0 -37,621.0,62.0 -38,611.0,60.0 -39,604.25,1.0 -40,603.9,6257.0 -41,601.0,58.0 -42,600.0,2500.0 -43,591.0,55.0 -44,581.0,52.0 -45,571.0,47.0 -46,561.0,43.0 -47,551.0,37.0 -48,541.0,32.0 -49,531.0,27.0 -0,1208.55,16956.0 -1,1208.5,4882.0 -2,1208.45,4689.0 -3,1208.4,14002.0 -4,1208.35,4876.0 -5,1208.3,4973.0 -6,1208.25,8449.0 -7,1208.2,45914.0 -8,1208.15,1134.0 -9,1208.1,67258.0 -10,1204.7,155.0 -11,1203.45,2000.0 -12,1203.4,930.0 -13,1201.1,155.0 -14,1195.6,2070.0 -15,1189.05,155.0 -16,1168.15,155.0 -17,1132.5,155.0 -18,1061.2,153.0 -19,1034.7,154.0 -20,1000.0,52500.0 -21,995.1,154.0 -22,982.1,26.0 -23,915.85,154.0 -24,900.0,4510.0 -25,800.0,26400.0 -26,751.95,3521.0 -27,750.8,386.0 -28,701.0,45.0 -29,691.0,49.0 -30,681.0,53.0 -31,671.0,56.0 -32,661.0,59.0 -33,651.0,61.0 -34,641.0,61.0 -35,631.0,62.0 -36,623.45,915.0 -37,621.0,62.0 -38,611.0,60.0 -39,604.25,1.0 -40,603.9,6257.0 -41,601.0,58.0 -42,600.0,2500.0 -43,591.0,55.0 -44,581.0,52.0 -45,571.0,47.0 -46,561.0,43.0 -47,551.0,37.0 -48,541.0,32.0 -49,531.0,27.0 -0,1208.55,16956.0 -1,1208.5,4882.0 -2,1208.45,4689.0 -3,1208.4,14002.0 -4,1208.35,4876.0 -5,1208.3,4973.0 -6,1208.25,8449.0 -7,1208.2,45914.0 -8,1208.15,1134.0 -9,1208.1,67258.0 -10,1204.7,155.0 -11,1203.45,2000.0 -12,1203.4,930.0 -13,1201.1,155.0 -14,1195.6,2070.0 -15,1189.05,155.0 -16,1168.15,155.0 -17,1132.5,155.0 -18,1061.2,153.0 -19,1034.7,154.0 -20,1000.0,52500.0 -21,995.1,154.0 -22,982.1,26.0 -23,915.85,154.0 -24,900.0,4510.0 -25,800.0,26400.0 -26,751.95,3521.0 -27,750.8,386.0 -28,701.0,45.0 -29,691.0,49.0 -30,681.0,53.0 -31,671.0,56.0 -32,661.0,59.0 -33,651.0,61.0 -34,641.0,61.0 -35,631.0,62.0 -36,623.45,915.0 -37,621.0,62.0 -38,611.0,60.0 -39,604.25,1.0 -40,603.9,6257.0 -41,601.0,58.0 -42,600.0,2500.0 -43,591.0,55.0 -44,581.0,52.0 -45,571.0,47.0 -46,561.0,43.0 -47,551.0,37.0 -48,541.0,32.0 -49,531.0,27.0 -0,1208.65,25175.0 -1,1208.5,5804.0 -2,1208.45,7600.0 -3,1208.4,9692.0 -4,1208.35,4600.0 -5,1208.3,5101.0 -6,1208.25,6161.0 -7,1208.2,79140.0 -8,1208.15,29600.0 -9,1208.1,1208.0 -10,1204.7,155.0 -11,1203.45,2000.0 -12,1203.4,930.0 -13,1201.1,155.0 -14,1195.6,2070.0 -15,1189.05,155.0 -16,1168.15,155.0 -17,1132.5,155.0 -18,1061.2,153.0 -19,1034.7,154.0 -20,1000.0,52500.0 -21,995.1,154.0 -22,982.1,26.0 -23,915.85,154.0 -24,900.0,4510.0 -25,800.0,26400.0 -26,751.95,3521.0 -27,750.8,386.0 -28,701.0,45.0 -29,691.0,49.0 -30,681.0,53.0 -31,671.0,56.0 -32,661.0,59.0 -33,651.0,61.0 -34,641.0,61.0 -35,631.0,62.0 -36,623.45,915.0 -37,621.0,62.0 -38,611.0,60.0 -39,604.35,1.0 -40,603.9,6257.0 -41,601.0,58.0 -42,600.0,2500.0 -43,591.0,55.0 -44,581.0,52.0 -45,571.0,47.0 -46,561.0,43.0 -47,551.0,37.0 -48,541.0,32.0 -49,531.0,27.0 diff --git a/scripts/ETH_Derbit_asks.csv b/scripts/ETH_Derbit_asks.csv new file mode 100644 index 0000000..49e0aac --- /dev/null +++ b/scripts/ETH_Derbit_asks.csv @@ -0,0 +1,27 @@ +0,0.0005,100.0 +0,0.005,10.0 +0,0.05,1.0 +0,0.005,10.0 +0,0.05,1.0 +0,0.05,1.0 +0,0.05,1.0 +0,0.4835,5.0 +0,0.5,23.0 +0,0.0235,10.0 +0,0.0095,10.0 +0,0.1,1.0 +0,0.0005,9.0 +0,0.337,1.0 +0,0.37,4.0 +0,0.79,1.0 +0,0.7735,1.0 +0,0.744,1.0 +0,0.648,1.0 +0,0.2455,5.0 +0,0.8255,1.0 +0,0.601,1.0 +0,0.591,1.0 +0,0.577,1.0 +0,0.519,1.0 +0,0.3655,1.0 +0,0.141,8.0 diff --git a/scripts/ETH_Derbit_bids.csv b/scripts/ETH_Derbit_bids.csv new file mode 100644 index 0000000..dbf563f --- /dev/null +++ b/scripts/ETH_Derbit_bids.csv @@ -0,0 +1,13 @@ +0,0.0005,1.0 +0,0.0005,10.0 +0,0.004,1.0 +0,0.0005,1.0 +0,0.0005,1.0 +0,0.0005,91.0 +0,0.0005,1.0 +0,0.039,2.0 +0,0.0505,1.0 +1,0.05,5.0 +0,0.001,1.0 +0,0.0005,2.0 +0,0.0005,1.0 diff --git a/scripts/deribit_order_book.py b/scripts/deribit_order_book.py index 6a8cf80..2f00244 100644 --- a/scripts/deribit_order_book.py +++ b/scripts/deribit_order_book.py @@ -3,118 +3,139 @@ import asyncio from tardis_client import TardisClient, Channel from tardis_dev import datasets, get_exchange_details - +from pprint import pprint class Deribit(object): url = "https://test.deribit.com/api/v2/public/" - def get_order_book(self): + def get_instruments(self): + url = self.url + "get_instruments" + resp = requests.get(url, params={'kind': 'option', 'currency': 'BTC'}) + result = resp.json()['result'] + instrument_names = [] + for data in result: + instrument_name = data['instrument_name'] + if 'P' not in instrument_name: + instrument_names.append(instrument_name) + + print(instrument_names) + return instrument_names + + def get_order_book(self, instrument_names): url = self.url + "get_order_book" - resp = requests.get(url, params={'depth': 50, 'instrument_name': 'ETH-26JUL19'}) - print(resp.json()) - return resp.json()['result'] - - def create_csv(self, data): - df_bids = pd.DataFrame( - data=data['bids'], - columns=['price', - 'amount'] - ) - - df_asks = pd.DataFrame( - data=data['asks'], - columns=['price', - 'amount'] - ) - - df_bids.to_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Derbit_bids.csv') - df_asks.to_csv( - '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/Derbit_asks.csv') - - # def deribit_hist(self): - # # # pip install tardis-client - # # import asyncio - # # from tardis_client import TardisClient, Channel - # # tardis_client = TardisClient(api_key="YOUR_API_KEY") - # # - # # async def replay(): - # # # replay method returns Async Generator - # # messages = tardis_client.replay( - # # exchange="deribit", - # # from_date="2019-07-01", - # # to_date="2019-07-02", - # # filters=[Channel(name="book", symbols=["OPTIONS"])] - # # ) - # # - # # # messages as provided by Deribit real-time stream - # # async for local_timestamp, message in messages: - # # print(message) - # # - # # asyncio.run(replay()) - # - # # pip install tardis-client - # # import asyncio - # # from tardis_client import TardisClient, Channel - # # tardis_client = TardisClient(api_key="YOUR_API_KEY") - # # - # # async def replay(): - # # # replay method returns Async Generator - # # messages = tardis_client.replay( - # # exchange="okex-options", - # # from_date="2020-02-01", - # # to_date="2020-02-02", - # # filters=[Channel(name="option/trade", symbols=[])] - # # ) - # # - # # # messages as provided by OKEx real-time stream - # # async for local_timestamp, message in messages: - # # print(message) - # # - # # asyncio.run(replay()) - # - # # requires Python >=3.6 - # # pip install tardis-dev - # - # import logging - # - # # optionally enable debug logs - # # logging.basicConfig(level=logging.DEBUG) - # - # exchange = 'deribit' - # exchange_details = get_exchange_details(exchange) - # - # # iterate over and download all data for every symbol - # for symbol in exchange_details["datasets"]["symbols"]: - # # alternatively specify datatypes explicitly ['trades', 'incremental_book_L2', 'quotes'] etc - # # see available options https://docs.tardis.dev/downloadable-csv-files#data-types - # data_types = symbol["dataTypes"] - # symbol_id = symbol["id"] - # from_date = symbol["availableSince"] - # to_date = symbol["availableTo"] - # - # print('symbol:: ', symbol_id) - # # skip groupped symbols - # if symbol_id in ['PERPETUALS', 'SPOT', 'FUTURES']: - # continue - # - # print(f"Downloading {exchange} {data_types} for {symbol_id} from {from_date} to {to_date}") - # - # # each CSV dataset format is documented at https://docs.tardis.dev/downloadable-csv-files#data-types - # # see https://docs.tardis.dev/downloadable-csv-files#download-via-client-libraries for full options docs - # datasets.download( - # exchange=exchange, - # data_types=data_types, - # from_date=from_date, - # to_date=to_date, - # symbols=[symbol_id], - # # TODO set your API key here - # api_key="YOUR_API_KEY", - # # path where CSV data will be downloaded into - # download_dir="./datasets", - # ) + order_books = [] + for i, instrument_name in enumerate(instrument_names): + order_books.append(requests.get(url, params={'instrument_name': instrument_name}).json()['result']) + # if i == 5: + # break + pprint(order_books) + return order_books + + def create_csv(self, order_books): + for order_book in order_books: + df_bids = pd.DataFrame( + data=order_book['bids'], + columns=['price', + 'amount'] + ) + + df_asks = pd.DataFrame( + data=order_book['asks'], + columns=['price', + 'amount'] + ) + + df_bids.to_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/BTC_Derbit_bids.csv', mode='a', header=False) + df_asks.to_csv( + '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/BTC_Derbit_asks.csv', mode='a', header=False) + + def deribit_hist(self): + # # pip install tardis-client + # import asyncio + # from tardis_client import TardisClient, Channel + # tardis_client = TardisClient(api_key="YOUR_API_KEY") + # + # async def replay(): + # # replay method returns Async Generator + # messages = tardis_client.replay( + # exchange="deribit", + # from_date="2019-07-01", + # to_date="2019-07-02", + # filters=[Channel(name="book", symbols=["OPTIONS"])] + # ) + # + # # messages as provided by Deribit real-time stream + # async for local_timestamp, message in messages: + # print(message) + # + # asyncio.run(replay()) + + # pip install tardis-client + # import asyncio + # from tardis_client import TardisClient, Channel + # tardis_client = TardisClient(api_key="YOUR_API_KEY") + # + # async def replay(): + # # replay method returns Async Generator + # messages = tardis_client.replay( + # exchange="okex-options", + # from_date="2020-02-01", + # to_date="2020-02-02", + # filters=[Channel(name="option/trade", symbols=[])] + # ) + # + # # messages as provided by OKEx real-time stream + # async for local_timestamp, message in messages: + # print(message) + # + # asyncio.run(replay()) + + # requires Python >=3.6 + # pip install tardis-dev + + import logging + + # optionally enable debug logs + # logging.basicConfig(level=logging.DEBUG) + + exchange = 'deribit' + exchange_details = get_exchange_details(exchange) + + # iterate over and download all data for every symbol + for symbol in exchange_details["datasets"]["symbols"]: + # alternatively specify datatypes explicitly ['trades', 'incremental_book_L2', 'quotes'] etc + # see available options https://docs.tardis.dev/downloadable-csv-files#data-types + data_types = symbol["dataTypes"] + symbol_id = symbol["id"] + from_date = symbol["availableSince"] + to_date = symbol["availableTo"] + + from_date = '2022-08-26T00:00:00.000Z' + print('symbol:: ', symbol_id, from_date, to_date) + # skip groupped symbols + if symbol_id in ['PERPETUALS', 'SPOT', 'FUTURES']: + continue + + print(f"Downloading {exchange} {data_types} for {symbol_id} from {from_date} to {to_date}") + + # each CSV dataset format is documented at https://docs.tardis.dev/downloadable-csv-files#data-types + # see https://docs.tardis.dev/downloadable-csv-files#download-via-client-libraries for full options docs + datasets.download( + exchange=exchange, + data_types=data_types, + from_date=from_date, + to_date=to_date, + symbols=[symbol_id], + # TODO set your API key here + api_key="TD.qu8XwTgCD2yrT2hC.G9za4OJj4UNPCUp.oU6MX-8YFSKsaLY.i5tiLA6IR9iUTZJ.PThJU5B4TUyCuvk.47-x", + # path where CSV data will be downloaded into + download_dir="./datasets", + ) if __name__ == '__main__': d = Deribit() - order_book = d.get_order_book() - d.create_csv(order_book) - # d.deribit_hist() \ No newline at end of file + # instruments = d.get_instruments() + # order_books = d.get_order_book(instruments) + # d.create_csv(order_books) + + d.deribit_hist() \ No newline at end of file From df8f01416d5e122c46505c8588f13c29f885e413 Mon Sep 17 00:00:00 2001 From: Akhilleshgoswami Date: Tue, 27 Dec 2022 13:20:35 +0530 Subject: [PATCH 5/5] add script to format csv file --- .gitignore | 3 + requirements.txt | 10 ++ scripts/Uniswap ETH-USDC Pool Swaps.csv | 200 ++++++++++++------------ scripts/Uniswap: ETH-USDC Pool Data.csv | 2 +- scripts/deribit_order_book.py | 72 ++++++++- scripts/test.csv | 22 +++ services/binance_client.py | 183 ++++++++++++++++------ utilities/datetime_utilities.py | 2 +- 8 files changed, 339 insertions(+), 155 deletions(-) create mode 100644 scripts/test.csv diff --git a/.gitignore b/.gitignore index 0270e7d..776c1a8 100644 --- a/.gitignore +++ b/.gitignore @@ -91,3 +91,6 @@ venv.bak/ .Trashes ehthumbs.db Thumbs.db + + +scripts/datasets \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 0b91bc7..f5771a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ +aiofiles==0.8.0 aiohttp==3.8.1 aiosignal==1.2.0 +asgiref==3.5.2 async-timeout==4.0.2 atomicwrites==1.4.1 attrs==22.1.0 @@ -12,6 +14,8 @@ click==8.1.3 cytoolz==0.11.2 dateparser==1.0.0 distlib==0.3.6 +Django==4.1.2 +djangorestframework==3.14.0 dydx-v3-python==1.7.0 ecdsa==0.16.0 eth-abi==2.2.0 @@ -36,7 +40,9 @@ multiaddr==0.0.9 multidict==6.0.2 mypy-extensions==0.4.3 netaddr==0.8.0 +numpy==1.24.1 packaging==21.3 +pandas==1.5.2 parsimonious==0.8.1 pathspec==0.10.1 platformdirs==2.5.2 @@ -56,7 +62,11 @@ requests==2.28.1 requests-mock==1.6.0 rlp==2.0.1 six==1.16.0 +sortedcontainers==2.4.0 +sqlparse==0.4.3 sympy==1.6 +tardis-client==1.3.3 +tardis-dev==2.0.0a13 toml==0.10.2 tomli==2.0.1 toolz==0.12.0 diff --git a/scripts/Uniswap ETH-USDC Pool Swaps.csv b/scripts/Uniswap ETH-USDC Pool Swaps.csv index 116d50f..99a5bff 100644 --- a/scripts/Uniswap ETH-USDC Pool Swaps.csv +++ b/scripts/Uniswap ETH-USDC Pool Swaps.csv @@ -1,101 +1,101 @@ ,id,amountIn,amountInUSD,amountOut,amountOutUSD,timestamp,tokenIn,tokenOut -0,0x000034b19989093db01dab53cfdd68095df98894d1adea77e448dfb552095ef1-5,1478046135,1478.046135,1297103585614120489,1476.578315091771810754929749923415,1668987359,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -1,0x000109542b1fb2ef41094b1dcae49295bf6b67a359e3b7ba610555716c6d037a-2,124393481348542253740,147320.4138447047494083206833736018,147317476747,147317.476747,1669249007,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -2,0x00013508b3b56cf1613dc373b3ccf6fcafcd3f3c7b0860ae0574a9242d3c1504-88,389696273086551948,495.2751709179147683802682530179515,494151202,494.151202,1670086019,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -3,0x00024c60710fc0384d19877412a2c32d0e9bbf91bf1aa460ce71c3c8cb677fce-35,1790341195202309670,2245.472695963413720236948665845606,2250217200,2250.2172,1668417695,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -4,0x000295323120fc3e18f834bac8f2273ea078a1ed5cb3d319686add753553ae51-201,1137229071610171485,1501.625283348017482460174393642247,1500000000,1500,1670992451,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -5,0x0003126decf8b23dd624a5887fdf38ab955870bbdf7e8b31a7819a73e3d56cb4-135,1011075000000000000,1227.064967051691519853785195301846,1227497302,1227.497302,1668604391,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -6,0x00037cbcf8a1d38a7277f8e4dab3ed5e9ca29959bb13534d14581df2b3615a7b-215,5000000000,5000,4568903685867950012,4987.090647107708438915514655430467,1669121279,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -7,0x000388e7c7e5a5483fc1cc0b06a1f47f4696162becc4e31c7e4f1f7bd44eda6d-32,54821367652710738152,70561.78919821249295587817540921597,70692889520,70692.88952,1669864859,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -8,0x0003f86092a7496dafcf859edcd4013898d83106496bde3cbff58b690ecd4fe6-60,1970599275149658514,2318.376399461934350900527385242463,2317696024,2317.696024,1669655975,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -9,0x0004167242a562b2863db4ebd1f2785b9cddfbedfd6d81fb32bc8d0f07d5004a-214,6401495,6.401495,5393759277803882,6.389058294254219581811281717498997,1669373243,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -10,0x0004220c39f28a4bac8676cf54b1ca4b11a9baaff2ac90554167fcd095b5b370-53,817285625000000000,991.6592322535656731615887690330034,991224433,991.224433,1669582331,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -11,0x0004762e470db297b3f03b8f381fb1a2b1e2402781dbf6f05a5e18e8b0f3637d-172,100000000,100,78642597524776254,99.70859894718863499435120395202008,1670729795,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -12,0x00047d119b0fe5c194a152651284159dcbaf95164311d551f7f8bf4b067c9b55-119,145054547335,145054.547335,119821830852204860421,145231.3480732831214505859797147423,1668625247,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -13,0x0004e192535cec3a60af282022675ff0c2d3468622bf104909456e9c29ac034e-151,500000000,500,394545357882383759,498.5264199317388328343087378078006,1670635631,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -14,0x0004f746ba615d9a3df22196318142df5fa491ee9a90ed3098755b6e1a17f701-90,2000000000000000,2.463534886048492764939430353695576,2464984,2.464984,1670428643,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -15,0x0005b49f728da5c96717db6486d42c8b5351a16da719ed33319e3df3984749b5-2,67486844518,67486.844518,53444624962446430990,67622.18629755595054419742444168192,1670266823,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -16,0x0005cf567355979722d13b4a478fce9e0e4c1a8e1bf7cc4f62dc2e26ecd6f408-42,77838087386,77838.087386,63930141526521634778,77878.06567515199294818956125639041,1668922871,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -17,0x0005d800acf20c11921e167929bf89cffa93d4eefc9aaea71141280e49347534-22,2000000000,2000,1493146436193730042,1998.714377895442770217706746197551,1670939375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -18,0x0005e611811e9a0460476ab96e70582cc18fbff6b2e8bac8d2b6e186fd0a0be3-108,3000000000,3000,2361988642172534605,3001.379178785878219610871998859185,1670711375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -19,0x000607cc9b1170897fa53e2180f3869bafb01ddd918bf53cbe7d48eaaab1b7a7-72,7440097925086047395,8176.633145337944314306709869293087,8185666632,8185.666632,1669068167,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -20,0x0006181b51e4375d4904a8f6b864771b3d6f86f56218f8c590bf019fbcf2b071-187,388096393419025026,500.9144025080792978033335991935964,500000000,500,1670204507,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -21,0x00064665b6709a136a1a3eca9355153da033f50d77b2ec8f2e6ed4b971f674f4-351,990000000,990,783594442820526316,987.324576873590902845704747990882,1670261435,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -22,0x000690c8b385c9043eb36b8c338e32ec33ce03c10510de9579560e67193484c0-224,2544182551,2544.182551,2000000000000000000,2539.063668419619177449659903962748,1670073563,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -23,0x00070ee89a307945fa7729baa77bd84e9be8d9b18e46fe024ae3b83753548f4f-214,45300000000,45300,35511651508703748185,45178.27338399168430155128191996259,1669917419,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -24,0x00071755c1829f6009766383c27d531c654db6540ad91273e29fceac9c3bf81e-104,702515498477883100,852.5765966949496092385262389774738,854021771,854.021771,1669589579,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -25,0x00074e7856cec06964ed7e9e49ff0cee6749f98155e7776250d7da08207b2269-154,139000000000000000,177.7472365005762227623917226610236,177671873,177.671873,1670183963,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -26,0x0007c4a6748fbea2ba5f5075cea09a5405ef29268a058b974d68db33e26ccdbf-158,45442658,45.442658,37362710102650478,45.53036940777862799086296852570061,1669722515,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -27,0x000825d07190c273d8f39958291f012fabdbb5577309ac3fe043660ebc52fafe-93,228000000,228,172388892384274449,227.5897629261585089900564120965985,1671001391,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -28,0x00085069cd9ffec5e1f68ede86e20f8ea65c2ae7fa174fde1936db89cb8e078d-124,67320512286749998838,81773.57110781521689917846143607704,81746708429,81746.708429,1669548707,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -29,0x0008898332c996efce2135d5348846d0fcc4f3044204f108af39b3c19474ca3a-3,82811796991847364,99.96749693339951536658744491661348,100000000,100,1668875795,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -30,0x0008a0b7ef18ed49c539afc722e56c6fa0f0b2542be8baf1e2861354ad1b5e12-120,268837509,268.837509,240906796625060269,269.1687662485863878018567463640699,1669026455,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -31,0x0008b22f4f663e68e82192b06667813565f5d816148138ecc6fb7ed82d278555-85,2129728344019114732,2668.482123569571411980323395411168,2675643390,2675.64339,1668428819,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -32,0x000902e2e3d4f15e19a2d8a37c0b34bc9c6d7e4badee9556d7cbc11826143834-124,100000000,100,85191005348792565,100.0963313100343029559637904342475,1668978743,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -33,0x00092dc8a2bf0674d8e7797aab234a3b85f0b16a419aeb9e0ecf0d4c7178c8e4-180,152777605,152.777605,137284657287873814,153.1049090539555513682649217970112,1668997415,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -34,0x0009780b1d8832d4b3a05d66f5fb7002c897dc6ca388fb02a5c74ba1ae6470bc-147,4583736768746747300,5810.803676058068573256963843048245,5819064603,5819.064603,1669772879,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -35,0x0009901381c036baea27766f20c7b6aac9a4d229332cca6f71455081b1366b2c-165,10000000000000000000,11059.58199585079205593154609428095,11045782254,11045.782254,1669065383,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -36,0x0009a49bb36b4de21cdec10d6e8641677c69716749550b7b60e72dbb3c18f37a-232,6925825532,6925.825532,6354060709438919559,6928.839426761290640345460770525418,1669061171,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -37,0x0009c0ba8c08573bfcc61bff399028eb0bef8353a223a99e799c53263eee5132-206,87447456014375132,107.092654885082252611527530180462,107185780,107.18578,1670401295,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -38,0x0009ec2fa114966d9b3edb379f2597f13e0a46ae1654ce13d6fc7878c5a62ada-236,31333107943935781,37.66532096071870977652515595281959,37633804,37.633804,1668626351,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -39,0x0009ec819a74b4185662b04f6704e447fc3037a5c9a0b156db98937272d02612-239,1129580236,1129.580236,884570228461818042,1130.417217407118878694008264316261,1670689643,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -40,0x000a23a3e98df8c07549b7f8c222516b87a61a23e9a7163499243cb398d2035c-196,54265776504,54265.776504,40485968856449676884,54326.20537612968461225289413945937,1670941763,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -41,0x000a25a3b08a5e24baae101861573ea59f2aca70e15f93d13121cdfda10a79d0-6,7869309102889643019,9566.584642772533228669881049871249,9550687900,9550.6879,1668623483,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -42,0x000a2bf9bd2ee10c7801303d18148f8c5407f4610a4fe8bd7b5fb07e485c723b-121,99125000,99.125,84651418070043447,99.03451596541396836627247763058085,1669666007,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -43,0x000a684b44737cf1acd9371bc983ec44a404d87f48fabca7e89942c3e870783e-44,27350344568191546677,33240.64948953481851412664657399509,33143028360,33143.02836,1669715279,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -44,0x000a89fda78c8f5845caeb427707ad4fc91d61c15975f619bb2aaf8915656cda-167,10000000000,10000,7957409655479135576,9999.109402209031235002048623382547,1668576023,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -45,0x000aa2fcaa342432ff29b0f61b8ea6d8c745510f7da9833626dde4d7849d4857-11,1500000000,1500,1182827926964382184,1501.629906584126250801855413062794,1669800167,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -46,0x000abd2753811a34690102f00c0c7cdd59e61800e8399687b0d42355ecc4d60f-237,993156174759624577,1219.886541015505299052005703942452,1217944149,1217.944149,1670462459,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -47,0x000b0ac93173166df7d2d4de94b38eaf2780efc979c4c29df0d1821ba1a85505-173,6668158022,6668.158022,5761256241679568638,6681.304960695632393728037470608761,1668945695,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -48,0x000b37ee2ac2b68f6e7e30fdf00c61df399bfdc06e443fd9dbea4a32ae5a370f-98,3202169151,3202.169151,2742903108918189617,3208.055088524700354664652880173338,1669662743,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -49,0x000b45f4febd23c9a2925fc8fc37c9963004176240b705f98fd9a5f6052b29e7-2,62605920412,62605.920412,50000000000000000000,62588.99326313726189811356882286315,1668434015,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -50,0x000b8e4eae56dd42299645a621a0097f960f9f05cc85272bd3ee33d2696ab6d7-353,11700000000000000000,15082.28346043442768534247794052628,15059709297,15059.709297,1669838471,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -51,0x000b999f1375e194eaa5152bf4d4b8845b008c93def8449273c671577a01c29d-266,687164958,687.164958,580046858940971036,686.9551553836815145934704817638601,1669247999,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -52,0x000b9bb56e7978607284323c2615cba22cf2d4a353dcc64df5c449922863410c-126,3535346914,3535.346914,3041412752754335499,3539.28872216746250858777803334761,1669599455,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -53,0x000c3836e3a2df4376a32ff44c56083b533abad730cd146e51270e0ab2f6cf08-8,450882262988230807,555.2773404599807705863999197849959,556034529,556.034529,1668446027,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -54,0x000c9edcd8ff8f7feec27921f501f10464b28313e651b661027f466978282d5d-417,150000000,150,117100591073844210,149.8023591944646388042077757695854,1670002919,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -55,0x000cc846c4602eecfc0efc7f0125dfc5c5c9efc9763a2e14c5e195aea880bf73-153,117808794991173302,150.5153514500488001235795203310101,150228813,150.228813,1668431987,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -56,0x000cd89ef1c023489aec226bccd6fb7c7d7771bb56a41bc08145894fbc3aae77-211,802157762987866885,902.4806412632238390991728378309284,900000000,900,1669151699,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -57,0x000d2f929ad6b2ea2655b332f36c1bab7188b7dd4d622c451019f80569f64925-8,87254976746373802924,104461.2209480090457008913318584241,104129116753,104129.116753,1668690719,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -58,0x000d4d4bec2733a5c7bcf5b7f1f691182e12a05f2d5dcb0932727353cc4f0ab7-33,221657941080,221657.94108,189335471985985574114,220425.9601023615653465398878708739,1669599983,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -59,0x000d89e165456257fdf017295aae0a063001adc1e6620ef84000f8c4356be4a7-2,221186270193399988224,266858.8080617627670272936454727703,266187416608,266187.416608,1669734323,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -60,0x000d8e5680165bf604347e8815e2f60a5d9c98e9069228749307080d1a18516e-96,489722102,489.722102,377821614661595811,489.7597181657740029697560266812508,1670235779,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -61,0x000dbae30551139bb78a4b98a1c803cfc5b1f9c57341cdc82675ce1bb3a23701-160,100000000000000000,126.5243129921480351784745360172717,126468495,126.468495,1668529523,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -62,0x000e007687c10375cbf9c78a5274972a93dab80e909f0c6909e2cb2953a56f7f-31,5500000000000000000,7027.246500126307297950827907814847,7005200863,7005.200863,1669770335,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -63,0x000eaf2897b7632720d06e751c460deef645c2949eddeb7e8b0ff133adb4ef8c-128,540356828420055709,677.6083679364369407590902660987313,678714873,678.714873,1670328311,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -64,0x000f14dcf174b6790da1346cebd4460c8f3f10305d89c02d7c036f08310cacfc-108,228094655,228.094655,185174582305186625,227.7905249066587186213436339303054,1668594491,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -65,0x000f5626300f0750d40c415ffb5319dab8f11cf9382c7185c34babbbeedbedb6-172,101652458,101.652458,87150260424868370,101.8421160125417030480059430090612,1669647419,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -66,0x001040ea10eedbf195c3e9988bb95c7109e87d7d96dcd0906119273fe928d068-173,23000000000000000000,30788.1767384040163376148840199038,30762373882,30762.373882,1670939507,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -67,0x0010a07b7c62b059bde59c295bf7ebd09e659c658c5188deb94574a75319cd9f-139,80000000000000000,99.58997994935005326387592895327608,99637545,99.637545,1670835083,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -68,0x0010b699f97ea378a15167caa3e4e8070b313ba118f0dd72606b44f7666f8350-235,597203256,597.203256,500000000000000000,596.2660536738925758971493451728535,1668696947,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -69,0x0010dd1dbac464fd4ed4ede750d1b1e4fb158e9f7e6026e73f27e54a5ff8cfa5-69,1750000000000000000,2089.601298743384860498322075605391,2089022275,2089.022275,1669305263,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -70,0x0010f8f919531f9daa4efc721941fc580c13c42b95b00dc9abc87e06bbef2697-36,442781958277,442781.958277,370569755838053934921,441219.7821704383950129858842076921,1668614087,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -71,0x001175d295e10249b1640d054e053af5a9a5bcef08c011d8794fa1e5e2ce6bdf-62,786700674450090592,999.6541937387814849412899987617145,1000000000,1000,1670707715,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -72,0x00121c8a984a71690a93c490bbaef5411add5426bfeb1fdd69ae6269230f7d1b-161,34072253428,34072.253428,31107982801544335415,33965.97228210157587422971946157141,1669121543,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -73,0x001265c2257e256b443713aff5022659f03b9ba08febe5c4d759f0acd51c0482-351,161964750,161.96475,134192084775607378,161.9915767886102394535360302164904,1668879899,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -74,0x0012917541bb034476239c7ffbb000616759770495d1bf91e335d9ad51105320-27,127450144274908757375,163985.2250711530765749779309840744,163463834599,163463.834599,1670048267,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -75,0x0012ad233c8d4cf38198bb5c640472d205e9da9fa18299c89f9fcc477f3d9c07-9,102149639164,102149.639164,81379782168142732278,101896.237151900339483203814101855,1670875595,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -76,0x0012b032df97c36ef32607e9b3d263b03115a68a100891bb835ae2725a3ed6f2-26,50787677789816421008,62657.7113730068030538294663300701,62586678315,62586.678315,1670459735,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -77,0x0012c310765d694981ed0aa40b6846bca0a5808ad0d398eb77fb700f2001f9a3-3,173186388,173.186388,136622098968674253,172.7443847887911814620570371101012,1669808939,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -78,0x0012c354eaf8edd4d2a6009674b9f91377ed113b950441575516615a3fec24a3-148,1378357748731678842,1681.258038689653328284891096921859,1676865176,1676.865176,1668914243,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -79,0x00138ea17bd330402363b3252d0c9b7dd893b5ed34f7e7c919770be94825ccf1-2,168052000000,168052,143965636224748615781,167893.8890881633508467271685834583,1669231907,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -80,0x0014a538a76197d5c536100b4a6c52c16a87af5283fbee0b714858747f8aaa50-25,63997310942,63997.310942,53183946836339303127,63796.8459323684798932939451968641,1668659591,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -81,0x0014a84e893dbf1d8193adec6aa76386af504813b8e990220ee82ea23990b057-207,2000000000,2000,1641922405233304959,1993.640900350500869230657732975156,1668620759,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -82,0x0014d7c9387f1528db92c962607db231a0eb808998173af53650eec1292d5aa4-47,146286098699,146286.098699,125371201071187266249,145939.9291728625466382775074083112,1669599899,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -83,0x00150b5e805660507d84711d32cf543b1116f68f2b6fa6a0eb8cbcc1e5af84ef-197,100000000,100,79537633692585247,99.71530439422134962750911011122191,1670274563,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -84,0x0015e71bcc7b5fbd63ea510d1c60343c0a19a3376e187e57a9621f5f0770cdb4-16,88148000000,88148,69087960209172972637,88009.98790712475759844056308570797,1669834115,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -85,0x0015eaf66faa1acb169d9c642abf998510b76c59f493346599f3de7d9a146743-60,500000000,500,385570084899493365,499.7767468188205352665785344849472,1670239655,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -86,0x0016191988c376ba039da0662c8ee0c57d3bb86a4e1690a6bf6cef1f74271df2-82,1011663561,1011.663561,833634224945509249,1012.939185479613504907922107504041,1668458987,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -87,0x001656a38a19043974d745eaa2dcf67470191b1e948e73cd74d5822795c7278d-83,457957500,457.9575,356706798367087471,457.816837379571089771993924789184,1670927195,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -88,0x00168edd933bf9e5d35bf6ee876be61e85e5a60fb34fa313ece8f84d4b570661-60,9200000000000000000,11658.20239861051633754561834888595,11633717910,11633.71791,1670797679,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -89,0x0016b868c9d71c2d30bcf3cba0dac01ba0c11e8d36950aa8a0840d85e2f80ebe-12,90000000000000000,114.3019300381844645737136539136624,114503394,114.503394,1670735639,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -90,0x0016eafe88732712823fcd5fb06f3332f0e0e998c1f083af41faf961fdfd5700-72,5130615637,5130.615637,4000000000000000000,5125.460865596803003337015874313644,1669895627,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -91,0x0016f40c21c019565d6cb709bfa4c3bb51db7a24f96c7c3032903f0ba15f68cf-195,274691190,274.69119,220521542851804911,274.5217003876373706347494922217498,1670833439,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -92,0x0017041ec60d690371e94d89a359c880ebfaf06be1526c82e7d09144f886c53f-15,94501582361,94501.582361,74364927802113063576,94459.86676913179806107167442815025,1670372927,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -93,0x0017325941aa39405b16edefe957f948d06e92256d5daf51a45688afa61d7d24-141,300000000,300,233553202981922484,300.2968135859144996724471181171974,1670582039,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -94,0x0017365db4b32af9ae489381216edc37f71549eb25398b2c86a9ea1f3b31fe51-113,1608879518,1608.879518,1268611335373476330,1608.373107450809429350277100394909,1670613683,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -95,0x001848cbde097eb69a11298e0aa202f0dae69cf0ddc23173a85f9bae130b44e0-31,285463996001386370482,319246.4143789552760494236889770393,318581113685,318581.113685,1669124183,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -96,0x00190c5ae20013c5398983e68a66eb1920a6b9c8fbc1b57a35874e5f50dc1056-2,68804418803,68804.418803,59244783242288670360,68762.13741266891496172661068982674,1669174463,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" -97,0x001915b3a91dfbaad2724a43962883fc775ffd3910e50ebe367909c7098b3f6f-146,67825326563021070,85.7756676874583562905877384000105,85713786,85.713786,1670639939,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -98,0x0019d2cce8667b56bc0d471f98007a479197b7c70866f2f42088339208ff1b32-157,2180230404539721659,2786.177861187842370831727056731085,2782134766,2782.134766,1670689199,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" -99,0x0019ee344636db8fc546efb0173025b3546cd1836ef2fec50aabba53e415ee41-115,555934947212639472,602.8231358122314493283779813467397,603005278,603.005278,1669113215,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +0,0x00001ac287e0a1b0a82d8b8445ad6493aa45a5a0f37fc06e5078cbb54c9a7910-68,165164902440265255,219.8915313872214287834768998602455,220000000,220,1673417903,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +1,0x000029977dec2ee069746f37b406b0033478fc74c1e8c4c32e005369ff72cd8e-67,1453460000000000000,2373.210496844090595231272385689297,2377337793,2377.337793,1674397679,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +2,0x0000306bc3246038da552285fa7dc7c910eb286c2bbe5cb5e2fc7b5548678e7d-247,76043182366132083,95.08155837256730590695657996275899,95000000,95,1672817147,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +3,0x000034b19989093db01dab53cfdd68095df98894d1adea77e448dfb552095ef1-5,1478046135,1478.046135,1297103585614120489,1476.578315091771810754929749923415,1668987359,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +4,0x00005407efab368c1ecf0df1ca44f78fcf65e8f85a6aac114a88380b6b20fd52-206,220057903336809077,360.3669886199093650360228486070972,360996431,360.996431,1675397111,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +5,0x0000c035c58a1d3f3c4fd0f583833c2bb80e6f10a006f536d27933682c022620-6,46558220046,46558.220046,29250375374715193786,46570.2665801853793349376870973774,1674891731,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +6,0x0000cde32d93c27e0b8909faa3deff77b39c196552d3556fe72c52ac7aacbc15-252,41168561785,41168.561785,32082468149638960158,41221.66511439034313405098452639043,1673221199,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +7,0x0000d9a6306f946191d8e780be0defe6507cf36460dd62394aacbb0b8a378142-164,78854012872,78854.012872,52911760284495763560,78617.22438030167725480248225868876,1676300387,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +8,0x0000de911f7145a68d7f723af42f43bad2eab3d260aa364c24a764f6fa5a687b-2,658335797628,658335.797628,433403423715345122191,656088.2351651385428695225230769098,1676249243,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +9,0x000109542b1fb2ef41094b1dcae49295bf6b67a359e3b7ba610555716c6d037a-2,124393481348542253740,147320.4138447047494083206833736018,147317476747,147317.476747,1669249007,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +10,0x00013508b3b56cf1613dc373b3ccf6fcafcd3f3c7b0860ae0574a9242d3c1504-88,389696273086551948,495.2751709179147683802682530179515,494151202,494.151202,1670086019,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +11,0x0001413726ac7ed8bd835c7b163fb52460ad00c56c33e31bbe93c33d43790031-34,23897635823703337387,31800.64562004974990896384092151001,31781533974,31781.533974,1673371691,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +12,0x00017573880e3f74be038583b37c2859adc093f2624e7c1514fef3107e0e4196-415,13275691,13.275691,11197569439537872,13.29150344287183389087434958984589,1672262831,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +13,0x00017afe68c99a258817f952c24b43930b88e72c9cbe3928a55e8a95214debf4-57,10954742856831383,18.27254395664930463656905648544463,18294668,18.294668,1675587791,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +14,0x000180fd16f1709774988a7ce673be07e04045ec30b44c65fa195c6510be7bdb-95,6000452133744186616,10197.10740014680736445244853829156,10184884903,10184.884903,1676654915,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +15,0x00018d5885ee9c8b5cb1f82177add3f52038b4fa84be9a684ec7a09b14cfda80-159,300000000,300,179581315560361048,299.6322196597881884548633601256496,1676858579,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +16,0x000191fbd21e8da2b6cb51bd625dd9ab462eb6e74e142375ef76b1abd9d67b2d-337,1282788143576881559,1718.200420854212407413636972593922,1717630879,1717.630879,1673377739,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +17,0x00019b1104ef65fb423f2026525fa70e8d5798e78760fb415de22bd1e1f7b2b3-258,83988289661,83988.289661,50749033534626685680,83731.2025569066564831940163361986,1677197603,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +18,0x0001c5172aa2665e4d5517b13e985b6cc41cb7fad938c2dec0acca26015ee91b-298,414000000000000000,482.7061953698765066962876352994952,483015472,483.015472,1671494051,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +19,0x0001c7bb01be6c7c957d909db1b3704c351f18be7a4af8e53947d6c4b23e0fbb-345,300000000,300,189579828305880956,300.0643651785422170445163237931002,1677979631,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +20,0x0001cbe8769d9a9c9ec11bd1c531c2e9f94e545a4724eadd000ea516cc1817cf-179,1559216971256209875,2497.758512250542161582893402842844,2502989418,2502.989418,1677280343,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +21,0x0001e1c3f4201f15646fe923267f903d3cd680487857d2d50a08ca97cfe301c0-358,500000000,500,305780961300264129,498.603544583147138539471203277568,1674511943,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +22,0x0001f0cf46ab4f319b65d1ac82eb041fe13cbda4aac65f0e41b09fde5dc1b96c-151,826042261308203401,987.790359723301792522336330096657,986819337,986.819337,1671218975,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +23,0x0002088b2f326f0114b41b8a89d7f15f12d293328a6a2d3c761eef1c34175695-13,4266117177,4266.117177,3560090738149703786,4263.76654287425030107557538050146,1672447895,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +24,0x00020c21ddd0def995e370ba49c18145cde69d5aed39b6ede6457a79ad00e030-17,302345723632499994783,400728.5135016687542263586647806889,400027691117,400027.691117,1673453135,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +25,0x000220fa0f2a0e30c993148127f013d1387a17fa5d428f22f26e81e80b651207-122,704204432016447112,1184.298508455932297991278175498373,1184486129,1184.486129,1676975147,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +26,0x0002334de6147cb80bd341efd3458dd7fc3044aba46665122382b93b42986e7d-179,139988967458866108,231.247111610865897697279692115659,231464603,231.464603,1674313943,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +27,0x0002413d43d3df164c298af1e8f37807c471b00428a1cff0dfc78ff31cf3bf9d-8,45026455951645244514,73472.10681696937993626979876857663,73465887941,73465.887941,1675928915,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +28,0x00024c60710fc0384d19877412a2c32d0e9bbf91bf1aa460ce71c3c8cb677fce-35,1790341195202309670,2245.472695963413720236948665845606,2250217200,2250.2172,1668417695,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +29,0x000295323120fc3e18f834bac8f2273ea078a1ed5cb3d319686add753553ae51-201,1137229071610171485,1501.625283348017482460174393642247,1500000000,1500,1670992451,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +30,0x0002ac81a0eb41067c88c3263da5cd194d1bb536e3802386c824ad9cfbe145d4-254,146597500,146.5975,123041165753576800,146.9148758876479106053597613793723,1671505991,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +31,0x0002b4156acce5f421f60a20522849d1259ca66e869050f6bf7d31dbd348e2f9-97,8545738327461185507,14307.99857248156101915096385363379,14293487402,14293.487402,1675316291,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +32,0x0002c9b82966567b8f14e1be7c12da305ec26a94247fd1086a6d86eefef25433-7,380699615609,380699.615609,232216253075649844206,379526.6622254281781688392307858671,1677154703,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +33,0x0002cb0a08fd9b9a069b2b8e136a542c52f2a43e0b6026ddbf6f796cde2ed127-255,730000000,730,470539141711631270,729.4582417291888962280629039060472,1675991879,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +34,0x0002ce92fa7e99591690605cf298db46203385f1cd251064378edcf5f260a5f8-186,227987500000000000,364.6381802085514440274379580598034,365352292,365.352292,1674770531,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +35,0x0002ea03a9f19ad95a9e9a89e77670a510962bbd9a42c3f45f34f673fae7693a-291,159580832454,159580.832454,131375328460179736637,159342.7739399207275661227702880451,1672004819,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +36,0x000300720c33807a7b3ee711aa973a7474e7f54996f9f921d0a21ff36ece4248-32,1157496010487669351,1885.30709735455757546380871321046,1883774218,1883.774218,1674517775,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +37,0x0003091d8a4d0f6f045542e413922c889039aa834885b9e22fd2bb327162b2d4-104,37111517622300000256,62682.0518868005100616316183171547,62630647482,62630.647482,1676867291,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +38,0x00030cdb7432ccdafafc334ba7374d82bc90c248cd43d887d381bcdd5954327f-17,2463469618,2463.469618,2044605831764151188,2457.241880647332943225326798336604,1671995411,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +39,0x0003126decf8b23dd624a5887fdf38ab955870bbdf7e8b31a7819a73e3d56cb4-135,1011075000000000000,1227.064967051691519853785195301846,1227497302,1227.497302,1668604391,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +40,0x0003174be116602d08a9369f666da73317edcdee6c8fcba40c69f31fd676ef3c-348,1117283795202131135,1857.485734651577899154796223969609,1856064056,1856.064056,1676998931,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +41,0x00034570969b2d3139c60f1f0e9c278881e19c86b12940a2fab8f353f4171ebf-203,91948671224,91948.671224,59089499156165231960,91849.56685955868653799392335586442,1674158867,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +42,0x00037cbcf8a1d38a7277f8e4dab3ed5e9ca29959bb13534d14581df2b3615a7b-215,5000000000,5000,4568903685867950012,4935.113661628706988594489622024252,1669121279,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +43,0x000385236b773e6ef3b9d4fc4cff7e8e904c67d99c672354b6da523fa7e61bfe-254,200000000000000000,314.881706889972581875426507916693,315441773,315.441773,1675202975,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +44,0x000388e7c7e5a5483fc1cc0b06a1f47f4696162becc4e31c7e4f1f7bd44eda6d-32,54821367652710738152,70561.78919821249295587817540921597,70692889520,70692.88952,1669864859,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +45,0x00038b2e69d8990f728c32262d9a9df86498659f501d3ec8ceee9d33a2b421f7-76,295000000,295,180779303637153529,294.9868181521293845772488862693362,1675929275,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +46,0x0003e7b5cf753abd51b2500e46d67231b992db582ffe4189ccff154662565b7d-6,25677625618,25677.625618,16569766083477603453,25642.91978753200847105781265117018,1673864891,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +47,0x0003f0273e17afcc6e302db829fc3458e64037ac8b93f18e056ccc2fdb7b66b0-26,666986917569356920950,1055316.254887044495771516971112594,1056301653513,1056301.653513,1674687647,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +48,0x0003f1332793db82d0e9340e285f7497fec2d9e2bf2202d6d5985fa21920f335-198,100000000,100,63496397646308500,99.79036338311041940575328087158152,1675244471,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +49,0x0003f2288193ef1c41c3403f421778aaa201650722362478557675885803560a-10,52070312500,52070.3125,40377417689533516823,51929.33485283363781639921950732185,1671103931,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +50,0x0003f3019796f9f263c611457850e0f36fc16a91574342adae70747170f655b7-26,2437937998,2437.937998,2000000000000000000,2435.547840819167387824376037989934,1671704747,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +51,0x0003f86092a7496dafcf859edcd4013898d83106496bde3cbff58b690ecd4fe6-60,1970599275149658514,2318.376399461934350900527385242463,2317696024,2317.696024,1669655975,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +52,0x000403853ea11ae0a7c27964fa22089a38af82a635a433a48a76e2a8aba7f18d-262,7500000000,7500,6354058392112957125,7483.803003711648851661898311538769,1671254063,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +53,0x00041460eed1095758df4eb73cca77d25ecf0fa8036bb1ad58c26b59bbe7a4a5-215,4734014928,4734.014928,3357657118317251876,4740.712156529922927639390309718152,1673611847,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +54,0x0004167242a562b2863db4ebd1f2785b9cddfbedfd6d81fb32bc8d0f07d5004a-214,6401495,6.401495,5393759277803882,6.389058294254219581811281717498997,1669373243,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +55,0x0004220c39f28a4bac8676cf54b1ca4b11a9baaff2ac90554167fcd095b5b370-53,817285625000000000,991.6592322535656731615887690330034,991224433,991.224433,1669582331,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +56,0x00042e65952f228739ffd873368e36ceb88e26900ba9c696d99e4d7d0dc47ffe-180,4019500000000000000,6759.586102899764376918375007018465,6770720827,6770.720827,1676972723,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +57,0x0004762e470db297b3f03b8f381fb1a2b1e2402781dbf6f05a5e18e8b0f3637d-172,100000000,100,78642597524776254,99.70859894718863499435120395202008,1670729795,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +58,0x00047d119b0fe5c194a152651284159dcbaf95164311d551f7f8bf4b067c9b55-119,145054547335,145054.547335,119821830852204860421,145231.3480732831214505859797147423,1668625247,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +59,0x00049f42f21bf62be30883117947ae5ebcc88af474a73193bde118a6f4b913e5-12,3959655927321705924,6087.071071822915533733227938028623,6070028066,6070.028066,1676167439,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +60,0x0004a842fc4692495edec665a019d1c4a08f83ab3a3d42eda18ca5eb0c883c63-314,902494922,902.494922,587926328861019821,901.9743574990142161575806215133252,1673731751,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +61,0x0004b67609a1de803c73051f8523ddfab153b2a2dab73b297394736b9a1d31d0-16,1200044468588,1200044.468588,933502979724866713603,1205110.722604868102689678235682618,1671069059,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +62,0x0004d4d6bdf572366136bbae48729ec2597d0a119d6af97dc94213ec509b5fa4-384,1700000000,1700,1040514037011376308,1697.384053167469410528406395013065,1677441611,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +63,0x0004e192535cec3a60af282022675ff0c2d3468622bf104909456e9c29ac034e-151,500000000,500,394545357882383759,498.5264199317388328343087378078006,1670635631,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +64,0x0004e8d45d9ece8614111ab33d43fa07ef2c46c83c047f399a466fcee8005bb7-22,1000000000000000000,1192.7887840739622182228804846387,1192593067,1192.593067,1672550615,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +65,0x0004f746ba615d9a3df22196318142df5fa491ee9a90ed3098755b6e1a17f701-90,2000000000000000,2.463534886048492764939430353695576,2464984,2.464984,1670428643,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +66,0x0004f984aa96eb9b513fb2699f2d0b97612bef2b08c79dfb92019b577fc07534-2,98178094703599992832,155424.3942613838908461369455208275,154959384856,154959.384856,1673968499,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +67,0x0004ff8bcca6eec289d136694cd6089230381027ce71216b6d7516ca3a6c5753-11,23495431691234003859,28447.42084712940182748879375117486,28428266422,28428.266422,1671649607,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +68,0x00053f5a85161a1e3fee534d7265325fed4c1750faecfd645063a393fe0a591b-256,16000000000000000000,20419.07421738995397147633191181165,20372870066,20372.870066,1671111887,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +69,0x00055009c1c3faf347fc62e7c0e9d12de89b4ad50d0103ec7986179005bda375-83,500000000,500,324658168083445099,500.2393255244421779306507107235814,1676234339,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +70,0x00055394402062bdddbacdf75c584ea250577ee2809bd6d227573319a5d34049-44,60000000000000000,72.61846128265588192931354725982646,72502400,72.5024,1671664019,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +71,0x00055740134249d4cb1c6f8c6166fb98a505056647b71f65804023705d84e342-2,362363336880220443540,569369.855421667822546913291763643,567479936514,567479.936514,1674939347,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +72,0x0005a3048cef80e13273e5c4a34da0a6bdf086f6a58c7f4af80088f5099be33b-124,1626933957,1626.933957,1049023316318160546,1628.319997165791650873281750135143,1676427455,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +73,0x0005b39cac653482836629c7eee2f6b86af98398ef60e7bd5991c9148124b870-244,273000000000000000,445.1509033450805905015192242518989,445524623,445.524623,1674509555,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +74,0x0005b49f728da5c96717db6486d42c8b5351a16da719ed33319e3df3984749b5-2,67486844518,67486.844518,53444624962446430990,67622.18629755595054419742444168192,1670266823,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +75,0x0005cf567355979722d13b4a478fce9e0e4c1a8e1bf7cc4f62dc2e26ecd6f408-42,77838087386,77838.087386,63930141526521634778,77878.06567515199294818956125639041,1668922871,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +76,0x0005d800acf20c11921e167929bf89cffa93d4eefc9aaea71141280e49347534-22,2000000000,2000,1493146436193730042,1998.714377895442770217706746197551,1670939375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +77,0x0005e611811e9a0460476ab96e70582cc18fbff6b2e8bac8d2b6e186fd0a0be3-108,3000000000,3000,2361988642172534605,3001.379178785878219610871998859185,1670711375,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +78,0x0005e89f8582ebdbe38b0cbe7a9a773277d9e7bb776fb33682c28c4005412c1e-208,545196208451149490,665.0821309604905535173923776816105,664000000,664,1671816239,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +79,0x0005eac78c3f4949f4b4e2c6163feb0079030be6882c276968a4e133192213ea-273,297519991439111194,361.4157159486135392279500710580066,361964351,361.964351,1672150559,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +80,0x0005fd68182f913707d94001eb70dd5669b3c40df38e757204e5caa1e98f5d63-243,3908110259,3908.110259,2568750873481335119,3900.130036749986864414249570398325,1676051015,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +81,0x000607cc9b1170897fa53e2180f3869bafb01ddd918bf53cbe7d48eaaab1b7a7-72,7440097925086047395,8136.737268637143302917327647046512,8185666632,8185.666632,1669068167,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +82,0x0006181b51e4375d4904a8f6b864771b3d6f86f56218f8c590bf019fbcf2b071-187,388096393419025026,500.9144025080792978033335991935964,500000000,500,1670204507,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +83,0x00062b2936e47f98113caf24254ebc703e445b2c5ccff6bce11381a5abb6e7c3-311,130000000000000000,157.3360312315733264087951731445154,157140915,157.140915,1671654263,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +84,0x00064665b6709a136a1a3eca9355153da033f50d77b2ec8f2e6ed4b971f674f4-351,990000000,990,783594442820526316,987.324576873590902845704747990882,1670261435,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +85,0x0006648102d8975dc859e1b718eac52e385bdad3c47aeef3adeeca3af7f5a326-153,1458420793,1458.420793,1090122987502864495,1461.644581664182116999178632022246,1673462339,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +86,0x000690c8b385c9043eb36b8c338e32ec33ce03c10510de9579560e67193484c0-224,2544182551,2544.182551,2000000000000000000,2539.063668419619177449659903962748,1670073563,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +87,0x00069b571b12903748a1f6fe55e6931d1f7c9008120239275409b2a7b3673520-45,65021385201,65021.385201,46317834422665068857,64960.38548132655420848900837246148,1673498771,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +88,0x0006b2174ad035f358be4a2a4bbb8dba6adaa75935f6b75ea91c28483a79f113-267,191239343497550752,299.6080957179967421235218179737225,300000000,300,1675150019,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +89,0x0006b9ae0e41e2bb2006e39a2aa1b1bf9d256271f7b547aea72f4bcebb852ceb-32,100000000000000000,142.7439434466932503086567311056539,142755881,142.755881,1673559947,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +90,0x0006d45ed36fc2168eb1b551445dec6dc2bedaa345aa66499aaca7776982cdfc-118,3130459795,3130.459795,2000714115646953947,3133.539833393292569689809304434482,1673938319,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +91,0x0006e29138b92d459dca5cad882e581ae75ed28187fffb356cfdb33df9344e83-208,500000000,500,354496208140829605,500.5212898279139487440732761439298,1673611175,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +92,0x0006e2f24ace317a46adc869d72e79ff3ed853b21096af2950003d215ca438bd-453,1951000000,1951,1186515899435651899,1949.739956472058409397388758350414,1675766975,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +93,0x0006f5e3ee6c47d318230178aa71427b9859295cb39e95a58fd595e7c9847e32-102,1128484458043936737,1777.597217155326103934385024411283,1777163186,1777.163186,1674679523,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +94,0x00070ee89a307945fa7729baa77bd84e9be8d9b18e46fe024ae3b83753548f4f-214,45300000000,45300,35511651508703748185,45178.27338399168430155128191996259,1669917419,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +95,0x00071671c9a89f538fa3b15d40bbcc29bb07ae1d601364141e547ac6af6b499b-2,289476898087,289476.898087,183487364915596510774,289546.4211466199105665218362133516,1674035303,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" +96,0x00071755c1829f6009766383c27d531c654db6540ad91273e29fceac9c3bf81e-104,702515498477883100,852.5765966949496092385262389774738,854021771,854.021771,1669589579,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +97,0x000733aaa47fe79cd1250e7d3342937f151ef402f26baac6ec5815d11ec30920-252,999506095727113942,1659.105343745557268787958634689001,1656000000,1656,1676610491,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +98,0x00074e7856cec06964ed7e9e49ff0cee6749f98155e7776250d7da08207b2269-154,139000000000000000,177.7472365005762227623917226610236,177671873,177.671873,1670183963,"{'name': 'Wrapped Ether', 'symbol': 'WETH'}","{'name': 'USD Coin', 'symbol': 'USDC'}" +99,0x0007557d2f77a2088ae842e3052430d2712bb6ad4e0cc6e281d5dd4f97517c42-64,1950853839,1950.853839,1160752137942572619,1947.843469780194405829595960947194,1675526351,"{'name': 'USD Coin', 'symbol': 'USDC'}","{'name': 'Wrapped Ether', 'symbol': 'WETH'}" diff --git a/scripts/Uniswap: ETH-USDC Pool Data.csv b/scripts/Uniswap: ETH-USDC Pool Data.csv index 8009e4c..95fc3d2 100644 --- a/scripts/Uniswap: ETH-USDC Pool Data.csv +++ b/scripts/Uniswap: ETH-USDC Pool Data.csv @@ -1,2 +1,2 @@ ,timestamp,cumulativeProtocolSideRevenueUSD,cumulativeSupplySideRevenueUSD,cumulativeTotalRevenueUSD,cumulativeVolumeUSD,fees,name -0,,0,157252292.1265826042557284213258822,157252292.1265826042557284213258822,314504584253.1652085114568426515811,"[{'id': 'lp-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_LP_FEE', 'feePercentage': '0.05'}, {'id': 'protocol-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_PROTOCOL_FEE', 'feePercentage': '0'}, {'id': 'trading-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_TRADING_FEE', 'feePercentage': '0.05'}]",Uniswap V3 USD Coin/Wrapped Ether 0.05% +0,,0,171286183.4745586325076944095296054,171286183.4745586325076944095296054,342572366949.1172650153888190589444,"[{'id': 'lp-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_LP_FEE', 'feePercentage': '0.05'}, {'id': 'protocol-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_PROTOCOL_FEE', 'feePercentage': '0'}, {'id': 'trading-fee-0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640', 'feeType': 'FIXED_TRADING_FEE', 'feePercentage': '0.05'}]",Uniswap V3 USD Coin/Wrapped Ether 0.05% diff --git a/scripts/deribit_order_book.py b/scripts/deribit_order_book.py index 2f00244..5ce97dd 100644 --- a/scripts/deribit_order_book.py +++ b/scripts/deribit_order_book.py @@ -1,10 +1,12 @@ import pandas as pd import requests import asyncio +import datetime from tardis_client import TardisClient, Channel from tardis_dev import datasets, get_exchange_details from pprint import pprint + class Deribit(object): url = "https://test.deribit.com/api/v2/public/" @@ -45,9 +47,8 @@ def create_csv(self, order_books): 'amount'] ) - df_bids.to_csv('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/BTC_Derbit_bids.csv', mode='a', header=False) - df_asks.to_csv( - '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/scripts/BTC_Derbit_asks.csv', mode='a', header=False) + df_bids.to_csv('/Users/akhileshgoswami/Desktop/HedgingScripts/BTC_Derbit_bids.csv', mode='a', header=False) + df_asks.to_csv('/Users/akhileshgoswami/Desktop/HedgingScripts/BTC_Derbit_asks.csv', mode='a', header=False) def deribit_hist(self): # # pip install tardis-client @@ -106,17 +107,28 @@ def deribit_hist(self): # alternatively specify datatypes explicitly ['trades', 'incremental_book_L2', 'quotes'] etc # see available options https://docs.tardis.dev/downloadable-csv-files#data-types data_types = symbol["dataTypes"] + data_types = ['incremental_book_L2', 'book_snapshot_5', 'options_chain'] + symbol_id = symbol["id"] from_date = symbol["availableSince"] to_date = symbol["availableTo"] + symbol_type = symbol['type'] + print(symbol) + + if 'option' not in symbol_type: + continue - from_date = '2022-08-26T00:00:00.000Z' - print('symbol:: ', symbol_id, from_date, to_date) - # skip groupped symbols if symbol_id in ['PERPETUALS', 'SPOT', 'FUTURES']: continue + if '2022' not in from_date: + continue + + if from_date < '2022-08-26T00:00:00.000Z': + continue + print(f"Downloading {exchange} {data_types} for {symbol_id} from {from_date} to {to_date}") + # print('symbol:: ', symbol_id, from_date, to_date) # each CSV dataset format is documented at https://docs.tardis.dev/downloadable-csv-files#data-types # see https://docs.tardis.dev/downloadable-csv-files#download-via-client-libraries for full options docs @@ -132,10 +144,56 @@ def deribit_hist(self): download_dir="./datasets", ) + def format_data(self): + order_book = pd.read_csv('datasets/deribit_incremental_book_L2_2022-08-28_OPTIONS.csv') + + strike_prices = [] + expiry_date = [] + order_type = [] + open_at = [] + symbol_dict = {} + for index, row in order_book.iterrows(): + if not row['symbol'] in symbol_dict: + symbol_dict[row['symbol']] = [] + symbol_dict[row['symbol']].append(row) + + df = pd.DataFrame() + + data = [] + for key, value in symbol_dict.items(): + data.append(pd.DataFrame(value)) + + df = pd.concat(data) + for index, row in df.iterrows(): + symbol = row['symbol'].split('-') + + expiry_date.append(symbol[1]) + strike_prices.append(symbol[2]) + order_type.append(symbol[3]) + timestamp = int(row['timestamp']) / 1000 + + format_date = datetime.datetime.utcfromtimestamp(timestamp / 1000).strftime('%c') + date_time = format_date.split(' ') + option_open_date = date_time[2] + option_open_date += date_time[1] + option_open_date += date_time[4][2] + date_time[4][3] + open_at.append(option_open_date.upper()) + + if 'Unnamed: 0' in df.columns: + df.drop('Unnamed: 0', inplace=True, axis=1) + df['strike'] = strike_prices + df['written'] = open_at + df['expiry'] = expiry_date + df['type'] = order_type + df.to_csv('datasets/deribit_incremental_book_L2_2022-08-28_OPTIONS.csv') + + if __name__ == '__main__': d = Deribit() # instruments = d.get_instruments() # order_books = d.get_order_book(instruments) # d.create_csv(order_books) - d.deribit_hist() \ No newline at end of file + d.deribit_hist() + # d.format_data() + # d.drop_column() diff --git a/scripts/test.csv b/scripts/test.csv new file mode 100644 index 0000000..470daad --- /dev/null +++ b/scripts/test.csv @@ -0,0 +1,22 @@ +,exchange,symbol,timestamp,local_timestamp,is_snapshot,side,price,strike,written,expiry,type +0,deribit,ETH-30DEC22-2200-P,1661644800127000,1661644800135806,False,ask,0.835,2200,28AUG22,30DEC22,P +1,deribit,ETH-30DEC22-2200-P,1661644800127000,1661644800135806,False,ask,0.8355,2200,28AUG22,30DEC22,P +2,deribit,ETH-9SEP22-3400-C,1661644797212000,1661644800276176,True,ask,0.001,3400,27AUG22,9SEP22,C +3,deribit,SOL-9SEP22-50-C,1661644797669000,1661644800276181,True,ask,0.007,50,27AUG22,9SEP22,C +4,deribit,ETH-9SEP22-3000-C,1661644797216000,1661644800276199,True,ask,0.0005,3000,27AUG22,9SEP22,C +5,deribit,ETH-9SEP22-3000-C,1661644797216000,1661644800276199,True,ask,0.001,3000,27AUG22,9SEP22,C +6,deribit,ETH-9SEP22-3000-C,1661644797216000,1661644800276199,True,ask,0.003,3000,27AUG22,9SEP22,C +7,deribit,ETH-9SEP22-3000-C,1661644797216000,1661644800276199,True,ask,0.0035,3000,27AUG22,9SEP22,C +8,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.0015,2600,27AUG22,9SEP22,C +9,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.002,2600,27AUG22,9SEP22,C +10,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.0025,2600,27AUG22,9SEP22,C +11,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.003,2600,27AUG22,9SEP22,C +12,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.007,2600,27AUG22,9SEP22,C +13,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,ask,0.0075,2600,27AUG22,9SEP22,C +14,deribit,ETH-9SEP22-2600-C,1661644797214000,1661644800276214,True,bid,0.0005,2600,27AUG22,9SEP22,C +15,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,ask,0.002,2300,27AUG22,9SEP22,C +16,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,ask,0.0025,2300,27AUG22,9SEP22,C +17,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,ask,0.0045,2300,27AUG22,9SEP22,C +18,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,ask,0.006,2300,27AUG22,9SEP22,C +19,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,bid,0.001,2300,27AUG22,9SEP22,C +20,deribit,ETH-9SEP22-2300-C,1661644797212000,1661644800276226,True,bid,0.0005,2300,27AUG22,9SEP22,C diff --git a/services/binance_client.py b/services/binance_client.py index ffa7447..365cccb 100644 --- a/services/binance_client.py +++ b/services/binance_client.py @@ -1,6 +1,108 @@ -import math -import multiprocessing +# import math +# import multiprocessing +# +# import pandas as pd +# import os.path +# from datetime import timedelta, datetime +# from dateutil import parser +# from binance.client import Client as Client_binance +# +# +# class BinanceClient(object): +# def __init__(self, +# config): +# self.binance_api_key = config['binance_api_key'] +# self.binance_api_secret = config['binance_api_secret'] +# self.client = Client_binance(api_key=self.binance_api_key, api_secret=self.binance_api_secret) +# # self.initial_date = config['initial_date'] +# # self.symbol = config['symbol'] +# # self.freq = config['freq'] +# +# ### FUNCTIONS +# def minutes_of_new_data(self, symbol, kline_size, +# initial_date, data, source, end_date=0): +# if len(data) > 0: +# old = parser.parse(data["timestamp"].iloc[-1]) +# elif source == "binance": +# old = datetime.strptime(initial_date, '%d %b %Y') +# if source == "binance": +# data = self.client.get_klines(symbol=symbol, interval=kline_size) +# print('size: ', len(data)) +# new = pd.to_datetime(data[end_date][0], unit='ms') +# return old, new +# +# def get_all_binance(self, symbol, freq, +# initial_date, save=False, end_date=0): +# binsizes = {"1m": 1, "5m": 5, "10m": 10, "15m": 15, "1h": 60, "6h": 360, "12h": 720, "1d": 1440} +# filename = '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/files/%s-%s-%s-data.csv' % ( +# symbol, freq, initial_date) +# data_df = pd.DataFrame() +# oldest_point, newest_point = self.minutes_of_new_data(symbol, freq, +# initial_date, data_df, source="binance", end_date=end_date) +# delta_min = (newest_point - oldest_point).total_seconds() / 60 +# available_data = math.ceil(delta_min / binsizes[freq]) +# if oldest_point == datetime.strptime(initial_date, '%d %b %Y'): +# print('Downloading all available %s data for %s. Be patient..!' % (freq, symbol)) +# else: +# print('Downloading %d minutes of new data available for %s, i.e. %d instances of %s data.' +# % (delta_min, symbol, available_data, freq)) +# klines = self.client.get_historical_klines(symbol, freq, +# oldest_point.strftime("%d %b %Y %H:%M:%S"), +# newest_point.strftime("%d %b %Y %H:%M:%S")) +# data = pd.DataFrame(klines, +# columns=['timestamp', 'open', 'high', 'low', 'close', 'volume', 'close_time', +# 'quote_av', +# 'trades', 'tb_base_av', 'tb_quote_av', 'ignore']) +# data['timestamp'] = pd.to_datetime(data['timestamp'], unit='ms') +# # data.index = pd.to_datetime(data['timestamp'], unit='ms') +# if len(data_df) > 0: +# temp_df = pd.DataFrame(data) +# data_df = data_df.append(temp_df) +# else: +# data_df = data +# data_df.set_index('timestamp', inplace=True) +# if save: +# data_df.to_csv(filename) +# print('All caught up..!') +# print(initial_date) +# return data_df +# +# +# if __name__ == '__main__': +# +# import json +# from joblib import Parallel, delayed +# +# with open('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/StgyApp_config.json') as json_file: +# config = json.load(json_file) +# _binance_client_ = BinanceClient(config['binance_client']) +# +# symbol = 'ETHUSDC' +# freq = '1m' +# initial_dates = ["1 Jan 2022", "1 Jan 2021", "1 Jan 2020", "1 Jan 2019", "1 Jan 2018", "1 Jan 2017", "1 Jan 2016", +# "1 Jan 2015", "1 Jan 2014"] +# end_dates = [-1, 232, 963, 1328, 1693, 2058, 2424, 2789, 3154] +# +# # eth_historical_prices_year_wise = [] +# parallel_pool = Parallel(n_jobs=9) +# delayed_function = [delayed(_binance_client_.get_all_binance)(symbol=symbol, freq=freq, +# initial_date=initial_date, save=True, +# end_date=end_date) for initial_date, end_date in +# zip(initial_dates, end_dates)] +# +# eth_historical_prices_year_wise = parallel_pool(delayed_function) +# print('eth_historical_prices_year_wise', eth_historical_prices_year_wise) +# +# # eth_prices_float = [] +# # for i, eth_prices in enumerate(eth_historical_prices_year_wise): +# # eth_prices_float.append([]) +# # for eth_price in eth_prices: +# # eth_prices_float[i].append(float(eth_price)) +# # +# # historical_data = eth_prices_float +# # print(historical_data) +import math import pandas as pd import os.path from datetime import timedelta, datetime @@ -9,36 +111,35 @@ class BinanceClient(object): + def __init__(self, config): self.binance_api_key = config['binance_api_key'] self.binance_api_secret = config['binance_api_secret'] + self.client = Client_binance(api_key=self.binance_api_key, api_secret=self.binance_api_secret) - # self.initial_date = config['initial_date'] - # self.symbol = config['symbol'] - # self.freq = config['freq'] ### FUNCTIONS - def minutes_of_new_data(self, symbol, kline_size, - initial_date, data, source, end_date=0): + def minutes_of_new_data(self, symbol, initial_date, + kline_size, data, source): if len(data) > 0: old = parser.parse(data["timestamp"].iloc[-1]) elif source == "binance": old = datetime.strptime(initial_date, '%d %b %Y') if source == "binance": - data = self.client.get_klines(symbol=symbol, interval=kline_size) - print('size: ', len(data)) - new = pd.to_datetime(data[end_date][0], unit='ms') + new = pd.to_datetime(self.client.get_klines(symbol=symbol, interval=kline_size)[-1][0], unit='ms') return old, new - def get_all_binance(self, symbol, freq, - initial_date, save=False, end_date=0): + def get_all_binance(self, symbol, initial_date, freq, save=False): binsizes = {"1m": 1, "5m": 5, "10m": 10, "15m": 15, "1h": 60, "6h": 360, "12h": 720, "1d": 1440} - filename = '/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/files/%s-%s-%s-data.csv' % ( - symbol, freq, initial_date) - data_df = pd.DataFrame() - oldest_point, newest_point = self.minutes_of_new_data(symbol, freq, - initial_date, data_df, source="binance", end_date=end_date) + filename = '/home/agustin/Git-Repos/algo-trading-crypto/il-hedger/il_hedger/files/%s-%s-data.csv' % ( + symbol, freq) + if os.path.isfile(filename): + data_df = pd.read_csv(filename) + else: + data_df = pd.DataFrame() + oldest_point, newest_point = self.minutes_of_new_data(symbol, initial_date, + freq, data_df, source="binance") delta_min = (newest_point - oldest_point).total_seconds() / 60 available_data = math.ceil(delta_min / binsizes[freq]) if oldest_point == datetime.strptime(initial_date, '%d %b %Y'): @@ -50,11 +151,9 @@ def get_all_binance(self, symbol, freq, oldest_point.strftime("%d %b %Y %H:%M:%S"), newest_point.strftime("%d %b %Y %H:%M:%S")) data = pd.DataFrame(klines, - columns=['timestamp', 'open', 'high', 'low', 'close', 'volume', 'close_time', - 'quote_av', + columns=['timestamp', 'open', 'high', 'low', 'close', 'volume', 'close_time', 'quote_av', 'trades', 'tb_base_av', 'tb_quote_av', 'ignore']) data['timestamp'] = pd.to_datetime(data['timestamp'], unit='ms') - # data.index = pd.to_datetime(data['timestamp'], unit='ms') if len(data_df) > 0: temp_df = pd.DataFrame(data) data_df = data_df.append(temp_df) @@ -64,40 +163,32 @@ def get_all_binance(self, symbol, freq, if save: data_df.to_csv(filename) print('All caught up..!') - print(initial_date) return data_df if __name__ == '__main__': import json - from joblib import Parallel, delayed with open('/Users/prithvirajmurthy/Desktop/blockchain/cruize/scripts/StgyApp_config.json') as json_file: config = json.load(json_file) _binance_client_ = BinanceClient(config['binance_client']) - symbol = 'ETHUSDC' - freq = '1m' - initial_dates = ["1 Jan 2022", "1 Jan 2021", "1 Jan 2020", "1 Jan 2019", "1 Jan 2018", "1 Jan 2017", "1 Jan 2016", - "1 Jan 2015", "1 Jan 2014"] - end_dates = [-1, 232, 963, 1328, 1693, 2058, 2424, 2789, 3154] - - # eth_historical_prices_year_wise = [] - parallel_pool = Parallel(n_jobs=9) - delayed_function = [delayed(_binance_client_.get_all_binance)(symbol=symbol, freq=freq, - initial_date=initial_date, save=True, - end_date=end_date) for initial_date, end_date in - zip(initial_dates, end_dates)] - - eth_historical_prices_year_wise = parallel_pool(delayed_function) - print('eth_historical_prices_year_wise', eth_historical_prices_year_wise) - - # eth_prices_float = [] - # for i, eth_prices in enumerate(eth_historical_prices_year_wise): - # eth_prices_float.append([]) - # for eth_price in eth_prices: - # eth_prices_float[i].append(float(eth_price)) - # - # historical_data = eth_prices_float - # print(historical_data) + # Track historical data + symbol_eth = 'ETHBUSD' + symbol_btc = 'BTCBUSD' + freq = '1d' + initial_date = "1 Jan 2021" + _binance_client_ = BinanceClient(config['binance_client']) + eth_historical = _binance_client_.get_all_binance(symbol=symbol_eth, freq=freq, + initial_date=initial_date, save=False) + btc_historical = _binance_client_.get_all_binance(symbol=symbol_btc, freq=freq, + initial_date=initial_date, save=False) + eth_prices = eth_historical['close'] + for i in range(len(eth_prices)): + print(eth_prices[i]) + eth_prices[i] = float(eth_prices[i]) + btc_prices = btc_historical['close'] + for i in range(len(btc_prices)): + print() + btc_prices[i] = float(btc_prices[i]) diff --git a/utilities/datetime_utilities.py b/utilities/datetime_utilities.py index af7497b..ca7c415 100644 --- a/utilities/datetime_utilities.py +++ b/utilities/datetime_utilities.py @@ -5,7 +5,7 @@ TIMEZONE = pytz.timezone("Asia/Kolkata") -def convert_epoch_to_utcdatetime(epoch, parser="%Y-%m-%dT%H:%M:%S"): +def convert_epoch_to_utcdatetime(epoch, parser="%Y-%m-%d"): return ( (datetime.utcfromtimestamp(epoch)) .replace(tzinfo=pytz.utc)