Offer and request calculations for Ethereum Subscriptions
When creating a graph to monitor the order information, they are crucial as the offer prices are calculated (offer) and ask (ask). In this article, we will break down the offer process and ask Ethereum using the Cryptsy application.
Which offers and asking for prices?
The offer price (BID) represents the highest price that the buyer is willing to pay for the activity at any time.
Ask (ask) the price represents the lowest price that the seller is willing to accept the activity at any time.
How are the offer and the question?
In Ethereum, bid and questionnaires are calculated on the basis of real -time market information. The process includes:
- Search for market information : Api Cryptsy recovers market information from the Ethereum Exchange servers.
- Price calculation : API uses algorithms to calculate the offer and demand for prices based on market information. These calculations generally include:
* Average Royal Area (ATR)
* Mobile averages
* Relative resistance index (RSI)
3
- Price storage : the calculated offer and the prices of the applications are archived in a database or data structure such as a table or a hash map.
Implementation of the API Cryptsy
To make the offer and ask for a calculation of the graph, you have:
- Sign up for a cryptic account and get the access ID.
2
`http
Curl -x Get \
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
-H ‘Authorization: Barerer Your_access_Token’ \
-D ‘id = 1’
`
Answer:
Json
{
“Offer”: [
{“TimesTAMP”: 1643723400, “Price”: 2,5435},
{“TimesTAMP”: 1643719400, “Price”: 2,5428}
],],
“Ask”: [
{“TimesTAMP”: 1643723400, “Price”: 2,5447},
{“TimesTAMP”: 1643719400, “Price”: 2,5433}
–
}
`
Implementation of the graph
To view the offer and ask for a graph for prices, you can use a data structure such as a table or a hash map to save calculated prices. Here is an example with Python:
Python
Door json
Etherumummarket class:
Def __init __ (yourself):
Self.bids = []
Self.asks = []
Def Get_bids (Self):
Offer.
PRINT (F “TimesTAMP: {Offer [‘TimesTamp’]}, price: {Offer [‘Price’]}”)
Def Get_asks (self):
Ask self.asks:
PRINT (F “TimesTamp: {Ask [‘TimesTamp’]}, price: {Ask [‘Price’]}”)
Example of use
Market = Etherummarket ()
Market.get_bids ()
Even if true:
Response = input (“write” get offers “to collect existing prices or” exit “to stop:”)
If the answer == “exit”:
break
other:
Market.get_asks ()
`
This code is required for the current offer and asks for prices from the terminalsGet /Market /Bidand Get /Market /Ask
. This implementation can be used as a starting point for the graph.
Tips and variants
- To improve performance, take into consideration the use of a database, such as Redis or Mongodb, to store calculated prices.
- Take the filtering of additional features such as pairs of ownership or TimesTamps by increasing the functionality of the graphic designer.
- When you request an offer and ask for subscriptions to external applications, follow the best safety practices and interest rates to avoid bees rates.
By following these steps and understanding how the offers and questionnaires are calculated using the Cryptsy in Ethereum application, it is possible to create an effective graph that effectively views orders information in the cryptocurrency market.