Announcement

Collapse

Announcement

~ gang gang ~
See more
See less

official fun with crypto / api / python thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • official fun with crypto / api / python thread

    query current price of pancakeswap's BUNNY via coingecko:

    $ pip3 install pycoingecko

    Collecting pycoingecko

    Downloading pycoingecko-2.0.0-py3-none-any.whl (7.7 kB)

    Requirement already satisfied: requests in /usr/local/lib/python3.8/site-packages (from pycoingecko) (2.22.0)

    Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.8/site-packages (from requests->pycoingecko) (3.0.4)

    Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.8/site-packages (from requests->pycoingecko) (1.24.3)

    Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/lib/python3.8/site-packages (from requests->pycoingecko) (2.8)

    Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.8/site-packages (from requests->pycoingecko) (2020.6.20)

    Installing collected packages: pycoingecko

    Successfully installed pycoingecko-2.0.0
    $



    $ cat coingecko_bunny.py

    from pycoingecko import CoinGeckoAPI

    cg = CoinGeckoAPI()

    print(cg.get_price(ids='pancake-bunny', vs_currencies='usd'))


    $ python3 coingecko_bunny.py

    {'pancake-bunny': {'usd': 46.36}}




  • #2
    lets get 24 hours of historic data:

    import json

    from pycoingecko import CoinGeckoAPI

    cg = CoinGeckoAPI()

    cg.get_price(ids='pancake-bunny', vs_currencies='usd')




    historic = cg.get_coin_market_chart_by_id(id='pancake-bunny', vs_currency='usd',days='1')

    print(historic)


    $ python3 coingecko_bunny.py

    {'prices': [[1621555063372, 43.55382720097626], [1621555379452, 43.826849043314475], [1621555698450, 43.91903416884624], [1621555909260, 43.93388356643381], [1621556385826, 44.26545850524607], [1621556569094, 42.363704925301455], [1621556858264, 42.382323877348135], [1621557213590, 42.47019085116806], [1621557505320, 42.53297001215754], [1621557914140, 42.747649000230226], [1621558453249, 42.67633860902318], [1621558716961, 42.668510331271044], [1621558981085, 42.66177379767048], [1621559278209, 42.66161744818578], [1621559742740, 45.48561457387514], [1621560301798, 45.439119841116124], [1621560474394, 45.474778313182156], [1621560930689, 45.460137467373926], [1621561533997, 45.5009040655625], [1621561620222, 45.49971836788884], [1621561978715, 44.952414708202205], [1621562389204, 44.737195738420155], [1621562907351, 46.25776273493376], [1621563303448, 46.299178092651445], [1621563507084, 46.327230385210065], [1621563679568, 46.2863537971301], [1621563936656, 44.68055173276287], [1621564476632, 44.60982709777035], [1621565082816, 44.947410851756416], [1621565597200, 44.96099849745219], [1621565847878, 44.95352943869971], [1621566250437, 45.20446042978259], [1621566574669, 45.066034578705874], [1621566743504, 45.017963346074545], [1621567237114, 44.44341475083882], [1621567384135, 44.39991438231701], [1621567932640, 44.05866380213586], [1621568289506, 44.365699761535716], [1621568725722, 44.33945026542624], [1621569010405, 44.47810268446662], [1621569231960, 44.47962064611949], [1621569437539, 44.450570847604766], [1621569905034, 44.30331832246809], [1621570161953, 44.3938667626626], [1621570440186, 44.27130820320509], [1621570709724, 44.28611572223674], [1621571051869, 43.60507297919677], [1621571369789, 43.45081901401876], [1621571910274, 43.218467494881196], [1621572067806, 42.86053401738278], [1621572589315, 42.925523145136225], [1621572695424, 42.94721333610654], [1621573215063, 39.25715520565883], [1621573417834, 39.27824193584489], [1621573867707, 39.46959018951825], [1621574189719, 39.30547168602093], [1621574605654, 39.403367879214535], [1621574882877, 39.20980380854448], [1621575050664, 39.211262127918594], [1621575336445, 39.335572905312226], [1621575691530, 39.41645471836264], [1621575939881, 39.40930308547981], [1621576283652, 38.113240680104866], [1621576511073, 37.980067941884194], [1621577347003, 37.8193402625295], [1621577659210, 37.54712122052465], [1621577993340, 38.59725546712349], [1621578306314, 38.67047004941574], [1621578684321, 38.7919991675802], [1621579143009, 38.899569714413346], [1621579473597, 37.622513533782225], [1621579674719, 37.75879172348322], [1621580291906, 37.85449420101199], [1621581149607, 37.71806305691916], [1621581393893, 37.5927871849863], [1621581817150, 37.57539467584649], [1621582198006, 37.47084899362349], [1621582352039, 37.48295813778496], [1621582705263, 37.30641637692287], [1621583076407, 37.93637082058997], [1621583306268, 37.96017743732117], [1621583684001, 37.99841719219402], [1621584001290, 38.01343576572601], [1621584311669, 38.08232863355852], [1621584453734, 38.05051123187773], [1621584826874, 37.165085914288184], [1621585152195, 37.247181979333995], [1621585460303, 37.35672576687783], [1621585675019, 37.43300752010586], [1621586045300, 37.572135771763946], [1621586345265, 37.48000222558626], [1621586501024, 42.9478837467513], [1621586726110, 42.88447638994221], [1621587142768, 42.96632469673424], [1621587601979, 42.92785103920944], [1621587824083, 43.08294203365797], [1621588217087, 44.8343918614632], [1621588681454, 44.766469301270206], [1621589075877, 44.86368731772238], [1621589365547, 45.21056068032479], [1621589839187, 45.32941352418103], [1621590268330, 45.54312191478862], [1621590813645, 45.69225747393171], [1621591017182, 45.699790729434255], [1621591289431, 45.671207390994994], [1621591750904, 45.708840390736626], [1621591996836, 45.709275896377925], [1621592310577, 45.75642080068245], [1621592705373, 45.746385602398206], [1621592913270, 45.34141114477658], [1621593058013, 45.37025858662698], [1621593391214, 45.45198498765988], [1621593779315, 45.39410825953115], [1621594423447, 45.489823908468374], [1621595107635, 45.086815108610175], [1621595597654, 44.644173607345316], [1621595972004, 44.62725680692006], [1621596138014, 44.613337088946025], [1621596575500, 47.600290664733976], [1621596925879, 47.76834182632886], [1621597320783, 47.77933081238737], [1621597584370, 47.78286865781913], [1621598134765, 47.90286794904275], [1621598255045, 47.6384359224992], [1621598550901, 47.86326206721418], [1621598947577, 47.963803191762764], [1621599274293, 47.85128831309223], [1621599480862, 48.12468635156776], [1621599857458, 50.47610309936751], [1621600222889, 50.47822970213059], [1621600414579, 50.46347806000489], [1621600729335, 50.332610657693806], [1621601110556, 50.32311814997107], [1621601288409, 50.28719342455728], [1621601496558, 50.23981648764027], [1621601837888, 50.04959295989665], [1621602298810, 57.63013363113259], [1621602444101, 57.66298513119887], [1621602684515, 57.77754141611671], [1621603120179, 57.934302865126654], [1621603303060, 58.21077659267881], [1621603696290, 58.2626839143879], [1621604054620, 58.32673764240915], [1621604360935, 58.5794589208224], [1621604739438, 58.64503563235348], [1621605228497, 58.62321351138178], [1621605577167, 58.733220972262444], [1621605906314, 58.91960966677436], [1621606431883, 59.210671196273665], [1621606773870, 56.212818792890076], [1621607055301, 56.25014771553429], [1621607176012, 53.51471930506701], [1621607564929, 56.51031606047749], [1621607873454, 52.822062130106026], [1621608248207, 54.31071967894136], [1621608520887, 55.4165326796314], [1621608756409, 55.65255843514622], [1621609177427, 55.56066645779707], [1621609576183, 55.35960366118543], [1621609992049, 55.636690014779425], [1621610349226, 55.39752635193834], [1621610704609, 55.44490715481586], [1621610967668, 55.242398037661474], [1621611188498, 55.30873584306023], [1621611397276, 55.275785717543016], [1621611833731, 54.765782909822995], [1621612199501, 54.78971866550263], [1621612336086, 54.649557938776134], [1621612658441, 54.62771019221937], [1621613177052, 53.94133895081192], [1621613417879, 53.909632719870906], [1621613879507, 53.97479467564451], [1621614239980, 54.54243560208895], [1621614605951, 54.64672873602991], [1621614895756, 54.68971799282676], [1621615070991, 54.84615014856462], [1621615427802, 51.48321584914312], [1621615600986, 51.418245590807786], [1621615997163, 51.34748572426739], [1621616305665, 51.26631455265936], [1621616647833, 52.243975402570904], [1621616819693, 52.214843410481386], [1621617166763, 52.15170253495131], [1621617457182, 52.19118209044161], [1621617772500, 52.25186176318419], [1621618155762, 52.21021549976177], [1621618416668, 52.091828688810935], [1621618630637, 52.01462159494057], [1621619059802, 51.9233472299194], [1621619268580, 51.21673544687829], [1621619466262, 51.22892595057912], [1621619927614, 51.24616843600554], [1621620381837, 51.62665679956147], [1621620746578, 51.40708966871887], [1621621087283, 51.296260059910885], [1621621498747, 50.05279727384361], [1621621667075, 49.72545391307656], [1621621861252, 49.72412469647284], [1621622363690, 49.989701150777], [1621622931687, 50.127039166305835], [1621623270924, 50.3943702251055], [1621623595557, 50.20344671289764], [1621624243444, 50.03425243431641], [1621624805421, 48.15112147734239], [1621625062470, 47.964269238681936], [1621625387289, 45.77328843922939], [1621625640701, 45.58565029855729], [1621625984766, 44.2091840059904], [1621626244923, 44.25072947218677], [1621626370353, 44.51266210841492], [1621626677779, 45.72391534186847], [1621627207652, 45.37922546101624], [1621627497410, 45.41984401552412], [1621627777613, 43.66224786083836], [1621628095475, 43.53262624943259], [1621628657483, 43.24890398358897], [1621628821023, 43.34500439742395], [1621629057437, 44.590832121347404], [1621629586580, 44.49626742461955], [1621629784678, 44.60345631247503], [1621630035672, 44.64615940299756], [1621630343452, 44.57467262132718], [1621630668764, 43.92449643850505], [1621630931254, 43.86458633297883], [1621631388228, 40.25129952826042], [1621631568632, 40.061266456660405], [1621631744251, 39.83310598738796], [1621632280210, 39.934758505192455], [1621632546502, 40.67366974617464], [1621632792146, 39.447275805147406], [1621633086071, 39.91339417122114], [1621633751111, 40.41283181496611], [1621634039273, 42.7110284835754], [1621634219718, 42.75748637484323], [1621634737519, 42.83085230483978], [1621634913005, 42.568131762948624], [1621635179506, 42.40251006543671], [1621635357970, 43.98883010140287], [1621635720518, 44.1242108623294], [1621635954959, 44.08187666109764], [1621636288117, 44.41883310906853], [1621636647634, 44.93355136743585], [1621636937176, 45.01534125306283], [1621637291965, 44.982878973046994], [1621637608497, 45.87445614845894], [1621637846146, 45.84557021889579], [1621638167939, 45.5910050215649], [1621638427845, 45.65330905090846], [1621638766857, 45.87563098613356], [1621638969764, 46.154889843295045], [1621639506559, 46.24798421013577], [1621639789302, 46.360226884911256], [1621640088608, 46.2972084743391], [1621640233775, 47.87499741717415], [1621640577169, 47.86298087386446], [1621640952206, 47.81825890078257], [1621640952000, 47.81825890078257]], 'market_caps': [[1621555063372, 22313215.14037135], [1621555379452, 22361864.309486713], [1621555698450, 22361864.309486713], [1621555909260, 22361864.309486713], [1621556385826, 22416476.756757557], [1621556569094, 22585656.927178163], [1621556858264, 22585656.927178163], [1621557213590, 21624821.23068692], [1621557505320, 21624821.23068692], [1621557914140, 21701685.721265], [1621558453249, 21811221.82769681], [1621558716961, 21811221.82769681], [1621558981085, 21770842.740093462], [1621559278209, 21770842.740093462], [1621559742740, 21767325.770025607], [1621560301798, 23182469.45953069], [1621560474394, 23182469.45953069], [1621560930689, 23202690.687125515], [1621561533997, 23211346.69925221], [1621561620222, 23211346.69925221], [1621561978715, 23215415.903092347], [1621562389204, 23215415.903092347], [1621562907351, 22826352.396467917], [1621563303448, 23602194.456569377], [1621563507084, 23602194.456569377], [1621563679568, 23616782.53367861], [1621563936656, 23616782.53367861], [1621564476632, 22748178.30020806], [1621565082816, 22761364.830132037], [1621565597200, 22933610.890811943], [1621565847878, 22933610.890811943], [1621566250437, 22936732.79014941], [1621566574669, 22936732.79014941], [1621566743504, 22994136.52164859], [1621567237114, 22994136.52164859], [1621567384135, 22676455.912362743], [1621567932640, 22676455.912362743], [1621568289506, 22480143.635855284], [1621568725722, 22636803.23179035], [1621569010405, 22636803.23179035], [1621569231960, 22694154.808858696], [1621569437539, 22694154.808858696], [1621569905034, 22680107.182494156], [1621570161953, 22680107.182494156], [1621570440186, 22651174.93933843], [1621570709724, 22651174.93933843], [1621571051869, 22596196.901952542], [1621571369789, 22596196.901952542], [1621571910274, 22170001.72582042], [1621572067806, 21868819.384702213], [1621572589315, 21868819.384702213], [1621572695424, 21901978.92247729], [1621573215063, 21901978.92247729], [1621573417834, 20030259.921670448], [1621573867707, 20138651.065166924], [1621574189719, 20138651.065166924], [1621574605654, 20054912.53990229], [1621574882877, 20054912.53990229], [1621575050664, 20006843.80119695], [1621575336445, 20006843.80119695], [1621575691530, 20070271.14760591], [1621575939881, 20070271.14760591], [1621576283652, 20107890.650728118], [1621576511073, 20107890.650728118], [1621577347003, 19378649.031832624], [1621577659210, 19296640.613820273], [1621577993340, 19296640.613820273], [1621578306314, 19693557.9060542], [1621578684321, 19792922.389237475], [1621579143009, 19792922.389237475], [1621579473597, 19847808.333002284], [1621579674719, 19847808.333002284], [1621580291906, 19265746.806853853], [1621581149607, 19314577.280942123], [1621581393893, 19314577.280942123], [1621581817150, 19181045.966030043], [1621582198006, 19181045.966030043], [1621582352039, 19118829.189124532], [1621582705263, 19034930.393227085], [1621583076407, 19034930.393227085], [1621583306268, 19368500.25833431], [1621583684001, 19368500.25833431], [1621584001290, 19368500.25833431], [1621584311669, 19395674.365967784], [1621584453734, 19395674.365967784], [1621584826874, 19380086.709749334], [1621585152195, 19380086.709749334], [1621585460303, 19004707.10338876], [1621585675019, 19004707.10338876], [1621586045300, 19162871.088442955], [1621586345265, 19162871.088442955], [1621586501024, 19123499.46169974], [1621586726110, 19123499.46169974], [1621587142768, 21881035.551232733], [1621587601979, 21881035.551232733], [1621587824083, 21903166.688710283], [1621588217087, 21903166.688710283], [1621588681454, 22875944.976412427], [1621589075877, 22841288.707304705], [1621589365547, 22841288.707304705], [1621589839187, 23067878.374967482], [1621590268330, 23128520.90859985], [1621590813645, 23237561.785069037], [1621591017182, 23237561.785069037], [1621591289431, 23302915.103901338], [1621591750904, 23302915.103901338], [1621591996836, 23322338.87655259], [1621592310577, 23322338.87655259], [1621592705373, 23346393.7190967], [1621592913270, 23346393.7190967], [1621593058013, 23149361.369734213], [1621593391214, 23149361.369734213], [1621593779315, 23191060.80125379], [1621594423447, 23161530.237926897], [1621595107635, 23210367.432490285], [1621595597654, 23004739.414627273], [1621595972004, 22770258.026870284], [1621596138014, 22770258.026870284], [1621596575500, 22770258.026870284], [1621596925879, 24372940.367075983], [1621597320783, 24372940.367075983], [1621597584370, 24372940.367075983], [1621598134765, 24380352.422510564], [1621598255045, 24380352.422510564], [1621598550901, 24421371.718935285], [1621598947577, 24421371.718935285], [1621599274293, 24472671.025952693], [1621599480862, 24472671.025952693], [1621599857458, 24554758.775078468], [1621600222889, 24554758.775078468], [1621600414579, 25755612.092180192], [1621600729335, 25755612.092180192], [1621601110556, 25679838.69274055], [1621601288409, 25679838.69274055], [1621601496558, 25633966.022056557], [1621601837888, 25633966.022056557], [1621602298810, 25536907.87599475], [1621602444101, 25536907.87599475], [1621602684515, 29421504.792859785], [1621603120179, 29421504.792859785], [1621603303060, 29559939.804349072], [1621603696290, 29559939.804349072], [1621604054620, 29727490.349863525], [1621604360935, 29727490.349863525], [1621604739438, 29889119.120015908], [1621605228497, 29922578.461883515], [1621605577167, 29922578.461883515], [1621605906314, 29967573.451214854], [1621606431883, 30062674.942343697], [1621606773870, 30062674.942343697], [1621607055301, 28681583.406966925], [1621607176012, 28681583.406966925], [1621607564929, 27304926.495570764], [1621607873454, 27304926.495570764], [1621608248207, 26951510.585059796], [1621608520887, 26951510.585059796], [1621608756409, 28275292.68780934], [1621609177427, 28275292.68780934], [1621609576183, 28348834.365116987], [1621609992049, 28387624.02265965], [1621610349226, 28387624.02265965], [1621610704609, 28265595.049713712], [1621610967668, 28265595.049713712], [1621611188498, 28186443.607386876], [1621611397276, 28186443.607386876], [1621611833731, 28203479.072710473], [1621612199501, 28203479.072710473], [1621612336086, 27955472.07014688], [1621612658441, 27955472.07014688], [1621613177052, 27872810.149985407], [1621613417879, 27506423.98828609], [1621613879507, 27506423.98828609], [1621614239980, 27539671.708461225], [1621614605951, 27539671.708461225], [1621614895756, 27882514.021136057], [1621615070991, 27882514.021136057], [1621615427802, 27984265.223078504], [1621615600986, 27984265.223078504], [1621615997163, 26235238.35348377], [1621616305665, 26235238.35348377], [1621616647833, 26157718.26400353], [1621616819693, 26157718.26400353], [1621617166763, 26641688.11525352], [1621617457182, 26641688.11525352], [1621617772500, 26629615.350734446], [1621618155762, 26629615.350734446], [1621618416668, 26639326.806744978], [1621618630637, 26639326.806744978], [1621619059802, 26448373.909063805], [1621619268580, 26448373.909063805], [1621619466262, 26138641.399828024], [1621619927614, 26138641.399828024], [1621620381837, 26147439.069016673], [1621620746578, 26341576.437842056], [1621621087283, 26341576.437842056], [1621621498747, 25634827.49043227], [1621621667075, 25634827.49043227], [1621621861252, 25370843.52725422], [1621622363690, 25370843.52725422], [1621622931687, 25506349.15370423], [1621623270924, 25576423.414912343], [1621623595557, 25576423.414912343], [1621624243444, 25615408.996271804], [1621624805421, 25529080.647732858], [1621625062470, 24568246.82426476], [1621625387289, 24568246.82426476], [1621625640701, 23355000.129382674], [1621625984766, 23355000.129382674], [1621626244923, 22556943.87242043], [1621626370353, 22556943.87242043], [1621626677779, 23329808.391262673], [1621627207652, 23329808.391262673], [1621627497410, 23153936.556697227], [1621627777613, 23153936.556697227], [1621628095475, 22277879.505923167], [1621628657483, 22113037.53098948], [1621628821023, 22113037.53098948], [1621629057437, 22751672.983818557], [1621629586580, 22751672.983818557], [1621629784678, 22703423.041993946], [1621630035672, 22703423.041993946], [1621630343452, 22779902.737768035], [1621630668764, 22779902.737768035], [1621630931254, 22381119.085253235], [1621631388228, 22381119.085253235], [1621631568632, 20537504.24635581], [1621631744251, 20537504.24635581], [1621632280210, 20324128.486513905], [1621632546502, 20324128.486513905], [1621632792146, 20753011.080808625], [1621633086071, 20753011.080808625], [1621633751111, 20365094.09348141], [1621634039273, 20619923.20084975], [1621634219718, 20619923.20084975], [1621634737519, 21816241.171798874], [1621634913005, 21816241.171798874], [1621635179506, 21719626.374477305], [1621635357970, 21719626.374477305], [1621635720518, 22444512.24153631], [1621635954959, 22444512.24153631], [1621636288117, 22663913.570173636], [1621636647634, 22663913.570173636], [1621636937176, 22926539.33731126], [1621637291965, 22926539.33731126], [1621637608497, 22951707.864081185], [1621637846146, 22951707.864081185], [1621638167939, 23391880.61210574], [1621638427845, 23391880.61210574], [1621638766857, 23293782.79662585], [1621638969764, 23293782.79662585], [1621639506559, 23549705.407181505], [1621639789302, 23549705.407181505], [1621640088608, 23654474.95284962], [1621640233775, 24427359.470944785], [1621640577169, 24427359.470944785], [1621640952206, 24427359.470944785], [1621640952000, 24398409.65975904]], 'total_volumes': [[1621555063372, 4193873099.098415], [1621555379452, 4037211739.7294745], [1621555698450, 4045708398.895174], [1621555909260, 4047076287.1849675], [1621556385826, 4077624105.1196327], [1621556569094, 3920397852.247223], [1621556858264, 3922114423.778628], [1621557213590, 3930245858.4574924], [1621557505320, 3936052865.3602805], [1621557914140, 3261004414.17546], [1621558453249, 3256749196.7463365], [1621558716961, 3256151799.263044], [1621558981085, 3255510570.9736543], [1621559278209, 3255498876.048992], [1621559742740, 2766505496.342505], [1621560301798, 2763675028.5526185], [1621560474394, 2765844327.5066447], [1621560930689, 2764954741.5648704], [1621561533997, 2767363282.8105764], [1621561620222, 2767291168.7224283], [1621561978715, 2348242009.5786242], [1621562389204, 2336982160.111366], [1621562907351, 2417104323.678162], [1621563303448, 2419277258.966289], [1621563507084, 2420742825.498417], [1621563679568, 2418607424.707977], [1621563936656, 2116391326.796373], [1621564476632, 2112976447.8406925], [1621565082816, 2129314277.9701066], [1621565597200, 2129965575.0195248], [1621565847878, 2129612785.6643853], [1621566250437, 2141653238.3867176], [1621566574669, 2135093732.198482], [1621566743504, 2132897570.5061107], [1621567237114, 2105249641.6514592], [1621567384135, 2103189063.368812], [1621567932640, 2087028294.976076], [1621568289506, 2101885906.9151864], [1621568725722, 2100624743.1044574], [1621569010405, 2107193536.8171442], [1621569231960, 2107276513.2649295], [1621569437539, 2105890199.1898837], [1621569905034, 2098913519.990419], [1621570161953, 2103245688.0634577], [1621570440186, 2097441275.7085931], [1621570709724, 2098142811.3728492], [1621571051869, 1822989236.6273096], [1621571369789, 1816539566.70739], [1621571910274, 1248645297.1117811], [1621572067806, 1238304070.7966604], [1621572589315, 1240140922.2407534], [1621572695424, 1240767563.2566955], [1621573215063, 1133848887.934211], [1621573417834, 1134452165.6670067], [1621573867707, 1139969797.5342607], [1621574189719, 1135178613.2397828], [1621574605654, 1021346624.1961874], [1621574882877, 1016315491.2340807], [1621575050664, 1016353290.7746834], [1621575336445, 1019562051.5554643], [1621575691530, 1021655606.4671433], [1621575939881, 1021443850.9998921], [1621576283652, 985899294.7327266], [1621576511073, 982435146.4795974], [1621577347003, 978235812.5792725], [1621577659210, 971175342.2028489], [1621577993340, 914076828.1119313], [1621578306314, 915803428.4777634], [1621578684321, 918708455.7431648], [1621579143009, 921248890.0078018], [1621579473597, 1084182846.0440698], [1621579674719, 1087072119.105351], [1621580291906, 1090749845.8729823], [1621581149607, 854832978.0164901], [1621581393893, 852909235.8361632], [1621581817150, 852514632.7010802], [1621582198006, 850124753.349565], [1621582352039, 850396775.6154194], [1621582705263, 846271484.4863589], [1621583076407, 848444935.803802], [1621583306268, 848977369.5334208], [1621583684001, 849797086.1339284], [1621584001290, 850104385.505172], [1621584311669, 851645054.6894938], [1621584453734, 850955012.6103837], [1621584826874, 828372611.3156435], [1621585152195, 830202450.53457], [1621585460303, 832644214.149701], [1621585675019, 834344316.0696946], [1621586045300, 838255215.1079177], [1621586345265, 835392461.5255641], [1621586501024, 1007489300.6515391], [1621586726110, 1006008970.1799673], [1621587142768, 1007923558.8395491], [1621587601979, 1007021026.3076726], [1621587824083, 1010651607.4067309], [1621588217087, 1049984073.5348235], [1621588681454, 1048393383.8103654], [1621589075877, 1050656645.532886], [1621589365547, 1031319711.6222607], [1621589839187, 1034019667.3292118], [1621590268330, 1038885505.4640219], [1621590813645, 1042288478.2783928], [1621591017182, 1042300589.2605981], [1621591289431, 1041693350.0619249], [1621591750904, 1042546557.2374444], [1621591996836, 1042567183.5052116], [1621592310577, 1043643616.3225538], [1621592705373, 1043415713.4832768], [1621592913270, 1003806100.1166197], [1621593058013, 1004450921.1440517], [1621593391214, 1006259399.6309191], [1621593779315, 1004993249.7799137], [1621594423447, 1007140813.1356772], [1621595107635, 998502063.5623723], [1621595597654, 988709203.8650807], [1621595972004, 988334822.8426704], [1621596138014, 988013082.1286944], [1621596575500, 1035242296.6936959], [1621596925879, 1038900624.9961336], [1621597320783, 1039151872.4343877], [1621597584370, 1039230847.2472057], [1621598134765, 1041836778.5579108], [1621598255045, 1013169144.7683545], [1621598550901, 1017950723.0958425], [1621598947577, 1020087623.9347473], [1621599274293, 1017699504.611024], [1621599480862, 1023513086.8313593], [1621599857458, 716067464.9713308], [1621600222889, 716100616.5817221], [1621600414579, 715887024.1937526], [1621600729335, 714029783.5325356], [1621601110556, 713905102.5338783], [1621601288409, 713395459.1388962], [1621601496558, 711695531.4759098], [1621601837888, 710033820.6780295], [1621602298810, 817279205.4203387], [1621602444101, 817745436.8470224], [1621602684515, 819380955.8213366], [1621603120179, 821604913.645519], [1621603303060, 825526800.5147971], [1621603696290, 826266271.5377097], [1621604054620, 827173163.2878082], [1621604360935, 821061869.2036784], [1621604739438, 822006501.7548338], [1621605228497, 821696306.7524098], [1621605577167, 823180317.0055721], [1621605906314, 825821015.5008395], [1621606431883, 829923472.9100362], [1621606773870, 787904013.5596758], [1621607055301, 788512833.4313372], [1621607176012, 750167682.4551299], [1621607564929, 1043781465.5205959], [1621607873454, 740485040.1537403], [1621608248207, 1005069043.447611], [1621608520887, 1001714442.5453466], [1621608756409, 1005974555.8915278], [1621609177427, 1004316854.7307254], [1621609576183, 1000687805.3527749], [1621609992049, 1005696456.3678397], [1621610349226, 1001385062.9448293], [1621610704609, 1002516603.232321], [1621610967668, 998854972.9280928], [1621611188498, 1000054447.4109079], [1621611397276, 999460652.3713555], [1621611833731, 990259735.9747971], [1621612199501, 990689854.8960199], [1621612336086, 988155514.2677987], [1621612658441, 977670719.0541139], [1621613177052, 965389795.4126207], [1621613417879, 964806656.8413427], [1621613879507, 966004390.8391544], [1621614239980, 976142481.1634575], [1621614605951, 978020129.843312], [1621614895756, 991282893.8145822], [1621615070991, 994127087.603835], [1621615427802, 939450455.5961068], [1621615600986, 938276238.1557082], [1621615997163, 936979763.609187], [1621616305665, 935502745.657945], [1621616647833, 952674613.9908572], [1621616819693, 952144041.6217234], [1621617166763, 950973813.2983918], [1621617457182, 951694748.2377363], [1621617772500, 952799862.8889004], [1621618155762, 952028189.5815479], [1621618416668, 949869462.9756335], [1621618630637, 948455184.5959678], [1621619059802, 946786454.151235], [1621619268580, 921316867.2672722], [1621619466262, 921537291.2602456], [1621619927614, 921842175.6541042], [1621620381837, 928683811.1646761], [1621620746578, 924726050.9920948], [1621621087283, 922728740.3528061], [1621621498747, 887388508.5602659], [1621621667075, 881575393.3629726], [1621621861252, 881552287.035689], [1621622363690, 886245939.6757877], [1621622931687, 888680746.362438], [1621623270924, 893407645.4772577], [1621623595557, 890015652.1577823], [1621624243444, 886986021.5604403], [1621624805421, 853858397.8870993], [1621625062470, 850541536.3128756], [1621625387289, 810935779.637596], [1621625640701, 807611515.922139], [1621625984766, 793078279.8256266], [1621626244923, 793823573.0855317], [1621626370353, 789202045.3033271], [1621626677779, 810795484.619361], [1621627207652, 813828722.3250283], [1621627497410, 814569014.9938294], [1621627777613, 783251310.0198847], [1621628095475, 780925727.5253949], [1621628657483, 775835220.8096473], [1621628821023, 777559150.8730739], [1621629057437, 798027476.905008], [1621629586580, 796335333.1493145], [1621629784678, 798253658.0709476], [1621630035672, 799035126.0510051], [1621630343452, 797743073.9461453], [1621630668764, 786104555.2627839], [1621630931254, 785031031.3913728], [1621631388228, 719120320.0079973], [1621631568632, 715730717.9372829], [1621631744251, 711654532.8170223], [1621632280210, 713462657.9856083], [1621632546502, 726701114.0626469], [1621632792146, 703109153.886237], [1621633086071, 711395120.4538772], [1621633751111, 720295998.0283948], [1621634039273, 764013106.8551881], [1621634219718, 764856797.0817294], [1621634737519, 766168839.1297022], [1621634913005, 761469332.9126406], [1621635179506, 758510992.1126075], [1621635357970, 787386277.8942621], [1621635720518, 789809551.102454], [1621635954959, 789051775.4692875], [1621636288117, 795091221.7342647], [1621636647634, 813407551.2914288], [1621636937176, 814888148.9420401], [1621637291965, 814301191.5680907], [1621637608497, 830346040.2958603], [1621637846146, 829823193.3948442], [1621638167939, 825214071.6594161], [1621638427845, 826341797.3933405], [1621638766857, 830365906.7377259], [1621638969764, 835386642.5389767], [1621639506559, 837068894.7146912], [1621639789302, 839098670.9736326], [1621640088608, 837960375.5854428], [1621640233775, 848923330.1065817], [1621640577169, 848710310.4223793], [1621640952206, 847917079.6302581], [1621640952000, 847917079.6302581]]}

    Comment


    • #3
      lets make this shit pandalicious


      $ cat coingecko_bunny.py

      import pandas as pd

      import json

      from pycoingecko import CoinGeckoAPI

      cg = CoinGeckoAPI()

      cg.get_price(ids='pancake-bunny', vs_currencies='usd')




      historic = cg.get_coin_market_chart_by_id(id='pancake-bunny', vs_currency='usd',days='1')

      bunny=pd.DataFrame(historic, columns=['prices'])

      print(bunny)

      $ python3 coingecko_bunny.py

      prices

      0 [1621555379452, 43.826849043314475]

      1 [1621555698450, 43.91903416884624]

      2 [1621555909260, 43.93388356643381]

      3 [1621556385826, 44.26545850524607]

      4 [1621556569094, 42.363704925301455]

      .. ...

      252 [1621640233775, 47.87499741717415]

      253 [1621640577169, 47.86298087386446]

      254 [1621640952206, 47.81825890078257]

      255 [1621641447514, 47.95365231153537]

      256 [1621641447000, 47.95365231153537]




      [257 rows x 1 columns]

      $

      Comment


      • #4
        please understand i have no idea what im doing

        Comment


        • #5
          oh shit OHLC data:

          $ cat coingecko_bunny.py

          import pandas as pd

          import json

          from pycoingecko import CoinGeckoAPI

          cg = CoinGeckoAPI()

          cg.get_price(ids='pancake-bunny', vs_currencies='usd')




          historic = cg.get_coin_ohlc_by_id(id='pancake-bunny', vs_currency='usd',days='1')

          bunny=pd.DataFrame(historic)

          print(bunny)

          $ python3 ./coingecko_bunny.py

          0 1 2 3 4

          0 1621557000000 42.38 42.38 42.38 42.38

          1 1621558800000 42.47 42.75 42.47 42.67

          2 1621560600000 42.66 45.49 42.66 45.47

          3 1621562400000 45.46 45.50 44.74 44.74

          4 1621564200000 46.26 46.33 44.68 44.68

          5 1621566000000 44.61 44.96 44.61 44.95

          6 1621567800000 45.20 45.20 44.40 44.40

          7 1621569600000 44.06 44.48 44.06 44.45

          8 1621571400000 44.30 44.39 43.45 43.45

          9 1621573200000 43.22 43.22 42.86 42.95

          10 1621575000000 39.26 39.47 39.21 39.21

          11 1621576800000 39.21 39.42 37.98 37.98

          12 1621578600000 37.82 38.67 37.55 38.67

          13 1621580400000 38.79 38.90 37.62 37.85

          14 1621582200000 37.72 37.72 37.47 37.47

          15 1621584000000 37.48 38.00 37.31 38.00

          16 1621585800000 38.01 38.08 37.17 37.43

          17 1621587600000 37.57 42.97 37.48 42.97

          18 1621589400000 42.93 45.21 42.93 45.21

          19 1621591200000 45.33 45.70 45.33 45.70

          20 1621593000000 45.67 45.76 45.34 45.34

          21 1621594800000 45.37 45.49 45.37 45.49

          22 1621596600000 45.09 47.60 44.61 47.60

          23 1621598400000 47.77 47.90 47.64 47.64

          24 1621600200000 47.86 50.48 47.85 50.48

          25 1621602000000 50.48 50.48 50.05 50.05

          26 1621603800000 57.63 58.26 57.63 58.26

          27 1621605600000 58.33 58.73 58.33 58.73

          28 1621607400000 58.92 59.21 53.51 53.51

          29 1621609200000 56.51 56.51 52.82 55.56

          30 1621611000000 55.36 55.64 55.24 55.24

          31 1621612800000 55.31 55.31 54.63 54.63

          32 1621614600000 53.94 54.54 53.91 54.54

          33 1621616400000 54.65 54.85 51.27 51.27

          34 1621618200000 52.24 52.25 52.15 52.21

          35 1621620000000 52.09 52.09 51.22 51.25

          36 1621621800000 51.63 51.63 49.73 49.73

          37 1621623600000 49.72 50.39 49.72 50.20

          38 1621625400000 50.03 50.03 45.77 45.77

          39 1621627200000 45.59 45.72 44.21 45.72

          40 1621629000000 45.38 45.42 43.25 43.35

          41 1621630800000 44.59 44.65 43.92 43.92

          42 1621632600000 43.86 43.86 39.83 40.67

          43 1621634400000 39.45 42.76 39.45 42.76

          44 1621636200000 42.83 44.12 42.40 44.08

          45 1621638000000 44.42 45.87 44.42 45.85

          46 1621639800000 45.59 46.36 45.59 46.36

          47 1621641600000 46.30 47.95 46.30 47.95

          48 1621643400000 48.08 48.45 48.02 48.45

          $

          Comment


          • #6
            so im not sure what to make of this but these prices arent accurate.

            bunny is currently trading at $50.83 each, which ive verified against its USDT swap value, but coingecko is showing its current price as 47.80...

            something to consider if youre scalping or even swinging...

            Comment


            • #7
              so the prices arent accurate on coingecko's website either. honestly dont get what thats about, i thought coingecko was kind of a top player in this... we are talking about like a solid 4-6% delta between their price and current price, thats not acceptable.

              Comment


              • #8
                Coingecko seems so reputable tho 10.1.0

                Comment


                • #9
                  HOW DARE YOU 10.1.1

                  Comment


                  • #10
                    I’M EVOLVING

                    Comment


                    • #11
                      Gauchojake software upgrade!!!!

                      Comment


                      • gauchojake
                        gauchojake commented
                        Editing a comment
                        It's kind of hilarious

                    • #12
                      like honestly i really want to be an advocate for this shit and make cool little tools to get rich with in python but its as if bsc exchanges simply unplugged their altcoin feeds when btc started to drop.



                      Comment


                      • #13
                        bunny is currently trading at 40.98

                        coinbase has it at 45.xx

                        coingecko 43.xx

                        Comment

                        Working...
                        X