Skip to main content

Access to Overnight.Fi API Data

Project description

OverPy.Fi

OverPy.Fi allows you to access realtime data from Overnight.fi.

Overnight Finance is an Asset Management Protocol offering Low-Risk Passive Yield Products primarily for conservative stablecoin investors, both individuals and protocol treasuries.

This package was created to access data such as; strategies, payouts, APYs network specific to what Overnight offers

Installation

Use the package manager pip to install usdpluspy.

pip install usdplus

Usage

These are the symbols to use per network

'o' = Optimism
'm' = Matic
'b' = Binance
'a' = Avalanche

from usdplus import USDPlus

matic_network = USDPlus('m')

for line in matic_network.payouts():
    print(line)

'''
First 5 rows of data

[{'id': {'strategyName': 'USD+', 'tokenName': 'USDC'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', 'percentage': 47.0293, 'netAssetValue': 839401.182572, 'updateDate': '2022-12-02T09:35:04.330661'}, {'id': {'strategyName': 'USD+', 'tokenName': 'USDT'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', 'percentage': 3.4422, 'netAssetValue': 61437.194341, 'updateDate': '2022-12-02T09:35:04.33139'}, {'id': {'strategyName': 'USD+', 'tokenName': 'DAI'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063', 'percentage': 18.3381, 'netAssetValue': 327306.467433, 'updateDate': '2022-12-02T09:35:04.332155'}, {'id': {'strategyName': 'USD+', 'tokenName': 'WETH'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.33288'}, {'id': {'strategyName': 'USD+', 'tokenName': 'WMATIC'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.333609'}, {'id': {'strategyName': 'USD+', 'tokenName': 'aUSDC'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x625E7708f30cA75bfd92586e17077590C60eb4cD', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.334287'}, {'id': {'strategyName': 'USD+', 'tokenName': 'USD+'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.335375'}, {'id': {'strategyName': 'USD+', 'tokenName': 'nUSD'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0xb6c473756050de474286bed418b77aeac39b02af', 'percentage': 1.4967, 'netAssetValue': 26713.676041, 'updateDate': '2022-12-02T09:35:04.336119'}, {'id': {'strategyName': 'USD+', 'tokenName': 'TUSD'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x2e1ad108ff1d8c782fcbbb89aad783ac49586756', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.336857'}, {'id': {'strategyName': 'USD+', 'tokenName': 'USDC (delta-neutral)'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x2791bca1f2de4661ed88a30c99a7a9449aa84174', 'percentage': 29.7005, 'netAssetValue': 530108.236685, 'updateDate': '2022-12-02T09:35:04.33764'}, {'id': {'strategyName': 'USD+', 'tokenName': 'WBTC'}, 'strategyAddress': '0x236eeC6359fb44CCe8f97E99387aa7F8cd5cdE1f', 'tokenAddress': '0x1BFD67037B42Cf73acF2047067bd4F2C47D9BfD6', 'percentage': 0.0, 'netAssetValue': 0.0, 'updateDate': '2022-12-02T09:35:04.33841'}]
{'transactionHash': '0xca14638182f43ddeb6acdde5b2e265c651992338bb547a6817aa379041f6cf45', 'payableDate': '2022-12-02T05:30:51', 'dailyProfit': 0.000158, 'annualizedYield': 6.3584470185, 'totalUsdPlus': 1801092.953976, 'totalUsdc': 1801092.953976, 'duration': 22.463611111}
{'transactionHash': '0x4210f6151e2d47a39a524d7b45bba5e41887b413ad00156e21cd90b51acc5248', 'payableDate': '2022-12-01T07:03:02', 'dailyProfit': 0.00035, 'annualizedYield': 13.6338182201, 'totalUsdPlus': 1796862.569403, 'totalUsdc': 1796862.569403, 'duration': 23.98}
{'transactionHash': '0xc4747ff27990da0d7de6152b961711cdbe655eab3c7fb349f08c44a73b91c083', 'payableDate': '2022-11-30T07:04:14', 'dailyProfit': 0.000271, 'annualizedYield': 11.1753411977, 'totalUsdPlus': 1796907.032724, 'totalUsdc': 1796907.032724, 'duration': 22.425833333}
{'transactionHash': '0xf996e7db3729b1d857638fc0830e66b2ce8d1d58f2a29563b02f3a56cbf4fef7', 'payableDate': '2022-11-29T08:38:41', 'dailyProfit': 0.000238, 'annualizedYield': 8.4902799174, 'totalUsdPlus': 1815534.162905, 'totalUsdc': 1815534.162905, 'duration': 25.630555555}
. . . . .
. . . . . 
. . . . . 

'''

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usdplus-0.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

usdplus-0.0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file usdplus-0.0.1.tar.gz.

File metadata

  • Download URL: usdplus-0.0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for usdplus-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0cfbfcfce80462db559789f1e428ad7824f9b0b04e50f9127eba0b4dc8cdd71c
MD5 9e73a1d52db7a34b15e377f656f3e033
BLAKE2b-256 c7694543bc9c9cee7c152804d26e8aa6426e09203663b916038013543c6992b6

See more details on using hashes here.

File details

Details for the file usdplus-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: usdplus-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for usdplus-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 611e86f9cd0e8b70f80a04f6c766009d7e0467bd7270f7c7757f3efcff16cb9e
MD5 a575c012b0c14080956b0964e820b3f1
BLAKE2b-256 066c1f8ab19f24c2ab59cf2c9d95061035dc593bd5af86b75885bf7c7c76f1d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page