mirror of
https://git.wownero.com/wownero/wownero-funding-system.git
synced 2024-08-15 00:53:45 +00:00
wow-usd convert API route
This commit is contained in:
parent
2a0158e5f2
commit
68d6690c22
1 changed files with 11 additions and 1 deletions
|
@ -23,3 +23,13 @@ def api_proposals_get(status, cat, limit, offset):
|
||||||
return 'error', 500
|
return 'error', 500
|
||||||
|
|
||||||
return [p.json for p in proposals]
|
return [p.json for p in proposals]
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api/1/convert/wow-usd')
|
||||||
|
@endpoint.api(
|
||||||
|
parameter('wow', type=int, location='args', required=True)
|
||||||
|
)
|
||||||
|
def api_wow_usd(wow):
|
||||||
|
from wowfunding.bin.utils import Summary, wow_to_usd
|
||||||
|
prices = Summary.fetch_prices()
|
||||||
|
return jsonify(usd=wow_to_usd(wows=wow, btc_per_wow=prices['wow-btc'], usd_per_btc=prices['btc-usd']))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue