Base URL : api.alphadefi.fund/

Our API has 2 main call types 

     1. /historical

     2. /info

 

 

Historical ->

UST Market Cap

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $last: { $dateToString: { date: ‘$date’ } } },
            value: { $last: ‘$ust_circulating_supply’ },
        }

      –  /terra/ustmc/{params: to, from}

      – example ->

          https://api.alphadefi.fund/historical/terra/ustmc/?to=2022-02-16&from=2022-02-01

Coin Market Caps

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$last_updated’ } },
            date: { $last: { $dateToString: { date: ‘$last_updated’ } } },
            market_cap: { $last: ‘$quote’ },
            circulating_supply: { $last: ‘$circulating_supply’ },
            total_supply: { $last: ‘$total_supply’ },
            cmc_rank: { $last: ‘$cmc_rank’ },
        }
 

      – /coinmarketcaps/:symbol

      – example ->

          https://api.alphadefi.fund/historical/coinmarketcaps/BTC

Kujira Historical Liquidations

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$executed_at’ } },
            executed_at: { $last: { $dateToString: { date: ‘$executed_at’ } } },
            bid_fee: { $last: ‘$bid_fee },
            number_tokens_liquidated: { $last: ‘$number_tokens_liquidated’ },
            token: { $last: ‘$token’ },
            height: { $last: ‘$height’ },
            total_amount_paid_for_collateral: { $last: ‘$total_amount_paid_for_collateral’ },
            txhash: { $last: ‘$txhash’ },
            Discounted_Price_Per_Unit_Paid: { $last: ‘$Discounted_Price_Per_Unit_Paid’ },
        }
 

      – /kujira/liquidations/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/kujira/liquidations/?to=2022-02-16&from=2022-02-01

AlphaDefi Liquidation Profile

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$Date’ } },
            Date: { $last: { $dateToString: { date: ‘$Date’ } } },
            collateral_value: { $last: ‘$collateral_value },
            Loan_Value: { $last: ‘$Loan_Value’ },
            bigrisk: { $last: ‘$bigrisk’ },
            areatowatch: { $last: ‘$areatowatch },
            luna_price: { $last: ‘$luna_price’ },
            Luna_Liquidation_Price: { $last: ‘$Luna_Liquidation_Price’ },
            percent_of_loans: { $last: ‘$percent_of_loans’ },
            ltv: { $last: ‘$ltv’ },
        }
 

      – /kujira/profiles/{params: datetime}

      – example ->

         https://api.alphadefi.fund/historical/kujira/profiles/?datetime=2022-02-03T06:30:00

Mirror Long APRs

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            apr: { $avg: ‘$apr’ },
        }
 

      -/mirror/longaprs/:ticker{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/mirror/longaprs/mABNB/?to=2022-02-17&from=2021-01-01

Mirror Short APRs

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            apr: { $avg: ‘$apr’ },
        }
 

      -/mirror/shortaprs/:ticker/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/mirror/shortaprs/mABNB/?to=2022-02-17&from=2021-01-01

Mirror mAsset Spreads

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            apr: { $avg: ‘$apr’ },
        }
 

      -/mirror/spreads/:ticker/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/mirror/spreads/mABNB/?to=2022-02-17&from=2021-01-01

Master Pool Data by DEX

Available Tickers – > https://api.alphadefi.fund/info/dexpooldict

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$timestamp’ } },
            date: { $last: { $dateToString: { date: ‘$timestamp’ } } },
            liquidity: { $last: ‘$ustLiquidity’ },
            ustPoolVolume7d: { $last: ‘$ustPoolVolume7d’ },
            apr7d: { $last: ‘$apr7d’ },
            poolPrice: { $last: ‘$poolPrice’ },
        }
 

      -/pools/:dex/:ticker/{params: to, from}

      – example ->

        https://api.alphadefi.fund/historical/pools/Terraswap/mbtc-ust/?to=2022-02-18&from=2021-01-01

Anchor Information

Available Tickers – > https://api.alphadefi.fund/info/anchordict

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            value: { $avg: ‘$value’ },
        }
 

      -/anchor/:ticker/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/anchor/blunaCollateral?from=2021-01-24&to=2022-01-24

Nexus Vault Information

Available Tickers – > https://api.alphadefi.fund/info/nexusdict

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            value: { $avg: ‘$value’ },
        }
 

      -/nexus/:ticker/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/nexus/bLunaVaultApr?from=2021-01-24&to=2022-01-24

Terra Core Information

Available Tickers – > https://api.alphadefi.fund/info/dashboarddict

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            value: { $avg: ‘$value’ },
        }
 

      -/terradashboard/:ticker/{params: to, from}

      – example ->

         https://api.alphadefi.fund/historical/terradashboard/UST%20Market%20Cap%20($)/?from=2021-01-24&to=2022-01-24

 

Luna Staking Derivative APRs (data starts 3/8/22)

Available Tickers – >https://api.alphadefi.fund/info/liqstakingdictt

return {
            _id: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } },
            date: { $first: { $dateToString: { format: “%Y-%m-%d”, date: ‘$date’ } } },
            ticker: { $first: ‘$ticker’ },
            value: { $last: ‘$value’ },
        }
 

      -/liquidstaking/:ticker/{params: to, from, precision}

      – example ->

https://api.alphadefi.fund/historical/liquidstaking/Anchor_bLuna_APR/?to=2022-03-09&from=2022-03-08&precision=day

 

Info ->

 

Current AlphaDefi Liquidation Profile:

     https://api.alphadefi.fund/info/liqprofile (updates every minute)

Current Farmers Market APR Grid Data:

      https://api.alphadefi.fund/info/aprcompare (updates daily)