Ares Wikipedia

Ares Wikipedia

  • Docs
  • Contribute
  • Languages iconEnglish
    • 中文

›Learn

General

  • Overview
  • Supplementary
  • Glossary

WhitePaper

  • Introduction
  • Technical Architecture
  • Data market
  • Economic Model

Learn

    Stake Mining

    • Trojan Stake Mining
    • Iliad Stake Mining
    • Asset cross-chain bridge
  • Liquidity mining
  • Gladios

    • Account
    • Claim Test Coins
    • Transfer
    • Set Online Identity

    Oracle

    • Ares Oracle
    • Ares Oracle Provider Support
    • Oracle Finance
    • Staking Extend

    Slot Auction

    • Kusama
    • Dot
  • Get Price
  • Get Symbol Fraction

Build

    Basic

    • Obtain Price Through Cross-Chain

    Gladios Guide

    • Set Up the Verifier Node
    • Quotation node rpc tools

Node

  • Hardware environment
  • Run Node
  • Run Validator Node
  • Run Validator Node Q&A
  • Start the Oracle Service
  • Start The Warehouse Service
  • Warehouse Api

Mainnet

    Validator Tutorial

    • Account
    • Map ERC20/BEP20 ARES
    • How to bond stash & controller account
    • Validator node program upgrade/deployment
    • Set Session Keys
    • Validator node verification
    • Punishment verification & Extraction of assets

    Nominator Tutorial

    • Create Odyssey Account & Stake
    • Nominate for any one or more nodes
    • Check penalties & withdraw assets

Get Symbol Fraction

Get the list of supported symbol fraction on the chain

  • By getting the storage structure aresOracle.symbolFraction, we can get the specific symbol fraction supported in the chain, and later we can query by these symbol fraction.
/// Example

import {ApiPromise, Keyring, WsProvider} from "@polkadot/api";
import { cryptoWaitReady } from '@polkadot/util-crypto';
await cryptoWaitReady();

// import BigNumber from "bignumber.js";

let polkaAPI = null;
const url = "wss://gladios.aresprotocol.io";
async function initProvider(url) {
    const provider = new WsProvider(url);
    return await ApiPromise.create({provider});
}

async function init() {
    const keyring = new Keyring({ type: 'sr25519' });
    const dave = await keyring.createFromUri('//Dave');
    polkaAPI = await initProvider(url);
}

/**
 * Get supported symbol fraction
 */
async function getSymbolFraction(symbol) {
    if(polkaAPI) {
        console.log("Get symbol list:");
        const exposures = await polkaAPI.query.aresOracle.symbolFraction.entries();
        exposures.forEach(([key, exposure]) => {
            console.log(`Symbol = ${key.toHuman()[0]}`);
        })
    }
}

await init()
getSymbolFraction();

  • Call Result
Get symbol list:
Symbol = stx-usdt
Symbol = grt-usdt
Symbol = icx-usdt
Symbol = xtz-usdt
Symbol = snx-usdt
Symbol = ren-usdt
...
← Get PriceObtain Price Through Cross-Chain →
  • Get the list of supported symbol fraction on the chain
About Us

Ares is an on-chain-verified oracle platform that provides secure and reliable data services for the Polkadot DeFi ecosystem.

Email   info@aresprotocol.io
Quick links
WebsiteBlogTokenomicsBuy TokenFarms
Resources
DocumentationGithubBlockchain Explorer
Social Media
Copyright © 2023 The Ares Protocol All rights reserved