GithubHelp home page GithubHelp logo

defichain-data-issues's People

Contributors

markusneusinger avatar

Watchers

 avatar

defichain-data-issues's Issues

Change data Backend

  • more flexibility, can serve 1min interval

live data: postgres, redis
backup: blob
redundance on data fetch with redis, if postgres is down

add burn rate

i have burn total, but also want burned per hour, day... to compare it with emission

column "nan" does not exist

[SQL: insert into data_day (endpoint, feature, datetime, modified, height, count, mean, std, min, q25, median, q75, max, open, close) values('https://api.dfx.swiss/v1/statistic', 'staking__yield__apr', '2023-01-26 00:00:00', '2023-02-02 08:41:36.269925+00:00', Null, 0.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,nan,nan) ON CONFLICT (endpoint, feature, datetime) DO UPDATE SET modified = EXCLUDED.modified, height = EXCLUDED.height, count = EXCLUDED.count, mean = EXCLUDED.mean, std = EXCLUDED.std, min = EXCLUDED.min, q25 = EXCLUDED.q25, median = EXCLUDED.median, q75 = EXCLUDED.q75, max = EXCLUDED.max, open = EXCLUDED.open, close = EXCLUDED.close;]
(Background on this error at: https://sqlalche.me/e/14/f405)
33%|███▎ | 3/9 00:17<00:35, 5.90s/it column "nan" does not exist
LINE 1: ...00', Null, 0.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,-1.0,nan,nan) O...

FutureWarning: Indexing a timezone-aware DatetimeIndex

calc_table.py:84: FutureWarning: Indexing a timezone-aware DatetimeIndex with a timezone-naive datetime is deprecated and will raise KeyError in a future version. Use a timezone-aware object instead.
hour_first = result_df.loc[hour_first_last_idx.values[idx]]

TypeError: string indices must be integers, not 'str'

eb 20 01:33:27 defichain-worker app/advanced-scheduler.5670 https://ocean.defichain.com/v0/mainnet/poolpairs
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 0%| | 0/19 [00:00<?, ?it/s] 0%| | 0/19 [00:07<?, ?it/s]
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 Traceback (most recent call last):
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 File "/app/api_calculate_tables.py", line 100, in
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 value = next((sub for sub in data if sub[search_key] == search_value), None)
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 File "/app/api_calculate_tables.py", line 100, in
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 value = next((sub for sub in data if sub[search_key] == search_value), None)
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 ~~~^^^^^^^^^^^^
Feb 20 01:33:35 defichain-worker app/advanced-scheduler.5670 TypeError: string indices must be integers, not 'str'

refactore data self-service

now:
/features
/history
/value

split day/hour/minute because minute has other limits and for value its not relevant, for ohlc reading multiple features at once should not be allowed. endpoints need to be specific and easy.

reduce data update time

only load last 2 bins for update

i.e. its 12:46 i need to load/update 11-12 bin and 12-13

for minute some extra because not all features are not updated every minute

add some extra or have a once per day safety update with more time?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.