class Metapurse < ActiveRecord::Base belongs_to :user def icpswap_pool_data_raw icpswap_pool_data_raw = `dfx --identity anonymous canister --network=ic call ggzvv-5qaaa-aaaag-qck7a-cai getAllPools` end def icp_usd JSON.parse(`curl -s https://www.binance.com/api/v3/avgPrice?symbol=ICPUSDT`)["price"].to_f end end