Skip to content

implementation of a universal interface providing seamless access to trade on cryptocurrency exchanges

License

Notifications You must be signed in to change notification settings

grinply/cryptoapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Universal crypto API

Universal API interface in Golang that aims to abstract the connection with the biggest cryptocurrency exchanges by Volume. The API supports both spot and derivative markets.

Trading Pairs in Cryptocurrency

Understanding how trading pairs work is important for effect use of the universal crypto api, but also trading in general. In cryptocurrency, “trading pairs” or “cryptocurrency pairs” are assets that can be traded for each other on an exchange — for example Bitcoin/Litecoin (BTC/LTC) and Ethereum/Bitcoin Cash (ETH/BCH). Trading pairs lets you compare costs between different cryptocurrencies.

Operating in an trading pair

Currency pairs compare the value of one currency to another—the base currency (or the first one) versus the second or the quote currency. It indicates how much of the quote currency is needed to purchase one unit of the base currency.

For example if we are trading the ETH/BTC pair and see the following chart:

ETH/BTC price chart

The latest price denoted in the chart is 0.060943, what does this mean ? this can be translate as 0.060943 BTC (quote currency) can BUY 1 ETH (base currency), in all operations you either buy or sell the base currency (ETH in this case), the quote currency (BTC in the example) is only used to price the operations.

A example of some operations can be:

  • Initial balance: 1 BTC and 2 ETH
  • BUY 2.0 ETH for 0.121886 BTC ( price of 0.060943)
  • updated balance: 4 ETH and 0.878114 BTC
  • SELL 0.5 ETH for 0.035 BTC ( price of 0.07000)
  • updated balance: 4 ETH and 0.878114 BTC
  • BUY 0.5 ETH for 0.31 BTC ( price of 0.06)
  • final balance: 4 ETH and 0.878114 BTC

About

implementation of a universal interface providing seamless access to trade on cryptocurrency exchanges

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages