PaySwap
English
English
  • PaySwap Intro
    • Get Started
      • Create a Wallet
      • Get Tokens
      • Using PaySwap without Centralized Exchanges
      • Connect Your Wallet to PaySwap
      • Sell/Buy Native Tokens
    • Click Here for Help
      • Troubleshooting Errors
      • What is an Approval Transaction?
      • Fixing Stuck Pending Transactions on MetaMask
  • 🐲Leviathans
    • 👚Apparel, Beauty & Cosmetics Leviathan
    • 🚰Beverage Leviathan
    • 🎥Culture & Entertainment Leviathan
    • 🔌Energy Leviathan
    • 🥕Food Leviathan
    • 😷Healthcare Leviathan
    • 🪖Law & Order Leviathan
    • 🪓Mining Leviathan
    • 😈NSFW Leviathan
    • 🏠Real Estate Leviathan
    • 💻Software, Telco & Other Leviathan
    • 🚌Transportation Leviathan
    • 🏦The Money Bank
    • NWO
  • Products
    • 🌉ARPs
      • Manual ARPs
        • Setting Up Your Company's Payroll
        • Setting Up A Tontine
        • Selling Shares In An Asset
      • Percentage Based ARPs
        • Roommates Paying Bills Together
      • Automatic ARPs
      • Minting & Claiming Notes
    • 🟪Auditors
      • Natural Resource Audits
      • SSID Audits
      • Tokenizing Real Estate
      • Tokenizing Personal Posessions
      • Nature Tokens
      • Bounty Hunters
    • 🔮Betting Contracts
      • Bets without alphabet-encoding
      • Bets with alphabet-encoding
      • Partner Betting Events
    • 💧Bills
      • Taxes
      • Bookkeeping
      • Bank Accounts
      • Selling Shares In An Asset
    • 🖼️CanCan
      • Products/Services
        • Listing Products/Services
        • Buying Products/Services
          • Buying With Your Wallet
          • Buying Through The Stake Market
          • Selling Through The Stake Market
          • Buying Through Valuepools/DAOs
      • Articles
        • Listing Articles
        • Tipping Writers
      • Paywalls
        • Listing Paywalls
        • Adding Items To Paywalls
        • Removing Items From Paywalls
        • Partnering With Paywalls
        • Buying Paywall Subscriptions
        • Activating Paywall Subscriptions
      • NFTickets
      • Discounts & Cashbacks
        • Discounts
        • Cashbacks
        • Manual Rewards
      • List Partner Valuepools
      • Announcements
      • Reviews
      • Dynamic Pricing
      • Partnerships
      • Memberships
      • Identity Requirements
      • Sponsorships
      • Auctions & Bids
      • Drops
      • Votes
    • 🧑‍⚖️dRamps
      • Adding A Token Market
      • Deploying & Adding An Extra Token
      • Activating A Token Market
      • Update Prices On A Token Market
      • Automatic Ramps
        • Minting tFIAT Tokens
        • Burning tFIAT Tokens
      • Manual Ramps
        • Minting tFIAT Tokens
        • Burning tFIAT Tokens
      • Sponsor Ramp
      • Sell/Buy Native Tokens
      • Ramps Valuepool
      • Partnerships
      • Bootstrapping
      • Selling Token Markets
      • Use Cases
        • Paying For Tuition
        • Paying For Products/Services
        • Remittances
        • Forex
        • Blockchain Bridge
        • Store of Value
    • 🖼️eCollectibles
      • The Default Minter
      • Custom Minters
      • Listing Pre-Minted NFTs
    • 🔄Exchange
      • Token Swaps
      • How to Trade
      • Fees and Routes
      • Liquidity Pools
      • How to Add/Remove Liquidity
      • FAQ
    • 🧈Future Collaterals
    • 🎮Games
      • Game Objects
      • Game Scholarships
    • 🎟️Lottery
      • How to Play Lottery
      • Lottery FAQ
      • Marketplace Lottery
      • FT Lottery
      • NFT Lottery
    • 💳PayCards
      • MarketPlace Purchases
    • 🐞Profile
      • Building Your Social Graph
      • Transferring Money
      • Credit Reports
      • Security & Others
    • 💹Revenue Sharing
      • Accelerator
      • Businesses
      • Contributors
      • Referrals
    • 🍯Sponsors
    • 🍏SSI
      • Creating Data
      • Creating An SSID
      • Creating A Unique Profile
    • 📈StakeMarket
      • Buying A Listed Product
      • Call For Tenders
      • Collateralized Loans
      • Stake Applications
      • Litigations
    • 🖥️TrustBounties
      • FT Bounties
      • NFT Bounties
      • Approvals
    • 🌐ValuePools/DAOs
      • Minting An NFT Token
      • Sponsoring A Valuepool
      • Shopping With A Valuepool
      • Lending & Investing With A Valuepool
      • Creating A Proposal
    • 👾Wills
      • Setting Up Your Will
      • Using Wills For Storage
    • 🛍️Worlds
      • Red Pill Worlds
      • Blue Pill Worlds
      • Green Worlds
  • Use Cases
    • CanCan
      • Item MarketPlace: Amazon
      • Item MarketPlace: Rentals
      • Talent MarketPlace
      • AirBnB
      • Ride Hailing
      • Delivery App
      • Rent The Runway
      • Subscription App
      • Dating App
      • Friend.tech
      • TeleHealth
      • Product Remixes
    • Valuepools
      • BNPL App
      • Group Investment App
      • Insurance App
      • Marketing App
      • Savings App
    • ARPs
      • Budgetting
      • Group Vacation Planning
      • Proxy Investment
      • Spend Management
      • Loan Management
      • Rent Management
      • Tipping
      • Play & Earn Loan Management
    • Bills
      • Flexible Loan Management
      • Bill Payment
      • Taxes
      • Proxy Investment
    • Auditors
      • Address Verification
      • Identity Verification
      • Luxury Item Authentication
      • Awards & Trophees
      • Credit Wothiness
    • Games
      • Play To Earn For Your Game
      • Play To Earn For Tripe A Game
      • Betting
    • Betting
      • Stock Market
      • Sports
      • General
      • Companies
      • Swaps
    • Lottery
      • Data Collection
      • Sale Incentive
    • SSI
      • Supply Chain
      • Medical Records
      • Zero Knowledge Proofs
      • Background Checks
      • Single Sign-On
    • StakeMarket
      • Pre Sales
      • Construction Contract
      • Collateralized Employment Contract
    • TrustBounty
      • Volatility Hedge
  • Governance & Tokenomics
  • Culture & Vision
  • RoadMap
  • Developers
    • Smart Contracts (EVM)
      • PaySwap Exchange
        • v3 contracts
          • PancakeV3Factory
          • SmartRouterV3
            • V3SwapRouter
            • V2SwapRouter
            • StableSwapRouter
          • NonfungiblePositionManager
          • PancakeV3Pool
      • MasterChef
        • MasterChef V3
      • dRamps
        • dRamp Contract
      • Lottery
        • Lottery Contract
  • Team
  • Contact Us
    • Customer Support
    • Social Accounts & Communities
Powered by GitBook
On this page
  • Deploying An Extra Token
  • Adding An Extra Token
  • Finding An API
  • Adding Relevant Tags

Was this helpful?

  1. Products
  2. dRamps

Deploying & Adding An Extra Token

PreviousAdding A Token MarketNextActivating A Token Market

Last updated 1 year ago

Was this helpful?

Extra tokens are tokens that have not necessarily been added by PaySwap itself, they can be tokens representing stocks, index funds, commodities, native coins of various blockchains, etc.

Suppose you want to set-up a ramp in order to help users from around the world purchase Tesla stocks, you can deploy a Tesla token as an extra token, and add it to your ramp so users can mint/burn Tesla tokens.

In this scenario, each time a user mints Tesla tokens, the equivalent amount in USD of the number of Tesla tokens is transferred to your Stripe account (in case of automatic ramps) in order for you to be able to purchase the actual Tesla stocks from the stock market.

This model can be used to enable anyone around the world to have access to any stocks, index funds, etc.

You can replace Tesla in the example above with commodities like Gold, Silver, Bitcoin, etc.

Deploying An Extra Token

To deploy an extra token, go to your ramp's control panel menu, click on the the Deploy Extra Token button

Fill in the form with the name of the token, its ticker name as well as a stringified version of the call object for a call to an API that will return the price of the token in USD.

Let's take the example of an API call that goes like this:

const options = {
    method: 'GET',
    url: 'https://alpha-vantage.p.rapidapi.com/query',
    params: {
      function: 'TIME_SERIES_DAILY',
      symbol: 'TSLA',
      outputsize: 'compact',
      datatype: 'csv'
    },
    headers: {
      'X-RapidAPI-Key': <your_private_key>,
      'X-RapidAPI-Host': 'alpha-vantage.p.rapidapi.com'
    }
  }
const response = await axios.request(options)
  

To get the stringified version of our options object, we will open the console panel of our browser, copy the options object into it, and call the JSON.stringify function on our options' object like in the image below

Once you have the stringified version of the options' object, you can copy it into the call object field in the form to deploy the token and validate the transaction.

Make sure your API returns either one value that is the price of the token in USD, or a series of values in CSV format of which the first valid number is the price of the token in USD.

You can change your options object anytime by selecting the Update Extra Token Call option from the control panel of your ramp and inputting your new options object in stringified format.

Once your token has been deployed, you should be able to see its address listed in the parameters' section of your ramp like in the image below under the Extra Tokens field. If you don't reload the page.

Copy the address by clicking on the icon right next to it and go back to your ramp's control panel.

Select the Add Extra Token button, paste the previously copied address in the Extra Token Address field, and validate the transaction.

.

The next step is to add this newly deployed token to your ramp as a token market.

Adding An Extra Token

To add your newly created token as a token market so users can mint/burn it, go to your ramp's control panel menu, click on the Add Token Market button, and validate the form.

You should be able to see your token added in the bottom left section of your ramp's panel like in the image below

To enable users to mint your new token, you also have to have the ramp fetch its price from your API.

To do so, select the token, then click on the Control Panel button, and from the menu, click on the Fetch Price From API button. Refresh until you get a real number and not a NaN

The platform uses your API to get the token's price in USD and then converts its USD price into that of the native coin of your ramp's blockchain. Since in this case, our ramp is deployed on the Fantom blockchain, it fetches the TSLA price in USD and then converts it to FTM.

Click on the Set Prices button and then on the Continue button. Validate the transaction.

You should be able to see the price updated in the parameters section of your ramp like in the image below

The last step is to create a bounty and attach it to your new token market so users can start minting and burning your TSLA tokens.

Make sure when they do, that you actually go and purchase the real TSLA stock otherwise, your bounty might get claimed.

Finding An API

You can find multiple APIs that return the real-time price of most assets by doing a simple Google search.

To query a stock for instance we use the call object below:

const options = {
  method: 'GET',
  url: 'https://alpha-vantage.p.rapidapi.com/query',
  params: {
    function: 'TIME_SERIES_DAILY',
    symbol: 'MSFT',
    outputsize: 'compact',
    datatype: 'csv'
  },
  headers: {
    'X-RapidAPI-Key': <your_private_key>,
    'X-RapidAPI-Host': 'alpha-vantage.p.rapidapi.com'
  }
};

This call will return the daily prices of the MSFT stock in CSV format (make sure you replace your_private_key with your private key which you can get by creating an account on the site).

Replacing the MSFT ticker with any other ticker like OZ (for Gold), TSLA, as well as any other stock supported by the API, will return the prices of that stock.

A call with the object above will return a CSV object with the format below

timestamp,open,high,low,close,volume 
2024-01-22,400.0200,400.6200,393.5900,396.5100,27016902 
2024-01-19,395.7600,398.6700,393.5000,398.6700,29331136 
2024-01-18,391.7200,393.9900,390.1200,393.8700,23392068

PaySwap parses for the first valid number in the returned CSV which in this case is the open price of the stock: 400.0200

If your API returns a different set of responses, just make sure the returned object is in CSV format and that the first valid number is the price of the asset.

Adding Relevant Tags

We recommend you add tags to your ramp relevant to its features such as the token markets you've added to it.

If you add the XOF tag to your ramp, for instance, users looking to either mint/burn tXOF/XOF tokens can find your ramp much faster by filtering for the XOF tag from the Product Tags drop-down menu at the top of the Ramps' page

To add a tag to your ramp, go to your ramp's control panel menu and select the Update Location option

Enter the tag and validate the operation. You can also add location tags by selecting the relevant countries and then the cities you operate in from the Country and City drop-downs.

The API given in the example above is the alpha-vantage API from . The site gives instructions on how to query for the prices of multiple stocks, cryptocurrencies, FIAT currencies, etc.

🧑‍⚖️
Rapid API